From 764cb58899b8ca0e9632a5e83c6950569442c41c Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 02 Nov 2022 14:28:12 +0800
Subject: [PATCH] 图片更改
---
src/store/modules/map.js | 42 ++++++++++++++++++++++++++++++++++++++++--
1 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/src/store/modules/map.js b/src/store/modules/map.js
index ac828a7..23eaa05 100644
--- a/src/store/modules/map.js
+++ b/src/store/modules/map.js
@@ -1,11 +1,19 @@
-import { getStore, setStore } from "@/util/store";
+import {
+ getStore,
+ setStore
+} from "@/util/store";
-import { getDictionary } from "@/api/system/dict";
+import {
+ getDictionary
+} from "@/api/system/dict";
const map = {
state: {
rotesData: false,
pointData: false,
+ mapServiceValue: [],
+ deleteIndex: -1,
+ notSet: false,
},
// actions: {
// FlowRoutes({commit}) {
@@ -20,12 +28,42 @@
// },
// },
mutations: {
+ changeNotSet(state, data) {
+ state.notSet = data;
+ },
+ setMapServiceValue(state, data) {
+ state.mapServiceValue.push(data);
+ },
+ deleteMapServiceValue(state, index) {
+ state.deleteIndex = index;
+ state.mapServiceValue.splice(index, 1);
+ },
+ clearMapServiceValue(state, data) {
+ state.mapServiceValue = [];
+ },
setRotesData(state, data) {
state.rotesData = data;
},
setPointData(state, data) {
state.pointData = data;
},
+ readDom(state, data) {
+ //时间
+ let time = null;
+ //判断dom
+ let checkDom = () => {
+ let dom = data.this.$refs[data.refName];
+ if (dom) {
+ if (data.fn) {
+ data.fn(dom);
+ }
+ return;
+ } else {
+ time = setTimeout(checkDom, 100); //自我调用
+ }
+ }
+ checkDom(); //首次运行
+ },
},
};
--
Gitblit v1.9.3