|
@@ -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) {
|