| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-31 10:47:29 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-11-04 19:12:02 |
| | | * @LastEditTime: 2024-11-04 22:42:54 |
| | | * @FilePath: \bigScreen\src\views\layout\components\scomponents\layersControl.vue |
| | | * @Description: |
| | | * |
| | |
| | | let tileLayers = new DC.TilesetLayer('tileLayers') |
| | | globalViewer.addLayer(tileLayers) |
| | | |
| | | const checkNodeById = (id) => { |
| | | const node = treeRef.value.getNode(id) |
| | | if (node) { |
| | | treeRef.value.setChecked(node, true, true) // true for checked, true for emit event |
| | | } |
| | | } |
| | | |
| | | const handleCheckChange = (data, options) => { |
| | | collectedNodes.value = [] |
| | | collectNodesWithFlag(data) |
| | |
| | | }) |
| | | } |
| | | |
| | | // onMounted(() => { |
| | | // setTimeout(() => { |
| | | // checkNodeById('1') |
| | | // }, 1000) |
| | | // }) |
| | | onMounted(() => { |
| | | handleCheckChange(data.filter(i => i.id == '1'), { |
| | | checkedKeys: ['1'] |
| | | }) |
| | | }) |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |