ソースを参照

adm:feat > 添加项目

shaun-sheep 4 年 前
コミット
6d119920c3

+ 2 - 1
config/index.js

@@ -364,7 +364,8 @@ module.exports = {
     // Paths
     assetsRoot: path.resolve(__dirname, '../dist'),
     assetsSubDirectory: 'static',
-    assetsPublicPath: '/adm/',
+    assetsPublicPath: '/adm/',// 39 配置
+    // assetsPublicPath: '/',
 
     /**
      * Source Maps

+ 1 - 0
config/prod.env.js

@@ -1,6 +1,7 @@
 'use strict'
 module.exports = {
   NODE_ENV: '"production"',
+  // BASE_URL: '"http://192.168.64.18:9988"', //测试iframe地址
   BASE_URL: '"http://39.102.40.239"', //测试iframe地址
   SSO_SERVER: '"http://mbi.sagacloud.cn"', //测试环境
   MQTT_SERVICE: '"ws://39.102.40.239:61614/stomp/"' //MQ测试环境地址

+ 1 - 0
src/api/scan/config.js

@@ -27,6 +27,7 @@ export const modelScanTask = dataCenter + '/model-scan-task'
 export const equipScanTask = dataCenter + '/equip-scan-task'
 export const shContainSp = rel + '/sh-contain-sp-base'
 export const statistics = dataCenter + '/statistics'
+export const stat = component + '/statistics'
 export const graphicUrl = dataCenter + '/graphic'
 export const compSpace = component + '/space'
 export const compEquipQuery = component + '/equip-query'

+ 14 - 12
src/api/scan/request.js

@@ -24,7 +24,8 @@ import {
   system,
   tenant,
   venders,
-  zone
+  zone,
+  stat
 } from './config.js'
 import http from './httpUtil'
 import storage from '@/framework/utils/storage'
@@ -806,7 +807,7 @@ export function EqToAssets(param, success) {
 
 //台账中待删除的对象
 export function queryLederDelObject(param, success) {
-  let url = `${baseUrl}${statistics}/object-delete-count`
+  let url = `${baseUrl}${stat}/object-delete-count`
   http.postJson(url, param, success)
 }
 
@@ -838,13 +839,13 @@ export function queryCenoteCount(param, success) {
 
 //竖井-按功能类型占比
 export function queryShaftFunctionType(param, success) {
-  let url = `${baseUrl}${statistics}/shaft-functype-count`
+  let url = `${baseUrl}${stat}/shaft-functype-count`
   http.postJson(url, param, success)
 }
 
 //竖井-关联业务空间完成度
 export function ShaftRelationBusinessSpace(param, success) {
-  let url = `${baseUrl}${statistics}/shaft2sp-count`
+  let url = `${baseUrl}${stat}/shaft2sp-count`
   http.postJson(url, param, success)
 }
 
@@ -940,12 +941,12 @@ export function getRentTableData(param, success) {
 
 //根据条件查询统计数量
 export function queryRentCount(param, success) {
-  let url = `${baseUrl}${tenant}/count`
+  let url = `${baseUrl}${object}/tenant/count`
   http.postJson(url, param, success)
 }
 
 export function queryTenantCompletion(param, success) {
-  let url = `${baseUrl}${statistics}/tenant2sp-count`
+  let url = `${baseUrl}${stat}/tenant2sp-count`
   http.postJson(url, param, success)
 }
 
@@ -1025,19 +1026,20 @@ export function saveRentRelateSpace(param, success) {
 
 //根据条件查询分区数量
 export function queryZoneCount(param, success) {
-  let url = `${baseUrl}${dataCenter}/zonespacebase/count`
+  // let url = `${baseUrl}${dataCenter}/zonespacebase/count`
+  let url = `${baseUrl}${object}/zone/count`
   http.postJson(url, param, success)
 }
 
 //业务空间-各分区占比
 export function queryPartitionRatio(param, success) {
-  let url = `${baseUrl}${statistics}/sp-objecttype-count`
+  let url = `${baseUrl}${stat}/sp-objecttype-count`
   http.postJson(url, param, success)
 }
 
 //业务空间-默认分区功能类型占比
 export function queryDefaultFunTypes(param, success) {
-  let url = `${baseUrl}${statistics}/general-sp-functype-count`
+  let url = `${baseUrl}${stat}/general-sp-functype-count`
   http.postJson(url, param, success)
 }
 
@@ -1269,7 +1271,7 @@ export function sysUnlinkEquip(param, success) {
 
 //设备清单 - 统计项目下所有设备数量
 export function countEquip(param, success) {
-  let url = `${baseUrl}${dataCenter}/equip/count`;
+  let url = `${baseUrl}${object}/equip/count`;
   http.postJson(url, param, success)
 }
 
@@ -2232,7 +2234,7 @@ export function getFloorMsgByFloorID(param, success) {
 
 // 不能同步到物理世界的关系数据
 export function notSyncRelationData(param, success) {
-  let url = `${baseUrl}${statistics}/unsyn-relation-count`
+  let url = `${baseUrl}${stat}/unsyn-relation-count`
   http.postJson(url, param, success)
 }
 
@@ -2245,7 +2247,7 @@ export function notSyncObject(param, success) {
 
 // 岗位和关联的资产信息点值不一致
 export function postRelationInforAtpism(param, success) {
-  let url = `${baseUrl}${statistics}/eq2pe-count`
+  let url = `${baseUrl}${stat}/eq2pe-count`
   http.postJson(url, param, success)
 }
 

+ 4 - 0
src/framework/layout/layout-store.js

@@ -56,6 +56,10 @@ export default {
         id: "Pj1101050013",
         name: "BIM测试项目_亚投行",
         pwd: "saga123456"
+      }, {
+        id: "Pj1101080259",
+        name: "博锐尚格北京总部办公楼",
+        pwd: "saga123456"
       }],
     breadcrumb: [],
     uploaderList: [], //当前上传文件列表

+ 115 - 114
src/views/ledger/report/index.vue

@@ -124,7 +124,6 @@ import {
   countEquip,
   countGeneralSys,
   countProperty,
-  gatherInfoPoint,
   getCenoteType,
   infoPoint,
   notSyncObject,
@@ -241,7 +240,8 @@ export default {
       sysMessageData: [],//统计系统信息点与需采集数据占比
       static: '标准静态',
       dynamic: '标准动态',
-      custom: '自定义'
+      custom: '自定义',
+      functionType: []
 
     }
   },
@@ -254,12 +254,12 @@ export default {
   },
   created() {
     this.params = {
-      ProjectId: this.projectId
+      projectId: this.projectId
     }
     this.getFunctionType();
     this.getStatisticsCount();
     this.getEquipCount();
-    this.gatherInfoPoints();
+    // this.gatherInfoPoints();
     this.systemInfoPoints();
     this.infoPoints();
     this.getAssetsCount();
@@ -280,22 +280,22 @@ export default {
     },
     zoneTypeConversion(item) {// 分区类型转换
       this.zoneType.forEach(it => {
-        if (item.Name === it.Code) {
-          item.Name = it.Name;
+        if (item.name === it.code) {
+          item.name = it.name;
         }
       })
     },
     functionTypeTranstion(item, type) {// 默认分区功能类型转换
-      type.forEach(it => {
-        if (item.Name === it.Code) {
-          item.Name = it.Name;
+      type && type.forEach(it => {
+        if (item.name === it.code) {
+          item.name = it.name;
           this.defaultPart.push({
-            name: item.Name + item.Count,
-            value: item.Count
+            name: item.name + item.count,
+            value: item.count
           });
         }
-        if (it.Content) {
-          this.functionTypeTranstion(item, it.Content)
+        if (it.content) {
+          this.functionTypeTranstion(item, it.content)
         }
       })
     },
@@ -308,7 +308,8 @@ export default {
       }
       getDataDictionary(params, res => {
         if (res.content.length) {
-          this.functionType = JSON.parse(res.content[0].dataSource)
+          // this.functionType = JSON.parse(res.content[0].dataSource)
+          this.functionType = res.content[0].dataSource
         }
         this.getZoneSpaceCount();
       })
@@ -332,95 +333,95 @@ export default {
 
     getStatisticsCount() {// 获取顶部统计数据
       let params = {
-        ProjectId: this.projectId,
-        Filters: "taskState = -1"
+        projectId: this.projectId,
+        filters: "taskState = -1"
       }
 
       // 台账中待删除的对象
       queryLederDelObject(params, res => {
-        this.lederDelObjectCount = res.Count;
+        this.lederDelObjectCount = res.count;
       })
 
       // 不能同步到物理世界的对象
-      notSyncObject(this.params, res => {
+      notSyncObject({}, res => {
         this.notSyncObjectCount = res.count;
       })
 
       // 不能同步到物理世界的关系数据
-      notSyncRelationData(this.params, res => {
-        this.notSyncDataCount = res.Count;
+      notSyncRelationData({}, res => {
+        this.notSyncDataCount = res.count;
       })
 
       // 岗位和关联的资产信息点值不一致
-      postRelationInforAtpism(this.params, res => {
-        this.postRelationInforCount = res.Count;
+      postRelationInforAtpism({}, res => {
+        this.postRelationInforCount = res.count;
       })
     },
     // 统计设备信息点与需采集数据占比
-    gatherInfoPoints() {
-      gatherInfoPoint(this.params, res => {
-        let arr = JSON.parse(JSON.stringify(res.Content))
-        arr.forEach(i => {
-          this.$set(this.deviceMessageData, 0, {
-            title: '统计设备信息点与需采集数据占比',
-            tips: '统计设备信息点与需采集数据占比',
-            contentValueO: '总数:',
-            contentValueT: '标准静态:',
-            needCountO: i.GatherInfoPointCounts,
-            needCountT: i.GatherStaticInfoPointCounts,
-            text: this.toPercent(i.GatherStaticInfoPointCounts / i.GatherInfoPointCounts),
-            val: this.static
-          })
-          this.$set(this.deviceMessageData, 1, {
-            contentValueO: '总数:',
-            contentValueT: '标准动态:',
-            needCountO: i.GatherInfoPointCounts,
-            needCountT: i.GatherDynamicInfoPointCounts,
-            text: this.toPercent(i.GatherDynamicInfoPointCounts / i.GatherInfoPointCounts),
-            val: this.dynamic
-          })
-
-          this.$set(this.deviceMessageData, 2, {
-            contentValueO: '总数:',
-            contentValueT: '自定义:',
-            needCountO: i.GatherInfoPointCounts,
-            needCountT: i.GatherCustomInfoPointCounts,
-            text: this.toPercent(i.GatherCustomInfoPointCounts / i.GatherInfoPointCounts),
-            val: this.custom
-          })
-        })
-      })
-    },
+    // gatherInfoPoints() {
+    //   gatherInfoPoint(this.params, res => {
+    //     let arr = JSON.parse(JSON.stringify(res.Content))
+    //     arr.forEach(i => {
+    //       this.$set(this.deviceMessageData, 0, {
+    //         title: '统计设备信息点与需采集数据占比',
+    //         tips: '统计设备信息点与需采集数据占比',
+    //         contentValueO: '总数:',
+    //         contentValueT: '标准静态:',
+    //         needCountO: i.gatherInfoPointCounts,
+    //         needCountT: i.gatherStaticInfoPointCounts,
+    //         text: this.toPercent(i.gatherStaticInfoPointCounts / i.gatherInfoPointCounts),
+    //         val: this.static
+    //       })
+    //       this.$set(this.deviceMessageData, 1, {
+    //         contentValueO: '总数:',
+    //         contentValueT: '标准动态:',
+    //         needCountO: i.gatherInfoPointCounts,
+    //         needCountT: i.gatherDynamicInfoPointCounts,
+    //         text: this.toPercent(i.gatherDynamicInfoPointCounts / i.gatherInfoPointCounts),
+    //         val: this.dynamic
+    //       })
+    //
+    //       this.$set(this.deviceMessageData, 2, {
+    //         contentValueO: '总数:',
+    //         contentValueT: '自定义:',
+    //         needCountO: i.gatherInfoPointCounts,
+    //         needCountT: i.gatherCustomInfoPointCounts,
+    //         text: this.toPercent(i.gatherCustomInfoPointCounts / i.gatherInfoPointCounts),
+    //         val: this.custom
+    //       })
+    //     })
+    //   })
+    // },
 
     // 统计系统信息点与需采集数据占比
     systemInfoPoints() {
       systemInfoPoint(this.params, res => {
-        let arr = JSON.parse(JSON.stringify(res.Content))
+        let arr = JSON.parse(JSON.stringify(res.content))
         arr.forEach(i => {
           this.$set(this.sysMessageData, 0, {
             title: '统计系统信息点与需采集数据占比',
             tips: '统计系统信息点与需采集数据占比',
             contentValueO: '总数:',
             contentValueT: '标准静态:',
-            needCountO: i.GatherInfoPointCounts,
-            needCountT: i.GatherStaticInfoPointCounts,
-            text: this.toPercent(i.GatherStaticInfoPointCounts / i.GatherInfoPointCounts),
+            needCountO: i.gatherInfoPointCounts,
+            needCountT: i.gatherStaticInfoPointCounts,
+            text: this.toPercent(i.gatherStaticInfoPointCounts / i.gatherInfoPointCounts),
             val: this.static
           })
           this.$set(this.sysMessageData, 1, {
             contentValueO: '总数:',
             contentValueT: '标准动态:',
-            needCountO: i.GatherInfoPointCounts,
-            needCountT: i.GatherDynamicInfoPointCounts,
-            text: this.toPercent(i.GatherDynamicInfoPointCounts / i.GatherInfoPointCounts),
+            needCountO: i.gatherInfoPointCounts,
+            needCountT: i.gatherDynamicInfoPointCounts,
+            text: this.toPercent(i.gatherDynamicInfoPointCounts / i.gatherInfoPointCounts),
             val: this.dynamic
           })
           this.$set(this.sysMessageData, 2, {
             contentValueO: '总数:',
             contentValueT: '自定义:',
-            needCountO: i.GatherInfoPointCounts,
-            needCountT: i.GatherCustomInfoPointCounts,
-            text: this.toPercent(i.GatherCustomInfoPointCounts / i.GatherInfoPointCounts),
+            needCountO: i.gatherInfoPointCounts,
+            needCountT: i.gatherCustomInfoPointCounts,
+            text: this.toPercent(i.gatherCustomInfoPointCounts / i.gatherInfoPointCounts),
             val: this.custom
           })
         })
@@ -431,34 +432,34 @@ export default {
     //统计设备信息点与总数据占比
     infoPoints() {
       infoPoint(this.params, res => {
-        let arr = JSON.parse(JSON.stringify(res.Content))
+        let arr = JSON.parse(JSON.stringify(res.content))
         arr.forEach(i => {
           this.$set(this.deviceMessageTotal, 0, {
             title: '统计设备信息点与总数据占比',
             tips: '统计设备信息点与总数据占比',
             contentValueO: '总数:',
             contentValueT: '标准静态:',
-            needCountO: i.StaticInfoPointCounts,
-            needCountT: i.StaticInfoPoint,
-            text: this.toPercent(i.StaticInfoPoint / i.StaticInfoPointCounts),
+            needCountO: i.staticInfoPointCounts,
+            needCountT: i.staticInfoPoint,
+            text: this.toPercent(i.staticInfoPoint / i.staticInfoPointCounts),
             val: this.static
           })
           this.$set(this.deviceMessageTotal, 1, {
             contentValueO: '总数:',
             contentValueT: '标准动态:',
-            needCountO: i.DynamicInfoPointCounts,
-            needCountT: i.DynamicInfoPoint,
-            text: this.toPercent(i.DynamicInfoPoint / i.DynamicInfoPointCounts),
+            needCountO: i.dynamicInfoPointCounts,
+            needCountT: i.dynamicInfoPoint,
+            text: this.toPercent(i.dynamicInfoPoint / i.dynamicInfoPointCounts),
             val: this.dynamic
           })
-          let obj = i.CustomInfoPointCounts ? {} : ''
+          let obj = i.customInfoPointCounts ? {} : ''
           if (obj) {
             obj = {
               contentValueO: '总数:',
               contentValueT: '自定义:',
-              needCountO: i.CustomInfoPointCounts,
-              needCountT: i.CustomInfoPoint,
-              text: this.toPercent(i.CustomInfoPoint / i.CustomInfoPointCounts),
+              needCountO: i.customInfoPointCounts,
+              needCountT: i.customInfoPoint,
+              text: this.toPercent(i.customInfoPoint / i.customInfoPointCounts),
               val: this.custom
             }
           }
@@ -472,7 +473,7 @@ export default {
     },
     getEquipCount() {// 获取设备总数
       countEquip(this.params, res => {
-        this.equipCount = res.Count;
+        this.equipCount = res.count;
         this.getEquipOtherCount();
       })
 
@@ -480,8 +481,8 @@ export default {
     getEquipOtherCount() {// 获取设备数据
       // 未关联资产
       let param = {
-        ProjectId: this.projectId,
-        Filters: "PropertyId isNull"
+        projectId: this.projectId,
+        filters: "propertyId isNull"
       }
       let promise1 = new Promise(resolve => {
         countEquip(param, res => {
@@ -491,8 +492,8 @@ export default {
 
       // 现场验证状态占比
       let par = {
-        ProjectId: this.projectId,
-        Filters: "taskState = 0 or taskState = 1"
+        projectId: this.projectId,
+        filters: "taskState = 0 or taskState = 1"
       }
       let promise2 = new Promise(resolve => {
         countEquip(par, res => {
@@ -501,8 +502,8 @@ export default {
       })
 
       let pa = {
-        ProjectId: this.projectId,
-        Filters: "not BimID isNull"
+        projectId: this.projectId,
+        filters: "not bimId isNull"
       }
       let promise3 = new Promise(resolve => {
         countEquip(pa, res => {
@@ -520,30 +521,30 @@ export default {
           tips: '设备未关联资产数量',
           contentValueO: '已关联:',
           contentValueT: '未关联:',
-          needCountO: this.equipCount - res.Count,
-          needCountT: res.Count,
-          text: `${res.Count}`
+          needCountO: this.equipCount - res.count,
+          needCountT: res.count,
+          text: `${res.count}`
         })
 
-        let text = this.toPercent(res1.Count / this.equipCount)
+        let text = this.toPercent(res1.count / this.equipCount)
         this.equipment.push({
           title: '现场验证状态占比',
           tips: '设备状态为未找到、已找到的数量与设备总数占比',
           contentValueO: '已验证:',
           contentValueT: '未验证:',
-          needCountO: res1.Count,
-          needCountT: this.equipCount - res1.Count,
+          needCountO: res1.count,
+          needCountT: this.equipCount - res1.count,
           text: text
         })
 
-        let text1 = this.toPercent(res2.Count / this.equipCount)
+        let text1 = this.toPercent(res2.count / this.equipCount)
         this.equipment.push({
           title: '与模型对应占比',
           tips: '"BIM模型中编码"有值的设备数量与设备总数占比',
           contentValueO: '已对应:',
           contentValueT: '未对应:',
-          needCountO: res2.Count,
-          needCountT: this.equipCount - res2.Count,
+          needCountO: res2.count,
+          needCountT: this.equipCount - res2.count,
           text: text1
         })
         this.isLoading = false;
@@ -629,13 +630,13 @@ export default {
     },
     getPartsCount() {// 获取部件数据
       queryPart(this.params, res => {
-        this.partsCount = res.Count;
+        this.partsCount = res.count;
       })
     },
     getZoneSpaceCount() {// 获取业务空间数据
       // 获取业务空间总数
       queryZoneCount(this.params, res => {
-        this.zoneSpaceCount = res.Count;
+        this.zoneSpaceCount = res.count;
       })
       let promise1 = new Promise((resolve) => {
         queryPartitionRatio(this.params, res => {
@@ -653,14 +654,14 @@ export default {
         this.defaultPart = [];
         let res1 = response[0]
         let res2 = response[1]
-        if (res1.Content.length) {
-          res1.Content.forEach(item => {
+        if (res1.content.length) {
+          res1.content.forEach(item => {
             this.zoneTypeConversion(item);
           })
-          let arr = res1.Content.filter(i => i.Count).forEach(j => {
+          let arr = res1.content.filter(i => i.count).forEach(j => {
             this.partProtion.push({
-              name: j.Name + j.Count,
-              value: j.Count
+              name: j.name + j.count,
+              value: j.count
             })
           })
           this.business.push({
@@ -669,8 +670,8 @@ export default {
             needCountO: this.partProtion,
           })
         }
-        if (res2.Content.length) {
-          res2.Content.forEach(item => {
+        if (res2.content.length) {
+          res2.content.forEach(item => {
             this.functionTypeTranstion(item, this.functionType);
           })
           this.business.push({
@@ -689,7 +690,7 @@ export default {
     getTenantCount() {// 获取租户数据
       // 获取租户总数
       queryRentCount(this.params, res => {
-        this.rentantCount = res.Count;
+        this.rentantCount = res.count;
       })
 
       // 租户-关联业务空间完成度
@@ -702,15 +703,15 @@ export default {
         this.tenant = [];
         let res = response[0];
         this.tenant = [];
-        let text = res.Count / this.rentantCount;
+        let text = res.count / this.rentantCount;
         text = this.toPercent(text);
         this.tenant.push({
           title: '关联业务空间完成度',
           tips: '已关联业务空间的租户数量百分比',
           contentValueO: '已关联:',
           contentValueT: '未关联:',
-          needCountO: res.Count,
-          needCountT: this.rentantCount - res.Count,
+          needCountO: res.count,
+          needCountT: this.rentantCount - res.count,
           text: text
         })
       })
@@ -738,12 +739,12 @@ export default {
         let res = response[0];
         let res1 = response[1];
         this.shaftPartProtion = [];
-        if (res.Content.length) {
-          res.Content.forEach(item => {
+        if (res.content.length) {
+          res.content.forEach(item => {
             this.shaftFunTypeTranstion(item);
             this.shaftPartProtion.push({
-              name: item.Name + item.Count,
-              value: item.Count
+              name: item.name + item.count,
+              value: item.count
             })
           })
           this.shaft.push({
@@ -753,14 +754,14 @@ export default {
           })
         }
 
-        let text = this.toPercent(res1.Count / this.shaftCount);
+        let text = this.toPercent(res1.count / this.shaftCount);
         this.shaft.push({
           title: '关联业务空间完成度',
           tips: '已关联业务空间的竖井数量百分比',
           contentValueO: '已关联:',
           contentValueT: '未关联:',
-          needCountO: res1.Count,
-          needCountT: this.shaftCount - res1.Count,
+          needCountO: res1.count,
+          needCountT: this.shaftCount - res1.count,
           text: text
         })
       })
@@ -779,7 +780,7 @@ export default {
       this.getSystemCount();
       this.getTenantCount();
       this.getShaftFunType();
-      this.gatherInfoPoints();
+      // this.gatherInfoPoints();
       this.systemInfoPoints();
       this.infoPoints();
     }