hfxc226 il y a 2 ans
Parent
commit
c3c911d2c0

+ 2 - 1
src/utils/dict.js

@@ -157,7 +157,8 @@ DictCache.TYPE = {
   CHECK_PLAN_LEVEL: 'CHECK_PLAN_LEVEL', // 等级1:现场,2,维修,3厂家
   CHECK_JOB_STATUS: 'CHECK_JOB_STATUS', // 任务状态,
   SPARE_PART_USED_SOURCE: 'SPARE_PART_USED_SOURCE', // 1 维修 2 保养
-
+  REMOTE_MEASURE: 'REMOTE_MEASURE', // 设备遥测
+  REMOTE_DEGREE: 'REMOTE_DEGREE', // 设备电度
   /* 审批单 */
   ACTIVITI_FORM_STATUS: 'ACTIVITI_FORM_STATUS', // 申请单状态
 

+ 1 - 1
src/views/remote/degree-log/RemoteDegreeLog.vue

@@ -137,7 +137,7 @@ export default {
         },
         {
           title: '描述',
-          dataIndex: 'desc'
+          dataIndex: 'description'
         },
         {
           title: '实时数值',

+ 2 - 2
src/views/remote/degree-log/modules/BaseForm.vue

@@ -75,7 +75,7 @@
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
-              v-decorator="['desc', {rules: [{required: true, message: '描述不能为空'}]}]"/>
+              v-decorator="['description', {rules: [{required: true, message: '描述不能为空'}]}]"/>
           </a-form-item>
         </row-item>
         <row-item>
@@ -167,7 +167,7 @@ export default {
           'sbName',
           'positionNum',
           'type',
-          'desc',
+          'description',
           'result',
           'ratio',
           'unit',

+ 2 - 2
src/views/remote/degree-log/modules/Detail.vue

@@ -12,7 +12,7 @@
       <detail-list-item term="设备名称">{{ model.sbName }}</detail-list-item>
       <detail-list-item term="点位">{{ model.positionNum }}</detail-list-item>
       <detail-list-item term="类型">{{ model.type }}</detail-list-item>
-      <detail-list-item term="描述">{{ model.desc }}</detail-list-item>
+      <detail-list-item term="描述">{{ model.description }}</detail-list-item>
       <detail-list-item term="实时数值">{{ model.result }}</detail-list-item>
       <detail-list-item term="系数">{{ model.ratio }}</detail-list-item>
       <detail-list-item term="单位">{{ model.unit }}</detail-list-item>
@@ -46,7 +46,7 @@ export default {
         'sbName': null,
         'positionNum': null,
         'type': null,
-        'desc': null,
+        'description': null,
         'result': null,
         'ratio': null,
         'unit': null,

+ 2 - 2
src/views/remote/degree-log/modules/RemoteDegreeLogSelectModal.vue

@@ -135,7 +135,7 @@ export default {
         },
         {
           title: '描述',
-          dataIndex: 'desc'
+          dataIndex: 'description'
         },
         {
           title: '实时数值',
@@ -176,7 +176,7 @@ export default {
           ...this.queryParam,
           ...this.extraQueryParam,
           dataScope: {
-            sortBy: 'desc',
+            sortBy: 'description',
             sortName: 'update_time'
           }
         }

+ 7 - 2
src/views/remote/degree/RemoteDegree.vue

@@ -126,11 +126,14 @@ export default {
         },
         {
           title: '类型',
-          dataIndex: 'type'
+          dataIndex: 'type',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.map, text)
+          }
         },
         {
           title: '描述',
-          dataIndex: 'desc'
+          dataIndex: 'description'
         },
         {
           title: '实时数值',
@@ -182,6 +185,7 @@ export default {
       selectedRowKeys: [],
       selectedRows: [],
 
+      map: {},
       options: {
         alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
         rowSelection: {
@@ -195,6 +199,7 @@ export default {
   created () {
     // 下拉框map
     this.tableOption()
+    this.map = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_DEGREE)
   },
   methods: {
     tableOption () {

+ 4 - 2
src/views/remote/degree/modules/BaseForm.vue

@@ -75,7 +75,7 @@
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
-              v-decorator="['desc', {rules: [{required: true, message: '描述不能为空'}]}]" />
+              v-decorator="['description', {rules: [{required: true, message: '描述不能为空'}]}]" />
           </a-form-item>
         </row-item>
         <row-item>
@@ -141,6 +141,7 @@ export default {
     return {
       confirmLoading: false,
       modalTitle: null,
+      map: {},
       form: this.$form.createForm(this),
       visible: false
       // 下拉框map
@@ -149,6 +150,7 @@ export default {
   props: {},
   created () {
     // 下拉框map
+    this.map = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_DEGREE)
   },
   methods: {
     base (record) {
@@ -168,7 +170,7 @@ export default {
           'sbName',
           'positionNum',
           'type',
-          'desc',
+          'description',
           'result',
           'ratio',
           'unit',

+ 6 - 3
src/views/remote/degree/modules/Detail.vue

@@ -11,8 +11,9 @@
       <detail-list-item term="设备id">{{ model.sbId }}</detail-list-item>
       <detail-list-item term="设备名称">{{ model.sbName }}</detail-list-item>
       <detail-list-item term="点位">{{ model.positionNum }}</detail-list-item>
-      <detail-list-item term="类型">{{ model.type }}</detail-list-item>
-      <detail-list-item term="描述">{{ model.desc }}</detail-list-item>
+      <detail-list-item term="类型">
+        {{ BaseTool.Object.getField(map,model.type) }}</detail-list-item>
+      <detail-list-item term="描述">{{ model.description }}</detail-list-item>
       <detail-list-item term="实时数值">{{ model.result }}</detail-list-item>
       <detail-list-item term="系数">{{ model.ratio }}</detail-list-item>
       <detail-list-item term="单位">{{ model.unit }}</detail-list-item>
@@ -40,6 +41,7 @@ export default {
       confirmLoading: false,
       mdl: {},
       modalTitle: null,
+      map: {},
       visible: false,
       // 下拉框map
       model: {
@@ -47,7 +49,7 @@ export default {
         'sbName': null,
         'positionNum': null,
         'type': null,
-        'desc': null,
+        'description': null,
         'result': null,
         'ratio': null,
         'unit': null,
@@ -61,6 +63,7 @@ export default {
   created () {
     // 下拉框map
 
+    this.map = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_DEGREE)
   },
   methods: {
     base (record) {

+ 5 - 3
src/views/remote/degree/modules/RemoteDegreeSelectModal.vue

@@ -128,12 +128,12 @@ export default {
           title: '类型',
           dataIndex: 'type',
           customRender: (text, record, index) => {
-            return this.BaseTool.Amount.formatter(text)
+            return this.BaseTool.Object.getField(this.map, text)
           }
         },
         {
           title: '描述',
-          dataIndex: 'desc'
+          dataIndex: 'description'
         },
         {
           title: '实时数值',
@@ -174,7 +174,7 @@ export default {
           ...this.queryParam,
           ...this.extraQueryParam,
           dataScope: {
-            sortBy: 'desc',
+            sortBy: 'description',
             sortName: 'update_time'
           }
         }
@@ -197,12 +197,14 @@ export default {
           onChange: this.onSelectChange
         }
       },
+      map: {},
       optionAlertShow: false,
       isCreated: false
     }
   },
   created () {
     // 下拉框map
+    this.map = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_DEGREE)
   },
   methods: {
     tableOption () {

+ 3 - 1
src/views/remote/measure/RemoteMeasure.vue

@@ -109,6 +109,7 @@ export default {
     return {
       advanced: false,
       visible: true,
+      map: {},
       // 查询参数
       queryParam: {},
       // 表头
@@ -138,7 +139,7 @@ export default {
         },
         {
           title: '描述',
-          dataIndex: 'desc'
+          dataIndex: 'description'
         },
         {
           title: '实时数值',
@@ -207,6 +208,7 @@ export default {
   created () {
     // 下拉框map
     this.tableOption()
+    this.map = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_MEASURE)
   },
   methods: {
     tableOption () {

+ 4 - 2
src/views/remote/measure/modules/BaseForm.vue

@@ -75,7 +75,7 @@
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
-              v-decorator="['desc', {rules: [{required: true, message: '描述不能为空'}]}]"/>
+              v-decorator="['description', {rules: [{required: true, message: '描述不能为空'}]}]"/>
           </a-form-item>
         </row-item>
         <row-item>
@@ -140,6 +140,7 @@ export default {
     return {
       confirmLoading: false,
       modalTitle: null,
+      map: {},
       form: this.$form.createForm(this),
       visible: false
       // 下拉框map
@@ -148,6 +149,7 @@ export default {
   props: {},
   created () {
     // 下拉框map
+    this.map = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_MEASURE)
   },
   methods: {
     base (record) {
@@ -167,7 +169,7 @@ export default {
           'sbName',
           'positionNum',
           'type',
-          'desc',
+          'description',
           'result',
           'ratio',
           'unit',

+ 6 - 3
src/views/remote/measure/modules/Detail.vue

@@ -11,8 +11,9 @@
       <detail-list-item term="设备id">{{ model.sbId }}</detail-list-item>
       <detail-list-item term="设备名称">{{ model.sbName }}</detail-list-item>
       <detail-list-item term="点位">{{ model.positionNum }}</detail-list-item>
-      <detail-list-item term="类型">{{ model.type }}</detail-list-item>
-      <detail-list-item term="描述">{{ model.desc }}</detail-list-item>
+      <detail-list-item term="类型">
+        {{ BaseTool.Object.getField(map,model.type) }}</detail-list-item>
+      <detail-list-item term="描述">{{ model.description }}</detail-list-item>
       <detail-list-item term="实时数值">{{ model.result }}</detail-list-item>
       <detail-list-item term="系数">{{ model.ratio }}</detail-list-item>
       <detail-list-item term="单位">{{ model.unit }}</detail-list-item>
@@ -38,6 +39,7 @@ export default {
     return {
       confirmLoading: false,
       mdl: {},
+      map: {},
       modalTitle: null,
       visible: false,
       // 下拉框map
@@ -46,7 +48,7 @@ export default {
         'sbName': null,
         'positionNum': null,
         'type': null,
-        'desc': null,
+        'description': null,
         'result': null,
         'ratio': null,
         'unit': null,
@@ -60,6 +62,7 @@ export default {
   created () {
     // 下拉框map
 
+    this.map = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_MEASURE)
   },
   methods: {
     base (record) {

+ 1 - 1
src/views/remote/measure/modules/ImportFormAdd.vue

@@ -29,7 +29,7 @@
 </template>
 
 <script>
-import { importRemoteMeasure } from '@/api/sb/info'
+import { importRemoteMeasure } from '@/api/remote/measure'
 
 export default {
   name: 'RemoteMeasureImportForm',

+ 6 - 3
src/views/remote/measure/modules/RemoteMeasureSelectModal.vue

@@ -94,6 +94,8 @@ export default {
       advanced: false,
       confirmLoading: false,
       mdl: {},
+
+      map: {},
       modalTitle: null,
       visible: false,
       record: null,
@@ -128,12 +130,12 @@ export default {
           title: '类型',
           dataIndex: 'type',
           customRender: (text, record, index) => {
-            return this.BaseTool.Amount.formatter(text)
+            return this.BaseTool.Object.getField(this.map, text)
           }
         },
         {
           title: '描述',
-          dataIndex: 'desc'
+          dataIndex: 'description'
         },
         {
           title: '实时数值',
@@ -174,7 +176,7 @@ export default {
           ...this.queryParam,
           ...this.extraQueryParam,
           dataScope: {
-            sortBy: 'desc',
+            sortBy: 'description',
             sortName: 'update_time'
           }
         }
@@ -203,6 +205,7 @@ export default {
   },
   created () {
     // 下拉框map
+    this.map = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_MEASURE)
   },
   methods: {
     tableOption () {