| | |
| | | import { createPoint, removeEntities } from "@/utils/map"; |
| | | // import { deviceDictList, getDictName } from "@/constant/dict.js"; |
| | | |
| | | import { getDeviceData } from "@/api/index"; |
| | | const emits = defineEmits(["start", "end"]); |
| | | |
| | | const list = [ |
| | |
| | | // createPoint(item) |
| | | }); |
| | | } |
| | | function getData() { |
| | | getDeviceData().then((res) => { |
| | | devicetList.value = res.data; |
| | | }); |
| | | } |
| | | |
| | | function createLabel(item) { |
| | | const { name, x, y, showBillboard = false } = item; |
| | | let position = Cesium.Cartesian3.for(x, y); |
| | |
| | | } |
| | | const schemeCardRef = ref(null); |
| | | |
| | | // function deleteSelectedScheme() { |
| | | // const selectedId = schemeCardRef.value.getSelectedId(); |
| | | // const selectedScheme = simStore.schemCard.find( |
| | | // (item) => item.id === selectedId |
| | | // ); |
| | | // if (!selectedId) { |
| | | // ElMessage.warning("请先选择一个方案!"); |
| | | // return; |
| | | // } |
| | | // ElMessageBox.confirm( |
| | | // `确定要删除 "${selectedScheme.name}" 方案吗?`, |
| | | // "删除确认", |
| | | // { |
| | | // confirmButtonText: "确定", |
| | | // cancelButtonText: "取消", |
| | | // type: "warning", |
| | | // } |
| | | // ) |
| | | // .then(() => { |
| | | // simStore.removeSchemCardItem(selectedId); |
| | | // ElMessage.success(`方案 "${selectedScheme.name}" 删除成功!`); |
| | | // }) |
| | | // .catch(() => { }); |
| | | // } |
| | | |
| | | function start(form) { |
| | | emits("start", form); |
| | | } |
| | |
| | | emits("end"); |
| | | } |
| | | onMounted(() => { |
| | | // getData() |
| | | // initDevicePoint() |
| | | }); |
| | | |