|
@@ -1,34 +1,34 @@
|
|
|
-import Vue from "vue"
|
|
|
-import Vuex from "vuex"
|
|
|
-import { login, queryFloor, queryfmapID } from "@/api/login.js"
|
|
|
-import { queryBrand } from "@/api/public.js"
|
|
|
-import axios from "axios"
|
|
|
+import Vue from 'vue'
|
|
|
+import Vuex from 'vuex'
|
|
|
+import { login, queryFloor, queryfmapID } from '@/api/login.js'
|
|
|
+import { queryBrand } from '@/api/public.js'
|
|
|
+import axios from 'axios'
|
|
|
|
|
|
Vue.use(Vuex)
|
|
|
export default new Vuex.Store({
|
|
|
state: {
|
|
|
- ssoToken: "admin:lengqiang",
|
|
|
+ ssoToken: 'admin:lengqiang',
|
|
|
// ssoToken: null,
|
|
|
isPreview: false,
|
|
|
- lastRoute: "",
|
|
|
+ lastRoute: '',
|
|
|
isrequestAuth: true, // 是否请求登录校验接口
|
|
|
permissions: [], //权限信息 "GLSMS_VIEW":"说明书查看"、"GLSMS_SYMBOL_MANAGE": "图例库管理"、 "GLSMS_PLANARGRAPH_MANAGE":"平面图维护"
|
|
|
plazas: [], //项目列表
|
|
|
userInfo: {
|
|
|
- employeename: "", //用户名称:艾宇;
|
|
|
- orgCode: "",
|
|
|
- username: "lengqiang", //账户名称
|
|
|
+ employeename: '', //用户名称:艾宇;
|
|
|
+ orgCode: '',
|
|
|
+ username: 'lengqiang', //账户名称
|
|
|
},
|
|
|
- plazaId: "1000423", //项目Id
|
|
|
- projectName: "", //全局项目名称
|
|
|
+ plazaId: '1000423', //项目Id
|
|
|
+ projectName: '', //全局项目名称
|
|
|
floorsArr: [], //楼层数组
|
|
|
floorSelect: [], //楼层下拉框
|
|
|
- fmapID: "",
|
|
|
+ fmapID: '',
|
|
|
haveFengMap: false, //是否有蜂鸟地图的数据
|
|
|
isMessage: true, //是否有发布的图
|
|
|
scpzTable: [], //土建系统图例展示
|
|
|
legendTable: [], //除土建系统图例展示
|
|
|
- remarksText: "", //备注
|
|
|
+ remarksText: '', //备注
|
|
|
bunkObj: {}, // 铺位名称
|
|
|
currentFloor: {}, //当前选中的楼层信息
|
|
|
},
|
|
@@ -112,19 +112,19 @@ export default new Vuex.Store({
|
|
|
// 获取项目列表、userId
|
|
|
async getUserInfo({ commit }, palyload) {
|
|
|
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)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -132,7 +132,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}`)
|
|
|
})
|
|
|
},
|
|
|
async getBrand(context) {
|
|
@@ -147,7 +147,7 @@ export default new Vuex.Store({
|
|
|
obj[i.bunkdesc] = i
|
|
|
})
|
|
|
}
|
|
|
- context.commit("SETBUNKOBJ", obj)
|
|
|
+ context.commit('SETBUNKOBJ', obj)
|
|
|
})
|
|
|
},
|
|
|
},
|