Merge remote-tracking branch 'origin/dev' into test
# Conflicts: # src/router/index.js
This commit is contained in:
commit
cf39a8fa89
@ -1,9 +1,9 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** 获取课程树*/
|
||||
export function getLessonTree(skinCode) {
|
||||
// /** 获取课程树*/
|
||||
export function getLessonTree(lessonId) {
|
||||
return request({
|
||||
url: `/api/lessonDraft/${skinCode}/tree`,
|
||||
url: `/api/lessonDraft/${lessonId}/tree`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
@ -95,9 +95,9 @@ export function dragSortLessonChapter(data) {
|
||||
});
|
||||
}
|
||||
|
||||
export function getLessonDrftList(params) {
|
||||
export function getLessonDrftList(mapId, params) {
|
||||
return request({
|
||||
url: `/api/lessonDraft`,
|
||||
url: `/api/lessonDraft/${mapId}/list`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
|
@ -115,5 +115,9 @@ export default {
|
||||
enterRunPlanName: 'Please enter the name of the diagram',
|
||||
setTheProject: 'Set the project',
|
||||
whetherItBelongsToTheProject: 'Whether it belongs to the project',
|
||||
belongsProject: 'Belongs project'
|
||||
belongsProject: 'Belongs project',
|
||||
theBelongsProjectCannotBeEmpty: 'The belongs project cannot be empty',
|
||||
pleaseSelectTheBelongsProject: 'Please select the belongs project',
|
||||
copyMapAs: 'Copy map as',
|
||||
whetherToCopyData: 'Whether to copy data'
|
||||
};
|
||||
|
@ -215,5 +215,9 @@ export default {
|
||||
applyRunPlanFail:'Submit run plan to publish fail!',
|
||||
cancelRunPlanTips:'This action will revoke the run plan request, whether to continue?',
|
||||
cancelRunPlanSuccess:'Revoke run plan success!',
|
||||
cancelRunPlanFail:'Revoke run plan fail!'
|
||||
cancelRunPlanFail:'Revoke run plan fail!',
|
||||
setProjectSuccess: 'Set belongs project success!',
|
||||
setProjectFail: 'Set belongs project fail!',
|
||||
copyMapSuccess: 'Copy map success!',
|
||||
copyMapFail: 'Copy map fail!'
|
||||
};
|
||||
|
@ -119,5 +119,9 @@ export default {
|
||||
// refreshFailed 刷新失败
|
||||
setTheProject: '设置归属项目',
|
||||
whetherItBelongsToTheProject: '是否归属项目',
|
||||
belongsProject: '归属项目'
|
||||
belongsProject: '归属项目',
|
||||
theBelongsProjectCannotBeEmpty: '所属项目不能为空',
|
||||
pleaseSelectTheBelongsProject: '请选择归属项目',
|
||||
copyMapAs: '复制地图为',
|
||||
whetherToCopyData: '是否复制数据'
|
||||
};
|
||||
|
@ -215,5 +215,9 @@ export default {
|
||||
applyRunPlanFail:'提交运行图发布申请失败!',
|
||||
cancelRunPlanTips:'此操作将撤销发布运行图申请,是否继续?',
|
||||
cancelRunPlanSuccess:'撤销运行图发布申请成功!',
|
||||
cancelRunPlanFail:'撤销运行图发布申请失败!'
|
||||
cancelRunPlanFail:'撤销运行图发布申请失败!',
|
||||
setProjectSuccess: '设置归属项目成功!',
|
||||
setProjectFail: '设置归属项目失败!',
|
||||
copyMapSuccess: '复制地图成功!',
|
||||
copyMapFail: '复制地图失败!'
|
||||
};
|
||||
|
@ -19,7 +19,6 @@ import Error401 from '@/views/error-page/401';
|
||||
import Errpr404 from '@/views/error-page/404';
|
||||
|
||||
import MapProduct from '@/views/system/product/index';
|
||||
import ibpDraw from '@/views/system/ibpDraw/index';
|
||||
import Dictionary from '@/views/system/dictionary/index';
|
||||
import DictionaryDetail from '@/views/system/dictionaryDetail/index';
|
||||
import UserControl from '@/views/system/userControl/index';
|
||||
@ -28,8 +27,9 @@ import UserExam from '@/views/system/userExam/index';
|
||||
import UserSimulation from '@/views/system/userSimulation/index';
|
||||
import ExistingSimulation from '@/views/system/existingSimulation/index';
|
||||
import CacheControl from '@/views/system/cacheControl/index';
|
||||
import SystemGenerate from '@/views/system/systemGenerate/index';
|
||||
import Trainingrecord from '@/views/system/trainingrecord/index';
|
||||
import SystemGenerate from '@/views/system/systemGenerate/index';
|
||||
import IbpDraw from '@/views/system/ibpDraw/index';
|
||||
|
||||
import Mapedit from '@/views/mapdraft/index';
|
||||
|
||||
@ -48,6 +48,7 @@ import ScriptDisplay from '@/views/scriptManage/display/index';
|
||||
import TeachDetail from '@/views/teach/detail/index';
|
||||
import TeachHome from '@/views/teach/index';
|
||||
import Pay from '@/views/components/pay/index';
|
||||
|
||||
import ExamDetail from '@/views/exam/detail/examDetail';
|
||||
import ExamHome from '@/views/exam/index';
|
||||
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
|
||||
@ -57,8 +58,6 @@ import DemonstrationDetail from '@/views/demonstration/detail/index';
|
||||
|
||||
import PlanMonitorEditTool from '@/views/planMonitor/editTool/index';
|
||||
import PlanMonitorEditUserTool from '@/views/planMonitor/editTool/userindex';
|
||||
// import PlanMonitor from '@/views/planMonitor/index';
|
||||
// import PlanMonitorHome from '@/views/planMonitor/home';
|
||||
import PlanMonitorDetail from '@/views/planMonitor/detail';
|
||||
|
||||
import DesignPlatformHome from '@/views/designPlatform/home';
|
||||
@ -308,22 +307,12 @@ export const asyncRouter = [
|
||||
meta: {
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'map/draw/:mapId/:view',
|
||||
component: Mapedit,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'lesson/edit/:type',
|
||||
component: LessonEdit,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 运行图设计
|
||||
path: 'runPlan/detail/:mapId',
|
||||
component: PlanMonitorDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 剧本
|
||||
path: 'script/home/:mapId',
|
||||
component: ScriptmanageHome,
|
||||
meta: {
|
||||
@ -331,13 +320,37 @@ export const asyncRouter = [
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 课程列表
|
||||
path: 'lesson/home/:mapId',
|
||||
// /:skinCode
|
||||
component: LessonHome,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 操作定义
|
||||
path: 'lesson/trainingRule',
|
||||
component: TrainingRuleList,
|
||||
hidden: true
|
||||
},
|
||||
{ // 操作定义步骤
|
||||
path: 'lesson/trainingRule/detail',
|
||||
hidden: true,
|
||||
component: TrainingRuleEdit
|
||||
},
|
||||
{ // 任务管理
|
||||
path: 'lesson/taskManage',
|
||||
component: Taskmanage,
|
||||
hidden: true
|
||||
},
|
||||
{ // 实训管理
|
||||
path: 'lesson/trainingManage',
|
||||
component: Trainingmanage,
|
||||
hidden: true
|
||||
},
|
||||
{ // 创建课程
|
||||
path: 'lesson/edit/:type',
|
||||
component: LessonEdit,
|
||||
hidden: true
|
||||
},
|
||||
{ // 课程详情
|
||||
path: 'lesson/details',
|
||||
component: LessonDetail,
|
||||
hidden: true,
|
||||
@ -354,32 +367,7 @@ export const asyncRouter = [
|
||||
component: TrainingrecordManage,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'lesson/taskManage',
|
||||
component: Taskmanage,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'lesson/trainingRule',
|
||||
component: TrainingRuleList,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'lesson/trainingRule/detail',
|
||||
hidden: true,
|
||||
component: TrainingRuleEdit
|
||||
},
|
||||
{
|
||||
path: 'lesson/trainingManage/:skinCode',
|
||||
component: Trainingmanage,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'lesson/training/:trainingId/:trainingName',
|
||||
component: TrainingrecordManage,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 地图预览
|
||||
path: 'mapPreview/:mapId',
|
||||
component: MapPreview,
|
||||
hidden: true
|
||||
@ -412,38 +400,15 @@ export const asyncRouter = [
|
||||
meta: {
|
||||
}
|
||||
},
|
||||
{
|
||||
{ // 地图绘制
|
||||
path: 'map/draw/:mapId/:view',
|
||||
component: Mapedit,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'lesson/edit/:type',
|
||||
component: LessonEdit,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 运行图设计
|
||||
path: 'runPlan/detail/:mapId',
|
||||
component: PlanMonitorDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'script/home/:mapId',
|
||||
component: ScriptmanageHome,
|
||||
meta: {
|
||||
i18n: 'router.scriptManage'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'lesson/home/:mapId',
|
||||
component: LessonHome,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'lesson/training/:trainingId/:trainingName',
|
||||
component: TrainingrecordManage,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -503,71 +468,71 @@ export const asyncRouter = [
|
||||
meta: {
|
||||
},
|
||||
children: [
|
||||
{
|
||||
{ // 仿真详情
|
||||
path: 'detail/:subSystem',
|
||||
component: DemonstrationDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 教学系统 课程列表
|
||||
path: 'teachHome/:subSystem',
|
||||
component: TeachHome,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 课程详情
|
||||
path: 'teach/:subSystem',
|
||||
component: TeachDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'examHome/:subSystem',
|
||||
component: ExamHome,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'exam/:examId',
|
||||
component: ExamDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: Pay,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 试卷列表
|
||||
path: 'course/:subSystem',
|
||||
component: ExamCourseDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'result/:userExamId',
|
||||
component: ExamResult,
|
||||
{ // 考试系统 课程列表
|
||||
path: 'examHome/:subSystem',
|
||||
component: ExamHome,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'permission/:mapId',
|
||||
component: Package,
|
||||
{ // 试卷详情
|
||||
path: 'exam/:examId',
|
||||
component: ExamDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'permission/detail/:id',
|
||||
component: PackageDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'draft',
|
||||
component: PackageDraft,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 试卷列表
|
||||
path: 'examRule/manage',
|
||||
component: PublishExamRule,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 创建试卷
|
||||
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
||||
component: PublishExamRuleDraft,
|
||||
hidden: true
|
||||
},
|
||||
{ // 购买
|
||||
path: 'pay/:lessonId',
|
||||
component: Pay,
|
||||
hidden: true
|
||||
},
|
||||
{ // 考试结果
|
||||
path: 'result/:userExamId',
|
||||
component: ExamResult,
|
||||
hidden: true
|
||||
},
|
||||
{ // 线路权限列表
|
||||
path: 'permission/:mapId',
|
||||
component: Package,
|
||||
hidden: true
|
||||
},
|
||||
{ // 打包详情
|
||||
path: 'permission/detail/:id',
|
||||
component: PackageDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 权限打包
|
||||
path: 'draft',
|
||||
component: PackageDraft,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'runPlan/manage/:mapId',
|
||||
component: PlanMonitorDetail,
|
||||
@ -772,7 +737,7 @@ export const asyncRouter = [
|
||||
children: [
|
||||
{
|
||||
path: 'ibp/edit',
|
||||
component: ibpDraw,
|
||||
component: IbpDraw,
|
||||
meta: {
|
||||
i18n: 'router.ibpDraw'
|
||||
}
|
||||
|
@ -42,80 +42,80 @@ import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
|
||||
export default {
|
||||
name: 'DeomonList',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
height: 120,
|
||||
trainingList: [],
|
||||
defaultProps: {
|
||||
label: 'roomName'
|
||||
},
|
||||
group: '',
|
||||
state: '',
|
||||
mapId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() {
|
||||
return this.$t('global.synthesisTrainingTitle');
|
||||
},
|
||||
isWatch() {
|
||||
return true;
|
||||
},
|
||||
isjoin() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
clickEvent(obj, node, data) {
|
||||
this.state = obj.state;
|
||||
this.group = obj.group;
|
||||
this.mapId = obj.mapId;
|
||||
},
|
||||
async getList() {
|
||||
try {
|
||||
const res = await getjointTrainList();
|
||||
this.trainingList = res.data;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
doShow() {
|
||||
this.getList();
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
async handleJoin() {
|
||||
if (this.group) {
|
||||
await getjointTraining(this.group);
|
||||
if (this.state == '02') {
|
||||
launchFullscreen();
|
||||
await putJointTrainingSimulationEntrance(this.group);
|
||||
const rest = await getPublishMapInfo(this.mapId);
|
||||
const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.group, subSystem: this.$route.query.subSystem };
|
||||
this.$router.push({ path: `/jointTraining`, query: query });
|
||||
} else if (this.state == '01') {
|
||||
const query = { group: this.group };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
} else {
|
||||
this.$message.info(this.$t('global.pleaseChooseRoom'));
|
||||
}
|
||||
}
|
||||
}
|
||||
name: 'DeomonList',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
height: 120,
|
||||
trainingList: [],
|
||||
defaultProps: {
|
||||
label: 'roomName'
|
||||
},
|
||||
group: '',
|
||||
state: '',
|
||||
mapId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() {
|
||||
return this.$t('global.synthesisTrainingTitle');
|
||||
},
|
||||
isWatch() {
|
||||
return true;
|
||||
},
|
||||
isjoin() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
clickEvent(obj, node, data) {
|
||||
this.state = obj.state;
|
||||
this.group = obj.group;
|
||||
this.mapId = obj.mapId;
|
||||
},
|
||||
async getList() {
|
||||
try {
|
||||
const res = await getjointTrainList();
|
||||
this.trainingList = res.data;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
doShow() {
|
||||
this.getList();
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
async handleJoin() {
|
||||
if (this.group) {
|
||||
await getjointTraining(this.group);
|
||||
if (this.state == '02') {
|
||||
launchFullscreen();
|
||||
await putJointTrainingSimulationEntrance(this.group);
|
||||
const rest = await getPublishMapInfo(this.mapId);
|
||||
const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.group, subSystem: this.$route.query.subSystem };
|
||||
this.$router.push({ path: `/jointTraining`, query: query });
|
||||
} else if (this.state == '01') {
|
||||
const query = { group: this.group };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
} else {
|
||||
this.$message.info(this.$t('global.pleaseChooseRoom'));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -23,52 +23,52 @@ import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
|
||||
export default {
|
||||
name: 'DeomonList',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
group: '',
|
||||
roomName: '',
|
||||
state: '',
|
||||
mapId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() {
|
||||
return this.$t('global.synthesisTrainingTitle');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(data) {
|
||||
this.roomName = data.creator.nickName;
|
||||
this.group = data.group;
|
||||
this.state = data.state;
|
||||
this.mapId = data.mapId;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
async handleJoin() {
|
||||
if (this.state == '02') {
|
||||
launchFullscreen();
|
||||
await putJointTrainingSimulationEntrance(this.group);
|
||||
const rest = await getPublishMapInfo(this.mapId);
|
||||
const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.group };
|
||||
this.$router.push({ path: `/jointTraining`, query: query });
|
||||
} else if (this.state == '01') {
|
||||
const query = { group: this.group };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
this.dialogShow = false;
|
||||
getjointTraining(this.group);
|
||||
}
|
||||
}
|
||||
name: 'DeomonList',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
group: '',
|
||||
roomName: '',
|
||||
state: '',
|
||||
mapId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() {
|
||||
return this.$t('global.synthesisTrainingTitle');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(data) {
|
||||
this.roomName = data.creator.nickName;
|
||||
this.group = data.group;
|
||||
this.state = data.state;
|
||||
this.mapId = data.mapId;
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
async handleJoin() {
|
||||
if (this.state == '02') {
|
||||
launchFullscreen();
|
||||
await putJointTrainingSimulationEntrance(this.group);
|
||||
const rest = await getPublishMapInfo(this.mapId);
|
||||
const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.group };
|
||||
this.$router.push({ path: `/jointTraining`, query: query });
|
||||
} else if (this.state == '01') {
|
||||
const query = { group: this.group };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
this.dialogShow = false;
|
||||
getjointTraining(this.group);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-card v-loading="loading">
|
||||
<div slot="header" style="text-align: center;">
|
||||
<div v-loading="loading" class="joylink-card">
|
||||
<div class="card-title">
|
||||
<span><b>{{ $t('demonstration.simulationName') + courseModel.name }}</b></span>
|
||||
</div>
|
||||
<div class="simulation-detail" :style="{ height: height-230 +'px' }">
|
||||
<div class="simulation-detail">
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('demonstration.productDescription') }}</span>
|
||||
<span class="list-elem">{{ courseModel.remarks }}</span>
|
||||
@ -21,8 +21,9 @@
|
||||
<el-button v-show="isCreateRoom" :loading="buttonLoading" type="primary" @click="start">{{ $t('demonstration.createRoom') }}</el-button>
|
||||
<el-button v-show="isInRoom" :loading="buttonLoading" type="primary" @click="joinRoom">{{ $t('demonstration.enterRoom') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
@ -35,241 +36,243 @@ import LimitList from '@/views/components/limits/index';
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
|
||||
export default {
|
||||
name: 'ExamDetailList',
|
||||
components: {
|
||||
LimitList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tryTime: 0,
|
||||
goodsId: '',
|
||||
tryUser: 0,
|
||||
loading: true,
|
||||
buttonLoading: false,
|
||||
currentLessonId: '',
|
||||
currentPrdCode: '',
|
||||
productList: [],
|
||||
courseModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
mapId: '',
|
||||
skinCode: '',
|
||||
remarks: '',
|
||||
prdType: '',
|
||||
prdCode: '',
|
||||
pmsList: []
|
||||
},
|
||||
jointShow: false,
|
||||
jointGroup: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
hasPermssion() {
|
||||
let isShow = false;
|
||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
||||
isShow = true;
|
||||
}
|
||||
return isShow;
|
||||
},
|
||||
isStartDemon() {
|
||||
return this.courseModel.prdType !== '03' && (this.hasPermssion || this.tryTime > 0);
|
||||
},
|
||||
isCreateRoom() {
|
||||
return this.courseModel.prdType === '03' && this.hasPermssion && !this.jointShow;
|
||||
},
|
||||
isInRoom() {
|
||||
return this.courseModel.prdType === '03' && this.hasPermssion && this.jointShow;
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
// prodId() {
|
||||
// return this.$route.query.prodId;
|
||||
// },
|
||||
height() {
|
||||
return this.$store.state.app.height - 50;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route': function (val) {
|
||||
this.loadInitData();
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
async loadInitData() {
|
||||
this.loading = true;
|
||||
try {
|
||||
const resp = await getSubSystemDetail(this.$route.params.subSystem);
|
||||
this.tryUser = 0;
|
||||
this.loading = false;
|
||||
if (resp.data.mapPrd) {
|
||||
this.courseModel = {
|
||||
id: resp.data.mapPrd.id,
|
||||
name: resp.data.mapPrd.name,
|
||||
mapId: this.mapId,
|
||||
skinCode: resp.data.mapPrd.skinCode,
|
||||
remarks: resp.data.mapPrd.remarks,
|
||||
prdType: resp.data.mapPrd.prdType,
|
||||
prdCode: resp.data.mapPrd.code,
|
||||
pmsList: resp.data.permissionList || [],
|
||||
PermissionType: PermissionType.SIMULATION
|
||||
};
|
||||
this.currentPrdCode = resp.data.mapPrd.code;
|
||||
if (resp.data.mapPrd.prdType === '03') {
|
||||
this.getJointTrainingList();
|
||||
}
|
||||
}
|
||||
if (!this.courseModel.pmsList) {
|
||||
this.tryUser = 1;
|
||||
const paras = {
|
||||
mapId: this.mapId,
|
||||
prdCode: this.courseModel.prdCode,
|
||||
permissionType: PermissionType.SIMULATION
|
||||
};
|
||||
name: 'ExamDetailList',
|
||||
components: {
|
||||
LimitList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tryTime: 0,
|
||||
goodsId: '',
|
||||
tryUser: 0,
|
||||
loading: true,
|
||||
buttonLoading: false,
|
||||
currentLessonId: '',
|
||||
currentPrdCode: '',
|
||||
productList: [],
|
||||
courseModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
mapId: '',
|
||||
skinCode: '',
|
||||
remarks: '',
|
||||
prdType: '',
|
||||
prdCode: '',
|
||||
pmsList: []
|
||||
},
|
||||
jointShow: false,
|
||||
jointGroup: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
hasPermssion() {
|
||||
let isShow = false;
|
||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
||||
isShow = true;
|
||||
}
|
||||
return isShow;
|
||||
},
|
||||
isStartDemon() {
|
||||
return this.courseModel.prdType !== '03' && (this.hasPermssion || this.tryTime > 0);
|
||||
},
|
||||
isCreateRoom() {
|
||||
return this.courseModel.prdType === '03' && this.hasPermssion && !this.jointShow;
|
||||
},
|
||||
isInRoom() {
|
||||
return this.courseModel.prdType === '03' && this.hasPermssion && this.jointShow;
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route': function (val) {
|
||||
this.loadInitData();
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
async loadInitData() {
|
||||
this.loading = true;
|
||||
try {
|
||||
const resp = await getSubSystemDetail(this.$route.params.subSystem);
|
||||
this.tryUser = 0;
|
||||
this.loading = false;
|
||||
if (resp.data.mapPrd) {
|
||||
this.courseModel = {
|
||||
id: resp.data.mapPrd.id,
|
||||
name: resp.data.mapPrd.name,
|
||||
mapId: this.mapId,
|
||||
skinCode: resp.data.mapPrd.skinCode,
|
||||
remarks: resp.data.mapPrd.remarks,
|
||||
prdType: resp.data.mapPrd.prdType,
|
||||
prdCode: resp.data.mapPrd.code,
|
||||
pmsList: resp.data.permissionList || [],
|
||||
PermissionType: PermissionType.SIMULATION
|
||||
};
|
||||
this.currentPrdCode = resp.data.mapPrd.code;
|
||||
if (resp.data.mapPrd.prdType === '03') {
|
||||
this.getJointTrainingList();
|
||||
}
|
||||
}
|
||||
if (!this.courseModel.pmsList) {
|
||||
this.tryUser = 1;
|
||||
const paras = {
|
||||
mapId: this.mapId,
|
||||
prdCode: this.courseModel.prdCode,
|
||||
permissionType: PermissionType.SIMULATION
|
||||
};
|
||||
|
||||
try {
|
||||
const resr = await getGoodsTryUse(paras);
|
||||
if (resr.data.tryTime <= 0) {
|
||||
this.tryTime = 0;
|
||||
} else {
|
||||
this.tryTime = resr.data.tryTime;
|
||||
this.goodsId = resr.data.goodsId;
|
||||
}
|
||||
} catch (error) {
|
||||
this.tryTime = 0;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
}
|
||||
},
|
||||
async getJointTrainingList() {
|
||||
try {
|
||||
if (this.mapId) {
|
||||
const res = await checkRoomExist({ mapId: this.mapId });
|
||||
this.jointGroup = res.data;
|
||||
this.jointShow = false;
|
||||
if (res.data) {
|
||||
this.jointShow = true;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error, '获取是否拥有综合演练房间');
|
||||
}
|
||||
},
|
||||
async joinRoom() {
|
||||
await getjointTraining(this.jointGroup);
|
||||
const query = { skinCode: this.courseModel.skinCode, group: this.jointGroup, subSystem: this.$route.params.subSystem};
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
},
|
||||
async createRoom() {
|
||||
try {
|
||||
this.buttonLoading = true;
|
||||
const param = {
|
||||
mapId: Number(this.mapId),
|
||||
prdCode: this.courseModel.prdCode
|
||||
};
|
||||
const res = await postCreateRoom(param);
|
||||
if (res && res.code == 200) {
|
||||
const query = { skinCode: this.courseModel.skinCode, group: res.data, subSystem: this.$route.params.subSystem };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
} catch (error) {
|
||||
this.buttonLoading = false;
|
||||
if (error.code == 20001) {
|
||||
this.$confirm(this.$t('tip.createRoomFailedHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {}).catch(() => {});
|
||||
}
|
||||
if (error.code == 500009) {
|
||||
this.$messageBox(error.message);
|
||||
}
|
||||
}
|
||||
},
|
||||
async start() {
|
||||
if (this.courseModel.prdType == '05') {
|
||||
this.jumpScheduling();
|
||||
} else if (this.courseModel.prdType == '03') {
|
||||
this.createRoom();
|
||||
} else {
|
||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
||||
this.jump();
|
||||
} else {
|
||||
if (this.tryTime <= 1) {
|
||||
this.$confirm(this.$t('tip.noPermissionHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.buy();
|
||||
}).catch(() => { this.buttonLoading = false; });
|
||||
} else {
|
||||
this.jump();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
jumpScheduling() {
|
||||
this.buttonLoading = true;
|
||||
const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode };
|
||||
schedulingNotify(data).then(resp => {
|
||||
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser };
|
||||
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
},
|
||||
jump() {
|
||||
const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode };
|
||||
this.buttonLoading = true;
|
||||
simulationNotify(data).then(resp => {
|
||||
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser };
|
||||
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
},
|
||||
buy() {
|
||||
this.buttonLoading = true;
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
||||
query: { permissionType: PermissionType.SIMULATION, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
});
|
||||
},
|
||||
transfer() {
|
||||
this.buttonLoading = false;
|
||||
if (this.$refs) {
|
||||
this.$refs[`limit`].transfer(this.courseModel);
|
||||
}
|
||||
},
|
||||
distribute() {
|
||||
this.buttonLoading = false;
|
||||
if (this.$refs) {
|
||||
this.$refs[`limit`].distribute(this.courseModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
const resr = await getGoodsTryUse(paras);
|
||||
if (resr.data.tryTime <= 0) {
|
||||
this.tryTime = 0;
|
||||
} else {
|
||||
this.tryTime = resr.data.tryTime;
|
||||
this.goodsId = resr.data.goodsId;
|
||||
}
|
||||
} catch (error) {
|
||||
this.tryTime = 0;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
}
|
||||
},
|
||||
async getJointTrainingList() {
|
||||
try {
|
||||
if (this.mapId) {
|
||||
const res = await checkRoomExist({ mapId: this.mapId });
|
||||
this.jointGroup = res.data;
|
||||
this.jointShow = false;
|
||||
if (res.data) {
|
||||
this.jointShow = true;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error, '获取是否拥有综合演练房间');
|
||||
}
|
||||
},
|
||||
async joinRoom() {
|
||||
await getjointTraining(this.jointGroup);
|
||||
const query = { skinCode: this.courseModel.skinCode, group: this.jointGroup, subSystem: this.$route.params.subSystem};
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
},
|
||||
async createRoom() {
|
||||
try {
|
||||
this.buttonLoading = true;
|
||||
const param = {
|
||||
mapId: Number(this.mapId),
|
||||
prdCode: this.courseModel.prdCode
|
||||
};
|
||||
const res = await postCreateRoom(param);
|
||||
if (res && res.code == 200) {
|
||||
const query = { skinCode: this.courseModel.skinCode, group: res.data, subSystem: this.$route.params.subSystem };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
} catch (error) {
|
||||
this.buttonLoading = false;
|
||||
if (error.code == 20001) {
|
||||
this.$confirm(this.$t('tip.createRoomFailedHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {}).catch(() => {});
|
||||
}
|
||||
if (error.code == 500009) {
|
||||
this.$messageBox(error.message);
|
||||
}
|
||||
}
|
||||
},
|
||||
async start() {
|
||||
if (this.courseModel.prdType == '05') {
|
||||
this.jumpScheduling();
|
||||
} else if (this.courseModel.prdType == '03') {
|
||||
this.createRoom();
|
||||
} else {
|
||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
||||
this.jump();
|
||||
} else {
|
||||
if (this.tryTime <= 1) {
|
||||
this.$confirm(this.$t('tip.noPermissionHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.buy();
|
||||
}).catch(() => { this.buttonLoading = false; });
|
||||
} else {
|
||||
this.jump();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
jumpScheduling() {
|
||||
this.buttonLoading = true;
|
||||
const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode };
|
||||
schedulingNotify(data).then(resp => {
|
||||
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser };
|
||||
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
},
|
||||
jump() {
|
||||
const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode };
|
||||
this.buttonLoading = true;
|
||||
simulationNotify(data).then(resp => {
|
||||
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser };
|
||||
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
},
|
||||
buy() {
|
||||
this.buttonLoading = true;
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
||||
query: { permissionType: PermissionType.SIMULATION, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
});
|
||||
},
|
||||
transfer() {
|
||||
this.buttonLoading = false;
|
||||
if (this.$refs) {
|
||||
this.$refs[`limit`].transfer(this.courseModel);
|
||||
}
|
||||
},
|
||||
distribute() {
|
||||
this.buttonLoading = false;
|
||||
if (this.$refs) {
|
||||
this.$refs[`limit`].distribute(this.courseModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
::-webkit-scrollbar {
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.joylink-card{
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
.card-title{
|
||||
height: 47px;
|
||||
line-height: 47px;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #d6d6d6;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.simulation-detail {
|
||||
margin: 50px;
|
||||
padding: 50px;
|
||||
padding-bottom: 0;
|
||||
height: calc(100% - 107px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
@ -289,10 +292,8 @@ export default {
|
||||
}
|
||||
|
||||
.btn-buy {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
transform: translateY(-20px);
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.el-tabs--border-card>.el-tabs__header .el-tabs__item {
|
||||
|
@ -1,97 +0,0 @@
|
||||
<template>
|
||||
<el-card :style="{height: height+'px'}">
|
||||
<div class="home-box" :style="{height: height+'px'}">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<h1 class="title">
|
||||
{{ $t('demonstration.simulationSystem') }}
|
||||
<img :src="logo" alt="" class="logo-img">
|
||||
</h1>
|
||||
<div class="card-box">
|
||||
<el-carousel :interval="4000" type="card" height="380px">
|
||||
<el-carousel-item v-for="(item, index) in listImg" :key="index">
|
||||
<img :src="item.src" alt="" height="100%" width="100%">
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
<div class="brief-box">{{ $t('demonstration.simulationSystemDescription') }}</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import logo from '@/assets/logo.png';
|
||||
import home1 from '@/assets/home/home1.png';
|
||||
import home2 from '@/assets/home/home2.png';
|
||||
import home3 from '@/assets/home/demon1.jpg';
|
||||
import home4 from '@/assets/home/tring1.png';
|
||||
import home5 from '@/assets/home/tring4.jpg';
|
||||
import home6 from '@/assets/home/demon2.jpg';
|
||||
export default {
|
||||
name: 'Home',
|
||||
data() {
|
||||
return {
|
||||
listImg: [
|
||||
{ src: home1 },
|
||||
{ src: home2 },
|
||||
{ src: home3 },
|
||||
{ src: home4 },
|
||||
{ src: home5 },
|
||||
{ src: home6 }
|
||||
],
|
||||
logo: logo
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
height() {
|
||||
return this.$store.state.app.height - 50;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ .el-carousel {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.home-box {
|
||||
padding: 15px 100px;
|
||||
float: left;
|
||||
width: 100%;
|
||||
font-family: 'Microsoft YaHei';
|
||||
|
||||
.title {
|
||||
font-size: 35px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
margin-top: 55px;
|
||||
border-bottom: 2px dashed #333;
|
||||
padding-bottom: 15px;
|
||||
margin-bottom: 70px;
|
||||
position: relative;
|
||||
|
||||
.logo-img {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 55px;
|
||||
}
|
||||
}
|
||||
|
||||
.card-box {
|
||||
width: 100%;
|
||||
padding: 0 50px;
|
||||
}
|
||||
|
||||
.brief-box {
|
||||
font-size: 18px;
|
||||
text-indent: 2em;
|
||||
line-height: 32px;
|
||||
padding: 40px 20px 0;
|
||||
font-family: unset;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,74 +0,0 @@
|
||||
<template>
|
||||
<div class="app-wrapper">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<div v-show="listShow" class="examList" :style="{width: widthLeft+'px'}">
|
||||
<demon-list ref="demonList" :height="height" />
|
||||
</div>
|
||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||
<transition>
|
||||
<router-view :product-list="productList" />
|
||||
</transition>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import demonList from './list/demonList';
|
||||
import drapLeft from '@/views/components/drapLeft/index';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'Exam',
|
||||
components: {
|
||||
demonList,
|
||||
drapLeft
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listShow: true,
|
||||
widthLeft: 450,
|
||||
productList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'lessonbar'
|
||||
]),
|
||||
height() {
|
||||
return this.$store.state.app.height - 50;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'lessonbar.opened': function (val) {
|
||||
this.listShow = val;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.widthLeft = Number(localStore.get('LeftWidth'));
|
||||
},
|
||||
methods: {
|
||||
refresh() {
|
||||
this.$refs && this.$refs.demonList && this.$refs.demonList.refresh();
|
||||
},
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.examList {
|
||||
float: left;
|
||||
}
|
||||
</style>
|
@ -1,146 +0,0 @@
|
||||
<template>
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ $t('global.mapList') }}</span>
|
||||
</div>
|
||||
<filter-city ref="filerCity" filter-empty :query-function="queryFunction" @filterSelectChange="refresh" />
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-125) +'px' }">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="treeList"
|
||||
node-key="id"
|
||||
:props="defaultProps"
|
||||
highlight-current
|
||||
:span="22"
|
||||
:filter-node-method="filterNode"
|
||||
@node-click="clickEvent"
|
||||
@node-contextmenu="showContextMenu"
|
||||
>
|
||||
<span slot-scope="{ node:tnode, data }">
|
||||
<span
|
||||
class="el-icon-tickets"
|
||||
:style="{color: data.valid ? 'green':''}"
|
||||
/>
|
||||
<span :style="{color: data.valid ? 'green':''}"> {{ tnode.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
import { getPublishMapTree } from '@/api/management/mapprd';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
||||
import FilterCity from '@/views/components/filterCity';
|
||||
|
||||
export default {
|
||||
name: 'ExamDetailList',
|
||||
components: {
|
||||
FilterCity
|
||||
},
|
||||
props: {
|
||||
height: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
defaultShowKeys: [],
|
||||
queryFunction: getPublishMapTree,
|
||||
filterText: '',
|
||||
treeData: [],
|
||||
treeList: [],
|
||||
selected: {},
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
node: {
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
role() {
|
||||
return this.$store.state.user.roles.includes('04') ||
|
||||
this.$store.state.user.roles.includes('05') ||
|
||||
this.$store.state.user.roles.includes('01');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.treeList = this.treeData.filter((res) => {
|
||||
return res.name.includes(val);
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
removeSessionStorage('demonList');
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
showContextMenu(e, obj, node, vueElem) {
|
||||
if (obj) {
|
||||
this.node = node;
|
||||
this.selected = obj;
|
||||
}
|
||||
},
|
||||
clickEvent(obj, data, ele) {
|
||||
if (obj.type == 'Map') {
|
||||
setSessionStorage('demonList', obj.id);
|
||||
this.$router.push({ path: `${UrlConfig.demonstration.detail}/${obj.id}` });
|
||||
}
|
||||
},
|
||||
async refresh(filterSelect) {
|
||||
this.loading = true;
|
||||
this.treeData = this.treeList = [];
|
||||
try {
|
||||
const res = await getPublishMapTree(filterSelect);
|
||||
this.treeData = res.data;
|
||||
this.treeList = this.filterText
|
||||
? res.data.filter(elem => { return elem.name.includes(this.filterText); })
|
||||
: res.data;
|
||||
|
||||
if (this.treeData.length > 0) {
|
||||
this.treeData.forEach(v => {
|
||||
v.children = [];
|
||||
});
|
||||
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const mapId = getSessionStorage('demonList') || null;
|
||||
this.$refs.tree.setCurrentKey(mapId);
|
||||
this.loading = false;
|
||||
});
|
||||
} catch (error) {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.back-home {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #3ea726;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-tree {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
background-color: #e4e3e3 !important;
|
||||
}
|
||||
</style>
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<div class="joylink-card">
|
||||
<div class="card-title">
|
||||
<b>{{ $t('exam.nameOfTestPaper') +': ' + examDetails.name }}</b>
|
||||
</div>
|
||||
<div style="margin:50px; overflow-y: auto;">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height - 190 +'px' }">
|
||||
<div style="padding:50px; padding-right: 0; height: 100%;">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('exam.examStartTime') +':' }}</span>
|
||||
<span v-if="examDetails.startTime" class="list-elem">
|
||||
@ -40,13 +40,13 @@
|
||||
</p>
|
||||
</span>
|
||||
</p>
|
||||
<div class="btn-start">
|
||||
<el-button :loading="loading" type="primary" @click="exmaStart">{{ $t('exam.startTheExam') }}</el-button>
|
||||
<el-button @click="back">{{ $t('global.back') }}</el-button>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="btn-start">
|
||||
<el-button :loading="loading" type="primary" @click="exmaStart">{{ $t('exam.startTheExam') }}</el-button>
|
||||
<el-button @click="back">{{ $t('global.back') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { examNotify } from '@/api/simulation';
|
||||
@ -223,6 +223,16 @@ export default {
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.joylink-card{
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
.card-title{
|
||||
height: 47px;
|
||||
line-height: 47px;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
}
|
||||
}
|
||||
|
||||
.menu li {
|
||||
border-right: solid white 1px;
|
||||
@ -279,7 +289,7 @@ export default {
|
||||
.list-table {
|
||||
padding-top: 10px;
|
||||
padding-left: 120px;
|
||||
width: calc(100%);
|
||||
width: calc(100% - 80px);
|
||||
}
|
||||
|
||||
.list-elem {
|
||||
@ -287,9 +297,7 @@ export default {
|
||||
}
|
||||
|
||||
.btn-start {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
transform: translateY(-20px);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
|
@ -40,37 +40,37 @@ import { UrlConfig } from '@/router/index';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'ExamHome',
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$route.params.subSystem': function(newVal) {
|
||||
this.loadInitPage();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitPage();
|
||||
},
|
||||
methods: {
|
||||
loadInitPage() {
|
||||
if (this.$route.params.subSystem) {
|
||||
getSubSystemDetail(this.$route.params.subSystem).then(resp =>{
|
||||
if (resp.data) {
|
||||
this.tableData = resp.data.lessonList;
|
||||
}
|
||||
}).catch(()=>{
|
||||
this.$messageBox(this.$t('error.obtainCourseInformationFailed'));
|
||||
});
|
||||
}
|
||||
},
|
||||
goLesson(row) {
|
||||
localStore.set('examDetail'+this.$route.params.subSystem, `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}?lessonId=${row.id}`);
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}`, query: {lessonId: row.id}});
|
||||
}
|
||||
}
|
||||
name: 'ExamHome',
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$route.params.subSystem': function(newVal) {
|
||||
this.loadInitPage();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitPage();
|
||||
},
|
||||
methods: {
|
||||
loadInitPage() {
|
||||
if (this.$route.params.subSystem) {
|
||||
getSubSystemDetail(this.$route.params.subSystem).then(resp =>{
|
||||
if (resp.data) {
|
||||
this.tableData = resp.data.lessonList;
|
||||
}
|
||||
}).catch(()=>{
|
||||
this.$messageBox(this.$t('error.obtainCourseInformationFailed'));
|
||||
});
|
||||
}
|
||||
},
|
||||
goLesson(row) {
|
||||
localStore.set('examDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}?lessonId=${row.id}`);
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}`, query: {lessonId: row.id}});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -45,82 +45,82 @@ import { submitExam } from '@/api/management/userexam';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
|
||||
export default {
|
||||
name: 'ExamResult',
|
||||
props: {
|
||||
examDetails: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
resultModel: {
|
||||
trainingName: '',
|
||||
score: 0
|
||||
},
|
||||
loading: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
height() {
|
||||
return this.$store.state.app.height - 50;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.submitExamData();
|
||||
},
|
||||
methods: {
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = this.$t('exam.totalScore');
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += this.$t('exam.points');
|
||||
} else {
|
||||
sums[index] = 'N/A';
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
},
|
||||
submitExamData() {
|
||||
this.loading = true;
|
||||
let count = 3;
|
||||
const userExamId = this.$route.params.userExamId;
|
||||
let interval = setInterval(() => {
|
||||
submitExam(userExamId).then(response => {
|
||||
this.loading = false;
|
||||
this.resultModel = response.data;
|
||||
clearInterval(interval);
|
||||
interval = null;
|
||||
}).catch(() => {
|
||||
if (count-- < 0) {
|
||||
this.loading = false;
|
||||
clearInterval(interval);
|
||||
interval = null;
|
||||
this.$messageBox(this.$t('error.submitExamFailed'));
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
name: 'ExamResult',
|
||||
props: {
|
||||
examDetails: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
resultModel: {
|
||||
trainingName: '',
|
||||
score: 0
|
||||
},
|
||||
loading: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
height() {
|
||||
return this.$store.state.app.height - 50;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.submitExamData();
|
||||
},
|
||||
methods: {
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = this.$t('exam.totalScore');
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += this.$t('exam.points');
|
||||
} else {
|
||||
sums[index] = 'N/A';
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
},
|
||||
submitExamData() {
|
||||
this.loading = true;
|
||||
let count = 3;
|
||||
const userExamId = this.$route.params.userExamId;
|
||||
let interval = setInterval(() => {
|
||||
submitExam(userExamId).then(response => {
|
||||
this.loading = false;
|
||||
this.resultModel = response.data;
|
||||
clearInterval(interval);
|
||||
interval = null;
|
||||
}).catch(() => {
|
||||
if (count-- < 0) {
|
||||
this.loading = false;
|
||||
clearInterval(interval);
|
||||
interval = null;
|
||||
this.$messageBox(this.$t('error.submitExamFailed'));
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
|
||||
},
|
||||
back() {
|
||||
const examId = this.resultModel.examId;
|
||||
this.$router.push({path: `${UrlConfig.trainingPlatform.examDetail}/${examId}`, query: { subSystem: this.$route.query.subSystem }});
|
||||
}
|
||||
}
|
||||
},
|
||||
back() {
|
||||
const examId = this.resultModel.examId;
|
||||
this.$router.push({path: `${UrlConfig.trainingPlatform.examDetail}/${examId}`, query: { subSystem: this.$route.query.subSystem }});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -91,15 +91,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
show (deviceCode, ibpPart) {
|
||||
if (!deviceCode) {
|
||||
return;
|
||||
if (!deviceCode) {
|
||||
return;
|
||||
}
|
||||
this.stationCode = deviceCode;
|
||||
document.getElementById(this.ibpId).oncontextmenu = function (e) {
|
||||
return false;
|
||||
};
|
||||
let offsetX = 0;
|
||||
if (ibpPart === 'left') {
|
||||
let offsetX = 0;
|
||||
if (ibpPart === 'left') {
|
||||
offsetX = 0;
|
||||
} else if (ibpPart === 'right') {
|
||||
offsetX = 1920;
|
||||
@ -140,14 +140,14 @@ export default {
|
||||
},
|
||||
// 点击选择事件
|
||||
onSelected(em) {
|
||||
if (em.deviceModel.mean) {
|
||||
if (em.deviceModel.mean) {
|
||||
const params = { operate:IbpOperation[em.deviceModel.mean].operate, stationCode:this.stationCode };
|
||||
handlerIbpEvent(this.$route.query.group, params);
|
||||
}
|
||||
},
|
||||
// 右键点击事件
|
||||
onContextMenu(em) {
|
||||
this.$store.dispatch('ibp/setUpdateDeviceData', em.eventTarget.model);
|
||||
this.$store.dispatch('ibp/setUpdateDeviceData', em.eventTarget.model);
|
||||
},
|
||||
// 绘图时调用,元素可拖拽
|
||||
drawIbpInit() {
|
||||
|
@ -24,7 +24,7 @@ import { getLessonDrftList } from '@/api/jmap/lessondraft';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import PublishCreate from './lessoncategory/edit/create';
|
||||
import PublishLesson from './lessoncategory/edit/lesson/publish';
|
||||
import { delLesson, getLessonTree } from '@/api/jmap/lessondraft';
|
||||
import { delLesson } from '@/api/jmap/lessondraft';
|
||||
import LessonDetail from '@/views/approval/lesson/detail';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
|
||||
@ -37,9 +37,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: false,
|
||||
showEdit: false,
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
@ -48,7 +46,7 @@ export default {
|
||||
show: false
|
||||
},
|
||||
queryList: {
|
||||
query: getLessonDrftList,
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
@ -158,35 +156,8 @@ export default {
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.loading = true;
|
||||
getLessonTree(this.$route.params.skinCode).then(response=> {
|
||||
response.data.forEach(elem => {
|
||||
if (elem.children) {
|
||||
elem.children.forEach( it => {
|
||||
it.parentId = elem.id;
|
||||
} );
|
||||
}
|
||||
});
|
||||
this.tableData = response.data;
|
||||
this.loading = false;
|
||||
}).catch(( ) => {
|
||||
this.$messageBox(this.$t('error.getDraftCourseDataFailed'));
|
||||
});
|
||||
},
|
||||
refuse() {
|
||||
this.loading = true;
|
||||
getLessonTree(this.$route.params.skinCode).then(response=> {
|
||||
response.data.forEach(elem => {
|
||||
if (elem.children) {
|
||||
elem.children.forEach( it => {
|
||||
it.parentId = elem.id;
|
||||
} );
|
||||
}
|
||||
});
|
||||
this.tableData = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
queryFunction(params) {
|
||||
return getLessonDrftList(this.$route.params.mapId, params);
|
||||
},
|
||||
handlerStatus(row) {
|
||||
let lessonStatus = '';
|
||||
@ -236,13 +207,13 @@ export default {
|
||||
this.$router.push({path: `${UrlConfig.design.lessonEdit}/treeSort`, query: {id: row.id}});
|
||||
},
|
||||
taskManage() {
|
||||
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId, skinCode: this.$route.params.skinCode}});
|
||||
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId}});
|
||||
},
|
||||
trainingManage() {
|
||||
this.$router.push({path: `${UrlConfig.design.trainingManage}/${this.$route.params.skinCode}`, query: {mapId: this.$route.params.mapId}});
|
||||
this.$router.push({path: `${UrlConfig.design.trainingManage}`, query: {mapId: this.$route.params.mapId}});
|
||||
},
|
||||
operationManage() {
|
||||
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId, skinCode: this.$route.params.skinCode}});
|
||||
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId}});
|
||||
},
|
||||
revertLesson(index, row) {
|
||||
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
||||
|
@ -1,114 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'TrainingOperateMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
props: {
|
||||
point: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
selected: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuShow: false,
|
||||
operation: {
|
||||
code: '',
|
||||
title: '',
|
||||
basicInfo: false
|
||||
},
|
||||
menu: [],
|
||||
lessonMenu: [
|
||||
{
|
||||
label: this.$t('lesson.createChapter'),
|
||||
handler: this.addSection
|
||||
},
|
||||
{
|
||||
label: this.$t('lesson.contentSorting'),
|
||||
handler: this.treeSort
|
||||
}
|
||||
],
|
||||
chapterMenu: [
|
||||
{
|
||||
label: this.$t('lesson.createChapter'),
|
||||
handler: this.addSection
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
selected: function (val) {
|
||||
if (val) {
|
||||
if (val.type === 'lesson') {
|
||||
this.menu = this.lessonMenu;
|
||||
} else if (val.type === 'chapter') {
|
||||
this.menu = this.chapterMenu;
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Lesson)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
doShow(point) {
|
||||
this.menuShow = true;
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
this.clickEvent();
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
this.menuShow = false;
|
||||
},
|
||||
createLesson() {
|
||||
this.$emit('lessonCreate');
|
||||
},
|
||||
createFromPublish() {
|
||||
this.$emit('publishCreate');
|
||||
},
|
||||
addSection() {
|
||||
this.$emit('chapterCreate');
|
||||
},
|
||||
treeSort() {
|
||||
this.$emit('treeSort');
|
||||
},
|
||||
deleteObj() {
|
||||
this.$confirm(this.$('tip.confirmDeletion'), this.$('global.tips'), {
|
||||
confirmButtonText: this.$('global.confirm'),
|
||||
cancelButtonText: this.$('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,188 +0,0 @@
|
||||
<template>
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ $t('lesson.courseList') }}</span>
|
||||
<el-button type="text" style="float: right; padding: 3px 0" @click="publishCreate">{{ $t('lesson.createNewCoursesFromRelease') }}</el-button>
|
||||
</div>
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: (height - 55) + 'px'}">
|
||||
<el-tree
|
||||
ref="lessonTree"
|
||||
:data="treeData"
|
||||
:props="defaultProps"
|
||||
:filter-node-method="filterNode"
|
||||
draggable
|
||||
:allow-drop="allowDrop"
|
||||
:allow-drag="allowDrag"
|
||||
expand-on-click-node
|
||||
highlight-current
|
||||
:span="22"
|
||||
@node-contextmenu="showContextMenu"
|
||||
@node-drag-end="handleDragEnd"
|
||||
@node-click="clickEvent"
|
||||
>
|
||||
<span slot-scope="{ node }">
|
||||
<span v-if="node.data.type === 'skin'" class="el-icon-news" />
|
||||
<span v-if="node.data.type === 'lesson'" class="el-icon-tickets" />
|
||||
<span v-if="node.data.type === 'chapter'" class="el-icon-document" />
|
||||
<span> {{ node.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
<tree-operate-menu
|
||||
ref="treeOperateMenu"
|
||||
:point="point"
|
||||
:selected="selected"
|
||||
@refresh="refresh"
|
||||
@lessonCreate="lessonCreate"
|
||||
@chapterCreate="chapterCreate"
|
||||
@treeSort="treeSort"
|
||||
/>
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
import { getLessonTree, dragSortLessonChapter } from '@/api/jmap/lessondraft';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import TreeOperateMenu from './operateMenu';
|
||||
|
||||
export default {
|
||||
name: 'TrainingOperate',
|
||||
components: {
|
||||
TreeOperateMenu
|
||||
},
|
||||
props: {
|
||||
height: {
|
||||
type: Number
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
filterText: '',
|
||||
node: {},
|
||||
selected: {},
|
||||
menuoper: {},
|
||||
treeData: [],
|
||||
point: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
filterText(val) {
|
||||
this.$refs.lessonTree.filter(val);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.refresh();
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
allowDrop(draggingNode, dropNode, type) {
|
||||
if (draggingNode && draggingNode.data.type === 'chapter') {
|
||||
return dropNode && dropNode.data.type === 'chapter';
|
||||
} else if (draggingNode && draggingNode.data.type === 'training') {
|
||||
return dropNode && dropNode.data.type === 'training' && type !== 'inner' && draggingNode.parent == dropNode.parent;
|
||||
}
|
||||
},
|
||||
allowDrag(draggingNode) {
|
||||
return draggingNode && (draggingNode.data.type === 'chapter' || draggingNode.data.type === 'training');
|
||||
},
|
||||
handleDragEnd(draggingNode, dropNode, dropType, ev) {
|
||||
if (draggingNode && dropNode && dropType !== 'none') {
|
||||
const lesson = this.getLeesonId(dropNode);
|
||||
const lessonId = lesson.data.id;
|
||||
const model = {
|
||||
location: dropType,
|
||||
sourceId: draggingNode.data.id,
|
||||
sourceType: draggingNode.data.type,
|
||||
targetId: dropNode.data.id,
|
||||
targetType: dropNode.data.type,
|
||||
lessonId: lessonId,
|
||||
chapterId: dropNode.parent.data.id
|
||||
};
|
||||
dragSortLessonChapter(model).then(response => {
|
||||
});
|
||||
}
|
||||
},
|
||||
getLeesonId(node) {
|
||||
if (node.parent.parent !== null) {
|
||||
return this.getLeesonId(node.parent);
|
||||
} else {
|
||||
return node;
|
||||
}
|
||||
},
|
||||
showContextMenu(e, obj, node, vueElem) {
|
||||
if (obj && (obj.type == 'lesson' || obj.type == 'chapter')) {
|
||||
e.preventDefault();
|
||||
this.point = {
|
||||
x: e.clientX,
|
||||
y: e.clientY
|
||||
};
|
||||
this.node = node;
|
||||
this.selected = obj;
|
||||
const menu = DeviceMenu.Lesson;
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||
}
|
||||
},
|
||||
clickEvent(obj, node, vueElem) {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
if (obj.type === 'skin') {
|
||||
this.$emit('lessonCreate', node);
|
||||
} else if (obj.type === 'lesson') {
|
||||
this.$emit('lessonEdit', node);
|
||||
} else if (obj.type === 'chapter') {
|
||||
this.$emit('chapterEdit', node);
|
||||
}
|
||||
},
|
||||
chapterCreate() {
|
||||
this.$emit('chapterCreate', this.node);
|
||||
},
|
||||
lessonCreate() {
|
||||
this.$emit('lessonCreate', this.node);
|
||||
},
|
||||
publishCreate() {
|
||||
this.$emit('publishCreate', this.node);
|
||||
},
|
||||
treeSort() {
|
||||
this.$emit('treeSort', this.node);
|
||||
},
|
||||
convertTreeData(list) {
|
||||
const tree = [];
|
||||
if (list && list.length) {
|
||||
/* 去除列表的training节点*/
|
||||
list.forEach(elem => {
|
||||
elem.children = this.convertTreeData(elem.children);
|
||||
if (elem.type !== 'training') {
|
||||
tree.push(elem);
|
||||
}
|
||||
});
|
||||
}
|
||||
return tree;
|
||||
},
|
||||
refresh() {
|
||||
this.loading = true;
|
||||
getLessonTree().then(response => {
|
||||
this.treeData = this.convertTreeData(response.data);
|
||||
this.$nextTick(() => { this.loading = false; });
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
background-color: #e4e3e3 !important;
|
||||
}
|
||||
</style>
|
@ -10,13 +10,13 @@
|
||||
<el-form-item :label="this.$t('lesson.courseName')+this.$t('global.colon')" prop="name">
|
||||
<el-input v-model="courseModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('lesson.associatedSkin')" prop="skinCode">
|
||||
<el-select v-model="courseModel.skinCode" :placeholder="$t('rules.pleaseSelect')" :disabled="true">
|
||||
<el-form-item :label="this.$t('lesson.mapName')" prop="mapId">
|
||||
<el-select v-model="courseModel.mapId" :placeholder="$t('rules.pleaseSelect')" :disabled="true">
|
||||
<el-option
|
||||
v-for="(item,index) in skinCodeList"
|
||||
v-for="(item,index) in mapIdList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -44,7 +44,7 @@
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<template v-if="!isEdit">
|
||||
<el-button v-if="courseModel.skinCode" type="primary" @click="create">{{ $t('global.create') }}</el-button>
|
||||
<el-button v-if="courseModel.mapId" type="primary" @click="create">{{ $t('global.create') }}</el-button>
|
||||
<el-button type="primary" @click="back">{{ $t('global.back') }}</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
@ -59,8 +59,8 @@
|
||||
<script>
|
||||
import { createLesson, updateLesson, getLessonDetail } from '@/api/jmap/lessondraft';
|
||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
// import { UrlConfig } from '@/router/index';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
|
||||
export default {
|
||||
name: 'CourseEdit',
|
||||
@ -71,12 +71,12 @@ export default {
|
||||
isEdit: false,
|
||||
display: 1,
|
||||
productList: [],
|
||||
skinCodeList: [],
|
||||
mapIdList: [],
|
||||
courseModel: {
|
||||
id: '',
|
||||
prdCode: '',
|
||||
product: [],
|
||||
skinCode: '',
|
||||
mapId: '',
|
||||
name: '',
|
||||
remarks: ''
|
||||
}
|
||||
@ -91,8 +91,8 @@ export default {
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
|
||||
],
|
||||
skinCode: [
|
||||
{ required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' }
|
||||
mapId: [
|
||||
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
|
||||
],
|
||||
prdCode: [
|
||||
{ required: true, message: this.$t('rules.selectAssociatedProduct'), trigger: 'change' }
|
||||
@ -105,9 +105,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
this.mapIdList = [];
|
||||
listPublishMap().then(response => {
|
||||
this.mapIdList = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
@ -117,7 +117,6 @@ export default {
|
||||
if (!isNew) {
|
||||
this.refresh(data);
|
||||
} else {
|
||||
this.courseModel.skinCode = this.$route.query.skinCode;
|
||||
this.courseModel.mapId = this.$route.query.mapId;
|
||||
}
|
||||
getCommodityMapProduct(this.$route.query.mapId).then(response => {
|
||||
@ -176,7 +175,7 @@ export default {
|
||||
const data = response.data;
|
||||
this.courseModel = {
|
||||
id: data.id,
|
||||
skinCode: this.$route.query.skinCode,
|
||||
mapId: this.$route.query.mapId,
|
||||
prdCode: data.prdCode,
|
||||
name: data.name,
|
||||
remarks: data.remarks
|
||||
@ -187,8 +186,7 @@ export default {
|
||||
}
|
||||
},
|
||||
back() {
|
||||
// this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}/${this.$route.query.skinCode}`, query: {cityCode: this.$route.query.cityCode} });
|
||||
this.$router.go(-1);
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}`, query: {cityCode: this.$route.query.cityCode} });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -877,16 +877,17 @@ export default {
|
||||
section.trainPosType = model.trainPosType;
|
||||
edits.push(section);
|
||||
}
|
||||
if (section.linkCode == model.linkCode && model.code != section.code) {
|
||||
// debugger;
|
||||
if (section.linkCode == model.linkCode && model.code != section.code && section.type == '01') {
|
||||
const lastIndex = this.oldPoint.length - 1;
|
||||
if (this.oldPoint[0].x == section.points[section.points.length - 1].x && this.oldPoint[0].y == section.points[section.points.length - 1].y) {
|
||||
section.points[section.points.length - 1].x = model.points[0].x;
|
||||
section.points[section.points.length - 1].y = model.points[0].y;
|
||||
section.offsetRight = model.offsetLeft;
|
||||
}
|
||||
if (this.oldPoint[lastIndex].x == section.points[0].x && this.oldPoint[lastIndex].y == section.points[0].y) {
|
||||
section.points[0].x = model.points[model.points.length - 1].x;
|
||||
section.points[0].y = model.points[model.points.length - 1].y;
|
||||
section.offsetLeft = model.offsetRight;
|
||||
}
|
||||
edits.push(section);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="height: 100%; overflow: auto;">
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
@ -13,76 +13,76 @@
|
||||
import { getPermissonDetail } from '@/api/management/author';
|
||||
|
||||
export default {
|
||||
name: 'Author',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
show: false,
|
||||
queryObject: {
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'type',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '150',
|
||||
buttons: [
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
name: 'Author',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
show: false,
|
||||
queryObject: {
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'type',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '150',
|
||||
buttons: [
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
},
|
||||
queryFunction() {
|
||||
return getPermissonDetail(this.$route.params.id);
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
turnback() {
|
||||
this.$router.go(-1);
|
||||
}
|
||||
}
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
},
|
||||
queryFunction() {
|
||||
return getPermissonDetail(this.$route.params.id);
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
turnback() {
|
||||
this.$router.go(-1);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -1,72 +1,69 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div class="pack-box" :style="{ height: height +'px' }">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" style="">
|
||||
<el-steps class="steps" :active="display">
|
||||
<el-step :title="$t('permission.customPackageRules')" icon="el-icon-edit" />
|
||||
<el-step icon="el-icon-setting" />
|
||||
</el-steps>
|
||||
<el-card class="forms pack-rule">
|
||||
<el-button class="addList" size="small" @click="dialogAdd">{{ $t('permission.addRules') }}</el-button>
|
||||
<el-table
|
||||
:data="ruleList"
|
||||
border
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
style="width: 100%"
|
||||
:height="height-300"
|
||||
>
|
||||
<el-table-column prop="permissionType" :label="$t('permission.permissionType')" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(PermissionTypeList, scope.row.permissionType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mapId" :label="$t('permission.mapName')">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(PublishMapList, scope.row.mapId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mapProductCode" :label="$t('permission.mapProductName')" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(mapProductList, scope.row.prdCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lessonId" :label="$t('permission.lessonName')">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(PublisLessonList, scope.row.lessonId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" :label="$t('permission.startTime')" width="80" />
|
||||
<el-table-column prop="endTime" :label="$t('permission.endTime')" width="80" />
|
||||
<el-table-column prop="amount" label="权限个数" width="90" />
|
||||
<el-table-column label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="dialogEdit(scope.row)">{{ $t('global.edit') }}</el-button>
|
||||
<el-button type="text" size="small" @click="deleteForm(scope.row)">{{ $t('global.delete') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="!urlInfo.url" type="primary" @click="packForm">{{ $t('permission.package') }}</el-button>
|
||||
<el-button v-if="urlInfo.url" type="primary" @click="qrcodeShow">{{ $t('permission.getQrcode') }}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<edit-rule
|
||||
ref="addRule"
|
||||
:permission-type-list="PermissionTypeList"
|
||||
:publis-lesson-list="PublisLessonList"
|
||||
:publish-map-list="PublishMapList"
|
||||
@editRuleForm="editRuleForm"
|
||||
@addRuleForm="addRuleForm"
|
||||
/>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="joylink-card pack-box">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" style="">
|
||||
<el-steps class="steps" :active="display">
|
||||
<el-step :title="$t('permission.customPackageRules')" icon="el-icon-edit" />
|
||||
<el-step icon="el-icon-setting" />
|
||||
</el-steps>
|
||||
<div class="joylink-card forms pack-rule">
|
||||
<el-button class="addList" size="small" @click="dialogAdd">{{ $t('permission.addRules') }}</el-button>
|
||||
<el-table
|
||||
:data="ruleList"
|
||||
border
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
style="width: 100%; min-height: 300px;"
|
||||
>
|
||||
<el-table-column prop="permissionType" :label="$t('permission.permissionType')" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(PermissionTypeList, scope.row.permissionType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mapId" :label="$t('permission.mapName')">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(PublishMapList, scope.row.mapId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mapProductCode" :label="$t('permission.mapProductName')" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(mapProductList, scope.row.prdCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lessonId" :label="$t('permission.lessonName')">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(PublisLessonList, scope.row.lessonId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" :label="$t('permission.startTime')" width="80" />
|
||||
<el-table-column prop="endTime" :label="$t('permission.endTime')" width="80" />
|
||||
<el-table-column prop="amount" label="权限个数" width="90" />
|
||||
<el-table-column label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="dialogEdit(scope.row)">{{ $t('global.edit') }}</el-button>
|
||||
<el-button type="text" size="small" @click="deleteForm(scope.row)">{{ $t('global.delete') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="!urlInfo.url" type="primary" @click="packForm">{{ $t('permission.package') }}</el-button>
|
||||
<el-button v-if="urlInfo.url" type="primary" @click="qrcodeShow">{{ $t('permission.getQrcode') }}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<edit-rule
|
||||
ref="addRule"
|
||||
:permission-type-list="PermissionTypeList"
|
||||
:publis-lesson-list="PublisLessonList"
|
||||
:publish-map-list="PublishMapList"
|
||||
@editRuleForm="editRuleForm"
|
||||
@addRuleForm="addRuleForm"
|
||||
/>
|
||||
</el-scrollbar>
|
||||
<qr-code ref="qrCode" />
|
||||
<can-transfer ref="canDistribute" @distribute="distribute" />
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -96,11 +93,6 @@ export default {
|
||||
ruleList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
height() {
|
||||
return this.$store.state.app.height - 63;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
@ -262,6 +254,8 @@ export default {
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.pack-box {
|
||||
padding-top: 10px;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
/deep/ {
|
||||
.el-step__icon.is-icon {
|
||||
@ -289,6 +283,8 @@ export default {
|
||||
}
|
||||
|
||||
.pack-rule {
|
||||
width: 980px;
|
||||
margin: 0 auto;
|
||||
.addList {
|
||||
float: right;
|
||||
font-size: 14px;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="height: 100%; overflow: auto;">
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<select-role ref="selectRole" @reloadTable="reloadTable" />
|
||||
</div>
|
||||
@ -12,159 +12,159 @@ import { superAdmin, admin } from '@/router';
|
||||
import selectRole from './selectRole/list';
|
||||
|
||||
export default {
|
||||
name: 'Author',
|
||||
components: {
|
||||
selectRole
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
param: '',
|
||||
WhetherTypeList: [],
|
||||
// EffectiveTypeList: [],
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
leftSpan: 18,
|
||||
queryObject: {
|
||||
'canDistribute': {
|
||||
type: 'select',
|
||||
label: this.$t('permission.permissionUseType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('permission.permissionName'),
|
||||
width: '210',
|
||||
prop: 'permissionName'
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.permissionType'),
|
||||
prop: 'permissionType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.permissionUseType'),
|
||||
prop: 'canDistribute',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.permissionTotal'),
|
||||
prop: 'amount'
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.permissionRemains'),
|
||||
prop: 'remains'
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
name: 'Author',
|
||||
components: {
|
||||
selectRole
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
param: '',
|
||||
WhetherTypeList: [],
|
||||
// EffectiveTypeList: [],
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
leftSpan: 18,
|
||||
queryObject: {
|
||||
'canDistribute': {
|
||||
type: 'select',
|
||||
label: this.$t('permission.permissionUseType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('permission.permissionName'),
|
||||
width: '210',
|
||||
prop: 'permissionName'
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.permissionType'),
|
||||
prop: 'permissionType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.permissionUseType'),
|
||||
prop: 'canDistribute',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.permissionTotal'),
|
||||
prop: 'amount'
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.permissionRemains'),
|
||||
prop: 'remains'
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.belonger'),
|
||||
prop: 'ownerName',
|
||||
isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0 || this.$store.state.user.roles.indexOf(admin) > 0; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '300',
|
||||
hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0 || this.$store.state.user.roles.indexOf(admin) < 0; },
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('permission.setBelonger'),
|
||||
handleClick: this.handleRoleVest,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.packingDetails'),
|
||||
handleClick: this.handleDetail,
|
||||
type: '',
|
||||
showControl: (row) => { return !row.permissionType; }
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('permission.permissionPack'), btnCode: 'employee_insert', handler: this.handlePermissionPack }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$route.params.mapId': function (val) {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
handleRoleVest(index, row) {
|
||||
this.$refs.selectRole.doShow(row.id);
|
||||
},
|
||||
handleDetail(index, row) {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.permissionDetails}/${row.permissionId}` });
|
||||
},
|
||||
loadInitData() {
|
||||
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
list.forEach(elem => {
|
||||
elem.value = elem.code;
|
||||
elem.label = elem.name;
|
||||
});
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
},
|
||||
formatterDate(row, porpInfo) {
|
||||
return row[porpInfo.property] ? row[porpInfo.property] : '---';
|
||||
},
|
||||
queryFunction(params) {
|
||||
if (this.$route.params.mapId) {
|
||||
params.mapId = this.$route.params.mapId;
|
||||
}
|
||||
return listUserPermision(params);
|
||||
},
|
||||
handlePermissionPack() {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.draft}` });
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.belonger'),
|
||||
prop: 'ownerName',
|
||||
isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0 || this.$store.state.user.roles.indexOf(admin) > 0; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '300',
|
||||
hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0 || this.$store.state.user.roles.indexOf(admin) < 0; },
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('permission.setBelonger'),
|
||||
handleClick: this.handleRoleVest,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.packingDetails'),
|
||||
handleClick: this.handleDetail,
|
||||
type: '',
|
||||
showControl: (row) => { return !row.permissionType; }
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('permission.permissionPack'), btnCode: 'employee_insert', handler: this.handlePermissionPack }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$route.params.mapId': function (val) {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
handleRoleVest(index, row) {
|
||||
this.$refs.selectRole.doShow(row.id);
|
||||
},
|
||||
handleDetail(index, row) {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.permissionDetails}/${row.permissionId}` });
|
||||
},
|
||||
loadInitData() {
|
||||
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
list.forEach(elem => {
|
||||
elem.value = elem.code;
|
||||
elem.label = elem.name;
|
||||
});
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
},
|
||||
formatterDate(row, porpInfo) {
|
||||
return row[porpInfo.property] ? row[porpInfo.property] : '---';
|
||||
},
|
||||
queryFunction(params) {
|
||||
if (this.$route.params.mapId) {
|
||||
params.mapId = this.$route.params.mapId;
|
||||
}
|
||||
return listUserPermision(params);
|
||||
},
|
||||
handlePermissionPack() {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.draft}` });
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -23,13 +23,13 @@
|
||||
/>
|
||||
<edit-smooth-run-time ref="editSmoothRunTime" @dispatchDialog="dispatchDialog" />
|
||||
<add-smooth-run-time ref="addSmoothRunTime" @dispatchDialog="dispatchDialog" />
|
||||
<duplicate-train ref="duplicateTrain" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh"/>
|
||||
<duplicate-train ref="duplicateTrain" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<modifying-routing ref="modifyingRouting" @dispatchDialog="dispatchDialog" />
|
||||
<modifying-begin-time ref="modifyingBeginTime" />
|
||||
|
||||
<systerm-out ref="systermOut" />
|
||||
<add-task ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh"/>
|
||||
<delete-task ref="deleteTask" @dispatchOperate="dispatchOperate" @refresh="refresh"/>
|
||||
<add-task ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<delete-task ref="deleteTask" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<modifying-task ref="modifyingTask" @dispatchOperate="dispatchOperate" />
|
||||
|
||||
<edit-station-between-time ref="editStationBetweenTime" />
|
||||
@ -64,109 +64,109 @@ import { deletePlanService } from '@/api/runplan';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
StatusBar,
|
||||
Schedule,
|
||||
// OpenRunPlan,
|
||||
// CreateEmptyPlan,
|
||||
Parameter,
|
||||
OffLine,
|
||||
AddPlanningTrain,
|
||||
EditPlanningTrain,
|
||||
DuplicateTrain,
|
||||
SystermOut,
|
||||
AddTask,
|
||||
DeleteTask,
|
||||
ModifyingTask,
|
||||
ModifyingRouting,
|
||||
ModifyingBeginTime,
|
||||
EditStationBetweenTime,
|
||||
AddSmoothRunTime,
|
||||
EditSmoothRunTime,
|
||||
ModifyingStationIntervalTime
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
PlanConvert: {},
|
||||
timeDemon: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
skinCode() {
|
||||
return this.$route.query.skinCode || '02';
|
||||
},
|
||||
width() {
|
||||
return this.$store.state.app.width;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(this.skinCode);
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
StatusBar,
|
||||
Schedule,
|
||||
// OpenRunPlan,
|
||||
// CreateEmptyPlan,
|
||||
Parameter,
|
||||
OffLine,
|
||||
AddPlanningTrain,
|
||||
EditPlanningTrain,
|
||||
DuplicateTrain,
|
||||
SystermOut,
|
||||
AddTask,
|
||||
DeleteTask,
|
||||
ModifyingTask,
|
||||
ModifyingRouting,
|
||||
ModifyingBeginTime,
|
||||
EditStationBetweenTime,
|
||||
AddSmoothRunTime,
|
||||
EditSmoothRunTime,
|
||||
ModifyingStationIntervalTime
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
PlanConvert: {},
|
||||
timeDemon: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
skinCode() {
|
||||
return this.$route.query.skinCode || '02';
|
||||
},
|
||||
width() {
|
||||
return this.$store.state.app.width;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(this.skinCode);
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.timeDemon = setInterval(() => {
|
||||
checkLoginLine();
|
||||
}, 3000 * 60);
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.timeDemon) {
|
||||
clearTimeout(this.timeDemon);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.schedule.setPosition();
|
||||
});
|
||||
},
|
||||
dispatchDialog(dialogObj) {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs[dialogObj.name]) {
|
||||
this.$refs[dialogObj.name].doShow(dialogObj.params);
|
||||
}
|
||||
});
|
||||
},
|
||||
dispatchOperate(operateObj) {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs[operateObj.dialogName]) {
|
||||
this.$refs[operateObj.dialogName][operateObj.operate](operateObj.params);
|
||||
}
|
||||
});
|
||||
},
|
||||
handleConfirm(params) {
|
||||
if (params.operate == 'AddPlanningTrain') {
|
||||
// 添加计划
|
||||
this.$refs.addPlanningTrain.handleConfirm();
|
||||
} else if (params.operate == 'DeletePlanningTrain') {
|
||||
// 删除计划
|
||||
const model = {
|
||||
planId: this.$route.query.planId,
|
||||
serviceNumber: params.serviceNumber
|
||||
},
|
||||
mounted() {
|
||||
this.timeDemon = setInterval(() => {
|
||||
checkLoginLine();
|
||||
}, 3000 * 60);
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.timeDemon) {
|
||||
clearTimeout(this.timeDemon);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.schedule.setPosition();
|
||||
});
|
||||
},
|
||||
dispatchDialog(dialogObj) {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs[dialogObj.name]) {
|
||||
this.$refs[dialogObj.name].doShow(dialogObj.params);
|
||||
}
|
||||
});
|
||||
},
|
||||
dispatchOperate(operateObj) {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs[operateObj.dialogName]) {
|
||||
this.$refs[operateObj.dialogName][operateObj.operate](operateObj.params);
|
||||
}
|
||||
});
|
||||
},
|
||||
handleConfirm(params) {
|
||||
if (params.operate == 'AddPlanningTrain') {
|
||||
// 添加计划
|
||||
this.$refs.addPlanningTrain.handleConfirm();
|
||||
} else if (params.operate == 'DeletePlanningTrain') {
|
||||
// 删除计划
|
||||
const model = {
|
||||
planId: this.$route.query.planId,
|
||||
serviceNumber: params.serviceNumber
|
||||
};
|
||||
deletePlanService(model).then(resp => {
|
||||
this.$message.success(this.$t('tip.deletePlanSuccessfully'));
|
||||
deletePlanService(model).then(resp => {
|
||||
this.$message.success(this.$t('tip.deletePlanSuccessfully'));
|
||||
this.$store.dispatch('runPlan/setSelected', {});
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
// this.$refs.openRunPlan.loadRunPlanData(Object.assign({refresh: true}, this.$route.query));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.deletePlanFailed'));
|
||||
});
|
||||
}
|
||||
},
|
||||
showTrain() {
|
||||
if (this.$refs.schedule) {
|
||||
this.$refs.schedule.displayTrain();
|
||||
}
|
||||
// this.$refs.openRunPlan.loadRunPlanData(Object.assign({refresh: true}, this.$route.query));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.deletePlanFailed'));
|
||||
});
|
||||
}
|
||||
},
|
||||
refresh(){
|
||||
showTrain() {
|
||||
if (this.$refs.schedule) {
|
||||
this.$refs.schedule.displayTrain();
|
||||
}
|
||||
},
|
||||
refresh() {
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -1,94 +0,0 @@
|
||||
<template>
|
||||
<el-card :style="{height: height+'px'}">
|
||||
<div class="home-box" :style="{height: height+'px'}">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" style="margin-top:5px;">
|
||||
<h1 class="title">
|
||||
{{ $t('planMonitor.lianPlanSystem') }}
|
||||
<img :src="logo" alt="" class="logo-img">
|
||||
</h1>
|
||||
<div class="card-box">
|
||||
<el-carousel :interval="4000" type="card" height="370px">
|
||||
<el-carousel-item v-for="(item, index) in listImg" :key="index">
|
||||
<img :src="item.src" alt="" height="100%" width="100%">
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
<div class="brief-box">
|
||||
{{ $t('planMonitor.lianPlanDescription') }}
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import logo from '@/assets/logo.png';
|
||||
import home1 from '@/assets/home/plan1.png';
|
||||
import home2 from '@/assets/home/plan2.png';
|
||||
import home3 from '@/assets/home/plan3.png';
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
data() {
|
||||
return {
|
||||
listImg: [
|
||||
{ src: home1 },
|
||||
{ src: home2 },
|
||||
{ src: home3 }
|
||||
],
|
||||
logo: logo
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
height() {
|
||||
return this.$store.state.app.height;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ .el-carousel {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.home-box {
|
||||
padding: 15px 100px;
|
||||
float: left;
|
||||
width: 100%;
|
||||
font-family: 'Microsoft YaHei';
|
||||
|
||||
.title {
|
||||
font-size: 35px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
margin-top: 55px;
|
||||
border-bottom: 2px dashed #333;
|
||||
padding-bottom: 15px;
|
||||
margin-bottom: 70px;
|
||||
position: relative;
|
||||
|
||||
.logo-img {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 55px;
|
||||
}
|
||||
}
|
||||
|
||||
.card-box {
|
||||
width: 100%;
|
||||
padding: 0 50px;
|
||||
}
|
||||
|
||||
.brief-box {
|
||||
font-size: 18px;
|
||||
text-indent: 2em;
|
||||
line-height: 32px;
|
||||
padding: 40px 20px 0;
|
||||
font-family: unset;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,70 +0,0 @@
|
||||
<template>
|
||||
<div class="app-wrapper">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<div v-show="listShow" class="map-list" :style="{width: widthLeft+'px'}">
|
||||
<plan-list ref="planList" :height="height" />
|
||||
</div>
|
||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||
<transition>
|
||||
<router-view />
|
||||
</transition>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import planList from './planmanage/planList';
|
||||
import drapLeft from '@/views/components/drapLeft/index';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'Exam',
|
||||
components: {
|
||||
planList,
|
||||
drapLeft
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listShow: true,
|
||||
widthLeft: Number(localStore.get('LeftWidth')) || 450
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'lessonbar'
|
||||
]),
|
||||
height() {
|
||||
return this.$store.state.app.height;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'lessonbar.opened': function (val) {
|
||||
this.listShow = val;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refresh() {
|
||||
this.$refs && this.$refs.planList && this.$refs.planList.refresh();
|
||||
},
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.map-list {
|
||||
float: left;
|
||||
}
|
||||
</style>
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag title="复制地图为" :visible.sync="dialogVisible" width="30%" center>
|
||||
<el-dialog v-dialogDrag :title="this.$t('publish.copyMapAs')" :visible.sync="dialogVisible" width="30%" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
@ -24,16 +24,16 @@ export default {
|
||||
form:{
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'name', label: '地图名称', type: 'text', required: true},
|
||||
{ prop: 'copyOtherData', label: '是否复制数据', type: 'switch', required: true}
|
||||
{ prop: 'name', label: this.$t('publish.mapName'), type: 'text', required: true},
|
||||
{ prop: 'copyOtherData', label: this.$t('publish.whetherToCopyData'), type: 'switch', required: true}
|
||||
]
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入地图名称', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||
],
|
||||
copyOtherData: [
|
||||
{ required: true, message: '请选择', trigger: 'change' }
|
||||
{ required: true, message: this.$t('global.choose'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -52,13 +52,13 @@ export default {
|
||||
}
|
||||
this.loading = true;
|
||||
copyMapAs(this.mapId, this.formModel).then(resp =>{
|
||||
this.$message.success('复制地图成功!');
|
||||
this.$message.success(this.$t('tip.copyMapSuccess'));
|
||||
this.loading = false;
|
||||
this.dialogVisible = false;
|
||||
this.$emit('refresh');
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(`复制地图失败!`);
|
||||
this.$messageBox(this.$t('tip.copyMapFail'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -15,10 +15,10 @@
|
||||
:label="this.$t('publish.belongsProject')"
|
||||
prop="projectCode"
|
||||
:rules="{
|
||||
required: true, message: '归属项目不能为空', trigger: 'change'
|
||||
required: true, message: this.$t('publish.theBelongsProjectCannotBeEmpty'), trigger: 'change'
|
||||
}"
|
||||
>
|
||||
<el-select v-model="formModel.projectCode" placeholder="请选择归属项目">
|
||||
<el-select v-model="formModel.projectCode" :placeholder="this.$t('publish.pleaseSelectTheBelongsProject')">
|
||||
<el-option label="西铁院" value="XTY" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -69,12 +69,12 @@ export default {
|
||||
}
|
||||
this.loading = true;
|
||||
setMapProject(this.formModel).then(resp =>{
|
||||
this.$message.success('设置归属项目成功!');
|
||||
this.$message.success(this.$t('tip.setProjectSuccess'));
|
||||
this.loading = false;
|
||||
this.dialogVisible = false;
|
||||
this.$emit('refresh');
|
||||
}).catch( ()=>{
|
||||
this.$messageBox(`设置归属项目失败!`);
|
||||
this.$messageBox(this.$t('tip.setProjectFail'));
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
|
@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<div class="joylink-card card_hidden_box">
|
||||
<div class="card-title">
|
||||
<b>{{ $t('teach.courseName') }}: {{ courseModel.name }}</b>
|
||||
</div>
|
||||
<div style="margin:50px" :style="{ height: height - 230 +'px' }">
|
||||
<div class="content_box" style="">
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane :label="$t('teach.courseDetails')" name="first">
|
||||
<div :style="{ height: height - 270 +'px' }">
|
||||
<div>
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
@ -32,11 +32,7 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('teach.permissionsDetails')" name="second">
|
||||
<div :style="{ height: height - 270 +'px' }">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<limit-list ref="limitList" :course-model="courseModel" @initLoadPage="initLoadPage" />
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<limit-list ref="limitList" :course-model="courseModel" @initLoadPage="initLoadPage" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
@ -46,7 +42,7 @@
|
||||
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('teach.authorityTransferred') }}</el-button>
|
||||
<el-button type="primary" @click="backLessonList">{{ $t('teach.returnCourseList') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -86,9 +82,6 @@ export default {
|
||||
computed: {
|
||||
hasPermssion() {
|
||||
return this.courseModel.pmsList.length > 0;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height - 50;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -214,6 +207,24 @@ export default {
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.joylink-card{
|
||||
height: 100%;
|
||||
.card-title{
|
||||
height: 47px;
|
||||
line-height: 47px;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
}
|
||||
}
|
||||
.content_box{
|
||||
padding: 50px;
|
||||
height: calc(100% - 107px);
|
||||
overflow: auto;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.card_hidden_box{
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.menu li {
|
||||
border-right: solid white 1px;
|
||||
@ -225,10 +236,8 @@ export default {
|
||||
}
|
||||
|
||||
.btn-buy {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
transform: translateY(-20px);
|
||||
padding: 10px 0;
|
||||
}
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
|
@ -6,23 +6,10 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-loading="loading">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
:label="this.$t('teach.courseName')"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="remarks"
|
||||
show-overflow-tooltip
|
||||
:label="this.$t('teach.courseDescription')"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="this.$t('global.operate')"
|
||||
>
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column prop="name" :label="this.$t('teach.courseName')" />
|
||||
<el-table-column prop="remarks" show-overflow-tooltip :label="this.$t('teach.courseDescription')" />
|
||||
<el-table-column :label="this.$t('global.operate')">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="goLesson(scope.row)">
|
||||
{{ $t('teach.enterTheCourse') }}
|
||||
|
@ -859,7 +859,7 @@ export default {
|
||||
stationList.forEach(item => {
|
||||
item.disabled = false;
|
||||
list.forEach(nor => {
|
||||
if (item.code === nor.deviceCode[0]) {
|
||||
if (item.value === nor.deviceCode[0]) {
|
||||
item.disabled = true;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user