allen 2 лет назад
Родитель
Сommit
6a00a8f7b4

+ 13 - 1
src/views/gisShow/components/rightEquipment.vue

@@ -183,6 +183,18 @@ export default {
         })
       }
     },
+    changeStatus(flag) {
+      switch (flag) { 
+        case 'I':
+          return '在线'
+        case 'W':
+          return '运行'
+        case 'E':
+          return '故障'
+        case 'O':
+          return '离线'
+      }
+     },
     async getBaseInfo() { 
       const response = await getBaseInfo({
         tmnId: this.tmnId
@@ -194,7 +206,7 @@ export default {
       this.cusareaName = value?.cusareaName;
       this.waterAddress = value?.waterAddress;
       this.tmnstatusRunstatusContent = value?.tmnstatusRunstatusContent;
-      this.tmnstatusRunstatus = value?.tmnstatusRunstatus;
+      this.tmnstatusRunstatus = this.changeStatus(value?.tmnstatusRunstatus);
       this.list = [{
         label: '设备名称:',
         text: this.tmnName || '-'

+ 16 - 1
src/views/monitoringMamage/components/IrrigationRecord.vue

@@ -8,6 +8,11 @@
       <el-button type="primary" size="small" style="margin-left: 16px;" @click="handleSearch">查询</el-button>
     </div>
     <b-table ref="tableRef" :args="{ 'highlight-current-row': true }" :data="loadData" :columns="columns" showIndex>
+      <template #cardusercdBillingtype="scope">
+        <span style="display:flex;align-items:center;justify-content:center">
+          {{ changeDict(scope.row.cardusercdBillingtype) }}
+        </span>
+      </template>
     </b-table>
   </el-dialog>
 </template>
@@ -79,7 +84,7 @@ export default {
         {
           label: '计费方式',
           prop: 'cardusercdBillingtype',
-          customRender: '',
+          customRender: 'cardusercdBillingtype',
           align: 'center'
         },
         {
@@ -117,6 +122,16 @@ export default {
     }
   },
   methods: {
+    changeDict(flag) {
+      switch (flag) {
+        case '0':
+          return '水电双计'
+        case '1':
+          return '只计水'
+        case '2':
+          return '只计电'
+       }
+     },
     loadData(parameter) {
       const payload = omit(assign({}, parameter), []);
       return this.getTableData(payload);