Browse Source

Merge branch 'apiupdate' of git.sagacloud.cn:web/ibms into apiupdate-zy

zhangyu 5 years ago
parent
commit
90b49ba622

+ 3 - 1
src/components/config_point/dictionaryCascader.vue

@@ -142,6 +142,9 @@ export default {
           let code = item.InfoPointCode
           this.pointDataSource[code] = item
         })
+        this.$nextTick(() => {
+          this.changeSelect(this.form.dict)
+        })
       })
     },
     //根据返回数据拼接options
@@ -173,7 +176,6 @@ export default {
     //设置值
     setCascaderVal(value) {
       this.form.dict = tools.deepCopy(value)
-      this.changeSelect(value)
       value.splice(value.length - 1, 1)
       this.handleChange(value)
     },

+ 17 - 1
src/components/config_point/step3_edit/index.vue

@@ -371,7 +371,7 @@ export default {
             let data = res.Content
             let arr = data
               .filter(item => {
-                return item.inputMode == 'L'
+                return item.inputMode == 'L' || item.inputMode == 'M'
               })
               .map(item => {
                 return {
@@ -566,10 +566,26 @@ export default {
       this.splitHandleShow.devArr = this.splitHandleShow.devArr ? this.splitHandleShow.devArr : [{ EquipmentMark: '', SplitStart: 1, SplitEnd: 1 }]
       this.splitHandleShow.pointArr = this.splitHandleShow.pointArr ? this.splitHandleShow.pointArr : [{ from: '', to: '' }]
     },
+    //处理函数
+    delDataSource(val) {
+      if (!val) {
+        return '--'
+      }
+      val = JSON.parse(val)
+      let str = ''
+      val.forEach(el => {
+        str += el.Code + '.' + el.Name + ' '
+      })
+      return str
+    },
     //对应数据字典变化
     changeDictionaryCas({ val, labels }) {
       this.dictionaryData = val;
       this.dictionaryNames = labels
+      this.infoDict = this.$refs.dictionaryCas.pointDataSource
+      this.unitObj = this.infoDict[val[val.length - 1]]
+      this.InfomationPoint = this.unitObj.InfoPointName || ''
+      this.ValueDescription = this.delDataSource(this.unitObj.DataSource)
     }
   },
   mounted() {

+ 1 - 1
src/components/config_point/step3_point/3_temps.vue

@@ -580,7 +580,7 @@ export default {
       this.dictionaryNames = labels
       this.infoDict = this.$refs.dictionaryCas.pointDataSource
       this.unitObj = this.infoDict[val[val.length - 1]]
-      this.InfomationPoint = this.unitObj.infoPointName || ''
+      this.InfomationPoint = this.unitObj.InfoPointName || ''
     }
   }
 }