zhangyu 5 лет назад
Родитель
Сommit
c6cba22aa0

+ 27 - 11
src/components/data_admin/buildTask/table/assetsTable.vue

@@ -18,13 +18,13 @@
         <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="EquipCategory.EquipName" label="设备族" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="CADID" label="安装位置" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="taskTyepe" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="taskType" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
-            <i title="查看详情" class="iconfont icon-xiangqing table-button" @click="handleDetail(scope.$index, scope.row)"></i>
-            <i title="重新生成任务" class="iconfont icon-Update table-button" @click="handleRegenerate(scope.$index, scope.row)"></i>
-            <i title="删除任务" class="iconfont icon-delete table-button" @click="handleDelete(scope.$index, scope.row)"></i>
-            <i title="认可此任务执行情况" class="iconfont icon-lijiqueren table-button" @click="handleConfirm(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '待验证' || scope.row.taskType == '未找到'" title="查看详情" class="iconfont icon-xiangqing table-button" @click="handleDetail(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '未找到'" title="重新生成任务" class="iconfont icon-Update table-button" @click="handleRegenerate(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '待验证'" title="删除任务" class="iconfont icon-delete table-button" @click="handleDelete(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '未找到'" title="认可此任务执行情况" class="iconfont icon-lijiqueren table-button" @click="handleConfirm(scope.$index, scope.row)"></i>
           </template>
         </el-table-column>
         <template slot="empty">
