From d5ebb1758471fc1b6f8c3271a852ba3398b72a42 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 29 Mar 2022 18:09:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=96=B0=E5=A2=9E=E7=AD=89?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 1 + src/layouts/header/index.vue | 18 +++-- src/libs/util.cookies.js | 6 +- src/pages/achievement/list/index.vue | 4 +- src/pages/project/add/index.vue | 107 +++++++++++++-------------- src/pages/project/list/index.vue | 18 ++--- src/setting.js | 1 + 7 files changed, 80 insertions(+), 75 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 2d1ee0f..222a960 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -90,6 +90,7 @@ export default { saveProjectDraft: `${host}occupationlab/projectManage/saveProjectDraft`, // 新增项目管理 addProjectManage: `${host}occupationlab/projectManage/addProjectManage`, // 新增项目管理 updateProjectManage: `${host}occupationlab/projectManage/updateProjectManage`, // 修改项目管理 + editProjectDraft: `${host}occupationlab/projectManage/editProjectDraft`, // 修改项目管理 copyProjectManage: `${host}occupationlab/projectManage/copyProjectManage`, // 复制项目管理 // 判分点 diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index e2f07f3..97dd649 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -75,12 +75,18 @@ export default { }); }, getUserDetail() { // 获取用户详情 - this.$get(this.api.queryUserInfoDetails).then(res => { - let { userAvatars, userName } = res.result.hrUserInfo; - userAvatars && this.setAvatar(userAvatars); - this.setUserName(userName); - }).catch(res => { - }); + this.$get(this.api.queryUserInfoDetails).then(res => { + let { hrUserInfo } = res.result + if (hrUserInfo) { + const { userAvatars, userName } = hrUserInfo + userAvatars && this.setAvatar(userAvatars) + this.setUserName(userName) + } else { + this.$get(this.api.isClient).then(res => { + res.customerName && this.setUserName(res.customerName) + }).catch(res => {}) + } + }).catch(res => {}) }, userCommand(command) { // 切换下拉菜单 if (command == "person") { diff --git a/src/libs/util.cookies.js b/src/libs/util.cookies.js index 17423b8..75c1c8d 100644 --- a/src/libs/util.cookies.js +++ b/src/libs/util.cookies.js @@ -14,7 +14,7 @@ cookies.set = function(name = "default", value = "", cookieSetting = {}) { expires: Setting.cookiesExpires }; Object.assign(currentCookieSetting, cookieSetting); - Cookies.set(name, value, currentCookieSetting); + Cookies.set(`admin-${name}`, value, currentCookieSetting); }; /** @@ -22,7 +22,7 @@ cookies.set = function(name = "default", value = "", cookieSetting = {}) { * @param {String} name cookie name */ cookies.get = function(name = "default") { - return Cookies.get(name); + return Cookies.get(`admin-${name}`); }; /** @@ -37,7 +37,7 @@ cookies.getAll = function() { * @param {String} name cookie name */ cookies.remove = function(name = "default") { - return Cookies.remove(name); + return Cookies.remove(`admin-${name}`); }; export default cookies; diff --git a/src/pages/achievement/list/index.vue b/src/pages/achievement/list/index.vue index 7ed681b..660d797 100644 --- a/src/pages/achievement/list/index.vue +++ b/src/pages/achievement/list/index.vue @@ -52,7 +52,7 @@
  • - +
  • @@ -71,7 +71,7 @@