diff --git a/src/api/yingji/index.js b/src/api/yingji/index.js index 41e9c47..441eed7 100644 --- a/src/api/yingji/index.js +++ b/src/api/yingji/index.js @@ -4,7 +4,7 @@ * @Author: JC9527 * @Date: 2023-09-11 15:38:21 * @LastEditors: JC9527 - * @LastEditTime: 2023-09-27 12:39:14 + * @LastEditTime: 2023-09-28 13:22:58 */ import request from '@/utils/request' @@ -86,4 +86,5 @@ export default { params }); }, + }; \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index b324187..b64458e 100644 --- a/src/permission.js +++ b/src/permission.js @@ -1,3 +1,11 @@ +/* + * @Descripttion: + * @version: + * @Author: JC9527 + * @Date: 2023-09-26 13:45:06 + * @LastEditors: JC9527 + * @LastEditTime: 2023-09-28 16:55:12 + */ import router from './router' import store from './store' import { Message } from 'element-ui' @@ -19,6 +27,7 @@ router.beforeEach((to, from, next) => { next({ path: '/' }) NProgress.done() } else { + store.dispatch("Getdistrict"); if (store.getters.roles.length === 0) { isRelogin.show = true // 判断当前用户是否已拉取完user_info信息 diff --git a/src/store/modules/user.js b/src/store/modules/user.js index c9e993c..4820325 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,4 +1,5 @@ import { login, login2, logout, getInfo } from "@/api/login"; +import { xzTree, listDist } from "@/api/yingji/keyEnterprise"; import { getToken, setToken, removeToken } from "@/utils/auth"; const user = { @@ -14,13 +15,17 @@ const user = { oldRouter: [], newRouter: [], old1: [], - new1: [] + new1: [], + district:[], }, mutations: { setOld: (state, route) => { state.old1 = route }, + SET_DISTRICT: (state,data) => { + state.district = data + }, setNew: (state, route) => { state.new1 = route }, @@ -69,6 +74,19 @@ const user = { }); }); }, + // 获取行政区划 + Getdistrict({ commit }){ + return new Promise((resolve, reject) => { + xzTree() + .then((res) => { + commit("SET_DISTRICT", res.data); + resolve(); + }) + .catch((error) => { + reject(error); + }); + }); + }, // 匿名 login2({ commit }, userInfo) { const username = userInfo.username.trim(); diff --git a/src/views/components/dialog/index.vue b/src/views/components/dialog/index.vue index 3ba4a77..3916dc6 100644 --- a/src/views/components/dialog/index.vue +++ b/src/views/components/dialog/index.vue @@ -1,326 +1,347 @@ + diff --git a/src/views/components/tempDialog/index.vue b/src/views/components/tempDialog/index.vue new file mode 100644 index 0000000..d8c09fe --- /dev/null +++ b/src/views/components/tempDialog/index.vue @@ -0,0 +1,259 @@ + + + + diff --git a/src/views/login.vue b/src/views/login.vue index e2c50c3..f312641 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -185,6 +185,7 @@ export default { this.getCode(); } }); + } }); }, diff --git a/src/views/yingji/home.vue b/src/views/yingji/home.vue index 016735f..5dbe3ce 100644 --- a/src/views/yingji/home.vue +++ b/src/views/yingji/home.vue @@ -2,8 +2,8 @@
- - + + --> - {{ scope.row.a ||0}}% - + -->
-
diff --git a/src/views/yingji/planManage.vue b/src/views/yingji/planManage.vue index f542e08..4db800b 100644 --- a/src/views/yingji/planManage.vue +++ b/src/views/yingji/planManage.vue @@ -4,7 +4,7 @@ * @Author: JC9527 * @Date: 2023-09-04 10:20:06 * @LastEditors: JC9527 - * @LastEditTime: 2023-09-27 16:45:07 + * @LastEditTime: 2023-09-28 13:44:14 -->