@@ -54,6 +54,9 @@ export default {
   computed: {
     ...mapGetters("layout", ["projectId"])
   },
+  props: {
+    paramsData: Object,
+  },
   data() {
     return {
       inSpaceType: '资产',
@@ -84,10 +87,6 @@ export default {
       }, // 列表样式
     };
   },
-  props: {
-    // params: Object,
-    // type: String
-  },
   created() {
     // this.getTableData()
   },
@@ -95,7 +94,7 @@ export default {
     // 获取列表数据
     getTableData() {
       let params = {
-        Filters: `ShaftID='${this.params.ShaftID}'`,
+        Filters: `ProjectId='${this.projectId}'`,
         Cascade: [
           {
             Name: 'equipmentList',
@@ -106,6 +105,22 @@ export default {
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize
       }
+      if (this.paramsData.buildfloor[0] == "noKnow") {
+        param.Filters += `buildingId isNull`
+      } else if (this.paramsData.buildfloor[0] && this.paramsData.buildfloor[0] != "all") {
+        param.Filters += `buildingId='${this.paramsData.buildfloor[0]}'`
+        if (this.paramsData.buildfloor[1] == "noKnow") {
+          param.Filters += `;floorId isNull`
+        } else if (this.paramsData.buildfloor[1] && this.paramsData.buildfloor[1] != "all") {
+          param.Filters += `;floorId='${this.paramsData.buildfloor[1]}'`
+        }
+      }
+      if(this.paramsData.taskState){
+        params.Filters += `;TaskState='${this.paramsData.taskState}'`
+      }
+      if(this.paramsData.category){
+        params.Filters += `;Category='${this.paramsData.category}'`
+      }
       queryCenoteTableData(params, res => {
         this.tableData = res.Content[0].EquipmentList || []
       })
@@ -149,11 +164,12 @@ export default {
     }
   },
   watch: {
-    params: {
+    paramsData: {
       handler(newName, oldName) {
         this.page.pageNumber = 1
         this.getTableData()
       },
+      immediate: true,
       deep: true
     }
   }

+ 27 - 11
src/components/data_admin/buildTask/table/deviceTable.vue

@@ -18,13 +18,13 @@
         <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="EquipCategory.EquipName" :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="CADID" label="安装位置" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="taskTyepe" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="taskType" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
-            <i title="查看详情" class="iconfont icon-xiangqing table-button" @click="handleDetail(scope.$index, scope.row)"></i>
-            <i title="重新生成任务" class="iconfont icon-Update table-button" @click="handleRegenerate(scope.$index, scope.row)"></i>
-            <i title="删除任务" class="iconfont icon-delete table-button" @click="handleDelete(scope.$index, scope.row)"></i>
-            <i title="认可此任务执行情况" class="iconfont icon-lijiqueren table-button" @click="handleConfirm(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '待验证' || scope.row.taskType == '未找到'" title="查看详情" class="iconfont icon-xiangqing table-button" @click="handleDetail(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '未找到'" title="重新生成任务" class="iconfont icon-Update table-button" @click="handleRegenerate(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '待验证'" title="删除任务" class="iconfont icon-delete table-button" @click="handleDelete(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '未找到'" title="认可此任务执行情况" class="iconfont icon-lijiqueren table-button" @click="handleConfirm(scope.$index, scope.row)"></i>
           </template>
         </el-table-column>
         <template slot="empty">
@@ -54,6 +54,9 @@ export default {
   computed: {
     ...mapGetters("layout", ["projectId"])
   },
+  props: {
+    paramsData: Object,
+  },
   data() {
     return {
       inSpaceType: '设备',
@@ -84,10 +87,6 @@ export default {
       }, // 列表样式
     };
   },
-  props: {
-    // params: Object,
-    // type: String
-  },
   created() {
     // this.getTableData()
   },
@@ -95,7 +94,7 @@ export default {
     // 获取列表数据
     getTableData() {
       let params = {
-        Filters: `ShaftID='${this.params.ShaftID}'`,
+        Filters: `ProjectId='${this.projectId}'`,
         Cascade: [
           {
             Name: 'equipmentList',
@@ -106,6 +105,22 @@ export default {
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize
       }
+      if (this.paramsData.buildfloor[0] == "noKnow") {
+        param.Filters += `buildingId isNull`
+      } else if (this.paramsData.buildfloor[0] && this.paramsData.buildfloor[0] != "all") {
+        param.Filters += `buildingId='${this.paramsData.buildfloor[0]}'`
+        if (this.paramsData.buildfloor[1] == "noKnow") {
+          param.Filters += `;floorId isNull`
+        } else if (this.paramsData.buildfloor[1] && this.paramsData.buildfloor[1] != "all") {
+          param.Filters += `;floorId='${this.paramsData.buildfloor[1]}'`
+        }
+      }
+      if(this.paramsData.taskState){
+        params.Filters += `;TaskState='${this.paramsData.taskState}'`
+      }
+      if(this.paramsData.family){
+        params.Filters += `;Family='${this.paramsData.family}'`
+      }
       queryCenoteTableData(params, res => {
         this.tableData = res.Content[0].EquipmentList || []
       })
@@ -149,11 +164,12 @@ export default {
     }
   },
   watch: {
-    params: {
+    paramsData: {
       handler(newName, oldName) {
         this.page.pageNumber = 1
         this.getTableData()
       },
+      immediate: true,
       deep: true
     }
   }

+ 19 - 10
src/components/data_admin/buildTask/table/modelTable.vue

@@ -15,13 +15,13 @@
         <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="EquipCategory.EquipName" :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="CADID" label="BIM ID" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="taskTyepe" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="taskType" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
-            <i title="查看详情" class="iconfont icon-xiangqing table-button" @click="handleDetail(scope.$index, scope.row)"></i>
-            <i title="重新生成任务" class="iconfont icon-Update table-button" @click="handleRegenerate(scope.$index, scope.row)"></i>
-            <i title="删除任务" class="iconfont icon-delete table-button" @click="handleDelete(scope.$index, scope.row)"></i>
-            <i title="认可此任务执行情况" class="iconfont icon-lijiqueren table-button" @click="handleConfirm(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '待验证' || scope.row.taskType == '未找到'" title="查看详情" class="iconfont icon-xiangqing table-button" @click="handleDetail(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '未找到'" title="重新生成任务" class="iconfont icon-Update table-button" @click="handleRegenerate(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '待验证'" title="删除任务" class="iconfont icon-delete table-button" @click="handleDelete(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.taskType == '未找到'" title="认可此任务执行情况" class="iconfont icon-lijiqueren table-button" @click="handleConfirm(scope.$index, scope.row)"></i>
           </template>
         </el-table-column>
         <template slot="empty">
@@ -51,6 +51,9 @@ export default {
   computed: {
     ...mapGetters("layout", ["projectId"])
   },
+  props: {
+    paramsData: Object,
+  },
   data() {
     return {
       inSpaceType: '设备',
@@ -81,18 +84,14 @@ export default {
       }, // 列表样式
     };
   },
-  props: {
-    paramsData: Object,
-  },
   created() {
     // this.getTableData()
   },
   methods: {
     // 获取列表数据
     getTableData() {
-      debugger
       let params = {
-        Filters: `ShaftID='${this.params.ShaftID}'`,
+        Filters: `ProjectId='${this.projectId}'`,
         Cascade: [
           {
             Name: 'equipmentList',
@@ -103,6 +102,15 @@ export default {
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize
       }
+      if(this.paramsData.taskState){
+        params.Filters += `;TaskState='${this.paramsData.taskState}'`
+      }
+      if(this.paramsData.modelFile){
+        params.Filters += `;ModelFile='${this.paramsData.modelFile}'`
+      }
+      if(this.paramsData.category){
+        params.Filters += `;Category='${this.paramsData.category}'`
+      }
       queryCenoteTableData(params, res => {
         this.tableData = res.Content[0].EquipmentList || []
       })
@@ -151,6 +159,7 @@ export default {
         this.page.pageNumber = 1
         this.getTableData()
       },
+      immediate: true,
       deep: true
     }
   }

+ 5 - 5
src/views/data_admin/buildTask/index.vue

@@ -19,11 +19,11 @@
 			<el-button class="add-task" @click="addTaskDialog = true">添加验证任务</el-button>
 		</div>
 		<div class="tabel-box">
-			<model-table ref="modelTable" :paramsData="{taskState, modelFile, category}" v-if="taskType == 'model'"></model-table>
-			<device-table ref="deviceTable" v-else-if="taskType == 'device'"></device-table>
-			<assets-table ref="assetsTable" v-else-if="taskType == 'assets'"></assets-table>
-			<tear-table ref="tearTable" v-else-if="taskType == 'tear'"></tear-table>
-			<replace-table ref="replaceTable" v-else-if="taskType == 'replace'"></replace-table>
+			<model-table :paramsData="{taskState, modelFile, category}" v-if="taskType == 'model'"></model-table>
+			<device-table :paramsData="{buildfloor, taskState, category}" v-else-if="taskType == 'device'"></device-table>
+			<assets-table :paramsData="{buildfloor, taskState, family}" v-else-if="taskType == 'assets'"></assets-table>
+			<tear-table v-else-if="taskType == 'tear'"></tear-table>
+			<replace-table v-else-if="taskType == 'replace'"></replace-table>
 		</div>
 		<add-task :addTaskDialog.sync="addTaskDialog"></add-task>
 	</div>