index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889
  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. functionTypeTranstion(item, type) {// 默认分区功能类型转换
  278. type.forEach(it => {
  279. if (item.Name === it.Code) {
  280. item.Name = it.Name;
  281. this.defaultPart.push({
  282. name: item.Name + item.Count,
  283. value: item.Count
  284. });
  285. }
  286. if (it.Content) {
  287. this.functionTypeTranstion(item, it.Content)
  288. }
  289. })
  290. },
  291. getFunctionType() {// 获取默认分区功能类型
  292. let params = {
  293. ProjectId: this.projectId,
  294. type: "GeneralZone",
  295. data: {
  296. Filters: "InfoPointCode='RoomFuncType'",
  297. Projection: ["DataSource", "InfoPointCode"]
  298. }
  299. }
  300. getDataDictionary(params, res => {
  301. if (res.Content.length) {
  302. this.functionType = JSON.parse(res.Content[0].DataSource)
  303. }
  304. this.getZoneSpaceCount();
  305. })
  306. },
  307. toPercent(point) {// 小数转换成百分比
  308. return (isNaN(point) || Number(point) === 0) ? '0%' : Number(point * 100).toFixed(2) + '%'
  309. },
  310. getShaftFunType() {// 获取数据功能类型
  311. getCenoteType(this.param, res => {
  312. this.ShaftFunType = res.Content;
  313. this.getShaftCount();
  314. })
  315. },
  316. shaftFunTypeTranstion(item) {// 竖井功能类型转换
  317. this.ShaftFunType.forEach((it, index) => {
  318. if (item.Name === it.Id) {
  319. item.Name = it.Name;
  320. }
  321. })
  322. },
  323. getStatisticsCount() {// 获取顶部统计数据
  324. let params = {
  325. ProjectId: this.projectId,
  326. Filters: "taskState = -1"
  327. }
  328. // 台账中待删除的对象
  329. queryLederDelObject(params, res => {
  330. this.lederDelObjectCount = res.Count;
  331. })
  332. // 不能同步到物理世界的对象
  333. notSyncObject(this.params, res => {
  334. this.notSyncObjectCount = res.Count;
  335. })
  336. // 不能同步到物理世界的关系数据
  337. notSyncRelationData(this.params, res => {
  338. this.notSyncDataCount = res.Count;
  339. })
  340. // 岗位和关联的资产信息点值不一致
  341. postRelationInforAtpism(this.params, res => {
  342. this.postRelationInforCount = res.Count;
  343. })
  344. },
  345. // 统计设备信息点与需采集数据占比
  346. gatherInfoPoints() {
  347. gatherInfoPoint(this.params, res => {
  348. let arr = JSON.parse(JSON.stringify(res.Content))
  349. arr.forEach(i => {
  350. this.$set(this.deviceMessageData, 0, {
  351. title: '统计设备信息点与需采集数据占比',
  352. tips: '统计设备信息点与需采集数据占比',
  353. contentValueO: '总数:',
  354. contentValueT: '标准静态:',
  355. needCountO: i.GatherInfoPointCounts,
  356. needCountT: i.GatherStaticInfoPointCounts,
  357. text: this.toPercent(i.GatherStaticInfoPointCounts / i.GatherInfoPointCounts),
  358. val: this.static
  359. })
  360. this.$set(this.deviceMessageData, 1, {
  361. contentValueO: '总数:',
  362. contentValueT: '标准动态:',
  363. needCountO: i.GatherInfoPointCounts,
  364. needCountT: i.GatherDynamicInfoPointCounts,
  365. text: this.toPercent(i.GatherDynamicInfoPointCounts / i.GatherInfoPointCounts),
  366. val: this.dynamic
  367. })
  368. this.$set(this.deviceMessageData, 2, {
  369. contentValueO: '总数:',
  370. contentValueT: '自定义:',
  371. needCountO: i.GatherInfoPointCounts,
  372. needCountT: i.GatherCustomInfoPointCounts,
  373. text: this.toPercent(i.GatherCustomInfoPointCounts / i.GatherInfoPointCounts),
  374. val: this.custom
  375. })
  376. })
  377. })
  378. },
  379. // 统计系统信息点与需采集数据占比
  380. systemInfoPoints() {
  381. systemInfoPoint(this.params, res => {
  382. let arr = JSON.parse(JSON.stringify(res.Content))
  383. arr.forEach(i => {
  384. this.$set(this.sysMessageData, 0, {
  385. title: '统计系统信息点与需采集数据占比',
  386. tips: '统计系统信息点与需采集数据占比',
  387. contentValueO: '总数:',
  388. contentValueT: '标准静态:',
  389. needCountO: i.GatherInfoPointCounts,
  390. needCountT: i.GatherStaticInfoPointCounts,
  391. text: this.toPercent(i.GatherStaticInfoPointCounts / i.GatherInfoPointCounts),
  392. val: this.static
  393. })
  394. this.$set(this.sysMessageData, 1, {
  395. contentValueO: '总数:',
  396. contentValueT: '标准动态:',
  397. needCountO: i.GatherInfoPointCounts,
  398. needCountT: i.GatherDynamicInfoPointCounts,
  399. text: this.toPercent(i.GatherDynamicInfoPointCounts / i.GatherInfoPointCounts),
  400. val: this.dynamic
  401. })
  402. this.$set(this.sysMessageData, 2, {
  403. contentValueO: '总数:',
  404. contentValueT: '自定义:',
  405. needCountO: i.GatherInfoPointCounts,
  406. needCountT: i.GatherCustomInfoPointCounts,
  407. text: this.toPercent(i.GatherCustomInfoPointCounts / i.GatherInfoPointCounts),
  408. val: this.custom
  409. })
  410. })
  411. })
  412. },
  413. //统计设备信息点与总数据占比
  414. infoPoints() {
  415. infoPoint(this.params, res => {
  416. let arr = JSON.parse(JSON.stringify(res.Content))
  417. arr.forEach(i => {
  418. this.$set(this.deviceMessageTotal, 0, {
  419. title: '统计设备信息点与总数据占比',
  420. tips: '统计设备信息点与总数据占比',
  421. contentValueO: '总数:',
  422. contentValueT: '标准静态:',
  423. needCountO: i.StaticInfoPointCounts,
  424. needCountT: i.StaticInfoPoint,
  425. text: this.toPercent(i.StaticInfoPoint / i.StaticInfoPointCounts),
  426. val: this.static
  427. })
  428. this.$set(this.deviceMessageTotal, 1, {
  429. contentValueO: '总数:',
  430. contentValueT: '标准动态:',
  431. needCountO: i.DynamicInfoPointCounts,
  432. needCountT: i.DynamicInfoPoint,
  433. text: this.toPercent(i.DynamicInfoPoint / i.DynamicInfoPointCounts),
  434. val: this.dynamic
  435. })
  436. let obj = i.CustomInfoPointCounts ? {} : ''
  437. if (obj) {
  438. obj = {
  439. contentValueO: '总数:',
  440. contentValueT: '自定义:',
  441. needCountO: i.CustomInfoPointCounts,
  442. needCountT: i.CustomInfoPoint,
  443. text: this.toPercent(i.CustomInfoPoint / i.CustomInfoPointCounts),
  444. val: this.custom
  445. }
  446. }
  447. this.$set(this.deviceMessageTotal, 2, {
  448. ...obj
  449. })
  450. })
  451. })
  452. },
  453. getEquipCount() {// 获取设备总数
  454. countEquip(this.params, res => {
  455. this.equipCount = res.Count;
  456. this.getEquipOtherCount();
  457. })
  458. },
  459. getEquipOtherCount() {// 获取设备数据
  460. // 未关联资产
  461. let param = {
  462. ProjectId: this.projectId,
  463. Filters: "PropertyId isNull"
  464. }
  465. let promise1 = new Promise(resolve => {
  466. countEquip(param, res => {
  467. resolve(res);
  468. })
  469. })
  470. // 现场验证状态占比
  471. let par = {
  472. ProjectId: this.projectId,
  473. Filters: "taskState = 0 or taskState = 1"
  474. }
  475. let promise2 = new Promise(resolve => {
  476. countEquip(par, res => {
  477. resolve(res);
  478. })
  479. })
  480. let pa = {
  481. ProjectId: this.projectId,
  482. Filters: "not BimID isNull"
  483. }
  484. let promise3 = new Promise(resolve => {
  485. countEquip(pa, res => {
  486. resolve(res);
  487. })
  488. })
  489. Promise.all([promise1, promise2, promise3]).then(response => {
  490. this.equipment = [];
  491. let res = response[0];
  492. let res1 = response[1];
  493. let res2 = response[2];
  494. this.equipment.push({
  495. title: '未关联设备',
  496. tips: '设备未关联资产数量',
  497. contentValueO: '已关联:',
  498. contentValueT: '未关联:',
  499. needCountO: this.equipCount - res.Count,
  500. needCountT: res.Count,
  501. text: `${res.Count}`
  502. })
  503. let text = this.toPercent(res1.Count / this.equipCount)
  504. this.equipment.push({
  505. title: '现场验证状态占比',
  506. tips: '设备状态为未找到、已找到的数量与设备总数占比',
  507. contentValueO: '已验证:',
  508. contentValueT: '未验证:',
  509. needCountO: res1.Count,
  510. needCountT: this.equipCount - res1.Count,
  511. text: text
  512. })
  513. let text1 = this.toPercent(res2.Count / this.equipCount)
  514. this.equipment.push({
  515. title: '与模型对应占比',
  516. tips: '"BIM模型中编码"有值的设备数量与设备总数占比',
  517. contentValueO: '已对应:',
  518. contentValueT: '未对应:',
  519. needCountO: res2.Count,
  520. needCountT: this.equipCount - res2.Count,
  521. text: text1
  522. })
  523. this.isLoading = false;
  524. })
  525. },
  526. getAssetsCount() {// 获取资产数据
  527. countProperty(this.params, res => {
  528. // 获取资产总数
  529. this.assetsCount = res.Count;
  530. })
  531. // 未关联资产
  532. let param = {
  533. ProjectId: this.projectId,
  534. Filters: " EquipmentId isnull"
  535. }
  536. let promise1 = new Promise((resolve) => {
  537. countProperty(param, res => {
  538. resolve(res)
  539. })
  540. })
  541. // 现场验证状态占比
  542. let par = {
  543. ProjectId: this.projectId,
  544. Filters: " taskState = 0 or taskState = 1"
  545. }
  546. let promise2 = new Promise((resolve) => {
  547. countProperty(par, res => {
  548. resolve(res);
  549. })
  550. })
  551. // 有无坐标占比
  552. let pa = {
  553. ProjectId: this.projectId,
  554. Filters: " not BIMLocation isnull"
  555. }
  556. let promise3 = new Promise((resolve) => {
  557. countProperty(pa, res => {
  558. resolve(res);
  559. })
  560. })
  561. Promise.all([promise1, promise2, promise3]).then(response => {
  562. this.assets = [];
  563. let res0 = response[0];
  564. let res1 = response[1];
  565. let res2 = response[2];
  566. this.assets.push({
  567. title: '未关联资产',
  568. tips: '资产未关联设备数量',
  569. contentValueO: '已关联:',
  570. contentValueT: '未关联:',
  571. text: `${res0.Count}`,
  572. needCountO: this.assetsCount - res0.Count,
  573. needCountT: res0.Count
  574. })
  575. let text = res1.Count / this.assetsCount;
  576. text = this.toPercent(text);
  577. this.assets.push({
  578. title: '现场验证状态占比',
  579. tips: '资产状态为未找到、已找到的数量与资产总数占比',
  580. contentValueO: '已验证:',
  581. contentValueT: '未验证:',
  582. text: text,
  583. needCountO: res1.Count,
  584. needCountT: this.assetsCount - res1.Count
  585. })
  586. let text1 = res2.Count / this.assetsCount;
  587. text1 = this.toPercent(text1);
  588. this.assets.push({
  589. title: '有无坐标占比',
  590. tips: '有坐标的资产数量百分比',
  591. contentValueO: '有坐标:',
  592. contentValueT: '无坐标:',
  593. text: text1,
  594. needCountO: res2.Count,
  595. needCountT: this.assetsCount - res2.Count
  596. })
  597. })
  598. },
  599. getPartsCount() {// 获取部件数据
  600. queryPart(this.params, res => {
  601. this.partsCount = res.Count;
  602. })
  603. },
  604. getZoneSpaceCount() {// 获取业务空间数据
  605. // 获取业务空间总数
  606. queryZoneCount(this.params, res => {
  607. this.zoneSpaceCount = res.Count;
  608. })
  609. let promise1 = new Promise((resolve) => {
  610. queryPartitionRatio(this.params, res => {
  611. resolve(res)
  612. })
  613. })
  614. let promise2 = new Promise((resolve) => {
  615. queryDefaultFunTypes(this.params, res => {
  616. resolve(res)
  617. })
  618. })
  619. Promise.all([promise1, promise2]).then(response => {
  620. this.business = [];
  621. this.partProtion = [];
  622. this.defaultPart = [];
  623. let res1 = response[0]
  624. let res2 = response[1]
  625. res1.Content.length && res1.Content.filter(i => i.Count).forEach(j => {
  626. this.zoneType.forEach(l => {
  627. if (l.Code == j.Name) {
  628. this.partProtion.push({
  629. name: l.Name + j.Count,
  630. value: j.Count
  631. })
  632. }
  633. })
  634. })
  635. this.business.push({
  636. title: '各分区占比',
  637. tips: '各类型分区实例数量与实例总数占比',
  638. needCountO: this.partProtion,
  639. })
  640. // }
  641. if (res2.Content.length) {
  642. res2.Content.forEach(item => {
  643. this.functionTypeTranstion(item, this.functionType);
  644. })
  645. this.business.push({
  646. title: '默认分区功能类型占比',
  647. tips: '默认分区实例的功能区类型占比',
  648. needCountO: this.defaultPart,
  649. })
  650. }
  651. })
  652. },
  653. getSystemCount() {// 获取系统数据
  654. countGeneralSys(this.params, res => {
  655. this.systemCount = res.Count;
  656. })
  657. },
  658. getTenantCount() {// 获取租户数据
  659. // 获取租户总数
  660. queryRentCount(this.params, res => {
  661. this.rentantCount = res.Count;
  662. })
  663. // 租户-关联业务空间完成度
  664. let promise = new Promise((resolve) => {
  665. queryTenantCompletion(this.params, res => {
  666. resolve(res);
  667. })
  668. })
  669. Promise.all([promise]).then(response => {
  670. this.tenant = [];
  671. let res = response[0];
  672. this.tenant = [];
  673. let text = res.Count / this.rentantCount;
  674. text = this.toPercent(text);
  675. this.tenant.push({
  676. title: '关联业务空间完成度',
  677. tips: '已关联业务空间的租户数量百分比',
  678. contentValueO: '已关联:',
  679. contentValueT: '未关联:',
  680. needCountO: res.Count,
  681. needCountT: this.rentantCount - res.Count,
  682. text: text
  683. })
  684. })
  685. },
  686. getShaftCount() {// 获取竖井数据
  687. this.shaft = [];
  688. // 获取竖井总数
  689. queryCenoteCount(this.params, res => {
  690. this.shaftCount = res.Count;
  691. })
  692. let promise1 = new Promise((resolve) => {
  693. queryShaftFunctionType(this.params, res => {
  694. resolve(res);
  695. })
  696. })
  697. let promise2 = new Promise((resolve) => {
  698. ShaftRelationBusinessSpace(this.params, res => {
  699. resolve(res);
  700. })
  701. })
  702. Promise.all([promise1, promise2]).then(response => {
  703. this.shaft = [];
  704. let res = response[0];
  705. let res1 = response[1];
  706. this.shaftPartProtion = [];
  707. if (res.Content.length) {
  708. res.Content.forEach(item => {
  709. this.shaftFunTypeTranstion(item);
  710. this.shaftPartProtion.push({
  711. name: item.Name + item.Count,
  712. value: item.Count
  713. })
  714. })
  715. this.shaft.push({
  716. title: '按功能类型占比',
  717. tips: '竖井实例的竖井功能占比',
  718. needCountO: this.shaftPartProtion,
  719. })
  720. }
  721. let text = this.toPercent(res1.Count / this.shaftCount);
  722. this.shaft.push({
  723. title: '关联业务空间完成度',
  724. tips: '已关联业务空间的竖井数量百分比',
  725. contentValueO: '已关联:',
  726. contentValueT: '未关联:',
  727. needCountO: res1.Count,
  728. needCountT: this.shaftCount - res1.Count,
  729. text: text
  730. })
  731. })
  732. }
  733. },
  734. watch: {
  735. projectId(n, o) {
  736. this.params = {
  737. ProjectId: this.projectId
  738. }
  739. this.getFunctionType();
  740. this.getStatisticsCount();
  741. this.getEquipCount();
  742. this.getAssetsCount();
  743. this.getPartsCount();
  744. this.getSystemCount();
  745. this.getTenantCount();
  746. this.getShaftFunType();
  747. this.gatherInfoPoints();
  748. this.systemInfoPoints();
  749. this.infoPoints();
  750. }
  751. }
  752. }
  753. </script>
  754. <style lang="scss" scoped>
  755. .data-display {
  756. width: 100%;
  757. margin-bottom: 10px;
  758. ul {
  759. display: flex;
  760. li {
  761. flex: 1;
  762. background: white;
  763. border: 1px solid #c9c9c9;
  764. text-align: center;
  765. padding: 20px;
  766. box-sizing: border-box;
  767. p {
  768. color: #333;
  769. i {
  770. margin-right: 20px;
  771. }
  772. }
  773. p:nth-child(1) {
  774. font-size: 24px;
  775. }
  776. + li {
  777. margin-left: 10px;
  778. }
  779. }
  780. li:hover {
  781. box-shadow: 0px 2px 4px #c9c9c9;
  782. }
  783. }
  784. }
  785. .progress {
  786. width: 100%;
  787. .basic-statistics {
  788. border-bottom: 1px dashed #c9c9c9;
  789. padding-bottom: 10px;
  790. margin-bottom: 10px;
  791. }
  792. .data {
  793. margin-bottom: 20px;
  794. .contain-title {
  795. height: 30px;
  796. line-height: 30px;
  797. /*border-left: 8px solid black;*/
  798. display: inline-block;
  799. margin: 8px 0;
  800. font-weight: 600;
  801. /*padding-left: 8px;*/
  802. cursor: default;
  803. i {
  804. margin-left: 6px;
  805. font-weight: normal;
  806. }
  807. }
  808. }
  809. }
  810. .data-show {
  811. width: 100%;
  812. display: flex;
  813. flex-wrap: wrap;
  814. .show-content {
  815. background: white;
  816. overflow: hidden;
  817. margin-right: 10px;
  818. margin-bottom: 10px;
  819. border: 1px solid #c9c9c9;
  820. }
  821. .device-content {
  822. border-top: 1px solid #c9c9c9;
  823. border-bottom: 1px solid #c9c9c9;
  824. margin: 10px 0;
  825. &:first-child {
  826. border-left: 1px solid #c9c9c9;
  827. }
  828. &:last-child {
  829. border-right: 1px solid #c9c9c9;
  830. }
  831. }
  832. }
  833. /*.system,*/
  834. /*.parts {*/
  835. /* height: 50px !important;*/
  836. /*}*/
  837. </style>