联调cvt系数页面与cvt绑定

This commit is contained in:
GGJ
2025-02-12 14:00:11 +08:00
parent e7807c8eae
commit 72051ba10e
8 changed files with 737 additions and 856 deletions

View File

@@ -32,6 +32,7 @@
:show-checkbox="true"
:default-expanded-keys="expandID"
node-key="id"
:filter-node-method="filterNode"
:check-strictly="false"
:expand-on-click-node="true"
:highlight-current="true"
@@ -81,13 +82,13 @@ export default {
fiveData: []
}
},
created() {},
watch: {
filterText(val) {
this.$refs.menuTree.filter(val)
}
},
methods: {
handleFilter(val) {
this.$refs.menuTree.filter(val)
},
// 点击树节点
treeckeck(data, checked, indeterminate) {},
open() {
@@ -195,6 +196,28 @@ export default {
console.log(this.time)
this.dialogVisible = false
},
// 过滤树节点
filterNode(value, data, node) {
if (!value) {
return true
}
let _array = [] //这里使用数组存储 只是为了存储值。
this.getReturnNode(node, _array, value)
let result = false
_array.forEach(item => {
result = result || item
})
return result
},
getReturnNode(node, _array, value) {
let isPass = node.data && node.data.name && node.data.name.indexOf(value) !== -1
isPass ? _array.push(isPass) : ''
this.index++
if (!isPass && node.name != 1 && node.parent) {
this.getReturnNode(node.parent, _array, value)
}
}
},
mounted() {
@@ -207,8 +230,13 @@ export default {
},
computed: {},
watch: {
filterText(val) {
console.log('🚀 ~ filterText ~ val:', val)
watch: {}
this.$refs.menuTree.filter(val)
}
}
}
</script>
<style lang="less" scoped>
@@ -217,7 +245,7 @@ export default {
::v-deep .el-dialog .el-dialog__body {
padding: 20px !important;
}
.boxTop{
.boxTop {
display: flex;
justify-content: space-between;
}