需求变更整改
This commit is contained in:
@@ -134,7 +134,7 @@ const defaultProps = {
|
||||
label: 'name',
|
||||
value: 'id'
|
||||
}
|
||||
const process = ref('2')
|
||||
const process = ref('')
|
||||
//治理设备数据
|
||||
const zlDeviceData = ref([])
|
||||
const zlDevList = ref<any>([])
|
||||
@@ -181,6 +181,9 @@ watch(process, val => {
|
||||
}, 0)
|
||||
})
|
||||
function filterProcess(nodes: any) {
|
||||
if (process.value == '') {
|
||||
return nodes
|
||||
}
|
||||
return nodes
|
||||
.map(node => {
|
||||
// 递归处理子节点
|
||||
|
||||
@@ -32,6 +32,7 @@ const config = useConfig()
|
||||
const tree = ref()
|
||||
const treRef = ref()
|
||||
const changeDeviceType = (val: any, obj: any) => {
|
||||
console.log("🚀 ~ changeDeviceType ~ val:", val,obj)
|
||||
emit('deviceTypeChange', val, obj)
|
||||
}
|
||||
getDeviceTree().then(res => {
|
||||
|
||||
@@ -119,7 +119,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
type: '',
|
||||
data: []
|
||||
})
|
||||
const process = ref('2')
|
||||
const process = ref('')
|
||||
const route = useRoute()
|
||||
const { proxy } = useCurrentInstance()
|
||||
const menuCollapse = ref(false)
|
||||
@@ -238,12 +238,16 @@ const filterNode = (value: string, data: any, node: any) => {
|
||||
}
|
||||
}
|
||||
function filterProcess(nodes: any) {
|
||||
if (process.value == '') {
|
||||
return nodes
|
||||
}
|
||||
return nodes
|
||||
.map(node => {
|
||||
// 递归处理子节点
|
||||
const children = node.children ? filterProcess(node.children) : []
|
||||
|
||||
// 如果当前节点的process=4,或者有子节点满足条件,则保留当前节点
|
||||
|
||||
if (node.process == process.value || children.length > 0) {
|
||||
return {
|
||||
...node,
|
||||
|
||||
Reference in New Issue
Block a user