Browse Source

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

zhangyu 5 years ago
parent
commit
c92e2d9fe7

+ 10 - 6
src/components/config_point/dictionaryCascader.vue

@@ -1,12 +1,13 @@
 <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 {
   getDataDictionary,//查询信息点
   queryPhysicsAllType,//查询所有部件类型
   queryDictionaryHead,//查询所有空间类型
+
 } from "@/api/scan/request"
 import { mapGetters, mapActions } from "vuex";
 import tools from "@/utils/scan/tools";
@@ -58,8 +59,6 @@ export default {
   },
   created() {
     this.getAllData()
-    let val = ["Equipment", "SICU", "OnlineStatus"]
-    this.setCascaderVal(val)
   },
   methods: {
     //选择
@@ -71,8 +70,8 @@ export default {
         this.getDataPoint(val[1])
       } else if (type == "Component" && val.length == 2) {
         this.getDataPoint(val[1])
-      } else if (type == "System" && val.length == 2) {
-        this.getDataPoint(val[1])
+      } else if (type == "System" && val.length == 3) {
+        this.getDataPoint(val[2])
       } else if (type == "Space" && val.length == 2) {
         this.getDataPoint(val[1])
       } else if (singleStr.indexOf(type) > -1) {
@@ -87,6 +86,10 @@ export default {
       queryPhysicsAllType('Component', res => {
         this.options[4].children = this.formatOptions(res.Content)
       })
+      queryPhysicsAllType('Major-System', res => {
+        let data = JSON.parse(JSON.stringify(res.Content).replace(/ListClassDef/g, 'children'));
+        this.options[5].children = this.formatOptions(data)
+      })
       let param1 = {
         Distinct: true,
         Filters: "ParentId='Space'"
@@ -138,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) {

File diff suppressed because it is too large
+ 615 - 634
src/components/config_point/step3_point/3_temps.vue