Commit 97fa8b91 authored by 胡占生's avatar 胡占生 🇨🇳

fix: 点位管理修复 下一次点击后报错问题,修复点位控制台警告问题

parent 0ce1b105
......@@ -162,7 +162,7 @@
>
<el-button @click="getNewPhoto" v-else>重新取图</el-button>
<el-button type="primary" @click="clearDraw">重绘标记</el-button>
<el-button type="primary" v-if="showNext" @click="++drawIndex">绘制下一个</el-button>
<el-button type="primary" v-if="showNext" @click="drawNext">绘制下一个</el-button>
</div>
<div class="right-draw-content">
<template v-if="algorithmManage.form.value.liveMap">
......@@ -375,6 +375,7 @@ const rules = {
};
const algLevelRef = ref(null);
const showNext = ref(false);
const title = ref('');
const isEdit = false;
let aiAlgorithmLabel = useIndex(
......@@ -406,6 +407,22 @@ watch(
algorithmManage.form.value.aiRegionalLocationList.forEach((val) => {
graph[val.id] = val.drawingArea && JSON.parse(val.drawingArea);
});
// console.log('algorithmManage.form.value.aiRegionalLocationList', algorithmManage.form.value.aiRegionalLocationList)
// setTimeout(()=>{
// console.log(' aiAlgorithm.list.value', aiAlgorithm.list.value)
// const seen = new Map();
// // 合并数组并去重
// const mergedArray = [].concat(...algorithmManage.form.value.aiRegionalLocationList, ...aiAlgorithm.list.value).filter(item => {
// if (seen.has(item.algorithmName)) {
// return false;
// }
// seen.set(item.algorithmName, true);
// return true;
// });
// console.log("🚀 ~ mergedArray ~ mergedArray:", mergedArray)
// algorithmManage.form.value.aiRegionalLocationList = mergedArray;
// },100)
// algorithmManage.form.value.aiRegionalLocationList
}
);
function handleDeviceChange(e, index) {
......@@ -680,6 +697,11 @@ function pointDraw(e) {
graph[drawId.value][drawIndex.value].point += `${e.offsetX},${e.offsetY} `;
graph[drawId.value][drawIndex.value].realPoint += `${e.offsetX*4},${e.offsetY*4} `;
}
function drawNext(){
if(graph[drawId.value][drawIndex.value]){
++drawIndex.value
}
}
</script>
<style scoped lang="scss">
......
......@@ -36,13 +36,11 @@
<span @click.stop>
<!-- 添加dropdown -->
<el-dropdown trigger="click">
<el-dropdown-link class="dropdown-link">
<el-button type="text" size="small">
<el-button text circle size="small">
<el-icon size="20" color="#333333"
><Setting
/></el-icon>
</el-button>
</el-dropdown-link>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="areaMangerAddBefore(data)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment