diff --git a/src/views/pictureOnMap/LayerControl.vue b/src/views/pictureOnMap/LayerControl.vue index e7922b6..a2ee238 100644 --- a/src/views/pictureOnMap/LayerControl.vue +++ b/src/views/pictureOnMap/LayerControl.vue @@ -125,7 +125,7 @@ } - console.log('node',node); + nextTick(() => { let arr = dataSource.value[0].children.map(p => p.value); arr.map(item => { @@ -137,10 +137,10 @@ selectList.value.push(data.value); proxy.$refs.layertree.setCheckedKeys(selectList.value); } + setLayerVisible(selectList.value,[]); }); } function setLayerVisible(newVal = [], oldVal = []) { - console.log('setLayerVisible',newVal,oldVal); const openLayer = _.difference(newVal, oldVal); const closeLayer = _.difference(oldVal, newVal); @@ -186,7 +186,7 @@ bus.emit(mapInitBusName); } -watch(() => selectList.value, setLayerVisible); +// watch(() => selectList.value, setLayerVisible);