需求变更整改

This commit is contained in:
guanj
2025-07-15 16:31:06 +08:00
parent 96518a4c9d
commit aa323c0d9c
50 changed files with 582 additions and 263 deletions

View File

@@ -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 => {
// 递归处理子节点

View File

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

View File

@@ -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,