Просмотр исходного кода

设备台账 优化表格字段显示及错误提示

yusheng 7 месяцев назад
Родитель
Сommit
4df55948a7

+ 22 - 10
src/views/maintenance/components/MaterialAdd.vue

@@ -112,8 +112,8 @@
             prop: 'name'
           },
           {
-            label: '编',
-            prop: 'codeNumber'
+            label: '编',
+            prop: 'code'
           },
           {
             label: '固资编码',
@@ -128,8 +128,8 @@
             prop: 'postName'
           },
           {
-            label: '负责人',
-            prop: 'chargePerson'
+            label: '片区负责人负责人',
+            prop: 'areaPersonInChargeUserName'
           },
           {
             label: '有效开始时间',
@@ -140,19 +140,31 @@
             prop: 'endTime'
           },
           {
+            prop: 'category.modelType',
             label: '型号',
-            prop: 'modelType',
-            slot: 'modelType'
+            showOverflowTooltip: true,
+            minWidth: 110
           },
           {
+            prop: 'category.specification',
             label: '规格',
-            prop: 'specification',
-            slot: 'specification'
+            showOverflowTooltip: true,
+            minWidth: 110
           },
           {
             label: '设备位置',
             prop: 'pathName',
-            slot: 'pathName'
+            formatter: (_row) => {
+              const positionDetail =
+                _row.position &&
+                _row.position.length != 0 &&
+                _row.position[0].detailPosition
+                  ? _row.position[0].detailPosition
+                  : '-';
+              return _row.deviceLocationName
+                ? _row.deviceLocationName + '-' + positionDetail
+                : '';
+            }
           }
         ],
 
@@ -228,7 +240,7 @@
         if (this.rootId && this.categoryLevelId) {
           this.$refs.table.reload({ page: 1, where: where });
         } else {
-          this.$message.error('请选择设备');
+          this.$message.error('请选择设备类别');
         }
       },
 

+ 3 - 1
src/views/maintenance/components/programRulesDialog.vue

@@ -705,8 +705,10 @@ export default {
         this.$set(this.addForm, 'executorId', res.data.executorId.split(','));
         this.$set(this.addForm, 'imageUrl', {});
         console.log(this.rootData);
-
+        if(res.data.groupId){
         this.getUserList({ groupId: res.data.groupId });
+
+        }
         // const rep = await getTreeByType(0);
         // console.log('sasas', res);
         // const ids = this.findTopLevelAncestorId(