|
@@ -1,6 +1,6 @@
|
|
|
-import Vue from "vue"
|
|
|
-import Vuex from "vuex"
|
|
|
-import { login, queryFloor, queryfmapID } from "@/api/login.js"
|
|
|
+import Vue from 'vue'
|
|
|
+import Vuex from 'vuex'
|
|
|
+import { login, queryFloor, queryfmapID } from '@/api/login.js'
|
|
|
Vue.use(Vuex)
|
|
|
export default new Vuex.Store({
|
|
|
state: {
|
|
@@ -8,15 +8,15 @@ export default new Vuex.Store({
|
|
|
permissions: [], //权限信息 "GLSMS_VIEW":"说明书查看"、"GLSMS_SYMBOL_MANAGE": "图例库管理"、 "GLSMS_PLANARGRAPH_MANAGE":"平面图维护"
|
|
|
plazas: [], //项目列表
|
|
|
userInfo: {
|
|
|
- employeename: "", //用户名称:艾宇;
|
|
|
- orgCode: "",
|
|
|
- username: "lengqiang", //账户名称
|
|
|
+ employeename: '', //用户名称:艾宇;
|
|
|
+ orgCode: '',
|
|
|
+ username: 'lengqiang', //账户名称
|
|
|
},
|
|
|
- plazaId: "1000423",
|
|
|
- projectName: "", //全局项目名称
|
|
|
+ plazaId: '1000423',
|
|
|
+ projectName: '', //全局项目名称
|
|
|
floorsArr: [], //楼层数组
|
|
|
floorSelect: [], //楼层下拉框
|
|
|
- fmapID: "",
|
|
|
+ fmapID: '',
|
|
|
},
|
|
|
getters: {
|
|
|
floorsArr: (state) => state.floorsArr,
|
|
@@ -42,7 +42,6 @@ export default new Vuex.Store({
|
|
|
state.floorsArr = data
|
|
|
if (data.length > 0) {
|
|
|
data.forEach((e) => {
|
|
|
- console.log(e)
|
|
|
let obj = {
|
|
|
id: e.gname,
|
|
|
name: e.code,
|
|
@@ -61,19 +60,19 @@ export default new Vuex.Store({
|
|
|
await login({
|
|
|
username: palyload,
|
|
|
}).then((res) => {
|
|
|
- if (res.result == "success") {
|
|
|
- commit("SETISREQUESTtAUTH", true)
|
|
|
- commit("SETAUTHMSG", res)
|
|
|
+ if (res.result == 'success') {
|
|
|
+ commit('SETISREQUESTtAUTH', true)
|
|
|
+ commit('SETAUTHMSG', res)
|
|
|
} else {
|
|
|
- console.log("接口报错!!")
|
|
|
- commit("SETISREQUESTtAUTH", false)
|
|
|
+ console.log('接口报错!!')
|
|
|
+ commit('SETISREQUESTtAUTH', false)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
getFloors(context) {
|
|
|
queryFloor({ plazaId: context.state.plazaId }).then((res) => {
|
|
|
- if (res.result == "success") {
|
|
|
- context.commit("SETFLOORS", res.data)
|
|
|
+ if (res.result == 'success') {
|
|
|
+ context.commit('SETFLOORS', res.data)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -81,7 +80,7 @@ export default new Vuex.Store({
|
|
|
await queryfmapID({
|
|
|
mapId: context.state.plazaId,
|
|
|
}).then((res) => {
|
|
|
- context.commit("SETMAPID", `${context.state.plazaId}_${res.mapVersion}`)
|
|
|
+ context.commit('SETMAPID', `${context.state.plazaId}_${res.mapVersion}`)
|
|
|
})
|
|
|
},
|
|
|
},
|