From df158da3a566faf802ee191fd98eabe19612b050 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 31 Dec 2020 09:32:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=AF=BE=E7=A8=8B=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=E8=B7=AF=E7=94=B1=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/company.js | 96 ++++++++++++++++++++++++ src/i18n/langs/en/global.js | 1 + src/i18n/langs/zh/global.js | 1 + src/layout/components/Logout.vue | 11 ++- src/layout/components/organization.vue | 41 ++++++++++ src/utils/baseUrl.js | 4 +- src/views/teach/detail/index.vue | 2 - src/views/teach/index.vue | 1 - src/views/trainingPlatform/demonList.vue | 3 +- 9 files changed, 152 insertions(+), 8 deletions(-) create mode 100644 src/layout/components/organization.vue diff --git a/src/api/company.js b/src/api/company.js index 81b481d31..49dd518a9 100644 --- a/src/api/company.js +++ b/src/api/company.js @@ -47,3 +47,99 @@ export function setCompanyManager(companyId, data) { data }); } +/** 获取单位所有部门 */ +export function getAllDept(companyId) { + return request({ + url: `/api/company/${companyId}/dept`, + method: 'get' + }); +} +/** 获取单位的部门树结构 */ +export function getAllDeptTree(companyId) { + return request({ + url: `/api/company/${companyId}/dept/tree`, + method: 'get' + }); +} +/** 获取部门及其子部门 */ +export function getDeptAndChild(companyId, deptId) { + return request({ + url: `/api/company/${companyId}/dept/${deptId}`, + method: 'get' + }); +} +/** 获取部门及其子树 */ +export function getDeptTree(companyId, deptId) { + return request({ + url: `/api/company/${companyId}/dept/${deptId}/tree`, + method: 'get' + }); +} +/** 获取单位所属的职位信息 */ +export function getCompanyPosition(companyId) { + return request({ + url: `/api/company/${companyId}/position`, + method: 'get' + }); +} +/** 分页获取单位的成员信息 */ +export function getCompanyMemberPaging(companyId) { + return request({ + url: `/api/company/${companyId}/refUserInfo`, + method: 'get' + }); +} +/** 更新单位成员信息 */ +export function putCompanyMember(companyId, data) { + return request({ + url: `/api/company/${companyId}/refUserInfo`, + method: 'put', + data + }); +} +/** 导入单位成员信息 */ +export function importCompanyMember(companyId, data) { + return request({ + url: `/api/company/${companyId}/refUserInfo/import`, + method: 'post', + data + }); +} +/** 删除单位成员信息 */ +export function deleteCompanyMember(companyId, memberId) { + return request({ + url: `/api/company/${companyId}/refUserInfo/${memberId}`, + method: 'delete' + }); +} +/** 查询职位信息 */ +export function getPositionInfo(positionId) { + return request({ + url: `/api/company/position/${positionId}`, + method: 'get' + }); +} +/** 更新职位信息 */ +export function updatePositionInfo(positionId, data) { + return request({ + url: `/api/company/position/${positionId}`, + method: 'put', + data + }); +} +/** 删除职位信息 */ +export function deletePositionInfo(positionId) { + return request({ + url: `/api/company/position/${positionId}`, + method: 'delete' + }); +} +/** 添加职位信息 */ +export function addPositionInfo(data) { + return request({ + url: `/api/company/position`, + method: 'post', + data + }); +} +/** 查询部门信息 */ diff --git a/src/i18n/langs/en/global.js b/src/i18n/langs/en/global.js index dcfa4a439..0462ad154 100644 --- a/src/i18n/langs/en/global.js +++ b/src/i18n/langs/en/global.js @@ -183,6 +183,7 @@ export default { examSystem: 'Examination System', runPlanSystem: 'The run plan system', personalDetails: 'information', + organization: 'organization', trainingPlatformEntrance: 'Training platform entrance', designPlatformEntrance: 'Design platform entrance', connect: 'connect', diff --git a/src/i18n/langs/zh/global.js b/src/i18n/langs/zh/global.js index 88092adf9..1c4aa0e77 100644 --- a/src/i18n/langs/zh/global.js +++ b/src/i18n/langs/zh/global.js @@ -183,6 +183,7 @@ export default { examSystem: '考试系统', runPlanSystem: '运行图系统', personalDetails: '个人信息', + organization: '单位组织', trainingPlatformEntrance: '实训平台入口', designPlatformEntrance: '设计平台入口', connect: '连接', diff --git a/src/layout/components/Logout.vue b/src/layout/components/Logout.vue index ab699a9eb..bff7a6bfa 100644 --- a/src/layout/components/Logout.vue +++ b/src/layout/components/Logout.vue @@ -10,22 +10,28 @@ {{ $t('global.personalDetails') }} + + + {{ $t('global.exit') }} + + + diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 978dd52b3..bb19cc018 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,10 +2,10 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://api.joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.129:9000'; // 旭强 - BASE_API = 'http://192.168.8.119:9000'; // 张赛 + // BASE_API = 'http://192.168.8.119:9000'; // 张赛 // BASE_API = 'http://192.168.8.110:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 diff --git a/src/views/teach/detail/index.vue b/src/views/teach/detail/index.vue index 1cafc5d4c..5f00b30dd 100644 --- a/src/views/teach/detail/index.vue +++ b/src/views/teach/detail/index.vue @@ -54,7 +54,6 @@ import { getSessionStorage, setSessionStorage } from '@/utils/auth'; import { trainingNotifyNew } from '@/api/simulation'; import { getPublishMapInfo } from '@/api/jmap/map'; import { launchFullscreen } from '@/utils/screen'; -import localStore from 'storejs'; export default { name: 'LessonDetail', @@ -230,7 +229,6 @@ export default { backLessonList() { this.disabled = true; setTimeout(() => { - localStore.remove('teachDetail' + this.$route.params.subSystem); this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`}); }, 100); }, diff --git a/src/views/teach/index.vue b/src/views/teach/index.vue index 854a56e1c..13806cb58 100644 --- a/src/views/teach/index.vue +++ b/src/views/teach/index.vue @@ -86,7 +86,6 @@ export default { } }, goLesson(row) { - localStore.set('teachDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}?lessonId=${row.id}&mapId=${row.mapId}&prdType=${row.prdType}`); this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdType: row.prdType}}); }, handleDelete(row) { diff --git a/src/views/trainingPlatform/demonList.vue b/src/views/trainingPlatform/demonList.vue index 7f0dd6502..43a7fd6ee 100644 --- a/src/views/trainingPlatform/demonList.vue +++ b/src/views/trainingPlatform/demonList.vue @@ -113,8 +113,7 @@ export default { break; case 'Lesson': this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`); - router = localStore.get('teachDetail' + obj.id); - if (!router) { router = { path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`}; } + router = { path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`}; this.toNextPage(isReplace, router); break; case 'Simulation':