Browse Source

modify point dictionarycascader

haojianlong 5 years ago
parent
commit
42ea95d53a
1 changed files with 3 additions and 4 deletions
  1. 3 4
      src/components/config_point/dictionaryCascader.vue

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

@@ -1,6 +1,6 @@
 <template>
   <el-cascader style='width: 100%;' :options='options' v-model='dict' @active-item-change='handleChange' :props='props' filterable
-    @change="changeSelect"></el-cascader>
+    @change="changeSelect" ref="dictCas"></el-cascader>
 </template>
 <script>
 import {
@@ -59,8 +59,6 @@ export default {
   },
   created() {
     this.getAllData()
-    let val = ["Equipment", "SICU", "OnlineStatus"]
-    this.setCascaderVal(val)
   },
   methods: {
     //选择
@@ -143,7 +141,8 @@ export default {
       })
     },
     changeSelect(val) {
-      console.log(val)
+      let labels = this.$refs.dictCas.currentLabels
+      this.$emit('change', { val: val, labels: labels })
     },
     //减少请求次数
     hasChildren(Code) {