diff --git a/.env.development b/.env.development index f1c9ca2f..dcc90cca 100644 --- a/.env.development +++ b/.env.development @@ -6,6 +6,7 @@ NODE_ENV = development # VUE_APP_TITLE = '托克逊能源管理平台' # VUE_APP_TITLE = '中建材光子科技有限公司' VUE_APP_TITLE = '超低排放系统' +VUE_APP_PJ = 'pf' # 接口地址 #VUE_APP_API_BASEURL = http://1.203.161.103:2800/api diff --git a/src/api/model/system.js b/src/api/model/system.js index f7408d99..420f587c 100644 --- a/src/api/model/system.js +++ b/src/api/model/system.js @@ -406,9 +406,10 @@ export default { }, config: { base: { + url: `${config.API_URL}/system/base_config/`, name: "账户信息", - req: async function(project){ - return await http.get(`${config.API_URL}/system/base_config${project}`); + req: async function(data){ + return await http.get(this.url, data); } }, getInfo: { diff --git a/src/config/route.js b/src/config/route.js index f642916a..a4c198fd 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -10,8 +10,7 @@ const routes = [ "meta": { "title": "工作台", "icon": "el-icon-home-filled", - "type": "menu", - "perms": ["photon"] + "type": "menu" }, "children": [ //首页 diff --git a/src/views/login/components/passwordForm.vue b/src/views/login/components/passwordForm.vue index 7276aa6b..82fd5f2a 100644 --- a/src/views/login/components/passwordForm.vue +++ b/src/views/login/components/passwordForm.vue @@ -128,19 +128,33 @@ export default { var res1 = await that.$API.auth.info.get(); that.$TOOL.data.set("USER_INFO", res1); that.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms)); - let base_name_short = this.$TOOL.data.get('BASE_INFO').base.base_name_short; - console.log(this.$TOOL.data.get('BASE_INFO')) - if (base_name_short == '托克逊能管') { + let base_dashboard = this.$TOOL.data.get('BASE_INFO').base.base_dashboard; + if (base_dashboard == null || base_dashboard == undefined) { + base_dashboard = '/dashboard' + } + if (this.$TOOL.data.get('BASE_INFO').base.base_name_short.indexOf('曲阳') != -1) { + that.$API.am.area.list.req({ page_size: 999 }).then(res => { + if (res.err_msg) { + } else { + debugger; + let areaList = res.results; + that.$TOOL.data.set("qyjyAreaList", areaList); + if (res1.type === 'employee') { + this.$router.replace({ + path: "/", + }); + } else { + this.$router.replace({ + path: "/rpm/rpj", + }); + } + that.$message.success("Login Success 登录成功"); + that.islogin = false; + } + }) + } else { this.$router.replace({ - path: "/dashboard_enm", - }); - } else if (base_name_short == '光子科技') { - this.$router.replace({ - path: "/dashboard_photon", - }); - } else if (base_name_short == '超低排放') { - this.$router.replace({ - path: "/dashboard_enp", + path: base_dashboard, }); } // if(this.$TOOL.data.get('BASE_INFO').base.base_name_short=='托克逊能管'){//托克逊 @@ -175,6 +189,8 @@ export default { } catch (err) { that.islogin = false; console.log(err); + } finally { + that.islogin = false; } // var res = await this.$API.auth.token.post(data) // console.log(res, err) diff --git a/src/views/login/components/phoneForm.vue b/src/views/login/components/phoneForm.vue index 22c6a79d..95a25f39 100644 --- a/src/views/login/components/phoneForm.vue +++ b/src/views/login/components/phoneForm.vue @@ -1,18 +1,22 @@