修改厂外地图高亮刷新方式

This commit is contained in:
15133876896-BGG25 2023-06-16 10:33:19 +08:00
parent 193dc97a51
commit 35c58e23ff
4 changed files with 17 additions and 8 deletions

View File

@ -1,5 +1,5 @@
<!-- <!--
* @FilePath: \wwwd:\code\screenFront\src\views\Offsite\content\chart\deviceslist.vue * @FilePath: \code\gitscreenFront\src\views\Offsite\content\chart\deviceslist.vue
* @Author: 王路平 * @Author: 王路平
* @文件版本: V1.0.0 * @文件版本: V1.0.0
* @Date: 2023-02-16 15:09:06 * @Date: 2023-02-16 15:09:06
@ -186,6 +186,7 @@ onMounted(() => {
let newcity = null; let newcity = null;
//dom //dom
a.addEventListener("DOMSubtreeModified", () => { a.addEventListener("DOMSubtreeModified", () => {
if (listenerTime.value) { if (listenerTime.value) {
clearTimeout(listenerTime.value); clearTimeout(listenerTime.value);
listenerTime.value = null; listenerTime.value = null;
@ -205,8 +206,8 @@ onMounted(() => {
} }
newcity = [...new Set(cityarr)]; newcity = [...new Set(cityarr)];
Offsite().setcity(newcity); // Offsite().setcity(newcity);
}, 500); }, 100);
}); });
}); });

View File

@ -1,5 +1,5 @@
<!-- <!--
* @FilePath: \wwwd:\code\screenFront\src\views\Offsite\content\chart\mapEchart.vue * @FilePath: \code\gitscreenFront\src\views\Offsite\content\chart\mapEchart.vue
* @Author: 王路平 * @Author: 王路平
* @文件版本: V1.0.0 * @文件版本: V1.0.0
* @Date: 2023-02-20 11:54:22 * @Date: 2023-02-20 11:54:22

View File

@ -75,6 +75,7 @@ let {t} = useI18n();
(newVal, oldVal) => { (newVal, oldVal) => {
// equipment1.value.setData(arr); // equipment1.value.setData(arr);
devlist1.value.setData(newVal) devlist1.value.setData(newVal)
}, },
{ deep: true, flush: "post" } { deep: true, flush: "post" }
); );

View File

@ -92,9 +92,14 @@ let {t} = useI18n();
if(result.code==200){ if(result.code==200){
store.setdevlist(result.data) store.setdevlist(result.data)
// result.data.forEach(res=>{
// store.setdevitem(res) let city=[]
// }) result.data.forEach(res=>{
city.push(res.city)
})
store.setcity([...new Set(city)]);
console.log(store.city);
} }
} }
function getWebsocket(val){ function getWebsocket(val){
@ -114,6 +119,8 @@ let {t} = useI18n();
} }
if(data.type=='DeviceOutPlant'){ if(data.type=='DeviceOutPlant'){
store.changeDevList(data.msg) store.changeDevList(data.msg)
console.log(data.msg);
} }
}catch(err){ }catch(err){