智慧园区前端大屏
shuishen
2024-11-14 e3a52e98105434d0be6a12a7db9ef1093c0c2ab2
src/pages/layout/components/scomponents/layersControl.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-10-31 10:47:29
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-11-12 18:15:54
 * @LastEditTime: 2024-11-13 19:20:17
 * @FilePath: \bigScreen\src\pages\layout\components\scomponents\layersControl.vue
 * @Description:
 *
@@ -463,7 +463,7 @@
          addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
          window.$viewer.addLayer(addTileLayers[item.layerName])
          function computeCircle(radius) {
          function computeCircle (radius) {
            var positions = []
            for (var i = 0; i < 1080; i++) {
              var radians = DC.Math.toRadians(i)
@@ -506,7 +506,7 @@
  })
}
function findObjectById(data, id) {
function findObjectById (data, id) {
  // 遍历数据数组
  for (let i = 0; i < data.length; i++) {
    const item = data[i]
@@ -558,7 +558,7 @@
  handleCheckChange(data.filter(i => indexPoint.value.includes(i.id)))
})
const sharedData = computed(() => pointStore.sharedData);
const sharedData = computed(() => pointStore.sharedData)
// 
watch(sharedData, (newValue) => {
  let companyInfo = JSON.parse(localStorage.getItem('companyInfo'))
@@ -576,13 +576,13 @@
    return
  }
  // 处理切换到应急空间页面,把图标显示
  console.log('sharedData changed to:', newValue);
  console.log('sharedData changed to:', newValue)
  // 获取缓存里面的企业id
  indexPoint.value.includes(newValue) ? '' : indexPoint.value.push(newValue)
  let checkList = data.filter(i => indexPoint.value.includes(i.id))
  treeRef.value?.setCheckedNodes(checkList)
  handleCheckChangeTwo(checkList, companyInfo.id)
});
})
const handleCheckChangeTwo = (data, firmId) => {
  let options = treeRef.value?.getCheckedNodes()