This commit is contained in:
joylink_cuiweidong 2020-12-31 09:45:55 +08:00
commit 2aa8f961c6
9 changed files with 152 additions and 8 deletions

View File

@ -47,3 +47,99 @@ export function setCompanyManager(companyId, data) {
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
});
}
/** 查询部门信息 */

View File

@ -183,6 +183,7 @@ export default {
examSystem: 'Examination System', examSystem: 'Examination System',
runPlanSystem: 'The run plan system', runPlanSystem: 'The run plan system',
personalDetails: 'information', personalDetails: 'information',
organization: 'organization',
trainingPlatformEntrance: 'Training platform entrance', trainingPlatformEntrance: 'Training platform entrance',
designPlatformEntrance: 'Design platform entrance', designPlatformEntrance: 'Design platform entrance',
connect: 'connect', connect: 'connect',

View File

@ -183,6 +183,7 @@ export default {
examSystem: '考试系统', examSystem: '考试系统',
runPlanSystem: '运行图系统', runPlanSystem: '运行图系统',
personalDetails: '个人信息', personalDetails: '个人信息',
organization: '单位组织',
trainingPlatformEntrance: '实训平台入口', trainingPlatformEntrance: '实训平台入口',
designPlatformEntrance: '设计平台入口', designPlatformEntrance: '设计平台入口',
connect: '连接', connect: '连接',

View File

@ -10,22 +10,28 @@
<el-dropdown-item> <el-dropdown-item>
<span style="display:block;" @click="handleDetail">{{ $t('global.personalDetails') }}</span> <span style="display:block;" @click="handleDetail">{{ $t('global.personalDetails') }}</span>
</el-dropdown-item> </el-dropdown-item>
<!--<el-dropdown-item>-->
<!--<span style="display:block;" @click="handleOrganization">{{ $t('global.organization') }}</span>-->
<!--</el-dropdown-item>-->
<el-dropdown-item> <el-dropdown-item>
<span style="display:block;" @click="logout">{{ $t('global.exit') }}</span> <span style="display:block;" @click="logout">{{ $t('global.exit') }}</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
<user-info ref="userInfo" /> <user-info ref="userInfo" />
<organization ref="organization" />
</el-dropdown> </el-dropdown>
</template> </template>
<script> <script>
import userInfo from './userInfo'; import userInfo from './userInfo';
import organization from './organization';
import { UrlConfig } from '@/scripts/ConstDic'; import { UrlConfig } from '@/scripts/ConstDic';
export default { export default {
name: 'Logout', name: 'Logout',
components: { components: {
userInfo userInfo,
organization
}, },
data() { data() {
return { return {
@ -49,6 +55,9 @@ export default {
}, },
handleDetail() { handleDetail() {
this.$refs.userInfo.doShow(); this.$refs.userInfo.doShow();
},
handleOrganization() {
this.$refs.organization.doShow();
} }
} }
}; };

View File

@ -0,0 +1,41 @@
<template>
<el-dialog
title="单位组织"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="部门管理" name="first">部门管理</el-tab-pane>
<el-tab-pane label="职位管理" name="second">职位管理</el-tab-pane>
<el-tab-pane label="成员管理" name="third">成员管理</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
</template>
<script>
export default {
name: 'Organization',
data() {
return {
dialogVisible: false
};
},
methods: {
doShow() {
this.dialogVisible = true;
},
handleClose() {
this.dialogVisible = false;
}
}
};
</script>
<style scoped>
</style>

View File

@ -2,10 +2,10 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://api.joylink.club/jlcloud'; // 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.107:9000'; // 袁琪
// BASE_API = 'http://192.168.8.129: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://192.168.8.110:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康

View File

@ -54,7 +54,6 @@ import { getSessionStorage, setSessionStorage } from '@/utils/auth';
import { trainingNotifyNew } from '@/api/simulation'; import { trainingNotifyNew } from '@/api/simulation';
import { getPublishMapInfo } from '@/api/jmap/map'; import { getPublishMapInfo } from '@/api/jmap/map';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
import localStore from 'storejs';
export default { export default {
name: 'LessonDetail', name: 'LessonDetail',
@ -230,7 +229,6 @@ export default {
backLessonList() { backLessonList() {
this.disabled = true; this.disabled = true;
setTimeout(() => { setTimeout(() => {
localStore.remove('teachDetail' + this.$route.params.subSystem);
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`}); this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`});
}, 100); }, 100);
}, },

View File

@ -86,7 +86,6 @@ export default {
} }
}, },
goLesson(row) { 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}}); this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdType: row.prdType}});
}, },
handleDelete(row) { handleDelete(row) {

View File

@ -113,8 +113,7 @@ export default {
break; break;
case 'Lesson': case 'Lesson':
this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`); this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`);
router = localStore.get('teachDetail' + obj.id); router = { path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`};
if (!router) { router = { path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`}; }
this.toNextPage(isReplace, router); this.toNextPage(isReplace, router);
break; break;
case 'Simulation': case 'Simulation':