yangjunjing il y a 5 ans
Parent
commit
6e9f975a37

+ 2 - 0
src/api/model/report.js

@@ -18,10 +18,12 @@ export function queryModel(params, success) {
     return httputils.postJson(`${baseUrl}/model-folder/query`, params, success)
 }
 
+// 查询文件夹下的所有楼层
 export function queryReportList(params, success) {
     return httputils.postJson(`${baseUrl}/report/list/non-blocking`, params, success)
 }
 
+// 查询文件夹下的所有楼层(包含缺失楼层)
 export function queryLostReportList(params, success) {
     return httputils.postJson(`${baseUrl}/model-floor/query-list-missing`, params, success)
 }

+ 3 - 6
src/components/ledger/report/datafan.vue

@@ -6,11 +6,8 @@
       </el-tooltip>
     </div>
     <div class="doughnut-view">
-      <fan-chart v-if="renderData.needCountO" type="type" width="200" height="200" :name="renderData.title" :renderData="echartsData" :id="id"></fan-chart>
-      <div v-else class="center">
-        <i class="icon-wushuju iconfont"></i>
-        暂无数据
-      </div>
+      <fan-chart v-if="renderData.needCountO" type="type" width="200" height="200" :name="renderData.title" :renderData="echartsData" :id="id">
+      </fan-chart>
     </div>
     <slot></slot>
   </div>
