This commit is contained in:
lVAL 2020-12-31 13:39:16 +08:00
commit d85c30a905
15 changed files with 185 additions and 37 deletions

View File

@ -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
});
}
/** 查询部门信息 */

View File

@ -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',

View File

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

View File

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

View File

@ -50,14 +50,14 @@ export default {
},
mounted() {
this.lessonList = [];
},
methods: {
doShow(node) {
getPublishLessonListByMapId({mapId:this.$route.params.mapId}).then(response => {
this.lessonList = response.data.map(elem => { return { code: elem.id, name: elem.name }; });
}).catch(error => {
this.$messageBox(`${this.$t('error.refreshFailed')}, ${error.message}`);
});
},
methods: {
doShow(node) {
this.dialogShow = true;
},
doClose() {

View File

@ -24,6 +24,7 @@
value-format="timestamp"
:disabled="isEdit"
:picker-options="pickerOptions"
@change="handle"
/>
</el-form-item>
</el-col>
@ -37,8 +38,8 @@
style="width: 100%;"
value-format="timestamp"
:disabled="true"
:picker-options="pickerOptions"
/>
<!-- :picker-options="pickerOptions" -->
</el-form-item>
</el-col>
</el-form-item>
@ -123,6 +124,7 @@ export default {
pickerOptions: {
disabledDate(time) {
return time.getTime() < new Date(new Date().toLocaleDateString()).getTime();
// return time.getTime() < Date.now() - 1 * 24 * 3600 * 1000;
}
},
formDetail: {
@ -217,6 +219,12 @@ export default {
passMark: data.passMark
};
},
handle() {
var startAt = new Date(this.form.startDate) * 1000 / 1000;
if (startAt < Date.now()) {
this.form.startDate = new Date().getTime();
}
},
getClassList() {
if (this.isClassShow) {
this.classList = [];
@ -255,34 +263,26 @@ export default {
});
},
submitForm() {
this.submit('definition');
},
submit(type) {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.startDate) {
this.form.startDate = this.getDate(this.form.startDate);
const form = Object.assign({}, this.form);
if (form.startDate) {
form.startDate = this.getDate(form.startDate);
}
if (this.form.endDate) {
this.form.endDate = this.getDate(this.form.endDate);
if (form.endDate) {
form.endDate = this.getDate(form.endDate);
}
this.form['trial'] = this.trial;
this.$store.dispatch('exam/setCourseDetail', this.form);
this.$emit('definition', this.form);
form['trial'] = this.trial;
this.$store.dispatch('exam/setCourseDetail', form);
this.$emit(type, form);
}
});
},
createQuickly() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.startDate) {
this.form.startDate = this.getDate(this.form.startDate);
}
if (this.form.endDate) {
this.form.endDate = this.getDate(this.form.endDate);
}
this.form['trial'] = this.trial;
this.$store.dispatch('exam/setCourseDetail', this.form);
this.$emit('createQuickly', this.form);
}
});
this.submit('createQuickly');
},
getDate(date) {
const now = new Date(date);

View File

@ -149,6 +149,7 @@ export default {
this.$store.dispatch('exam/setRuleList', []); //
const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleManage}`;
const lessonId = this.$route.params.lessonId;
this.$store.dispatch('exam/setCourseDetail', {});
if (parseInt(lessonId)) {
this.$router.replace({ path: `${path}`, query: { mapId: this.$route.query.mapId, lessonId: lessonId, noPreLogout: this.$route.query.noPreLogout } });
} else {

View File

@ -141,8 +141,8 @@ export default {
name: this.course.name, //
passingPoint: Number(this.course.passMark), //
remarks: this.course.desc, //
endTime: this.course.endTime,
startTime: this.course.startTime,
endTime: this.course.endDate,
startTime: this.course.startDate,
type: this.course.type, //
trial: this.course.trial == 2 //
};

View File

@ -76,7 +76,8 @@ export default {
title: this.$t('publish.examTime'),
prop: 'startTime',
type: 'formatter',
format: 'yyyy-MM-dd hh:ss'
format: 'yyyy-MM-dd hh:ss',
width:'200px'
},
{
title: this.$t('publish.fullMark'),

View File

@ -26,6 +26,7 @@ export default {
{ label: '运行图数据', value: 'RUN_PLAN' },
{ label: '3d数据', value: 'MAP_3D_DATA' },
{ label: 'ibp数据', value: 'ibp' },
{ label: 'iscs数据', value: 'iscs' },
{ label: '指令定义', value: 'COMMAND_DEFINITION' },
{ label: '剧本数据', value: 'script' },
{ label: '线路配置', value: 'REAL_LINE_CONFIG', selected: true }
@ -57,6 +58,7 @@ export default {
runPlan: this.checkList.includes('RUN_PLAN'),
map3dData: this.checkList.includes('MAP_3D_DATA'),
ibp: this.checkList.includes('ibp'),
iscs: this.checkList.includes('iscs'),
script:this.checkList.includes('script'),
commandDefinition: this.checkList.includes('COMMAND_DEFINITION'),
realLineConfig: this.checkList.includes('REAL_LINE_CONFIG')

View File

@ -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);
},

View File

@ -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) {

View File

@ -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':