index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
  1. <template>
  2. <div>
  3. <div class="data-display">
  4. <ul class="list">
  5. <li @click="detailPage">
  6. <p class="list-num">
  7. <i class='el-icon-s-order'></i>
  8. {{lederDelObjectCount?lederDelObjectCount:'0'}}
  9. </p>
  10. <p class="list-text">台账中待删除的对象</p>
  11. </li>
  12. <li @click="detailPage">
  13. <p class="list-num">
  14. <i class="el-icon-s-help"></i>
  15. {{notSyncObjectCount?notSyncObjectCount:'0'}}
  16. </p>
  17. <p class="list-text">不能同步到物理世界的对象</p>
  18. </li>
  19. <li @click="detailPage">
  20. <p class="list-num">
  21. <i class="el-icon-s-marketing"></i>
  22. {{notSyncDataCount?notSyncDataCount:'0'}}
  23. </p>
  24. <p class="list-text">不能同步到物理世界的关系数据</p>
  25. </li>
  26. <li @click="detailPage">
  27. <p class="list-num">
  28. <i class="el-icon-s-release"></i>
  29. {{postRelationInforCount?postRelationInforCount:'0'}}
  30. </p>
  31. <p class="list-text">岗位和关联的资产信息点值不一致</p>
  32. </li>
  33. </ul>
  34. </div>
  35. <div class="progress">
  36. <p class="basic-statistics">
  37. 基本统计
  38. <data-export style="float:right"></data-export>
  39. </p>
  40. <div class="data equipment" v-if="equipCount">
  41. <span class="contain-title">
  42. <span class="iconfont icon-juxing"></span>
  43. 设备<i>{{`(${equipCount?equipCount:"0"})`}}</i></span>
  44. <div class="data-show" v-loading="isLoading" v-if="equipment.length">
  45. <div class="show-content" v-for="(item,index) in equipment" :key="index">
  46. <data-origin :id="'equipment' + index" :renderData="item"></data-origin>
  47. </div>
  48. </div>
  49. <div class="data-show" v-loading="isLoading" v-if="deviceMessageTotal.length">
  50. <div class="device-content" v-for="(item,index) in deviceMessageTotal" :key="index">
  51. <data-origin :id="'origin-device' + index" :renderData="item" :filterClass="'yes'"></data-origin>
  52. </div>
  53. </div>
  54. <div class="data-show" v-loading="isLoading" v-if="deviceMessageData.length">
  55. <div class="device-content" v-for="(item,index) in deviceMessageData" :key="index">
  56. <data-origin :id="'origin-deviceTotal' + index" :renderData="item" :filterClass="'yes'"></data-origin>
  57. </div>
  58. </div>
  59. </div>
  60. <div class="data assets" v-if="assetsCount">
  61. <span class="contain-title">
  62. <span class="iconfont icon-juxing"></span>
  63. 资产<i>{{`(${assetsCount?assetsCount:"0"})`}}</i></span>
  64. <div class="data-show" v-loading="isLoading" v-if="assets.length">
  65. <div class="show-content" v-for="(item,index) in assets" :key="index">
  66. <data-origin :id="'assets' + index" :renderData="item"></data-origin>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="data parts" v-if="partsCount">
  71. <span class="contain-title">
  72. <span class="iconfont icon-juxing"></span>
  73. 部件<i>{{`(${partsCount?partsCount:'0'})`}}</i></span>
  74. </div>
  75. <div class="data business-space" v-if="zoneSpaceCount">
  76. <span class="contain-title">
  77. <span class="iconfont icon-juxing"></span>
  78. 业务空间<i>{{`(${zoneSpaceCount?zoneSpaceCount:'0'})`}}</i></span>
  79. <div class="data-show" v-if="business.length">
  80. <div v-for="(item,index) in business" :key="index" class="show-content">
  81. <datafan :id="'datafan' + index" :renderData="item"></datafan>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="data " v-if="systemCount">
  86. <span class="contain-title">
  87. <span class="iconfont icon-juxing"></span>
  88. 系统<i>{{`(${systemCount?systemCount:'0'})`}}</i></span>
  89. <div class="data-show" v-loading="isLoading" v-if="sysMessageData.length">
  90. <div class="device-content" v-for="(item,index) in sysMessageData" :key="index">
  91. <data-origin :id="'origin-sys' + index" :renderData="item" :filterClass="'yes'"></data-origin>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="data " v-if="rentantCount">
  96. <span class="contain-title">
  97. <span class="iconfont icon-juxing"></span>
  98. 租户<i>{{`(${rentantCount?rentantCount:'0'})`}}</i></span>
  99. <div class="data-show" v-loading="isLoading" v-if="tenant.length">
  100. <div class="show-content" v-for="(item,index) in tenant" :key="index">
  101. <data-origin :id="'origin-tenant' + index" :renderData="item"></data-origin>
  102. </div>
  103. </div>
  104. </div>
  105. <div class="data " v-if="shaftCount">
  106. <span class="contain-title">
  107. <span class="iconfont icon-juxing"></span>
  108. 竖井<i>{{`(${shaftCount?shaftCount:'0'})`}}</i></span>
  109. <div class="data-show" v-loading="isLoading" v-if="shaft.length">
  110. <div class="show-content" v-for="(item,index) in shaft" :key="index">
  111. <datafan :id="'origin-datafan' + index" :renderData="item" v-if="!item.needCountT"></datafan>
  112. <data-origin :id="'origin-shaft' + index" :renderData="item" v-else></data-origin>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </template>
  119. <script>
  120. import {mapGetters} from "vuex";
  121. import {
  122. countEquip,
  123. countGeneralSys,
  124. countProperty,
  125. gatherInfoPoint,
  126. getCenoteType,
  127. getDataDictionary,
  128. infoPoint,
  129. notSyncObject,
  130. notSyncRelationData,
  131. postRelationInforAtpism,
  132. queryCenoteCount,
  133. queryDefaultFunTypes,
  134. queryLederDelObject,
  135. queryPart,
  136. queryPartitionRatio,
  137. queryRentCount,
  138. queryShaftFunctionType,
  139. queryTenantCompletion,
  140. queryZoneCount,
  141. ShaftRelationBusinessSpace,
  142. systemInfoPoint
  143. } from "@/api/scan/request";
  144. import dataOrigin from "@/components/ledger/report/dataorigin";
  145. import datafan from "@/components/ledger/report/datafan";
  146. import dataExport from "@/components/ledger/report/dataexport";
  147. export default {
  148. data() {
  149. return {
  150. lederDelObjectCount: null,// 台账中待删除的对象
  151. notSyncObjectCount: null,// 不能同步到物理世界的对象
  152. notSyncDataCount: null,// 不能同步到物理世界的关系数据
  153. postRelationInforCount: null,// 岗位和关联的资产信息点值不一致
  154. equipCount: null,// 设备总数
  155. equipment: [],// 设备数据
  156. assetsCount: null,// 资产总数
  157. assets: [],// 资产数据
  158. parts: [],// 部件数据
  159. partsCount: null,// 部件总数
  160. zoneSpaceCount: null,// 业务空间总数
  161. zoneType: [// 分区类型
  162. {
  163. "Code": "GeneralZone",
  164. "Name": "默认分区",
  165. "Rel_type": "99"
  166. },
  167. {
  168. "Name": "供电分区",
  169. "Rel_type": "1",
  170. "Code": "PowerSupplyZone"
  171. },
  172. {
  173. "Name": "照明分区",
  174. "Rel_type": "2",
  175. "Code": "LightingZone"
  176. },
  177. {
  178. "Name": "网络分区",
  179. "Rel_type": "3",
  180. "Code": "NetworkZone"
  181. },
  182. {
  183. "Code": "AirConditioningZone",
  184. "Name": "空调分区",
  185. "Rel_type": "4"
  186. },
  187. {
  188. "Name": "采暖分区",
  189. "Rel_type": "5",
  190. "Code": "HeatingZone"
  191. },
  192. {
  193. "Name": "洁净分区",
  194. "Rel_type": "6",
  195. "Code": "CleanZone"
  196. },
  197. {
  198. "Name": "生活给水分区",
  199. "Rel_type": "7",
  200. "Code": "DomesticWaterSupplyZone"
  201. },
  202. {
  203. "Code": "FireZone",
  204. "Name": "防火分区",
  205. "Rel_type": "8"
  206. },
  207. {
  208. "Name": "安防分区",
  209. "Rel_type": "9",
  210. "Code": "SecurityZone"
  211. },
  212. {
  213. "Name": "租户分区",
  214. "Rel_type": "10",
  215. "Code": "TenantZone"
  216. },
  217. {
  218. "Name": '功能分区',
  219. 'Rel_type': '11',
  220. "Code": 'FunctionZone'
  221. }
  222. ],
  223. partProtion: [],// 业务空间-各分区占比数据
  224. defaultPart: [],// 业务空间-默认分区功能类型占比数据
  225. business: [],// 业务空间数据
  226. systemCount: null,// 系统总数
  227. system: [],// 系统数据
  228. rentantCount: null,// 租户总数
  229. tenant: [],// 租户数据
  230. shaftCount: null,// 竖井总数
  231. shaft: [],// 竖井数据
  232. ShaftFunType: null,// 竖井功能类型
  233. shaftPartProtion: null,// 竖井-按功能类型占比数据
  234. params: null,
  235. isLoading: false,
  236. deviceMessageData: [],//统计设备信息点与需采集数据占比
  237. deviceMessageTotal: [],//统计设备信息点与总数据占比
  238. sysMessageData: [],//统计系统信息点与需采集数据占比
  239. static: '标准静态',
  240. dynamic: '标准动态',
  241. custom: '自定义'
  242. }
  243. },
  244. components: {
  245. dataOrigin,
  246. datafan,
  247. dataExport,
  248. },
  249. mounted() {
  250. },
  251. created() {
  252. this.params = {
  253. ProjectId: this.projectId
  254. }
  255. this.getFunctionType();
  256. this.getStatisticsCount();
  257. this.getEquipCount();
  258. this.gatherInfoPoints();
  259. this.systemInfoPoints();
  260. this.infoPoints();
  261. this.getAssetsCount();
  262. this.getPartsCount();
  263. this.getSystemCount();
  264. this.getTenantCount();
  265. this.getShaftFunType();
  266. },
  267. computed: {
  268. ...mapGetters('layout', ['projectId'])
  269. },
  270. methods: {
  271. detailPage() {
  272. this.$message({
  273. message: '待开发',
  274. type: 'warning'
  275. });
  276. },
  277. zoneTypeConversion(item) {// 分区类型转换
  278. this.zoneType.forEach(it => {
  279. if (item.Name === it.Code) {
  280. item.Name = it.Name;
  281. }
  282. })
  283. },
  284. functionTypeTranstion(item, type) {// 默认分区功能类型转换
  285. type.forEach(it => {
  286. if (item.Name === it.Code) {
  287. item.Name = it.Name;
  288. this.defaultPart.push({
  289. name: item.Name + item.Count,
  290. value: item.Count
  291. });
  292. }
  293. if (it.Content) {
  294. this.functionTypeTranstion(item, it.Content)
  295. }
  296. })
  297. },
  298. getFunctionType() {// 获取默认分区功能类型
  299. let params = {
  300. ProjectId: this.projectId,
  301. type: "GeneralZone",
  302. data: {
  303. Filters: "InfoPointCode='RoomFuncType'",
  304. Projection: ["DataSource", "InfoPointCode"]
  305. }
  306. }
  307. getDataDictionary(params, res => {
  308. if (res.Content.length) {
  309. this.functionType = JSON.parse(res.Content[0].DataSource)
  310. }
  311. this.getZoneSpaceCount();
  312. })
  313. },
  314. toPercent(point) {// 小数转换成百分比
  315. return (isNaN(point) || Number(point) === 0) ? '0%' : Number(point * 100).toFixed(2) + '%'
  316. },
  317. getShaftFunType() {// 获取数据功能类型
  318. getCenoteType(this.param, res => {
  319. this.ShaftFunType = res.Content;
  320. this.getShaftCount();
  321. })
  322. },
  323. shaftFunTypeTranstion(item) {// 竖井功能类型转换
  324. this.ShaftFunType.forEach((it, index) => {
  325. if (item.Name === it.Id) {
  326. item.Name = it.Name;
  327. }
  328. })
  329. },
  330. getStatisticsCount() {// 获取顶部统计数据
  331. let params = {
  332. ProjectId: this.projectId,
  333. Filters: "taskState = -1"
  334. }
  335. // 台账中待删除的对象
  336. queryLederDelObject(params, res => {
  337. this.lederDelObjectCount = res.Count;
  338. })
  339. // 不能同步到物理世界的对象
  340. notSyncObject(this.params, res => {
  341. this.notSyncObjectCount = res.Count;
  342. })
  343. // 不能同步到物理世界的关系数据
  344. notSyncRelationData(this.params, res => {
  345. this.notSyncDataCount = res.Count;
  346. })
  347. // 岗位和关联的资产信息点值不一致
  348. postRelationInforAtpism(this.params, res => {
  349. this.postRelationInforCount = res.Count;
  350. })
  351. },
  352. // 统计设备信息点与需采集数据占比
  353. gatherInfoPoints() {
  354. gatherInfoPoint(this.params, res => {
  355. let arr = JSON.parse(JSON.stringify(res.Content))
  356. arr.forEach(i => {
  357. this.$set(this.deviceMessageData, 0, {
  358. title: '统计设备信息点与需采集数据占比',
  359. tips: '统计设备信息点与需采集数据占比',
  360. contentValueO: '总数:',
  361. contentValueT: '标准静态:',
  362. needCountO: i.GatherInfoPointCounts,
  363. needCountT: i.GatherStaticInfoPointCounts,
  364. text: this.toPercent(i.GatherStaticInfoPointCounts / i.GatherInfoPointCounts),
  365. val: this.static
  366. })
  367. this.$set(this.deviceMessageData, 1, {
  368. contentValueO: '总数:',
  369. contentValueT: '标准动态:',
  370. needCountO: i.GatherInfoPointCounts,
  371. needCountT: i.GatherDynamicInfoPointCounts,
  372. text: this.toPercent(i.GatherDynamicInfoPointCounts / i.GatherInfoPointCounts),
  373. val: this.dynamic
  374. })
  375. this.$set(this.deviceMessageData, 2, {
  376. contentValueO: '总数:',
  377. contentValueT: '自定义:',
  378. needCountO: i.GatherInfoPointCounts,
  379. needCountT: i.GatherCustomInfoPointCounts,
  380. text: this.toPercent(i.GatherCustomInfoPointCounts / i.GatherInfoPointCounts),
  381. val: this.custom
  382. })
  383. })
  384. })
  385. },
  386. // 统计系统信息点与需采集数据占比
  387. systemInfoPoints() {
  388. systemInfoPoint(this.params, res => {
  389. let arr = JSON.parse(JSON.stringify(res.Content))
  390. arr.forEach(i => {
  391. this.$set(this.sysMessageData, 0, {
  392. title: '统计系统信息点与需采集数据占比',
  393. tips: '统计系统信息点与需采集数据占比',
  394. contentValueO: '总数:',
  395. contentValueT: '标准静态:',
  396. needCountO: i.GatherInfoPointCounts,
  397. needCountT: i.GatherStaticInfoPointCounts,
  398. text: this.toPercent(i.GatherStaticInfoPointCounts / i.GatherInfoPointCounts),
  399. val: this.static
  400. })
  401. this.$set(this.sysMessageData, 1, {
  402. contentValueO: '总数:',
  403. contentValueT: '标准动态:',
  404. needCountO: i.GatherInfoPointCounts,
  405. needCountT: i.GatherDynamicInfoPointCounts,
  406. text: this.toPercent(i.GatherDynamicInfoPointCounts / i.GatherInfoPointCounts),
  407. val: this.dynamic
  408. })
  409. this.$set(this.sysMessageData, 2, {
  410. contentValueO: '总数:',
  411. contentValueT: '自定义:',
  412. needCountO: i.GatherInfoPointCounts,
  413. needCountT: i.GatherCustomInfoPointCounts,
  414. text: this.toPercent(i.GatherCustomInfoPointCounts / i.GatherInfoPointCounts),
  415. val: this.custom
  416. })
  417. })
  418. })
  419. },
  420. //统计设备信息点与总数据占比
  421. infoPoints() {
  422. infoPoint(this.params, res => {
  423. let arr = JSON.parse(JSON.stringify(res.Content))
  424. arr.forEach(i => {
  425. this.$set(this.deviceMessageTotal, 0, {
  426. title: '统计设备信息点与总数据占比',
  427. tips: '统计设备信息点与总数据占比',
  428. contentValueO: '总数:',
  429. contentValueT: '标准静态:',
  430. needCountO: i.StaticInfoPointCounts,
  431. needCountT: i.StaticInfoPoint,
  432. text: this.toPercent(i.StaticInfoPoint / i.StaticInfoPointCounts),
  433. val: this.static
  434. })
  435. this.$set(this.deviceMessageTotal, 1, {
  436. contentValueO: '总数:',
  437. contentValueT: '标准动态:',
  438. needCountO: i.DynamicInfoPointCounts,
  439. needCountT: i.DynamicInfoPoint,
  440. text: this.toPercent(i.DynamicInfoPoint / i.DynamicInfoPointCounts),
  441. val: this.dynamic
  442. })
  443. let obj = i.CustomInfoPointCounts ? {} : ''
  444. if (obj) {
  445. obj = {
  446. contentValueO: '总数:',
  447. contentValueT: '自定义:',
  448. needCountO: i.CustomInfoPointCounts,
  449. needCountT: i.CustomInfoPoint,
  450. text: this.toPercent(i.CustomInfoPoint / i.CustomInfoPointCounts),
  451. val: this.custom
  452. }
  453. }
  454. this.$set(this.deviceMessageTotal, 2, {
  455. ...obj
  456. })
  457. })
  458. })
  459. },
  460. getEquipCount() {// 获取设备总数
  461. countEquip(this.params, res => {
  462. this.equipCount = res.Count;
  463. this.getEquipOtherCount();
  464. })
  465. },
  466. getEquipOtherCount() {// 获取设备数据
  467. // 未关联资产
  468. let param = {
  469. ProjectId: this.projectId,
  470. Filters: "PropertyId isNull"
  471. }
  472. let promise1 = new Promise(resolve => {
  473. countEquip(param, res => {
  474. resolve(res);
  475. })
  476. })
  477. // 现场验证状态占比
  478. let par = {
  479. ProjectId: this.projectId,
  480. Filters: "taskState = 0 or taskState = 1"
  481. }
  482. let promise2 = new Promise(resolve => {
  483. countEquip(par, res => {
  484. resolve(res);
  485. })
  486. })
  487. let pa = {
  488. ProjectId: this.projectId,
  489. Filters: "not BimID isNull"
  490. }
  491. let promise3 = new Promise(resolve => {
  492. countEquip(pa, res => {
  493. resolve(res);
  494. })
  495. })
  496. Promise.all([promise1, promise2, promise3]).then(response => {
  497. this.equipment = [];
  498. let res = response[0];
  499. let res1 = response[1];
  500. let res2 = response[2];
  501. this.equipment.push({
  502. title: '未关联设备',
  503. tips: '设备未关联资产数量',
  504. contentValueO: '已关联:',
  505. contentValueT: '未关联:',
  506. needCountO: this.equipCount - res.Count,
  507. needCountT: res.Count,
  508. text: `${res.Count}`
  509. })
  510. let text = this.toPercent(res1.Count / this.equipCount)
  511. this.equipment.push({
  512. title: '现场验证状态占比',
  513. tips: '设备状态为未找到、已找到的数量与设备总数占比',
  514. contentValueO: '已验证:',
  515. contentValueT: '未验证:',
  516. needCountO: res1.Count,
  517. needCountT: this.equipCount - res1.Count,
  518. text: text
  519. })
  520. let text1 = this.toPercent(res2.Count / this.equipCount)
  521. this.equipment.push({
  522. title: '与模型对应占比',
  523. tips: '"BIM模型中编码"有值的设备数量与设备总数占比',
  524. contentValueO: '已对应:',
  525. contentValueT: '未对应:',
  526. needCountO: res2.Count,
  527. needCountT: this.equipCount - res2.Count,
  528. text: text1
  529. })
  530. this.isLoading = false;
  531. })
  532. },
  533. getAssetsCount() {// 获取资产数据
  534. countProperty(this.params, res => {
  535. // 获取资产总数
  536. this.assetsCount = res.Count;
  537. })
  538. // 未关联资产
  539. let param = {
  540. ProjectId: this.projectId,
  541. Filters: " EquipmentId isnull"
  542. }
  543. let promise1 = new Promise((resolve) => {
  544. countProperty(param, res => {
  545. resolve(res)
  546. })
  547. })
  548. // 现场验证状态占比
  549. let par = {
  550. ProjectId: this.projectId,
  551. Filters: " taskState = 0 or taskState = 1"
  552. }
  553. let promise2 = new Promise((resolve) => {
  554. countProperty(par, res => {
  555. resolve(res);
  556. })
  557. })
  558. // 有无坐标占比
  559. let pa = {
  560. ProjectId: this.projectId,
  561. Filters: " not BIMLocation isnull"
  562. }
  563. let promise3 = new Promise((resolve) => {
  564. countProperty(pa, res => {
  565. resolve(res);
  566. })
  567. })
  568. Promise.all([promise1, promise2, promise3]).then(response => {
  569. this.assets = [];
  570. let res0 = response[0];
  571. let res1 = response[1];
  572. let res2 = response[2];
  573. this.assets.push({
  574. title: '未关联资产',
  575. tips: '资产未关联设备数量',
  576. contentValueO: '已关联:',
  577. contentValueT: '未关联:',
  578. text: `${res0.Count}`,
  579. needCountO: this.assetsCount - res0.Count,
  580. needCountT: res0.Count
  581. })
  582. let text = res1.Count / this.assetsCount;
  583. text = this.toPercent(text);
  584. this.assets.push({
  585. title: '现场验证状态占比',
  586. tips: '资产状态为未找到、已找到的数量与资产总数占比',
  587. contentValueO: '已验证:',
  588. contentValueT: '未验证:',
  589. text: text,
  590. needCountO: res1.Count,
  591. needCountT: this.assetsCount - res1.Count
  592. })
  593. let text1 = res2.Count / this.assetsCount;
  594. text1 = this.toPercent(text1);
  595. this.assets.push({
  596. title: '有无坐标占比',
  597. tips: '有坐标的资产数量百分比',
  598. contentValueO: '有坐标:',
  599. contentValueT: '无坐标:',
  600. text: text1,
  601. needCountO: res2.Count,
  602. needCountT: this.assetsCount - res2.Count
  603. })
  604. })
  605. },
  606. getPartsCount() {// 获取部件数据
  607. queryPart(this.params, res => {
  608. this.partsCount = res.Count;
  609. })
  610. },
  611. getZoneSpaceCount() {// 获取业务空间数据
  612. // 获取业务空间总数
  613. queryZoneCount(this.params, res => {
  614. this.zoneSpaceCount = res.Count;
  615. })
  616. let promise1 = new Promise((resolve) => {
  617. queryPartitionRatio(this.params, res => {
  618. resolve(res)
  619. })
  620. })
  621. let promise2 = new Promise((resolve) => {
  622. queryDefaultFunTypes(this.params, res => {
  623. resolve(res)
  624. })
  625. })
  626. Promise.all([promise1, promise2]).then(response => {
  627. this.business = [];
  628. this.partProtion = [];
  629. this.defaultPart = [];
  630. let res1 = response[0]
  631. let res2 = response[1]
  632. if (res1.Content.length) {
  633. res1.Content.forEach(item => {
  634. this.zoneTypeConversion(item);
  635. })
  636. let arr = res1.Content.filter(i => i.Count).forEach(j => {
  637. this.partProtion.push({
  638. name: j.Name + j.Count,
  639. value: j.Count
  640. })
  641. })
  642. this.business.push({
  643. title: '各分区占比',
  644. tips: '各类型分区实例数量与实例总数占比',
  645. needCountO: this.partProtion,
  646. })
  647. }
  648. if (res2.Content.length) {
  649. res2.Content.forEach(item => {
  650. this.functionTypeTranstion(item, this.functionType);
  651. })
  652. this.business.push({
  653. title: '默认分区功能类型占比',
  654. tips: '默认分区实例的功能区类型占比',
  655. needCountO: this.defaultPart,
  656. })
  657. }
  658. })
  659. },
  660. getSystemCount() {// 获取系统数据
  661. countGeneralSys(this.params, res => {
  662. this.systemCount = res.Count;
  663. })
  664. },
  665. getTenantCount() {// 获取租户数据
  666. // 获取租户总数
  667. queryRentCount(this.params, res => {
  668. this.rentantCount = res.Count;
  669. })
  670. // 租户-关联业务空间完成度
  671. let promise = new Promise((resolve) => {
  672. queryTenantCompletion(this.params, res => {
  673. resolve(res);
  674. })
  675. })
  676. Promise.all([promise]).then(response => {
  677. this.tenant = [];
  678. let res = response[0];
  679. this.tenant = [];
  680. let text = res.Count / this.rentantCount;
  681. text = this.toPercent(text);
  682. this.tenant.push({
  683. title: '关联业务空间完成度',
  684. tips: '已关联业务空间的租户数量百分比',
  685. contentValueO: '已关联:',
  686. contentValueT: '未关联:',
  687. needCountO: res.Count,
  688. needCountT: this.rentantCount - res.Count,
  689. text: text
  690. })
  691. })
  692. },
  693. getShaftCount() {// 获取竖井数据
  694. this.shaft = [];
  695. // 获取竖井总数
  696. queryCenoteCount(this.params, res => {
  697. this.shaftCount = res.Count;
  698. })
  699. let promise1 = new Promise((resolve) => {
  700. queryShaftFunctionType(this.params, res => {
  701. resolve(res);
  702. })
  703. })
  704. let promise2 = new Promise((resolve) => {
  705. ShaftRelationBusinessSpace(this.params, res => {
  706. resolve(res);
  707. })
  708. })
  709. Promise.all([promise1, promise2]).then(response => {
  710. this.shaft = [];
  711. let res = response[0];
  712. let res1 = response[1];
  713. this.shaftPartProtion = [];
  714. if (res.Content.length) {
  715. res.Content.forEach(item => {
  716. this.shaftFunTypeTranstion(item);
  717. this.shaftPartProtion.push({
  718. name: item.Name + item.Count,
  719. value: item.Count
  720. })
  721. })
  722. this.shaft.push({
  723. title: '按功能类型占比',
  724. tips: '竖井实例的竖井功能占比',
  725. needCountO: this.shaftPartProtion,
  726. })
  727. }
  728. let text = this.toPercent(res1.Count / this.shaftCount);
  729. this.shaft.push({
  730. title: '关联业务空间完成度',
  731. tips: '已关联业务空间的竖井数量百分比',
  732. contentValueO: '已关联:',
  733. contentValueT: '未关联:',
  734. needCountO: res1.Count,
  735. needCountT: this.shaftCount - res1.Count,
  736. text: text
  737. })
  738. })
  739. }
  740. },
  741. watch: {
  742. projectId(n, o) {
  743. this.params = {
  744. ProjectId: this.projectId
  745. }
  746. this.getFunctionType();
  747. this.getStatisticsCount();
  748. this.getEquipCount();
  749. this.getAssetsCount();
  750. this.getPartsCount();
  751. this.getSystemCount();
  752. this.getTenantCount();
  753. this.getShaftFunType();
  754. this.gatherInfoPoints();
  755. this.systemInfoPoints();
  756. this.infoPoints();
  757. }
  758. }
  759. }
  760. </script>
  761. <style lang="scss" scoped>
  762. .data-display {
  763. width: 100%;
  764. margin-bottom: 10px;
  765. ul {
  766. display: flex;
  767. li {
  768. flex: 1;
  769. background: white;
  770. border: 1px solid #c9c9c9;
  771. text-align: center;
  772. padding: 20px;
  773. box-sizing: border-box;
  774. p {
  775. color: #333;
  776. i {
  777. margin-right: 20px;
  778. }
  779. }
  780. p:nth-child(1) {
  781. font-size: 24px;
  782. }
  783. + li {
  784. margin-left: 10px;
  785. }
  786. }
  787. li:hover {
  788. box-shadow: 0px 2px 4px #c9c9c9;
  789. }
  790. }
  791. }
  792. .progress {
  793. width: 100%;
  794. .basic-statistics {
  795. border-bottom: 1px dashed #c9c9c9;
  796. padding-bottom: 10px;
  797. margin-bottom: 10px;
  798. }
  799. .data {
  800. margin-bottom: 20px;
  801. .contain-title {
  802. height: 30px;
  803. line-height: 30px;
  804. /*border-left: 8px solid black;*/
  805. display: inline-block;
  806. margin: 8px 0;
  807. font-weight: 600;
  808. /*padding-left: 8px;*/
  809. cursor: default;
  810. i {
  811. margin-left: 6px;
  812. font-weight: normal;
  813. }
  814. }
  815. }
  816. }
  817. .data-show {
  818. width: 100%;
  819. display: flex;
  820. flex-wrap: wrap;
  821. .show-content {
  822. background: white;
  823. overflow: hidden;
  824. margin-right: 10px;
  825. margin-bottom: 10px;
  826. border: 1px solid #c9c9c9;
  827. }
  828. .device-content {
  829. border-top: 1px solid #c9c9c9;
  830. border-bottom: 1px solid #c9c9c9;
  831. margin: 10px 0;
  832. &:first-child {
  833. border-left: 1px solid #c9c9c9;
  834. }
  835. &:last-child {
  836. border-right: 1px solid #c9c9c9;
  837. }
  838. }
  839. }
  840. /*.system,*/
  841. /*.parts {*/
  842. /* height: 50px !important;*/
  843. /*}*/
  844. </style>