From 97277a2c41d80bbf375f88a47e242f1b17602b2b Mon Sep 17 00:00:00 2001 From: surprise <15810472099@163.com> Date: 星期三, 29 十一月 2023 16:53:10 +0800 Subject: [PATCH] 发布管理修改 --- src/store/index.js | 96 ++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 84 insertions(+), 12 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 12d743c..c2817f0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -9,6 +9,7 @@ export default new Vuex.Store({ state: { + oldTree: null, catalogueName: '', cataNode: {}, lang: 'zh', @@ -37,11 +38,58 @@ mapMenuBoxFlag: null, mapSpaceQueryLayer: null, mapMenuShpFile: null, + propertiesFlag: null, + propertiesName: null, + propertiesInfo: null, + pickUpPointInfo: null, //涓婚鍒囨崲 theme: variables.theme, + //鐧诲綍鐢ㄦ埛鍚� + uname: null, + unid: null, + //椤圭洰绠$悊 + projeOl: null, + download: false, + showAllLayers: true, + primitLayer: null, + loading: false, + pipelineEntity: [], + reporturl: null, + layerMnage: false, + themeflag: false, + language: true, + isNaviget: false, + treeData: null, + checkedKeys: [], + queryInfo: [], + Map3: [], + histogramLayer: [], + attachModel: false, + attachinfo: null, + catModel: false, + catModelInfo: null, + showPopBoxFlag: false, + pickoption: null, + previewLayer: null, + histLenged: false, + setAlphaDity: null, + setAlphaList: [], + isProjectLayer: [], + pigCode: null, + listenTime: null, + //鍦拌〃鍙樺舰 + surfaceDeForm: { + falg: false, + gid: null, + val: null + }, + setChangeBaseMap:true, }, mutations: { + UPDATE_LISTEN_TIME(state, msg) { + state.listenTime = msg; + }, //鑾峰彇鏉冮檺鍚堥泦 getPermsEntity(state, msg) { state.permsEntity = msg; @@ -82,16 +130,16 @@ }, /* 鎵撳紑Loading */ START_LOADING(state, msg) { - state.loadingInstance = Loading.service({ - lock: true, - text: msg ? msg : '鍔犺浇涓�...', - background: 'rgba(0, 0, 0, 0.7)', - }); + // state.loadingInstance = Loading.service({ + // lock: true, + // text: msg ? msg : '鍔犺浇涓�...', + // background: 'rgba(0, 0, 0, 0.7)', + // }); }, /* 鍏抽棴loading */ CLOSE_LOADING(state) { - state.loadingInstance.close(); + // state.loadingInstance.close(); }, /* 鏇存柊璇锋眰绾跨▼姹� */ UPDATE_API_COUNT(state, handle) { @@ -105,10 +153,12 @@ } } }, + SET_UNAME(state, name) { + state.uname = name; + }, SET_TOKEN(state, token) { state.token = token; }, - SET_KEY(state, key) { state.key = key; }, @@ -130,14 +180,19 @@ login(data) .then((response) => { const data = response; + if (data.code !== 200) { - return Message({ - message: data.msg, - type: 'error', - duration: 5 * 1000, - }); + resolve(data); + return + // return Message({ + // message: data.msg, + // type: 'error', + // duration: 5 * 1000, + // }); } + commit('SET_UNAME', data.result.uname); commit('SET_TOKEN', data.result.token); + setToken(data.result.token); resolve(data); }) @@ -146,6 +201,23 @@ }); }); }, + setCookies(res) { + var value = localStorage.getItem('LFToken'); + if (value != null) { + this.rmCookies(); + } + var timeData = moment(res.result.expire).format('YYYY-MM-DD HH:mm:ss'); + var token = res.result; + var LfPrems = { + token: token, + time: timeData, + }; + LfPrems = JSON.stringify(LfPrems); + localStorage.setItem('LFToken', LfPrems); + }, + rmCookies() { + localStorage.removeItem('LFToken'); + }, getpublickey({ commit, state }, userInfo) { return new Promise((resolve, reject) => { getPublicKey(userInfo) -- Gitblit v1.9.3