| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-31 10:47:29 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-12-03 13:44:43 |
| | | * @LastEditTime: 2024-12-03 14:30:57 |
| | | * @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue |
| | | * @Description: |
| | | * |
| | |
| | | label: '应急空间', |
| | | children: [ |
| | | { |
| | | parentId: '3', |
| | | id: '3-1', |
| | | label: '应急池', |
| | | type: 'layer', |
| | |
| | | } |
| | | }, |
| | | { |
| | | parentId: '3', |
| | | id: '3-2', |
| | | label: '阀门', |
| | | type: 'layer', |
| | |
| | | }, |
| | | |
| | | { |
| | | parentId: '3', |
| | | id: '3-3', |
| | | label: '公共管网', |
| | | children: [ |
| | | // 给水管网、污水管网、燃气管网、雨水管网 |
| | | { |
| | | parentId: '3-3', |
| | | id: '3-3-2', |
| | | label: '污水管网', |
| | | type: 'layer', |
| | |
| | | height: 60.2, |
| | | }, |
| | | { |
| | | parentId: '3-3', |
| | | id: '3-3-4', |
| | | label: '雨水管网', |
| | | type: 'layer', |
| | |
| | | }, |
| | | |
| | | { |
| | | parentId: '3', |
| | | id: '3-4', |
| | | label: '污水提升泵站', |
| | | type: 'layer', |
| | |
| | | }, |
| | | |
| | | { |
| | | parentId: '3', |
| | | id: '3-5', |
| | | label: '水库', |
| | | type: 'layer', |
| | |
| | | }, |
| | | |
| | | { |
| | | parentId: '3', |
| | | id: '3-6', |
| | | label: '应急泵', |
| | | type: 'layer', |
| | |
| | | }, |
| | | |
| | | { |
| | | parentId: '3', |
| | | id: '3-8', |
| | | label: '沟渠', |
| | | type: 'layer', |
| | |
| | | // layerName: 'fsclz' |
| | | // }, |
| | | { |
| | | parentId: '3', |
| | | id: '3-10', |
| | | label: '排水口', |
| | | type: 'layer', |
| | |
| | | label: '风险源', |
| | | children: [ |
| | | { |
| | | parentId: '4', |
| | | id: '4-1', |
| | | label: '一般', |
| | | type: 'layer', |
| | |
| | | } |
| | | }, |
| | | { |
| | | parentId: '4', |
| | | id: '4-2', |
| | | label: '较大', |
| | | type: 'layer', |
| | |
| | | } |
| | | }, |
| | | { |
| | | parentId: '4', |
| | | id: '4-9', |
| | | label: '暂定', |
| | | type: 'layer', |
| | |
| | | } |
| | | |
| | | const handleCheckChange = (data) => { |
| | | |
| | | let options = treeRef.value?.getCheckedNodes() |
| | | collectedNodes.value = [] |
| | | collectNodesWithFlag(data) |
| | |
| | | } |
| | | |
| | | const restHandleDelChange = (key) => { |
| | | |
| | | let checkIds = treeRef.value?.getCheckedKeys() |
| | | |
| | | if (checkIds && !checkIds.some(i => i == key)) { |
| | | return |
| | | } |
| | | |
| | | treeRef.value?.setCheckedKeys(checkIds.filter(i => i.indexOf(key))) |
| | | handleCheckChange([findObjectById(data, key)]) |
| | | let selectData = findObjectById(data, key) |
| | | |
| | | let parentId = null |
| | | if (selectData && 'parentId' in selectData) parentId = selectData.parentId |
| | | |
| | | treeRef.value?.setCheckedKeys(checkIds.filter(i => i.indexOf(key) && i != parentId)) |
| | | handleCheckChange([selectData]) |
| | | } |
| | | |
| | | // 飞到园区范围 |