@@ -68,7 +65,7 @@ export default {
 }
 .saga-fill {
   width: 345px;
-  height: 220px;
+  // height: 220px;
   .doughnut-view {
     height: 165px;
     width: 100%;

+ 2 - 6
src/components/ledger/report/dataorigin.vue

@@ -6,13 +6,9 @@
       </el-tooltip>
     </div>
     <div class="doughnut-view">
-      <report-doughnut v-if="renderData.needCountO && renderData.needCountT" type="type" width="200" height="200" :sum="renderData.sum"
+      <report-doughnut v-if="renderData.needCountO || renderData.needCountT" type="type" width="200" height="200" :sum="renderData.sum"
         :name="renderData.title" :renderData="echartsData" :id="id" :text="renderData.text">
       </report-doughnut>
-      <div v-else class="center">
-        <i class="icon-wushuju iconfont"></i>
-        暂无数据
-      </div>
     </div>
     <slot></slot>
   </div>
@@ -94,7 +90,7 @@ export default {
 }
 .saga-fill {
   width: 345px;
-  height: 220px;
+  // height: 220px;
   .doughnut-view {
     height: 165px;
     width: 100%;

+ 169 - 117
src/views/ledger/report/index.vue

@@ -34,7 +34,7 @@
     </div>
     <div class="progress">
       <p class="basic-statistics">基本统计</p>
-      <div class="data equipment">
+      <div class="data equipment" v-if="equipCount">
         <!-- 设备:本期只做前三个 -->
         <span class="contain-title">设备<i>{{`(${equipCount?equipCount:"0"})`}}</i></span>
         <div class="data-show" v-loading="isLoading" v-if="equipment.length">
@@ -42,63 +42,39 @@
             <data-origin :id="'origin' + index" :renderData="item"></data-origin>
           </div>
         </div>
-        <div v-if="!equipment.length" class="center" style="height: 60%;transform: translateY(30%);">
-          <i class="icon-wushuju iconfont"></i>
-          暂无数据
-        </div>
       </div>
-      <div class="data assets">
+      <div class="data assets" v-if="assetsCount">
         <span class="contain-title">资产<i>{{`(${assetsCount?assetsCount:"0"})`}}</i></span>
         <div class="data-show" v-loading="isLoading" v-if="assets.length">
           <div class="show-content" v-for="(item,index) in assets" :key="index">
             <data-origin :id="'origin' + index" :renderData="item"></data-origin>
           </div>
         </div>
-        <div v-if="!assets.length" class="center" style="height: 60%;transform: translateY(30%);">
-          <i class="icon-wushuju iconfont"></i>
-          暂无数据
-        </div>
       </div>
-      <div class="data parts">
+      <div class="data parts" v-if="partsCount">
         <span class="contain-title">部件<i>{{`(${partsCount?partsCount:'0'})`}}</i></span>
-        <div v-if="!parts.length" class="center" style="height: 60%;transform: translateY(30%);">
-          <i class="icon-wushuju iconfont"></i>
-          暂无数据
-        </div>
       </div>
-      <div class="data business-space">
+      <div class="data business-space" v-if="zoneSpaceCount">
         <span class="contain-title">业务空间<i>{{`(${zoneSpaceCount?zoneSpaceCount:'0'})`}}</i></span>
         <div class="data-show" v-if="business.length">
           <div v-for="(item,index) in business" :key="index" class="show-content">
             <datafan :id="'datafan' + index" :renderData="item"></datafan>
           </div>
         </div>
-        <div v-if="!business.length" class="center" style="height: 60%;transform: translateY(30%);">
-          <i class="icon-wushuju iconfont"></i>
-          暂无数据
-        </div>
       </div>
-      <div class="data system">
+      <div class="data system" v-if="systemCount">
         <!-- 系统:本期只查询总数 -->
         <span class="contain-title">系统<i>{{`(${systemCount?systemCount:'0'})`}}</i></span>
-        <div v-if="!system.length" class="center" style="height: 60%;transform: translateY(30%);">
-          <i class="icon-wushuju iconfont"></i>
-          暂无数据
-        </div>
       </div>
-      <div class="data tenant">
+      <div class="data tenant" v-if="rentantCount">
         <span class="contain-title">租户<i>{{`(${rentantCount?rentantCount:'0'})`}}</i></span>
         <div class="data-show" v-loading="isLoading" v-if="tenant.length">
           <div class="show-content" v-for="(item,index) in tenant" :key="index">
             <data-origin :id="'origin' + item + index" :renderData="item"></data-origin>
           </div>
         </div>
-        <div v-if="!tenant.length" class="center" style="height: 60%;transform: translateY(30%);">
-          <i class="icon-wushuju iconfont"></i>
-          暂无数据
-        </div>
       </div>
-      <div class="data shaft">
+      <div class="data shaft" v-if="shaftCount">
         <span class="contain-title">竖井<i>{{`(${shaftCount?shaftCount:'0'})`}}</i></span>
         <div class="data-show" v-loading="isLoading" v-if="shaft.length">
           <div class="show-content" v-for="(item,index) in shaft" :key="index">
@@ -106,10 +82,6 @@
             <data-origin :id="'origin' + item + index" :renderData="item" v-else></data-origin>
           </div>
         </div>
-        <div v-if="!shaft.length" class="center" style="height: 60%;transform: translateY(30%);">
-          <i class="icon-wushuju iconfont"></i>
-          暂无数据
-        </div>
       </div>
     </div>
   </div>
@@ -140,6 +112,7 @@ import {
 import dataOrigin from "@/components/ledger/report/dataorigin";
 import datafan from "@/components/ledger/report/datafan";
 import { queryDataSourceCount, synchronizeProj } from "@/fetch/point_http";
+import { resolve } from 'q';
 
 export default {
   data() {
@@ -256,14 +229,14 @@ export default {
   },
   methods: {
     zoneTypeConversion(item) {// 分区类型转换
-      this.zoneType.map(it => {
+      this.zoneType.forEach(it => {
         if (item.Name === it.Code) {
           item.Name = it.Name;
         }
       })
     },
     functionTypeTranstion(item, type) {// 默认分区功能类型转换
-      type.map(it => {
+      type.forEach(it => {
         if (item.Name === it.Code) {
           item.Name = it.Name;
           this.defaultPart.push({
@@ -295,7 +268,7 @@ export default {
     },
     toPercent(point) {// 小数转换成百分比
       if (point == 0) {
-        return 0;
+        return `0%`;
       }
       var str = Number(point * 100).toFixed(2);
       str += "%";
@@ -308,7 +281,7 @@ export default {
       })
     },
     shaftFunTypeTranstion(item) {// 竖井功能类型转换
-      this.ShaftFunType.map((it, index) => {
+      this.ShaftFunType.forEach((it, index) => {
         if (item.Name === it.Id) {
           item.Name = it.Name;
         }
@@ -341,9 +314,6 @@ export default {
         this.postRelationInforCount = res.Count;
       })
     },
-    getNotSyncObject() {
-
-    },
     getEquipCount() {// 获取设备总数
       countEquip(this.params, res => {
         this.equipCount = res.Count;
@@ -351,65 +321,80 @@ export default {
       })
     },
     getEquipOtherCount() {// 获取设备数据
+      this.equipment = [];
       // 未关联资产
       let param = {
         ProjectId: this.projectId,
         Filters: "PropertyId isNull"
       }
-      countEquip(param, res => {
+      let promise1 = new Promise(resolve => {
+        countEquip(param, res => {
+          resolve(res);
+        })
+      })
+
+      // 现场验证状态占比
+      let par = {
+        ProjectId: this.projectId,
+        Filters: "taskState = 0 or taskState = 1"
+      }
+      let promise2 = new Promise(resolve => {
+        countEquip(par, res => {
+          resolve(res);
+        })
+      })
+
+      let pa = {
+        ProjectId: this.projectId,
+        Filters: "not BimID isNull"
+      }
+      let promise3 = new Promise(resolve => {
+        countEquip(pa, res => {
+          resolve(res);
+        })
+      })
+
+      Promise.all([promise1, promise2, promise3]).then(response => {
+        this.equipment = [];
+        let res = response[0];
+        let res1 = response[1];
+        let res2 = response[2];
         this.equipment.push({
           title: '未关联资产',
           tips: '设备未关联资产数量',
           contentValueO: '未关联',
           contentValueT: '已关联',
-          text: '',
           needCountO: res.Count,
           needCountT: this.equipCount - res.Count,
           text: `总数${this.equipCount}`
         })
-      })
 
-      // 现场验证状态占比
-      let par = {
-        ProjectId: this.projectId,
-        Filters: "taskState = 0 or taskState = 1"
-      }
-      countEquip(par, res => {
-        let text = this.toPercent(res.Count / this.equipCount)
+        let text = this.toPercent(res1.Count / this.equipCount)
         this.equipment.push({
           title: '现场验证状态占比',
           tips: '设备状态为未找到、已找到的数量与设备总数占比',
           contentValueO: '已验证',
           contentValueT: '未验证',
-          text: '',
-          needCountO: res.Count,
-          needCountT: this.equipCount - res.Count,
+          needCountO: res1.Count,
+          needCountT: this.equipCount - res1.Count,
           text: text
         })
-        this.getEquipBIMIDCount();
-      })
-    },
-    getEquipBIMIDCount() {// 设备-与模型对应占比
-      let pa = {
-        ProjectId: this.projectId,
-        Filters: "not BimID isNull"
-      }
-      countEquip(pa, res => {
-        let text = this.toPercent(res.Count / this.equipCount)
+
+        let text1 = this.toPercent(res2.Count / this.equipCount)
         this.equipment.push({
           title: '与模型对应占比',
           tips: '"BIM模型中编码"有值的设备数量与设备总数占比',
           contentValueO: '有BIMID',
           contentValueT: '无BIMID',
-          text: '',
-          needCountO: res.Count,
-          needCountT: this.equipCount - res.Count,
-          text: text
+          needCountO: res2.Count,
+          needCountT: this.equipCount - res2.Count,
+          text: text1
         })
         this.isLoading = false;
       })
     },
     getAssetsCount() {// 获取资产数据
+      this.assets = [];
       countProperty(this.params, res => {
         // 获取资产总数
         this.assetsCount = res.Count;
@@ -420,15 +405,9 @@ export default {
         ProjectId: this.projectId,
         Filters: " EquipmentId isnull"
       }
-      countProperty(param, res => {
-        this.assets.push({
-          title: '未关联资产',
-          tips: '资产未关联设备数量',
-          contentValueO: '未关联',
-          contentValueT: '已关联',
-          text: `总数${this.assetsCount}`,
-          needCountO: res.Count,
-          needCountT: this.assetsCount - res.Count
+      let promise1 = new Promise((resolve) => {
+        countProperty(param, res => {
+          resolve(res)
         })
       })
 
@@ -437,17 +416,9 @@ export default {
         ProjectId: this.projectId,
         Filters: " taskState = 0 or taskState = 1"
       }
-      countProperty(par, res => {
-        let text = res.Count / this.assetsCount;
-        text = this.toPercent(text);
-        this.assets.push({
-          title: '现场验证状态占比',
-          tips: '资产状态为未找到、已找到的数量与资产总数占比',
-          contentValueO: '已验证',
-          contentValueT: '未验证',
-          text: text,
-          needCountO: res.Count,
-          needCountT: this.assetsCount - res.Count
+      let promise2 = new Promise((resolve) => {
+        countProperty(par, res => {
+          resolve(res);
         })
       })
 
@@ -456,19 +427,57 @@ export default {
         ProjectId: this.projectId,
         Filters: " not BIMLocation isnull"
       }
-      countProperty(pa, res => {
-        let text = res.Count / this.assetsCount;
+      let promise3 = new Promise((resolve) => {
+        countProperty(pa, res => {
+          resolve(res);
+        })
+      })
+
+      Promise.all([promise1, promise2, promise3]).then(response => {
+        this.assets = [];
+        let res0 = response[0];
+        let res1 = response[1];
+        let res2 = response[2];
+        this.assets.push({
+          title: '未关联资产',
+          tips: '资产未关联设备数量',
+          contentValueO: '未关联',
+          contentValueT: '已关联',
+          text: `总数${this.assetsCount}`,
+          needCountO: res1.Count,
+          needCountT: this.assetsCount - res1.Count
+        })
+
+        let text = res1.Count / this.assetsCount;
         text = this.toPercent(text);
         this.assets.push({
+          title: '现场验证状态占比',
+          tips: '资产状态为未找到、已找到的数量与资产总数占比',
+          contentValueO: '已验证',
+          contentValueT: '未验证',
+          text: text,
+          needCountO: res1.Count,
+          needCountT: this.assetsCount - res1.Count
+        })
+
+        let text1 = res2.Count / this.assetsCount;
+        text1 = this.toPercent(text1);
+        this.assets.push({
           title: '有无坐标占比',
           tips: '有坐标的资产数量百分比',
           contentValueO: '有坐标',
           contentValueT: '无坐标',
-          text: text,
-          needCountO: res.Count,
-          needCountT: this.assetsCount - res.Count
+          text: text1,
+          needCountO: res2.Count,
+          needCountT: this.assetsCount - res2.Count
         })
       })
+
+
+
+      countProperty(pa, res => {
+
+      })
     },
     getPartsCount() {// 获取部件数据
       queryPart(this.params, res => {
@@ -476,15 +485,25 @@ export default {
       })
     },
     getZoneSpaceCount() {// 获取业务空间数据
-
       // 获取业务空间总数
       queryZoneCount(this.params, res => {
         this.zoneSpaceCount = res.Count;
       })
-
-      // 获取业务空间的各分区占比
-      queryPartitionRatio(this.params, res => {
-        res.Content.map(item => {
+      let promise1 = new Promise((resolve) => {
+        queryPartitionRatio(this.params, res => {
+          resolve(res)
+        })
+      })
+      let promise2 = new Promise((resolve) => {
+        queryDefaultFunTypes(this.params, res => {
+          resolve(res)
+        })
+      })
+      Promise.all([promise1, promise2]).then(response => {
+        this.business = [];
+        let res1 = response[0]
+        let res2 = response[1]
+        res1.Content.forEach(item => {
           this.zoneTypeConversion(item);
           this.partProtion.push({
             name: item.Name,
@@ -496,11 +515,7 @@ export default {
           tips: '各类型分区实例数量与实例总数占比',
           needCountO: this.partProtion,
         })
-      })
-
-      // 获取业务空间默认分区功能类型占比
-      queryDefaultFunTypes(this.params, res => {
-        res.Content.map(item => {
+        res2.Content.forEach(item => {
           this.functionTypeTranstion(item, this.functionType);
         })
         this.business.push({
@@ -516,14 +531,20 @@ export default {
       })
     },
     getTenantCount() {// 获取租户数据
-
       // 获取租户总数
       queryRentCount(this.params, res => {
         this.rentantCount = res.Count;
       })
 
       // 租户-关联业务空间完成度
-      queryTenantCompletion(this.params, res => {
+      let promise = new Promise((resolve) => {
+        queryTenantCompletion(this.params, res => {
+          resolve(res);
+        })
+      })
+      Promise.all([promise]).then(response => {
+        let res = response[0];
+        this.tenant = [];
         let text = res.Count / this.rentantCount;
         text = this.toPercent(text);
         this.tenant.push({
@@ -531,23 +552,36 @@ export default {
           tips: '已关联业务空间的租户数量百分比',
           contentValueO: '已关联',
           contentValueT: '未关联',
-          text: '',
           needCountO: res.Count,
           needCountT: this.rentantCount - res.Count,
           text: text
         })
       })
+
     },
     getShaftCount() {// 获取竖井数据
-
+      this.shaft = [];
       // 获取竖井总数
       queryCenoteCount(this.params, res => {
         this.shaftCount = res.Count;
+        console.log(this.shaftCount, 1)
       })
 
-      // 获取竖井按功能类型占比
-      queryShaftFunctionType(this.params, res => {
-        res.Content.map(item => {
+      let promise1 = new Promise((resolve) => {
+        queryShaftFunctionType(this.params, res => {
+          resolve(res);
+        })
+      })
+      let promise2 = new Promise((resolve) => {
+        ShaftRelationBusinessSpace(this.params, res => {
+          resolve(res);
+        })
+      })
+      Promise.all([promise1, promise2]).then(response => {
+        this.shaft = [];
+        let res = response[0];
+        let res1 = response[1];
+        res.Content.forEach(item => {
           this.shaftFunTypeTranstion(item);
           this.shaftPartProtion.push({
             name: item.Name,
@@ -559,23 +593,37 @@ export default {
           tips: '竖井实例的竖井功能占比',
           needCountO: this.shaftPartProtion,
         })
-      })
 
-      // 获取竖井关联业务空间完成度
-      ShaftRelationBusinessSpace(this.params, res => {
-        let text = this.toPercent(res.Count / this.shaftCount);
+        let text = this.toPercent(res1.Count / this.shaftCount);
         this.shaft.push({
           title: '关联业务空间完成度',
           tips: '已关联业务空间的竖井数量百分比',
           contentValueO: '已关联',
           contentValueT: '未关联',
-          needCountO: res.Count,
-          needCountT: this.shaftCount - res.Count,
+          needCountO: res1.Count,
+          needCountT: this.shaftCount - res1.Count,
           text: text
         })
       })
     }
   },
+  watch: {
+    projectId(n, o) {
+      console.log(n)
+      console.log(o)
+      this.params = {
+        ProjectId: this.projectId
+      }
+      this.getFunctionType();
+      this.getStatisticsCount();
+      this.getEquipCount();
+      this.getAssetsCount();
+      this.getPartsCount();
+      this.getSystemCount();
+      this.getTenantCount();
+      this.getShaftFunType();
+    }
+  }
 }
 </script>
 
@@ -647,4 +695,8 @@ export default {
     border-radius: 5px;
   }
 }
+.system,
+.parts {
+  height: 50px !important;
+}
 </style>

+ 63 - 112
src/views/model/report/index.vue

@@ -45,9 +45,9 @@
                 </el-badge>
               </template>
             </el-table-column>
-            <el-table-column prop="itemsProblemsCheck" label="有问题的检查项" fixed width="150">
+            <el-table-column prop="questionItem" label="有问题的检查项" fixed width="150">
               <template slot-scope="scope">
-                <el-badge :value="scope.row.itemsProblemsCheck" class="item" :type='scope.row.itemsProblemsCheck?"warning":"success"'>
+                <el-badge :value="scope.row.questionItem" class="item" :type='scope.row.questionItem?"warning":"success"'>
                 </el-badge>
               </template>
             </el-table-column>
@@ -59,26 +59,30 @@
             </el-table-column>
             <el-table-column prop="FamilyNameCheck" label='设备族编码检查' width="200">
               <template slot-scope="scope">
-                <el-badge :value="scope.row.FamilyNameCheck" class="item" :type='scope.row.FamilyNameCheck?"danger":"success"'>
+                <el-badge :value="scope.row.FamilyNameCheck" class="item" type='danger' v-if="scope.row.FamilyNameCheck">
                 </el-badge>
+                <i class="icon el-icon-check" v-if="!scope.row.FamilyNameCheck"></i>
               </template>
             </el-table-column>
             <el-table-column prop="EquipPartLocationCheck" label='部件所在位置检查' width="200">
               <template slot-scope="scope">
-                <el-badge :value="scope.row.EquipPartLocationCheck" class="item" :type='scope.row.EquipPartLocationCheck?"danger":"success"'>
+                <el-badge :value="scope.row.EquipPartLocationCheck" class="item" type='danger' v-if="scope.row.EquipPartLocationCheck">
                 </el-badge>
+                <i class="icon el-icon-check" v-if="!scope.row.EquipPartLocationCheck"></i>
               </template>
             </el-table-column>
             <el-table-column prop="ColumnCheck" label='柱边界检查' width="200">
               <template slot-scope="scope">
-                <el-badge :value="scope.row.ColumnCheck" class="item" :type='scope.row.ColumnCheck?"danger":"success"'>
+                <el-badge :value="scope.row.ColumnCheck" class="item" type='danger' v-if="scope.row.ColumnCheck">
                 </el-badge>
+                <i class="icon el-icon-check" v-if="!scope.row.ColumnCheck"></i>
               </template>
             </el-table-column>
             <el-table-column prop="ConnectorCheck" label='连接件检查' width="200">
               <template slot-scope="scope">
-                <el-badge :value="scope.row.ConnectorCheck" class="item" :type='scope.row.ConnectorCheck?"danger":"success"'>
+                <el-badge :value="scope.row.ConnectorCheck" class="item" :type='danger' v-if="ConnectorCheck">
                 </el-badge>
+                <i class="icon el-icon-check" v-if="!scope.row.ConnectorCheck"></i>
               </template>
             </el-table-column>
             <el-table-column prop="SystemNameCheck" label='系统类型名称检查' width="200">
@@ -107,14 +111,16 @@
             </el-table-column>
             <el-table-column prop="ParameterIntegrityCheck" label='Revit族参数完整性检查' width="200">
               <template slot-scope="scope">
-                <el-badge :value="scope.row.ParameterIntegrityCheck" class="item" :type='scope.row.ParameterIntegrityCheck?"danger":"success"'>
+                <el-badge :value="scope.row.ParameterIntegrityCheck" class="item" type='danger' v-if="ParameterIntegrityCheck">
                 </el-badge>
+                <i class="icon el-icon-check" v-if="!scope.row.ParameterIntegrityCheck"></i>
               </template>
             </el-table-column>
             <el-table-column prop="XyzOverlapCheck" label='xyz坐标重叠检查' width="200">
               <template slot-scope="scope">
-                <el-badge :value="scope.row.XyzOverlapCheck" class="item" :type='scope.row.XyzOverlapCheck?"danger":"success"'>
+                <el-badge :value="scope.row.XyzOverlapCheck" class="item" type='danger' v-if="XyzOverlapCheck">
                 </el-badge>
+                <i class="icon el-icon-check" v-if="!scope.row.XyzOverlapCheck"></i>
               </template>
             </el-table-column>
             <template slot="empty">
@@ -184,38 +190,6 @@ export default {
     ...mapGetters('layout', ['projectId'])
   },
   methods: {
-    getlostFloors(ary, eng, FloorName) {// 获取缺失楼层
-      let newAry = ary[0];
-      if (newAry.FloorName !== '1') {
-        ary.unshift({ FloorName: `${1}` })
-      }
-      for (let i = 0; i < ary.length; i++) {
-        if (i === ary.length - 1) {
-          break;
-        }
-        let x = ary[i].FloorName;
-        let y = ary[i + 1].FloorName;
-        let z = { FloorName: `${Number(x) + 1}` };
-        if (Number(x) + 1 !== Number(y)) {
-          ary.splice(i + 1, 0, z)
-          i++;
-        }
-      }
-      for (let i = 0; i < ary.length; i++) {
-        ary[i].FloorName = `${eng + ary[i].FloorName}`;
-      }
-      for (let i = 0; i < ary.length; i++) {
-        for (let j = 0; j < FloorName.length; j++) {
-          if (ary[i].FloorName === FloorName[j].FloorName) {
-            break;
-          } else {
-            if (j === FloorName.length - 1) {
-              ary[i].FloorName = `${'丢失' + ary[i].FloorName}`
-            }
-          }
-        }
-      }
-    },
     getModelFileCount() {// 获取项目下所有模型文件夹
       let params = {
         ProjectId: this.projectId,
@@ -223,7 +197,7 @@ export default {
       queryModel(this.params, res => {
         this.ModelFileCount = res.Content.length;
         this.tableList = res.Content;
-        this.tableList.map((item, index) => {
+        this.tableList.forEach((item, index) => {
           item.Code = item.Id;
         })
         this.activeTab = this.tableList[0].Code;// 默认选中第一个模型文件夹
@@ -234,7 +208,7 @@ export default {
     getModelFloorCount() {// 获取楼层模型文件数量,计算出检查出问题的模型文件
       queryFloorList(this.params, res => {
         this.modelFloorCount = res.Total;
-        res.Content.map(item => {
+        res.Content.forEach(item => {
           if (!item.DataCheckResult) {
             this.problemCount += 1;
           }
@@ -262,85 +236,42 @@ export default {
         PageSize: this.page.pageSize
       }
       queryReportList(params, res => {
-        if (res.Content) {
-          let that = this;
-          this.FloorName = res.Content;
-          this.lostFloort.ary = [];
-          this.lostFloort.Bary = [];
-          this.lostFloort.Fary = [];
-          for (let i = 0; i < this.FloorName.length; i++) {
-            let it = this.FloorName[i];
-            if (this.lostFloort.regex.test(it.FloorName)) {
-              it.FloorName.replace(/^(B||F)(\d)/g, function (a, b, c) {
-                if (b === "B") {
-                  it.FloorName = c;
-                  that.lostFloort.Bary.push(it);
-                } else if (b === "F") {
-                  it.FloorName = c;
-                  that.lostFloort.Fary.push(it);
-                }
-              })
-            } else {
-              this.lostFloort.ary.push(it)
-            }
-          }
-          if (this.lostFloort.Bary.length > 0) {
-            this.getlostFloors(this.lostFloort.Bary, "B", this.FloorName)
-          }
-          if (this.lostFloort.Fary.length > 0) {
-            this.getlostFloors(this.lostFloort.Fary, "F", this.FloorName)
-          }
-          if (this.lostFloort.Bary.length < 0 && this.lostFloort.Fary.length < 0) {
-            this.tableData = res.Content;
-          } else {
-            this.tableData = [...this.lostFloort.ary, ...this.lostFloort.Bary, ...this.lostFloort.Fary]
-          }
-          let i;
-          let j = 0;
-          this.tableData.map(item => {
-            i = 0;
-            for (let key in item) {
-              if (item[key] > 0) {
-                i += 1;
-              }
-            }
-            if (item.ColumnCheck !== undefined) {
-              item.itemsProblemsCheck = i;
-              item.toBeDel = 10;
-              item.toBeSupplement = 6;
-            }
-            if (item.itemsProblemsCheck) {
-              j += 1;
-              this.floorIconType = j;
-            }
-          })
-        } else {
-          this.tableData = [];
-        }
+        this.FloorName = res.Content;
         this.getLostModelFloor();
       })
     },
     getLostModelFloor() {
       let param = {
         ProjectId: this.projectId,
-        Filters: `FolderId=${this.activeTab};Status=4`,
+        Filters: `FolderId='${this.activeTab}';Status=4`,
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize
       }
-      // queryLostReportList(param, res => {
-      //   console.log(res, 'lost');
-      //   this.LostFloorName = res.Content;
-      //   for (let i = 0; i < this.LostFloorName.length; i++) {
-      //     for (let j = 0; j < this.FloorName.length; j++) {
-      //       if (this.LostFloorName[i].FloorName == this.FloorName.FloorName) {
-      //         continue;
-      //       } else {
-      //         this.FloorName.splice(i, 0, this.LostFloorName[i])
-      //       }
-      //     }
-      //   }
-      //   this.tableData = this.FloorName;
-      // })
+      queryLostReportList(param, res => {
+        let that = this;
+        this.LostFloorName = res.Content;
+        // RFM1
+        this.LostFloorName.forEach((item, index) => {
+          if (!item.FolderId) {
+            item.FloorName = `${item.Note + item.FloorName}`
+            this.FloorName.splice(index, 0, item);
+          }
+        })
+        let i = 0;
+        this.FloorName.forEach(item => {
+          item.questionItem = 0;
+          item.toBeDel = 10;
+          item.toBeSupplement = 6;
+          for (let key in item) {
+            if (item[key] > 0) {
+              i += 1;
+              item.questionItem += 1;
+            }
+          }
+        })
+        this.floorIconType = i;
+        this.tableData = this.FloorName;
+      })
     },
     del() {
       // 点击需从模型中删除的设备
@@ -362,6 +293,15 @@ export default {
       this.page.pageNumber = val;
       this.getModelFloor();
     },
+  },
+  watch: {
+    projectId() {
+      this.params = {
+        ProjectId: this.projectId
+      }
+      this.getModelFileCount();
+      this.getModelFloorCount();
+    }
   }
 }
 </script>
@@ -413,4 +353,15 @@ export default {
 .error-color {
   color: #f56c6c;
 }
+.icon {
+  width: 20px;
+  height: 20px;
+  border-radius: 50%;
+  background: #67c23a;
+  text-align: center;
+  vertical-align: middle;
+  color: white;
+  padding-top: 4px;
+  box-sizing: border-box;
+}
 </style>