GuoYuFu123 5 years ago
parent
commit
bb221c8577

+ 3 - 3
src/components/config_point/step3_edit/formula_handle.vue

@@ -10,7 +10,7 @@
             <p class='xia-1'>👇</p>
             <div>
                 截取:
-                <el-switch v-model='subStrVal' active-color='#13ce66' inactive-color='#ff4949'></el-switch>
+                <el-switch v-model='subStrVal' active-color='#13ce66' inactive-color='#C0CCDA'></el-switch>
                 <p class='sub-p'>
                     <el-input-number v-model='from' :min='1' :max='10' label='描述文字' :disabled='!subStrVal'></el-input-number>位 - 第
                     <el-input-number
@@ -26,12 +26,12 @@
             <p class='xia-2'>👇</p>
              <p>
                 仅提取其中的数值:
-                <el-switch v-model='extract' active-color='#13ce66' inactive-color='#ff4949'></el-switch>
+                <el-switch v-model='extract' active-color='#13ce66' inactive-color='#C0CCDA'></el-switch>
             </p>
             <p class='xia-3'>👇</p>
             <p>
                 数值计算:
-                <el-switch v-model='valCountVal' active-color='#13ce66' inactive-color='#ff4949'></el-switch>
+                <el-switch v-model='valCountVal' active-color='#13ce66' inactive-color='#C0CCDA'></el-switch>
             </p>
             <p>
                 <el-select class='mark' v-model='mark' placeholder='请选择' :disabled='!valCountVal'>

+ 15 - 13
src/components/config_point/step3_edit/index.vue

@@ -88,7 +88,11 @@
                     v-else-if='form.DataRuleType == "需按公式转换"'
                     :formulaHandleShow='formulaHandleShow'
                 ></formula-handle>
-                <split-handle ref='splitHandle' v-else-if='form.DataRuleType == "需拆分处理"' :splitHandleShow='splitHandleShow'></split-handle>
+                <split-handle
+                    ref='splitHandle'
+                    v-else-if='form.DataRuleType == "需拆分处理"'
+                    :splitHandleShow='splitHandleShow'
+                ></split-handle>
             </el-form>
             <div class='btn-box'>
                 <el-button type='primary' @click='save'>保存</el-button>
@@ -104,22 +108,15 @@ import autoHandle from './auto_handle'
 import enumHandle from './enum_handle'
 import formulaHandle from './formula_handle'
 import splitHandle from './split_handle'
-  import {
-        mapGetters,
-        mapActions
-    } from "vuex";
+import { mapGetters, mapActions } from 'vuex'
 //api
 import { getEquipmentAll, getQueryProperty } from '@/fetch/data_plat'
 import { batchCreate } from '@/fetch/point_http'
 export default {
     name: 'point_config_step3_edit',
     computed: {
-            ...mapGetters("project", [
-                "projectId",
-                "datasourceId",
-                "protocolType"
-            ])
-        },
+        ...mapGetters('project', ['projectId', 'datasourceId', 'protocolType'])
+    },
     data() {
         return {
             options: [],
@@ -136,7 +133,7 @@ export default {
             ValueDescription: '', //值/点位描述
             form: {
                 dict: [],
-                DataRuleType: ''
+                DataRuleType: '无需处理,直接使用'
             },
             rules: {
                 DataRuleType: [{ required: true, message: '请选择值处理方式', trigger: 'change' }]
@@ -399,7 +396,7 @@ export default {
         },
         handleChange(arr) {
             this.unitObj = this.infoDict[arr[3]]
-            this.InfomationPoint = this.unitObj ? (this.unitObj.infoPointName || '--') : '--'
+            this.InfomationPoint = this.unitObj ? this.unitObj.infoPointName || '--' : '--'
         },
         handleItemChange(val, cb) {
             if (val.length == 3) {
@@ -475,6 +472,7 @@ export default {
         async showValue(val) {
             await this.getEqAll()
             let length = val.RelationList.length
+            let eqMark = this.editData.Point.EquipmentMark
             if (length) {
                 var data = val.RelationList[0]
                 let dict = [data.SpecialtyCode, data.SystemCode, data.EquipmentTypeCode]
@@ -560,6 +558,10 @@ export default {
                         devArr: devArr
                     }
                 }
+            } else {
+                this.noHandleShow = {
+                    EquipmentMark: eqMark
+                }
             }
         }
     },

+ 1 - 1
src/components/config_point/step3_edit/split_handle.vue

@@ -24,7 +24,7 @@
             </div>
             <p class='tranf-box'>
                 需要将截取值转换为标准值
-                <el-switch v-model='tranfVal' style='margin-left:12px' active-color='#13ce66' inactive-color='#ff4949'></el-switch>
+                <el-switch v-model='tranfVal' style='margin-left:12px' active-color='#13ce66' inactive-color='#C0CCDA'></el-switch>
             </p>
             <ul class='point-box'>
                 <span class='left'>如果</span>