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/lesson/lessoncategory/edit/create/index.vue b/src/views/lesson/lessoncategory/edit/create/index.vue
index ba4e6aaba..ce2c58df3 100644
--- a/src/views/lesson/lessoncategory/edit/create/index.vue
+++ b/src/views/lesson/lessoncategory/edit/create/index.vue
@@ -50,14 +50,14 @@ export default {
},
mounted() {
this.lessonList = [];
- 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) {
+ 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}`);
+ });
this.dialogShow = true;
},
doClose() {
diff --git a/src/views/publish/examRule/draft/examFrom.vue b/src/views/publish/examRule/draft/examFrom.vue
index f95524a4c..f71d1a4a5 100644
--- a/src/views/publish/examRule/draft/examFrom.vue
+++ b/src/views/publish/examRule/draft/examFrom.vue
@@ -24,6 +24,7 @@
value-format="timestamp"
:disabled="isEdit"
:picker-options="pickerOptions"
+ @change="handle"
/>
@@ -37,8 +38,8 @@
style="width: 100%;"
value-format="timestamp"
:disabled="true"
- :picker-options="pickerOptions"
/>
+
@@ -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);
diff --git a/src/views/publish/examRule/draft/index.vue b/src/views/publish/examRule/draft/index.vue
index a48bc94d3..bd3cc9196 100644
--- a/src/views/publish/examRule/draft/index.vue
+++ b/src/views/publish/examRule/draft/index.vue
@@ -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 {
diff --git a/src/views/publish/examRule/draft/rule.vue b/src/views/publish/examRule/draft/rule.vue
index f776b8cea..c9a067b81 100644
--- a/src/views/publish/examRule/draft/rule.vue
+++ b/src/views/publish/examRule/draft/rule.vue
@@ -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 // 权限判断
};
diff --git a/src/views/publish/examRule/index.vue b/src/views/publish/examRule/index.vue
index 9bafd2d08..666e0a1da 100644
--- a/src/views/publish/examRule/index.vue
+++ b/src/views/publish/examRule/index.vue
@@ -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'),
diff --git a/src/views/publish/publishMap/exportMap.vue b/src/views/publish/publishMap/exportMap.vue
index 13a170844..4ae5ce8bc 100644
--- a/src/views/publish/publishMap/exportMap.vue
+++ b/src/views/publish/publishMap/exportMap.vue
@@ -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')
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':