国际化调整
This commit is contained in:
parent
8553a9dcdc
commit
614aae8be0
@ -58,5 +58,10 @@ export default {
|
|||||||
updateOperateStepFailed: 'The update action step failed',
|
updateOperateStepFailed: 'The update action step failed',
|
||||||
packagePermissionFailed: 'Packaging authority failed',
|
packagePermissionFailed: 'Packaging authority failed',
|
||||||
acquisitionTimeFailed: 'Acquisition Time Failed',
|
acquisitionTimeFailed: 'Acquisition Time Failed',
|
||||||
getProductListFailed: 'Failed to get product list'
|
getProductListFailed: 'Failed to get product list',
|
||||||
|
obtainChapterDataFailed: 'Failed to obtain chapter data',
|
||||||
|
obtainCourseDetailsFailed: 'Failed to obtain course details',
|
||||||
|
obtainCourseInformationFailed: 'Failed to obtain course information',
|
||||||
|
obtainStepDataFailed: 'Failed to obtain step data'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
16
src/i18n/langs/en/exam.js
Normal file
16
src/i18n/langs/en/exam.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
export default {
|
||||||
|
testSystem: '城市轨道交通考试系统',
|
||||||
|
testSystemDescription: ' 该系统具有自定义考试规则、自动生成考卷、学员成绩统计、数据曲线分析及题库管理等功能,从实战操作、业务流程、故障模拟及考试规则等多角度出发,力求打造最符合用户需求的城市轨道交通在线交互实操类考试系统',
|
||||||
|
examResultsDetails: '考试结果详情',
|
||||||
|
testQuestionsName: '试题名称',
|
||||||
|
testScores: '考试得分',
|
||||||
|
points: '分',
|
||||||
|
whetherThrough: '是否通过',
|
||||||
|
didNotCalculate: '未计算',
|
||||||
|
pass: '通过',
|
||||||
|
notPass: '未通过',
|
||||||
|
examTime: '考试用时',
|
||||||
|
trainingName: '实训名称',
|
||||||
|
trainingScore: '实训得分',
|
||||||
|
returnToExamList: '返回考试列表'
|
||||||
|
};
|
@ -103,5 +103,8 @@ export default {
|
|||||||
mapList: 'Map list',
|
mapList: 'Map list',
|
||||||
updateTime: 'Update time:',
|
updateTime: 'Update time:',
|
||||||
line: 'Line:',
|
line: 'Line:',
|
||||||
permissionList: 'Permissions list:'
|
permissionList: 'Permissions list:',
|
||||||
|
remove: 'remove',
|
||||||
|
append: 'append',
|
||||||
|
release: 'release'
|
||||||
};
|
};
|
||||||
|
@ -16,6 +16,7 @@ import replay from './replay';
|
|||||||
import planMonitor from './planMonitor';
|
import planMonitor from './planMonitor';
|
||||||
import screenMonitor from './screenMonitor';
|
import screenMonitor from './screenMonitor';
|
||||||
import demonstration from './demonstration';
|
import demonstration from './demonstration';
|
||||||
|
import exam from './exam';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
...enLocale,
|
...enLocale,
|
||||||
@ -35,5 +36,6 @@ export default {
|
|||||||
replay,
|
replay,
|
||||||
planMonitor,
|
planMonitor,
|
||||||
screenMonitor,
|
screenMonitor,
|
||||||
demonstration
|
demonstration,
|
||||||
|
exam
|
||||||
};
|
};
|
||||||
|
@ -48,5 +48,44 @@ export default {
|
|||||||
eidtStepInfo: 'Edit Step Information',
|
eidtStepInfo: 'Edit Step Information',
|
||||||
product: 'Product',
|
product: 'Product',
|
||||||
remarks: 'Remarks',
|
remarks: 'Remarks',
|
||||||
operateSuccess: 'Operation successfully'
|
operateSuccess: 'Operation successfully',
|
||||||
|
createChapter: 'Create chapter',
|
||||||
|
contentSorting: 'Content sorting',
|
||||||
|
courseList: 'Course list',
|
||||||
|
createNewCoursesFromRelease: 'Create new courses from release',
|
||||||
|
courseName: 'Course name:',
|
||||||
|
parentChapter: 'Parent chapter:',
|
||||||
|
chapterName: 'Chapter name:',
|
||||||
|
chapterInstructions: 'Chapter instructions:',
|
||||||
|
associatedTraining: 'Associated training:',
|
||||||
|
updateChapter: 'Update chapter',
|
||||||
|
automaticOrManual: 'Auto/Manual',
|
||||||
|
automatic: 'Automatic',
|
||||||
|
manual: 'Manual',
|
||||||
|
publishCourseName: 'Publish course name:',
|
||||||
|
draftCourseName: 'Draft course name:',
|
||||||
|
associatedSkin: 'Associated skin:',
|
||||||
|
associatedProducts: 'Associated products:',
|
||||||
|
courseDescription: 'Course description:',
|
||||||
|
editCourse: 'Edit course',
|
||||||
|
createCourse: 'Create course',
|
||||||
|
courseRelease: 'Course release',
|
||||||
|
releaseAssociatedCity: 'Release associated city:',
|
||||||
|
releaseAssociatedMap: 'Release associated map:',
|
||||||
|
trainingSequence: 'Training sequence',
|
||||||
|
creationTime: 'Creation time',
|
||||||
|
finishTime: 'Finish time',
|
||||||
|
createResults: 'Create results',
|
||||||
|
start: 'start',
|
||||||
|
toPerform: 'To perform',
|
||||||
|
productType: 'Product type:',
|
||||||
|
minTime: 'Minimum time:',
|
||||||
|
maxTime: 'Largest time:',
|
||||||
|
trainingDescription: 'Training description:',
|
||||||
|
generateTraining: 'Generate training',
|
||||||
|
updateTraining: 'Update training',
|
||||||
|
deleteTraining: 'Delete training',
|
||||||
|
automaticGenerationOfTraining: 'Automatic generation of training',
|
||||||
|
modifyTrainingByCategory: 'Modify training by category',
|
||||||
|
deleteAutoGeneratedTraining: 'Delete auto-generated training'
|
||||||
};
|
};
|
||||||
|
@ -222,6 +222,20 @@ export default {
|
|||||||
selectMapProductName: 'Please select map product name',
|
selectMapProductName: 'Please select map product name',
|
||||||
inputTime: 'Please enter time',
|
inputTime: 'Please enter time',
|
||||||
inputPermissionNumber: 'Please enter the number of permissions',
|
inputPermissionNumber: 'Please enter the number of permissions',
|
||||||
permissionNumberGreater0: 'The number of permissions must be greater than 0'
|
permissionNumberGreater0: 'The number of permissions must be greater than 0',
|
||||||
|
enterChapterName: 'Please enter chapter name',
|
||||||
|
enterChapterInstructions: 'Please enter chapter instructions',
|
||||||
|
selectCourseName: 'Please select the course name',
|
||||||
|
enterCourseName: 'Please enter the course name',
|
||||||
|
selectAssociatedProduct: 'Please select the associated product',
|
||||||
|
enterCourseDescription: 'Please enter the course description',
|
||||||
|
courseIdIsEmpty: 'Course Id is empty',
|
||||||
|
selectCity: 'Please select city',
|
||||||
|
enterStandardTime: 'Please enter standard time',
|
||||||
|
enterNumericValue: 'Please enter a numeric value',
|
||||||
|
greaterThanMinTime: 'Must be greater than the minimum time',
|
||||||
|
selectTrainingType: 'Please select training type',
|
||||||
|
selectOneTrainingType: 'Only one training type can be selected',
|
||||||
|
enterProductType: 'Please enter product type',
|
||||||
|
selectAssociatedStation: 'Please select the associated station'
|
||||||
};
|
};
|
||||||
|
@ -106,5 +106,21 @@ export default {
|
|||||||
permissionsNumber: 'Please enter the number of valid permissions',
|
permissionsNumber: 'Please enter the number of valid permissions',
|
||||||
purchaseMonth: 'Please enter a valid purchase month',
|
purchaseMonth: 'Please enter a valid purchase month',
|
||||||
createRoomFailedHint: 'Each user can only create one comprehensive drill room. Do you want to enter the room?',
|
createRoomFailedHint: 'Each user can only create one comprehensive drill room. Do you want to enter the room?',
|
||||||
noPermissionHint: 'You do not have permission, please go to purchase products'
|
noPermissionHint: 'You do not have permission, please go to purchase products',
|
||||||
|
coursePublishSuccessful: 'Successful course release',
|
||||||
|
coursePublishFailed: 'Course launch failed',
|
||||||
|
startOperationHint: 'This operation will start the task. Do you want to continue?',
|
||||||
|
cancelsTaskHint: 'This action cancels the task. Do you want to continue?',
|
||||||
|
automaticGenerationTrainingSuccess: 'Automatic generation of training success',
|
||||||
|
automaticGenerationTrainingFailure: 'Automatic generation of training failure',
|
||||||
|
updateAutomaticGenerationTrainingSuccess: 'Update automatically generated training successfully',
|
||||||
|
updateAutomaticGenerationTrainingFailure: 'Update automatically generated training failure',
|
||||||
|
deleteAutomaticGenerationTrainingSuccess: 'Delete automatic generation training successfully',
|
||||||
|
deleteAutomaticGenerationTrainingFailure: 'Delete automatic generation training failure',
|
||||||
|
addTrainingSuccessfully: 'Add training successfully!',
|
||||||
|
addTrainingFailed: 'Failed to add training',
|
||||||
|
updateTrainingSuccessfully: 'Update training successfully!',
|
||||||
|
updateTrainingFailed: 'Failed to update training',
|
||||||
|
savedStepDataSuccessfully: 'Saved step data successfully',
|
||||||
|
savedStepDataFailed: 'Failed to save step data'
|
||||||
};
|
};
|
||||||
|
@ -58,6 +58,9 @@ export default {
|
|||||||
updateOperateStepFailed: '更新操作步骤失败',
|
updateOperateStepFailed: '更新操作步骤失败',
|
||||||
packagePermissionFailed: '打包权限失败',
|
packagePermissionFailed: '打包权限失败',
|
||||||
acquisitionTimeFailed: '获取时间失败',
|
acquisitionTimeFailed: '获取时间失败',
|
||||||
getProductListFailed: '获取产品列表失败'
|
getProductListFailed: '获取产品列表失败',
|
||||||
|
obtainChapterDataFailed: '获取章节数据失败',
|
||||||
|
obtainCourseDetailsFailed: '获取课程详情失败',
|
||||||
|
obtainCourseInformationFailed: '获取课程信息失败',
|
||||||
|
obtainStepDataFailed: '获取步骤数据失败'
|
||||||
};
|
};
|
||||||
|
16
src/i18n/langs/zh/exam.js
Normal file
16
src/i18n/langs/zh/exam.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
export default {
|
||||||
|
testSystem: '城市轨道交通考试系统',
|
||||||
|
testSystemDescription: ' 该系统具有自定义考试规则、自动生成考卷、学员成绩统计、数据曲线分析及题库管理等功能,从实战操作、业务流程、故障模拟及考试规则等多角度出发,力求打造最符合用户需求的城市轨道交通在线交互实操类考试系统',
|
||||||
|
examResultsDetails: '考试结果详情',
|
||||||
|
testQuestionsName: '试题名称',
|
||||||
|
testScores: '考试得分',
|
||||||
|
points: '分',
|
||||||
|
whetherThrough: '是否通过',
|
||||||
|
didNotCalculate: '未计算',
|
||||||
|
pass: '通过',
|
||||||
|
notPass: '未通过',
|
||||||
|
examTime: '考试用时',
|
||||||
|
trainingName: '实训名称',
|
||||||
|
trainingScore: '实训得分',
|
||||||
|
returnToExamList: '返回考试列表'
|
||||||
|
};
|
@ -128,5 +128,8 @@ export default {
|
|||||||
mapList: '地图列表',
|
mapList: '地图列表',
|
||||||
updateTime: '更新时间:',
|
updateTime: '更新时间:',
|
||||||
line: '线路:',
|
line: '线路:',
|
||||||
permissionList: '权限列表:'
|
permissionList: '权限列表:',
|
||||||
|
remove: '移除',
|
||||||
|
append: '添加',
|
||||||
|
release: '发布'
|
||||||
};
|
};
|
||||||
|
@ -16,6 +16,7 @@ import replay from './replay';
|
|||||||
import planMonitor from './planMonitor';
|
import planMonitor from './planMonitor';
|
||||||
import screenMonitor from './screenMonitor';
|
import screenMonitor from './screenMonitor';
|
||||||
import demonstration from './demonstration';
|
import demonstration from './demonstration';
|
||||||
|
import exam from './exam';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
...cnLocale,
|
...cnLocale,
|
||||||
@ -35,5 +36,6 @@ export default {
|
|||||||
replay,
|
replay,
|
||||||
planMonitor,
|
planMonitor,
|
||||||
screenMonitor,
|
screenMonitor,
|
||||||
demonstration
|
demonstration,
|
||||||
|
exam
|
||||||
};
|
};
|
||||||
|
@ -45,9 +45,48 @@ export default {
|
|||||||
stepReturn: '步骤返回值',
|
stepReturn: '步骤返回值',
|
||||||
stepTips: '步骤提示信息',
|
stepTips: '步骤提示信息',
|
||||||
createStepInfo: '创建步骤信息',
|
createStepInfo: '创建步骤信息',
|
||||||
eidtStepInfo: '编辑步骤信息',
|
editStepInfo: '编辑步骤信息',
|
||||||
product: '产品',
|
product: '产品',
|
||||||
remarks: '描述',
|
remarks: '描述',
|
||||||
operateSuccess: '操作成功'
|
operateSuccess: '操作成功',
|
||||||
|
createChapter: '创建章节',
|
||||||
|
contentSorting: '内容排序',
|
||||||
|
courseList: '课程列表',
|
||||||
|
createNewCoursesFromRelease: '从发布课程新建',
|
||||||
|
courseName: '课程名称:',
|
||||||
|
parentChapter: '父级章节:',
|
||||||
|
chapterName: '章节名称:',
|
||||||
|
chapterInstructions: '章节说明:',
|
||||||
|
associatedTraining: '关联实训:',
|
||||||
|
updateChapter: '更新章节',
|
||||||
|
automaticOrManual: '自动/人工',
|
||||||
|
automatic: '自动',
|
||||||
|
manual: '人工',
|
||||||
|
publishCourseName: '发布课程名称:',
|
||||||
|
draftCourseName: '草稿课程名称:',
|
||||||
|
associatedSkin: '关联皮肤:',
|
||||||
|
associatedProducts: '关联产品:',
|
||||||
|
courseDescription: '课程说明:',
|
||||||
|
editCourse: '编辑课程',
|
||||||
|
createCourse: '创建课程',
|
||||||
|
courseRelease: '课程发布',
|
||||||
|
releaseAssociatedCity: '发布关联城市:',
|
||||||
|
releaseAssociatedMap: '发布关联地图:',
|
||||||
|
trainingSequence: '实训排序',
|
||||||
|
creationTime: '创建时间',
|
||||||
|
finishTime: '完成时间',
|
||||||
|
createResults: '创建结果',
|
||||||
|
start: '开始',
|
||||||
|
toPerform: '重新执行',
|
||||||
|
productType: '产品类型:',
|
||||||
|
minTime: '最小用时:',
|
||||||
|
maxTime: '最大用时:',
|
||||||
|
trainingDescription: '实训描述:',
|
||||||
|
generateTraining: '生成实训',
|
||||||
|
updateTraining: '修改实训',
|
||||||
|
deleteTraining: '删除实训',
|
||||||
|
automaticGenerationOfTraining: '自动生成实训',
|
||||||
|
modifyTrainingByCategory: '按类别修改实训',
|
||||||
|
deleteAutoGeneratedTraining: '删除自动生成实训'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -232,6 +232,21 @@ export default {
|
|||||||
selectMapProductName: '请选择地图产品名称',
|
selectMapProductName: '请选择地图产品名称',
|
||||||
inputTime: '请输入时间',
|
inputTime: '请输入时间',
|
||||||
inputPermissionNumber: '请输入权限个数',
|
inputPermissionNumber: '请输入权限个数',
|
||||||
permissionNumberGreater0: '权限个数必须大于0'
|
permissionNumberGreater0: '权限个数必须大于0',
|
||||||
|
enterChapterName: '请输入章节名称',
|
||||||
|
enterChapterInstructions: '请输入章节说明',
|
||||||
|
selectCourseName: '请选择课程名称',
|
||||||
|
enterCourseName: '请输入课程名称',
|
||||||
|
selectAssociatedProduct: '请选择关联产品',
|
||||||
|
enterCourseDescription: '请输入课程说明',
|
||||||
|
courseIdIsEmpty: '课程Id为空',
|
||||||
|
selectCity: '请选择城市',
|
||||||
|
enterStandardTime: '请输入标准用时',
|
||||||
|
enterNumericValue: '请输入数字值',
|
||||||
|
greaterThanMinTime: '必须大于最小时间',
|
||||||
|
selectTrainingType: '请选择实训类型',
|
||||||
|
selectOneTrainingType: '只能选择一个实训类型',
|
||||||
|
enterProductType: '请输入产品类型',
|
||||||
|
selectAssociatedStation: '请选择关联的车站'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -106,5 +106,21 @@ export default {
|
|||||||
permissionsNumber: '请输入有效的权限个数',
|
permissionsNumber: '请输入有效的权限个数',
|
||||||
purchaseMonth: '请输入有效的购买月数',
|
purchaseMonth: '请输入有效的购买月数',
|
||||||
createRoomFailedHint: '每个用户只能创建一个综合演练房间, 是否进入房间?',
|
createRoomFailedHint: '每个用户只能创建一个综合演练房间, 是否进入房间?',
|
||||||
noPermissionHint: '您没有权限,请前往购买产品'
|
noPermissionHint: '您没有权限,请前往购买产品',
|
||||||
|
coursePublishSuccessful: '课程发布成功',
|
||||||
|
coursePublishFailed: '课程发布失败',
|
||||||
|
startOperationHint: '此操作将开始任务, 是否继续?',
|
||||||
|
cancelsTaskHint: '此操作将取消任务, 是否继续?',
|
||||||
|
automaticGenerationTrainingSuccess: '自动生成实训成功',
|
||||||
|
automaticGenerationTrainingFailure: '自动生成实训失败',
|
||||||
|
updateAutomaticGenerationTrainingSuccess: '更新自动生成实训成功',
|
||||||
|
updateAutomaticGenerationTrainingFailure: '更新自动生成实训失败',
|
||||||
|
deleteAutomaticGenerationTrainingSuccess: '删除自动生成实训成功',
|
||||||
|
deleteAutomaticGenerationTrainingFailure: '删除自动生成实训失败',
|
||||||
|
addTrainingSuccessfully: '添加实训成功!',
|
||||||
|
addTrainingFailed: '添加实训失败',
|
||||||
|
updateTrainingSuccessfully: '更新实训成功!',
|
||||||
|
updateTrainingFailed: '更新实训失败',
|
||||||
|
savedStepDataSuccessfully: '保存步骤数据成功',
|
||||||
|
savedStepDataFailed: '保存步骤数据失败'
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="home-box" :style="{height: height+'px'}">
|
<div class="home-box" :style="{height: height+'px'}">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" style="margin-top:5px;">
|
<el-scrollbar wrap-class="scrollbar-wrapper" style="margin-top:5px;">
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
城市轨道交通考试系统
|
{{$t('exam.testSystem')}}
|
||||||
<img :src="logo" alt="" class="logo-img">
|
<img :src="logo" alt="" class="logo-img">
|
||||||
</h1>
|
</h1>
|
||||||
<div class="card-box">
|
<div class="card-box">
|
||||||
@ -14,7 +14,7 @@
|
|||||||
</el-carousel>
|
</el-carousel>
|
||||||
</div>
|
</div>
|
||||||
<div class="brief-box">
|
<div class="brief-box">
|
||||||
该系统具有自定义考试规则、自动生成考卷、学员成绩统计、数据曲线分析及题库管理等功能,从实战操作、业务流程、故障模拟及考试规则等多角度出发,力求打造最符合用户需求的城市轨道交通在线交互实操类考试系统
|
{{$t('exam.testSystemDescription')}}
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,17 +33,17 @@
|
|||||||
menu: [],
|
menu: [],
|
||||||
lessonMenu: [
|
lessonMenu: [
|
||||||
{
|
{
|
||||||
label: '创建章节',
|
label: this.$t('lesson.createChapter'),
|
||||||
handler: this.addSection,
|
handler: this.addSection,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '内容排序',
|
label: this.$t('lesson.contentSorting'),
|
||||||
handler: this.treeSort,
|
handler: this.treeSort,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
chapterMenu: [
|
chapterMenu: [
|
||||||
{
|
{
|
||||||
label: '创建章节',
|
label: this.$t('lesson.createChapter'),
|
||||||
handler: this.addSection,
|
handler: this.addSection,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -101,15 +101,15 @@
|
|||||||
},
|
},
|
||||||
deleteObj() {
|
deleteObj() {
|
||||||
let _that = this;
|
let _that = this;
|
||||||
this.$confirm('是否确认删除?', '提示', {
|
this.$confirm(this.$('tip.confirmDeletion'), this.$('global.tips'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$('global.confirm'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('已取消删除');
|
this.$messageBox(this.$('tip.cancelledDelete'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card class="map-list-main" v-loading="loading">
|
<el-card class="map-list-main" v-loading="loading">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>课程列表</span>
|
<span>{{$t('lesson.courseList')}}</span>
|
||||||
<el-button type="text" @click="publishCreate" style="float: right; padding: 3px 0">从发布课程新建</el-button>
|
<el-button type="text" @click="publishCreate" style="float: right; padding: 3px 0">{{$t('lesson.createNewCoursesFromRelease')}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-input placeholder="输入关键字进行过滤" v-model="filterText" clearable> </el-input>
|
<el-input :placeholder="this.$t('global.filteringKeywords')" v-model="filterText" clearable> </el-input>
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height: (height - 55) + 'px'}">
|
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height: (height - 55) + 'px'}">
|
||||||
<el-tree ref="lessonTree" :data="treeData" :props="defaultProps" :filter-node-method="filterNode"
|
<el-tree ref="lessonTree" :data="treeData" :props="defaultProps" :filter-node-method="filterNode"
|
||||||
@node-contextmenu="showContextMenu" draggable :allow-drop="allowDrop" :allow-drag="allowDrag"
|
@node-contextmenu="showContextMenu" draggable :allow-drop="allowDrop" :allow-drag="allowDrag"
|
||||||
@ -156,7 +156,7 @@
|
|||||||
this.treeData = this.convertTreeData(response.data);
|
this.treeData = this.convertTreeData(response.data);
|
||||||
this.$nextTick(() => { this.loading = false; });
|
this.$nextTick(() => { this.loading = false; });
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('刷新失败');
|
this.$messageBox(this.$t('error.refreshFailed'));
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -167,4 +167,4 @@
|
|||||||
.el-tree-node.is-current>.el-tree-node__content {
|
.el-tree-node.is-current>.el-tree-node__content {
|
||||||
background-color: #e4e3e3 !important;
|
background-color: #e4e3e3 !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -7,48 +7,48 @@
|
|||||||
<el-card class="forms">
|
<el-card class="forms">
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height:height -160 + 'px'}" style="padding-top: 40px">
|
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height:height -160 + 'px'}" style="padding-top: 40px">
|
||||||
<el-form ref="form" :model="chapterModel" :rules="rules" label-width="135px">
|
<el-form ref="form" :model="chapterModel" :rules="rules" label-width="135px">
|
||||||
<el-form-item label="课程名称:" prop="lessonName">
|
<el-form-item :label="this.$t('lesson.courseName')" prop="lessonName">
|
||||||
<el-input v-model="chapterModel.lessonName" :disabled="true"></el-input>
|
<el-input v-model="chapterModel.lessonName" :disabled="true"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="父级章节:" prop="parentName">
|
<el-form-item :label="this.$t('lesson.parentChapter')" prop="parentName">
|
||||||
<el-input v-model="chapterModel.parentName" :disabled="true"></el-input>
|
<el-input v-model="chapterModel.parentName" :disabled="true"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="章节名称:" prop="name">
|
<el-form-item :label="this.$t('lesson.chapterName')" prop="name">
|
||||||
<el-input v-model="chapterModel.name"></el-input>
|
<el-input v-model="chapterModel.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="章节说明:" prop="remarks">
|
<el-form-item :label="this.$t('lesson.chapterInstructions')" prop="remarks">
|
||||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" placeholder="请输入内容"
|
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" :placeholder="this.$t('rules.pleaseEnterContent')"
|
||||||
v-model="chapterModel.remarks">
|
v-model="chapterModel.remarks">
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联实训:">
|
<el-form-item :label="this.$t('lesson.associatedTraining')">
|
||||||
<el-table ref="singleTable" :data="chapterModel.trainings" border highlight-current-row
|
<el-table ref="singleTable" :data="chapterModel.trainings" border highlight-current-row
|
||||||
:height="237">
|
:height="237">
|
||||||
<el-table-column type="index" width="50">
|
<el-table-column type="index" width="50">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column property="trainingName" label="实训名称">
|
<el-table-column property="trainingName" :label="this.$t('lesson.trainingName')">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column property="trial" label="是否试用" width="80">
|
<el-table-column property="trial" :label="this.$t('global.isTry')" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-checkbox v-model="scope.row.trial"></el-checkbox>
|
<el-checkbox v-model="scope.row.trial"></el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="right" label="操作" width="70">
|
<el-table-column fixed="right" :label="this.$t('global.operate')" width="70">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button @click.native.prevent="deleteRow(scope.$index, chapterModel.trainings)"
|
<el-button @click.native.prevent="deleteRow(scope.$index, chapterModel.trainings)"
|
||||||
type="text" size="small">移除</el-button>
|
type="text" size="small">{{$t('global.remove')}}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-button type="primary" style="margin-top: 20px" @click='pushTrain'>添加实训</el-button>
|
<el-button type="primary" style="margin-top: 20px" @click='pushTrain'>{{$t('lesson.addTraining')}}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="draft">
|
<div class="draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" @click="create" v-show="!isEdit">添加</el-button>
|
<el-button type="primary" @click="create" v-show="!isEdit">{{$t('global.append')}}</el-button>
|
||||||
<el-button type="primary" @click="update" v-show="isEdit">更新</el-button>
|
<el-button type="primary" @click="update" v-show="isEdit">{{$t('global.update')}}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<train-list ref="pathRoute" :trainings="this.chapterModel.trainings" :detail="detail"
|
<train-list ref="pathRoute" :trainings="this.chapterModel.trainings" :detail="detail"
|
||||||
@ -95,15 +95,15 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return this.isEdit ? '更新章节' : '创建章节';
|
return this.isEdit ? this.$t('lesson.updateChapter') : this.$t('lesson.createChapter');
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
let baseRules = {
|
let baseRules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入章节名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.enterChapterName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
remarks: [
|
remarks: [
|
||||||
{ required: true, message: '请输入章节说明', trigger: 'change' }
|
{ required: true, message: this.$t('rules.enterChapterInstructions'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
return baseRules;
|
return baseRules;
|
||||||
@ -135,7 +135,7 @@
|
|||||||
getLessonChapterDetail(data).then(response => {
|
getLessonChapterDetail(data).then(response => {
|
||||||
this.setChapterModel(response.data);
|
this.setChapterModel(response.data);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('获取章节数据失败')
|
this.$messageBox(this.$t('error.obtainChapterDataFailed'))
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
deleteRow(index, rows) {
|
deleteRow(index, rows) {
|
||||||
@ -193,7 +193,7 @@
|
|||||||
this.getChapter(node.data);
|
this.getChapter(node.data);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('获取课程详情失败');
|
this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
@ -201,9 +201,9 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
createLessonChapter(this.chapterModel).then(response => {
|
createLessonChapter(this.chapterModel).then(response => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$message.success('创建成功');
|
this.$message.success(this.$t('tip.createSuccess'));
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('刷新失败')
|
this.$messageBox(this.$t('error.refreshFailed'))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -213,9 +213,9 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
updateLessonChapter(this.chapterModel).then(response => {
|
updateLessonChapter(this.chapterModel).then(response => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$message.success('更新成功');
|
this.$message.success(this.$t('tip.updateSuccessfully'));
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('刷新失败')
|
this.$messageBox(this.$t('error.refreshFailed'))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -283,4 +283,4 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="实训列表"
|
:title="this.$t('lesson.trainingList')"
|
||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
top="20px"
|
top="20px"
|
||||||
width="90%"
|
width="90%"
|
||||||
@ -46,7 +46,7 @@ export default {
|
|||||||
queryObject: {
|
queryObject: {
|
||||||
type: {
|
type: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '实训类型',
|
label: this.$t('lesson.trainingType'),
|
||||||
change: this.typeChoose,
|
change: this.typeChoose,
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
@ -54,16 +54,16 @@ export default {
|
|||||||
},
|
},
|
||||||
operateType: {
|
operateType: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '操作类型',
|
label: this.$t('lesson.operationType'),
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
generateType: {
|
generateType: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '自动/人工',
|
label: this.$t('lesson.automaticOrManual'),
|
||||||
config: {
|
config: {
|
||||||
data: [{ value: '02', label: '人工' }, { value: '01', label: '自动' }]
|
data: [{ value: '02', label: this.$t('lesson.automatic'), }, { value: '01', label: this.$t('lesson.manual'), }]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -74,32 +74,32 @@ export default {
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '实训名称',
|
title: this.$t('lesson.trainingName'),
|
||||||
prop: 'name'
|
prop: 'name'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '皮肤类型',
|
title: this.$t('lesson.skinType'),
|
||||||
prop: 'skinCode',
|
prop: 'skinCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '产品',
|
title: this.$t('lesson.product'),
|
||||||
prop: 'prdCode',
|
prop: 'prdCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实训类型',
|
title: this.$t('lesson.trainingType'),
|
||||||
prop: 'type',
|
prop: 'type',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.type, this.trainingTypeList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.type, this.trainingTypeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作类型',
|
title: this.$t('lesson.operationType'),
|
||||||
prop: 'operateType',
|
prop: 'operateType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['code', 'name']); },
|
||||||
@ -107,16 +107,16 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: '操作',
|
title: this.$t('global.operate'),
|
||||||
width: '200',
|
width: '200',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '添加',
|
name: this.$t('global.append'),
|
||||||
handleClick: this.addObj,
|
handleClick: this.addObj,
|
||||||
showControl: (row) => { return !row.isShow; }
|
showControl: (row) => { return !row.isShow; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '移除',
|
name: this.$t('global.remove'),
|
||||||
handleClick: this.delObj,
|
handleClick: this.delObj,
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showControl: (row) => { return row.isShow; }
|
showControl: (row) => { return row.isShow; }
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="从发布课程创建" :visible.sync="dialogShow" width="600px" :before-close="doClose">
|
<el-dialog :title="this.$t('lesson.createNewCoursesFromRelease')" :visible.sync="dialogShow" width="600px" :before-close="doClose">
|
||||||
<el-form ref="form" :model="courseModel" :rules="rules" label-width="120px" size="mini">
|
<el-form ref="form" :model="courseModel" :rules="rules" label-width="120px" size="mini">
|
||||||
<el-form-item label="发布课程名称:" prop="code">
|
<el-form-item :label="this.$t('lesson.publishCourseName')" prop="code">
|
||||||
<el-select v-model="courseModel.code" placeholder="请选择">
|
<el-select v-model="courseModel.code" :placeholder="this.$t('rules.pleaseSelect')">
|
||||||
<el-option v-for="item in lessonList" :key="item.code" :value="item.code" :label="item.name">
|
<el-option v-for="item in lessonList" :key="item.code" :value="item.code" :label="item.name">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="草稿课程名称:" prop="name">
|
<el-form-item :label="this.$t('lesson.draftCourseName')" prop="name">
|
||||||
<el-input v-model="courseModel.name"></el-input>
|
<el-input v-model="courseModel.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogShow = false">取 消</el-button>
|
<el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
|
||||||
<el-button type="primary" @click="create" :loading="loading">确 定</el-button>
|
<el-button type="primary" @click="create" :loading="loading">{{$t('global.confirm')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -40,10 +40,10 @@
|
|||||||
rules() {
|
rules() {
|
||||||
let baseRules = {
|
let baseRules = {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请选择课程名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectCourseName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入课程名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
return baseRules;
|
return baseRules;
|
||||||
@ -54,7 +54,7 @@
|
|||||||
getPublishLessonList().then(response => {
|
getPublishLessonList().then(response => {
|
||||||
this.lessonList = response.data.map(elem => { return { code: elem.id, name: elem.name }; })
|
this.lessonList = response.data.map(elem => { return { code: elem.id, name: elem.name }; })
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('刷新失败')
|
this.$messageBox(this.$t('error.refreshFailed'))
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -74,9 +74,9 @@
|
|||||||
createLessonFromPublish(model).then(response => {
|
createLessonFromPublish(model).then(response => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$message.success('创建成功');
|
this.$message.success(this.$t('tip.createSuccess'));
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('创建失败')
|
this.$messageBox(this.$t('tip.creatingFailed'))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -88,4 +88,4 @@
|
|||||||
.option-group {
|
.option-group {
|
||||||
margin: 10px 100px;
|
margin: 10px 100px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
<el-card class="forms">
|
<el-card class="forms">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height:height-160 + 'px'}" style="padding-top: 40px">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height:height-160 + 'px'}" style="padding-top: 40px">
|
||||||
<el-form ref="form" :model="courseModel" :rules="rules" label-width="135px">
|
<el-form ref="form" :model="courseModel" :rules="rules" label-width="135px">
|
||||||
<el-form-item label="课程名称:" prop="name">
|
<el-form-item :label="this.$t('lesson.courseName')" prop="name">
|
||||||
<el-input v-model="courseModel.name" />
|
<el-input v-model="courseModel.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联皮肤:" prop="skinCode">
|
<el-form-item :label="this.$t('lesson.associatedSkin')" prop="skinCode">
|
||||||
<el-select v-model="courseModel.skinCode" placeholder="请选择" :disabled="true">
|
<el-select v-model="courseModel.skinCode" :placeholder="this.$t('rules.pleaseSelect')" :disabled="true">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item,index) in skinCodeList"
|
v-for="(item,index) in skinCodeList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -20,8 +20,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联产品:" prop="prdCode">
|
<el-form-item :label="this.$t('lesson.associatedProducts')" prop="prdCode">
|
||||||
<el-select v-model="courseModel.prdCode" placeholder="请选择" :disabled="isEdit">
|
<el-select v-model="courseModel.prdCode" :placeholder="this.$t('rules.pleaseSelect')" :disabled="isEdit">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item,index) in productList"
|
v-for="(item,index) in productList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -30,12 +30,12 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="课程说明:" prop="remarks">
|
<el-form-item :label="this.$t('lesson.courseDescription')" prop="remarks">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="courseModel.remarks"
|
v-model="courseModel.remarks"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:autosize="{ minRows: 6, maxRows: 6}"
|
:autosize="{ minRows: 6, maxRows: 6}"
|
||||||
placeholder="请输入内容"
|
:placeholder="this.$t('rules.pleaseEnterContent')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -44,12 +44,12 @@
|
|||||||
<div class="draft">
|
<div class="draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<template v-if="!isEdit">
|
<template v-if="!isEdit">
|
||||||
<el-button v-if="courseModel.skinCode" type="primary" @click="create">创建</el-button>
|
<el-button v-if="courseModel.skinCode" type="primary" @click="create">{{$t('global.create')}}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-button type="primary" @click="update">更新</el-button>
|
<el-button type="primary" @click="update">{{$t('global.update')}}</el-button>
|
||||||
<el-button type="primary" @click="publish">发布</el-button>
|
<el-button type="primary" @click="publish">{{$t('global.release')}}</el-button>
|
||||||
<el-button type="danger" @click="deleteLesson">删除</el-button>
|
<el-button type="danger" @click="deleteLesson">{{$t('global.delete')}}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
@ -92,21 +92,21 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return this.isEdit ? '编辑课程' : '创建课程';
|
return this.isEdit ? this.$t('lesson.editCourse') : this.$t('lesson.createCourse');
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
const baseRules = {
|
const baseRules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入课程名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
skinCode: [
|
skinCode: [
|
||||||
{ required: true, message: '请选择皮肤类型', trigger: 'change' }
|
{ required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
prdCode: [
|
prdCode: [
|
||||||
{ required: true, message: '请选择关联产品', trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectAssociatedProduct'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
remarks: [
|
remarks: [
|
||||||
{ required: true, message: '请输入课程说明', trigger: 'change' }
|
{ required: true, message: this.$t('rules.enterCourseDescription'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return baseRules;
|
return baseRules;
|
||||||
@ -150,9 +150,9 @@ export default {
|
|||||||
};
|
};
|
||||||
createLesson(model).then(response => {
|
createLesson(model).then(response => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$message.success('创建成功');
|
this.$message.success(this.$t('tip.createSuccess'));
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('创建失败');
|
this.$messageBox(this.$t('tip.creatingFailed'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -169,9 +169,9 @@ export default {
|
|||||||
};
|
};
|
||||||
updateLesson(model).then(response => {
|
updateLesson(model).then(response => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$message.success('更新成功');
|
this.$message.success(this.$t('tip.updateSuccessfully'));
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('更新失败');
|
this.$messageBox(this.$t('tip.updateFailed'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -181,12 +181,12 @@ export default {
|
|||||||
},
|
},
|
||||||
deleteLesson() {
|
deleteLesson() {
|
||||||
delLesson(this.courseModel).then(response => {
|
delLesson(this.courseModel).then(response => {
|
||||||
this.$message.success('删除成功');
|
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||||
this.$refs.form.resetFields();
|
this.$refs.form.resetFields();
|
||||||
this.isEdit = false,
|
this.isEdit = false,
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('删除失败');
|
this.$messageBox(this.$t('tip.failDelete'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getParentSkin(node) {
|
getParentSkin(node) {
|
||||||
@ -212,7 +212,7 @@ export default {
|
|||||||
remarks: data.remarks
|
remarks: data.remarks
|
||||||
};
|
};
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('获取课程信息失败');
|
this.$messageBox(this.$t('error.obtainCourseInformationFailed'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="课程发布" :visible.sync="dialogShow" width="30%" :before-doClose="doClose">
|
<el-dialog :title="this.$t('lesson.courseRelease')" :visible.sync="dialogShow" width="30%" :before-doClose="doClose">
|
||||||
<div>
|
<div>
|
||||||
<el-form label-position="right" ref="form" :rules="rules" :model="editModel" label-width="140px"
|
<el-form label-position="right" ref="form" :rules="rules" :model="editModel" label-width="140px"
|
||||||
@submit.native.prevent>
|
@submit.native.prevent>
|
||||||
<el-form-item label="发布关联城市:" prop="cityCode">
|
<el-form-item :label="this.$t('lesson.releaseAssociatedCity')" prop="cityCode">
|
||||||
<el-select v-model="editModel.cityCode" @change="cityChange" placeholder="请选择">
|
<el-select v-model="editModel.cityCode" @change="cityChange" :placeholder="this.$t('rules.pleaseSelect')">
|
||||||
<el-option v-for="item in cityList" :key="item.code" :label="item.name" :value="item.code">
|
<el-option v-for="item in cityList" :key="item.code" :label="item.name" :value="item.code">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发布关联地图:" prop="mapId">
|
<el-form-item :label="this.$t('lesson.releaseAssociatedMap')" prop="mapId">
|
||||||
<el-select v-model="editModel.mapId" @change="mapChange" placeholder="请选择">
|
<el-select v-model="editModel.mapId" @change="mapChange" :placeholder="this.$t('rules.pleaseSelect')">
|
||||||
<el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发布课程名称:" prop="name">
|
<el-form-item :label="this.$t('lesson.publishCourseName')" prop="name">
|
||||||
<el-input v-model="editModel.name"></el-input>
|
<el-input v-model="editModel.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogShow = false">取 消</el-button>
|
<el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
|
||||||
<el-button type="primary" @click="doSave" :loading="loading">确 定</el-button>
|
<el-button type="primary" @click="doSave" :loading="loading">{{$t('global.confirm')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -54,16 +54,16 @@
|
|||||||
rules() {
|
rules() {
|
||||||
return {
|
return {
|
||||||
id: [
|
id: [
|
||||||
{ required: true, message: '课程Id为空', trigger: 'change' }
|
{ required: true, message: this.$t('rules.courseIdIsEmpty'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
cityCode: [
|
cityCode: [
|
||||||
{ required: true, message: '请选择城市', trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectCity'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
mapId: [
|
mapId: [
|
||||||
{ required: true, message: '请选择地图名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入地图名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -119,11 +119,11 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
publishLesson(this.editModel).then(response => {
|
publishLesson(this.editModel).then(response => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$message.success('发布课程成功');
|
this.$message.success(this.$t('tip.coursePublishSuccessful'));
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$messageBox('发布课程失败');
|
this.$messageBox(this.$t('tip.coursePublishFailed'));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -133,4 +133,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card-box">
|
<div class="card-box">
|
||||||
<el-steps class="steps" :active="display">
|
<el-steps class="steps" :active="display">
|
||||||
<el-step title="实训排序" icon="el-icon-edit-outline"></el-step>
|
<el-step :title="this.$t('lesson.trainingSequence')" icon="el-icon-edit-outline"></el-step>
|
||||||
<el-step title="" icon="el-icon-upload"></el-step>
|
<el-step title="" icon="el-icon-upload"></el-step>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-card class="forms">
|
<el-card class="forms">
|
||||||
@ -61,7 +61,7 @@
|
|||||||
getLessonTree({ mapId: '' }).then(response => {
|
getLessonTree({ mapId: '' }).then(response => {
|
||||||
this.treeData = this.convertTreeData(response.data, node);
|
this.treeData = this.convertTreeData(response.data, node);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('刷新失败')
|
this.$messageBox(this.$t('error.refreshFailed'))
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
allowDrop(draggingNode, dropNode, type) {
|
allowDrop(draggingNode, dropNode, type) {
|
||||||
@ -135,4 +135,4 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%" :before-close="doClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%" :before-close="doClose" center>
|
||||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
<el-button type="primary" @click="doSave">{{$t('global.confirm')}}</el-button>
|
||||||
<el-button @click="doClose">取 消</el-button>
|
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
let form = {
|
let form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'parameter', label: '皮肤类型', type: 'select', required: true, options: this.skinCodeList },
|
{ prop: 'parameter', label: this.$t('lesson.skinType'), type: 'select', required: true, options: this.skinCodeList },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
return form
|
return form
|
||||||
@ -43,13 +43,13 @@
|
|||||||
rules() {
|
rules() {
|
||||||
let crules = {
|
let crules = {
|
||||||
parameter: [
|
parameter: [
|
||||||
{ required: true, message: '请选择地图', trigger: 'change' },
|
{ required: true, message: this.$t('rules.mapInput'), trigger: 'change' },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
return crules
|
return crules
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '自动生成操作'
|
return this.$t('lesson.generationOperation')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -92,9 +92,9 @@
|
|||||||
self.doClose()
|
self.doClose()
|
||||||
self.$emit('reloadTable'); // 刷新列表
|
self.$emit('reloadTable'); // 刷新列表
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$messageBox('创建失败');
|
this.$messageBox(this.$t('tip.creatingFailed'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return '' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: this.$t('lesson.creationTime'),
|
||||||
prop: 'createTime'
|
prop: 'createTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -65,15 +65,15 @@
|
|||||||
tagType: (row) => { if (row.status != '03') { return 'warning' } else { return 'success' } }
|
tagType: (row) => { if (row.status != '03') { return 'warning' } else { return 'success' } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '开始时间',
|
title: this.$t('global.startTime'),
|
||||||
prop: 'startTime'
|
prop: 'startTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '完成时间',
|
title: this.$t('lesson.finishTime'),
|
||||||
prop: 'finishTime'
|
prop: 'finishTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建结果',
|
title: this.$t('lesson.createResults'),
|
||||||
prop: 'result',
|
prop: 'result',
|
||||||
width: '400px'
|
width: '400px'
|
||||||
},
|
},
|
||||||
@ -83,19 +83,19 @@
|
|||||||
width: '250',
|
width: '250',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '开始',
|
name: this.$t('lesson.start'),
|
||||||
handleClick: this.taskStart,
|
handleClick: this.taskStart,
|
||||||
type: '',
|
type: '',
|
||||||
showControl: (row) => { return row.status == '01' }
|
showControl: (row) => { return row.status == '01' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '取消',
|
name: this.$t('global.cancel'),
|
||||||
handleClick: this.taskCancel,
|
handleClick: this.taskCancel,
|
||||||
type: '',
|
type: '',
|
||||||
showControl: (row) => { return row.status == '04' }
|
showControl: (row) => { return row.status == '04' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '重新执行',
|
name: this.$t('lesson.toPerform'),
|
||||||
handleClick: this.taskStart,
|
handleClick: this.taskStart,
|
||||||
type: '',
|
type: '',
|
||||||
showControl: (row) => { return row.status == '03' || row.status == '05' }
|
showControl: (row) => { return row.status == '03' || row.status == '05' }
|
||||||
@ -104,7 +104,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: '创建', btnCode: 'employee_insert', handler: this.createTask }
|
{ text: this.$t('global.create'), btnCode: 'employee_insert', handler: this.createTask }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -130,7 +130,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
taskStart(index, node) {
|
taskStart(index, node) {
|
||||||
this.$confirm('此操作将开始任务, 是否继续?', this.$t('global.tips'), {
|
this.$confirm( this.$t('tip.startOperationHint'), this.$t('global.tips'), {
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@ -145,7 +145,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
taskCancel(index, node) {
|
taskCancel(index, node) {
|
||||||
this.$confirm('此操作将取消任务, 是否继续?', this.$t('global.tips'), {
|
this.$confirm( this.$t('tip.startOperationHint'), this.$t('global.tips'), {
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@ -167,4 +167,4 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="operation.title" :visible.sync="dialogShow" width="500px" :before-close="close">
|
<el-dialog :title="operation.title" :visible.sync="dialogShow" width="500px" :before-close="close">
|
||||||
<el-form ref="form" :model="operateModel" label-width="100px" :rules="rules" size="mini">
|
<el-form ref="form" :model="operateModel" label-width="auto" :rules="rules" size="mini" label-position="right" class="dialog-form">
|
||||||
<el-form-item label="皮肤类型:" prop="skinCode">
|
<el-form-item :label="this.$t('lesson.skinType') + ':'" prop="skinCode">
|
||||||
<el-select v-model="operateModel.skinCode" @change="skinCodeChoose">
|
<el-select v-model="operateModel.skinCode" @change="skinCodeChoose">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in skinCodeList"
|
v-for="option in skinCodeList"
|
||||||
@ -11,7 +11,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产品类型:" prop="prdCode">
|
<el-form-item :label="this.$t('lesson.productType')" prop="prdCode">
|
||||||
<el-select v-model="operateModel.prdCode" @change="prdChange">
|
<el-select v-model="operateModel.prdCode" @change="prdChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in productList"
|
v-for="option in productList"
|
||||||
@ -21,7 +21,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="实训类型:" prop="type">
|
<el-form-item :label="this.$t('lesson.trainingType') + ':'" prop="type">
|
||||||
<el-select v-model="operateModel.type" @change="typeChange">
|
<el-select v-model="operateModel.type" @change="typeChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in trainingTypeLists"
|
v-for="option in trainingTypeLists"
|
||||||
@ -31,7 +31,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="操作类型:" prop="operateType">
|
<el-form-item :label="this.$t('lesson.operationType') + ':'" prop="operateType">
|
||||||
<el-select v-model="operateModel.operateType" multiple>
|
<el-select v-model="operateModel.operateType" multiple>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in trainingTypeMap[operateModel.type]"
|
v-for="option in trainingTypeMap[operateModel.type]"
|
||||||
@ -41,19 +41,19 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="isUpdate" label="最小用时:" prop="minDuration">
|
<el-form-item v-if="isUpdate" :label="this.$t('lesson.minTime')" prop="minDuration">
|
||||||
<el-input-number v-model="operateModel.minDuration" :min="0" :max="10000" />s
|
<el-input-number v-model="operateModel.minDuration" :min="0" :max="10000" />s
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="isUpdate" label="最大用时:" prop="maxDuration">
|
<el-form-item v-if="isUpdate" :label="this.$t('lesson.maxTime')" prop="maxDuration">
|
||||||
<el-input-number v-model="operateModel.maxDuration" :min="0" :max="10000" />s
|
<el-input-number v-model="operateModel.maxDuration" :min="0" :max="10000" />s
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="isUpdate" label="实训描述:" prop="remarks">
|
<el-form-item v-if="isUpdate" :label="this.$t('lesson.trainingDescription')" prop="remarks">
|
||||||
<el-input v-model="operateModel.remarks" type="textarea" />
|
<el-input v-model="operateModel.remarks" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">{{$t('global.cancel')}}</el-button>
|
||||||
<el-button type="primary" :loading="loading" @click="handleDeal">确 定</el-button>
|
<el-button type="primary" :loading="loading" @click="handleDeal">{{$t('global.confirm')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -82,11 +82,11 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
var minDurations = (rule, value, callback) => {
|
var minDurations = (rule, value, callback) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return callback(new Error('请输入标准用时'));
|
return callback(new Error(this.$t('rules.enterStandardTime')));
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!Number.isInteger(value)) {
|
if (!Number.isInteger(value)) {
|
||||||
callback(new Error('请输入数字值'));
|
callback(new Error(this.$t('rules.enterNumericValue')));
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
@ -94,14 +94,14 @@ export default {
|
|||||||
};
|
};
|
||||||
var maxDurations = (rule, value, callback) => {
|
var maxDurations = (rule, value, callback) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return callback(new Error('请输入标准用时'));
|
return callback(new Error(this.$t('rules.enterStandardTime')));
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!Number.isInteger(value)) {
|
if (!Number.isInteger(value)) {
|
||||||
callback(new Error('请输入数字值'));
|
callback(new Error(this.$t('rules.enterNumericValue')));
|
||||||
} else {
|
} else {
|
||||||
if (value < this.operateModel.minDuration) {
|
if (value < this.operateModel.minDuration) {
|
||||||
callback(new Error('必须大于最小时间'));
|
callback(new Error(this.$t('rules.greaterThanMinTime')));
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
@ -111,9 +111,9 @@ export default {
|
|||||||
|
|
||||||
var checkOperateType = (rule, value, callback) => {
|
var checkOperateType = (rule, value, callback) => {
|
||||||
if (value.length <= 0) {
|
if (value.length <= 0) {
|
||||||
return callback(new Error('请选择实训类型'));
|
return callback(new Error(this.$t('rules.selectTrainingType')));
|
||||||
} else if (this.operation.event == '02' && value.length !== 1) {
|
} else if (this.operation.event == '02' && value.length !== 1) {
|
||||||
return callback(new Error('只能选择一个实训类型'));
|
return callback(new Error(this.$t('rules.selectOneTrainingType')));
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
@ -151,13 +151,13 @@ export default {
|
|||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
skinCode: [
|
skinCode: [
|
||||||
{ required: true, message: '请输入地图名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
prdCode: [
|
prdCode: [
|
||||||
{ required: true, message: '请输入产品类型', trigger: 'change' }
|
{ required: true, message: this.$t('rules.enterProductType'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
type: [
|
type: [
|
||||||
{ required: true, message: '请输入实训类型', trigger: 'change' }
|
{ required: true, message: this.$t('rules.inputTrainingType'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
operateType: [
|
operateType: [
|
||||||
{ required: true, validator: checkOperateType, trigger: 'change' }
|
{ required: true, validator: checkOperateType, trigger: 'change' }
|
||||||
@ -266,11 +266,11 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
addAutoTraining(data).then(response => {
|
addAutoTraining(data).then(response => {
|
||||||
this.$message.success('自动生成实训成功!');
|
this.$message.success(this.$t('tip.automaticGenerationTrainingSuccess'));
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.close();
|
this.close();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('生成实训失败');
|
this.$messageBox(this.$t('tip.automaticGenerationTrainingFailure'));
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
} else if (this.operation.event == '02') { // edit
|
} else if (this.operation.event == '02') { // edit
|
||||||
@ -287,11 +287,11 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
updateAutoTraining(data).then(response => {
|
updateAutoTraining(data).then(response => {
|
||||||
this.$message.success('更新自动生成实训成功!');
|
this.$message.success(this.$t('tip.updateAutomaticGenerationTrainingSuccess'));
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.close();
|
this.close();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('更新自动生成实训失败');
|
this.$messageBox(this.$t('tip.updateAutomaticGenerationTrainingFailure'));
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
} else if (this.operation.event == '03') { // delete
|
} else if (this.operation.event == '03') { // delete
|
||||||
@ -305,11 +305,11 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
deleteAutoTraining(data).then(response => {
|
deleteAutoTraining(data).then(response => {
|
||||||
this.$message.success('删除自动生成实训成功!');
|
this.$message.success(this.$t('tip.deleteAutomaticGenerationTrainingSuccess'));
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.close();
|
this.close();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('删除自动生成实训失败');
|
this.$messageBox(this.$t('tip.deleteAutomaticGenerationTrainingFailure'));
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -324,4 +324,8 @@ export default {
|
|||||||
.el-checkbox {
|
.el-checkbox {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
.dialog-form {
|
||||||
|
position: relative;
|
||||||
|
left: 15px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -37,7 +37,7 @@ export default {
|
|||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '80px',
|
labelWidth: '120px',
|
||||||
initLoadCallback: this.loadInitQueryList,
|
initLoadCallback: this.loadInitQueryList,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
skinCode: {
|
skinCode: {
|
||||||
@ -50,7 +50,7 @@ export default {
|
|||||||
},
|
},
|
||||||
prdCode: {
|
prdCode: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '产品',
|
label: this.$t('lesson.product'),
|
||||||
change: this.prdChoose,
|
change: this.prdChoose,
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
@ -73,9 +73,9 @@ export default {
|
|||||||
},
|
},
|
||||||
generateType: {
|
generateType: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '自动/人工',
|
label: this.$t('lesson.automaticOrManual'),
|
||||||
config: {
|
config: {
|
||||||
data: [{ value: '02', label: '人工' }, { value: '01', label: '自动' }]
|
data: [{ value: '02', label: this.$t('lesson.manual') }, { value: '01', label: this.$t('lesson.automatic') }]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
@ -147,9 +147,9 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: '生成实训', btnCode: 'employee_insert', handler: this.autoMaticTrainging },
|
{ text: this.$t('lesson.generateTraining'), btnCode: 'employee_insert', handler: this.autoMaticTrainging },
|
||||||
{ text: '修改实训', btnCode: 'employee_insert', handler: this.editTrainingByType, type: 'warning' },
|
{ text: this.$t('lesson.updateTraining'), btnCode: 'employee_insert', handler: this.editTrainingByType, type: 'warning'},
|
||||||
{ text: '删除实训', btnCode: 'employee_insert', handler: this.delAutoMaticTrainging, type: 'danger' }
|
{ text: this.$t('lesson.deleteTraining'), btnCode: 'employee_insert', handler: this.delAutoMaticTrainging, type: 'danger'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -249,13 +249,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
autoMaticTrainging() {
|
autoMaticTrainging() {
|
||||||
this.$refs.draftTrain.show({ event: '01', title: '自动生成实训' });
|
this.$refs.draftTrain.show({ event: '01', title: this.$t('lesson.automaticGenerationOfTraining') });
|
||||||
},
|
},
|
||||||
editTrainingByType() {
|
editTrainingByType() {
|
||||||
this.$refs.draftTrain.show({ event: '02', title: '按类别修改实训' });
|
this.$refs.draftTrain.show({ event: '02', title: this.$t('lesson.modifyTrainingByCategory') });
|
||||||
},
|
},
|
||||||
delAutoMaticTrainging() {
|
delAutoMaticTrainging() {
|
||||||
this.$refs.draftTrain.show({ event: '03', title: '删除自动生成实训' });
|
this.$refs.draftTrain.show({ event: '03', title: this.$t('lesson.deleteAutoGeneratedTraining') });
|
||||||
},
|
},
|
||||||
demoDisplay(index, node) {
|
demoDisplay(index, node) {
|
||||||
trainingNotify({ trainingId: node.id }).then(resp => {
|
trainingNotify({ trainingId: node.id }).then(resp => {
|
||||||
@ -264,7 +264,7 @@ export default {
|
|||||||
this.$router.push({ path: `${UrlConfig.display}/manage`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/manage`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
this.$messageBox(this.$t('error.createSimulationFailed') +error.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="operation.title" :visible.sync="dialogShow" width="30%" :before-close="close">
|
<el-dialog :title="operation.title" :visible.sync="dialogShow" width="30%" :before-close="close">
|
||||||
<el-form ref="form" :model="operateModel" label-width="120px" :rules="rules" size="mini">
|
<el-form ref="form" :model="operateModel" label-width="120px" :rules="rules" size="mini">
|
||||||
<el-form-item label="实训名称:" prop="name">
|
<el-form-item :label="this.$t('lesson.trainingName')+':'" prop="name">
|
||||||
<el-input v-model="operateModel.name" />
|
<el-input v-model="operateModel.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产品类型:" prop="prdCode">
|
<el-form-item :label="this.$t('lesson.productType')" prop="prdCode">
|
||||||
<el-select v-model="operateModel.prdCode" placeholder="" :disabled="true">
|
<el-select v-model="operateModel.prdCode" placeholder="" :disabled="true">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in productTypesList"
|
v-for="option in productTypesList"
|
||||||
@ -14,7 +14,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="实训类型:" prop="type">
|
<el-form-item :label="this.$t('lesson.trainingType')+':'" prop="type">
|
||||||
<el-select v-model="operateModel.type" placeholder="" :disabled="true">
|
<el-select v-model="operateModel.type" placeholder="" :disabled="true">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in trainTypesList"
|
v-for="option in trainTypesList"
|
||||||
@ -24,7 +24,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="操作类型:">
|
<el-form-item :label="this.$t('lesson.operationType')+':'">
|
||||||
<el-select v-model="operateModel.operateType">
|
<el-select v-model="operateModel.operateType">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(option, index) in operationList"
|
v-for="(option, index) in operationList"
|
||||||
@ -34,24 +34,24 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="最小用时:" prop="minDuration">
|
<el-form-item :label="this.$t('lesson.minTime')" prop="minDuration">
|
||||||
<el-input-number v-model="operateModel.minDuration" :min="0" :max="10000" />s
|
<el-input-number v-model="operateModel.minDuration" :min="0" :max="10000" />s
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="最大用时:" prop="maxDuration">
|
<el-form-item :label="this.$t('lesson.maxTime')" prop="maxDuration">
|
||||||
<el-input-number v-model="operateModel.maxDuration" :min="0" :max="10000" />s
|
<el-input-number v-model="operateModel.maxDuration" :min="0" :max="10000" />s
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="实训说明:" prop="remarks">
|
<el-form-item :label="this.$t('lesson.trainingDescription')" prop="remarks">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="operateModel.remarks"
|
v-model="operateModel.remarks"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:autosize="{ minRows: 4, maxRows: 4}"
|
:autosize="{ minRows: 4, maxRows: 4}"
|
||||||
placeholder="请输入内容"
|
:placeholder="this.$t('rules.pleaseEnterContent')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">{{$t('global.cancel')}}</el-button>
|
||||||
<el-button type="primary" @click="handleDeal">确 定</el-button>
|
<el-button type="primary" @click="handleDeal">{{$t('global.confirm')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -71,11 +71,11 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
var minDurations = (rule, value, callback) => {
|
var minDurations = (rule, value, callback) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return callback(new Error('请输入标准用时'));
|
return callback(new Error(this.$t('rules.enterStandardTime')));
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!Number.isInteger(value)) {
|
if (!Number.isInteger(value)) {
|
||||||
callback(new Error('请输入数字值'));
|
callback(new Error(this.$t('rules.enterNumericValue')));
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
@ -83,14 +83,14 @@ export default {
|
|||||||
};
|
};
|
||||||
var maxDurations = (rule, value, callback) => {
|
var maxDurations = (rule, value, callback) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return callback(new Error('请输入标准用时'));
|
return callback(new Error(this.$t('rules.enterStandardTime')));
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!Number.isInteger(value)) {
|
if (!Number.isInteger(value)) {
|
||||||
callback(new Error('请输入数字值'));
|
callback(new Error(this.$t('rules.enterNumericValue')));
|
||||||
} else {
|
} else {
|
||||||
if (value < this.operateModel.minDuration) {
|
if (value < this.operateModel.minDuration) {
|
||||||
callback(new Error('必须大于最小时间'));
|
callback(new Error(this.$t('rules.greaterThanMinTime')));
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
@ -120,7 +120,7 @@ export default {
|
|||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入实训名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.inputTrainingName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
minDuration: [
|
minDuration: [
|
||||||
{ required: true, validator: minDurations, trigger: 'blur' }
|
{ required: true, validator: minDurations, trigger: 'blur' }
|
||||||
@ -129,7 +129,7 @@ export default {
|
|||||||
{ required: true, validator: maxDurations, trigger: 'blur' }
|
{ required: true, validator: maxDurations, trigger: 'blur' }
|
||||||
],
|
],
|
||||||
remarks: [
|
remarks: [
|
||||||
{ required: true, message: '请输入实训说明', trigger: 'change' }
|
{ required: true, message: this.$t('rules.inputTrainingRemark'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -216,7 +216,7 @@ export default {
|
|||||||
this.operateModel.operateType = response.data.operateType;
|
this.operateModel.operateType = response.data.operateType;
|
||||||
this.operateModel.remarks = response.data.remarks;
|
this.operateModel.remarks = response.data.remarks;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('获取骤数据失败');
|
this.$messageBox(this.$t('error.obtainStepDataFailed'));
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -271,9 +271,9 @@ export default {
|
|||||||
addTraining(data).then(response => {
|
addTraining(data).then(response => {
|
||||||
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']);
|
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']);
|
||||||
this.close();
|
this.close();
|
||||||
this.$message.success('添加实训成功!');
|
this.$message.success(this.$t('tip.addTrainingSuccessfully'));
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('新增实训失败');
|
this.$messageBox(this.$t('tip.addTrainingFailed'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -295,9 +295,9 @@ export default {
|
|||||||
updateTraining(data).then(response => {
|
updateTraining(data).then(response => {
|
||||||
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']);
|
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']);
|
||||||
this.close();
|
this.close();
|
||||||
this.$message.success('更新实训成功!');
|
this.$message.success(this.$t('tip.updateTrainingSuccessfully'));
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('更新实训失败');
|
this.$messageBox(this.$t('tip.updateTrainingFailed'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -217,14 +217,14 @@ export default {
|
|||||||
saveTrainingStepsData(model).then(response => {
|
saveTrainingStepsData(model).then(response => {
|
||||||
this.$refs.form.resetFields();
|
this.$refs.form.resetFields();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
this.$message.success('保存步骤数据成功');
|
this.$message.success(this.$t('tip.savedStepDataSuccessfully'));
|
||||||
this.saveDisabled = false;
|
this.saveDisabled = false;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.saveDisabled = false;
|
this.saveDisabled = false;
|
||||||
this.$messageBox('保存步骤数据失败');
|
this.$messageBox(this.$t('tip.savedStepDataFailed'));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('请选择关联的车站');
|
this.$messageBox(this.$t('rules.selectAssociatedStation'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@
|
|||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
start() {
|
start() {
|
||||||
@ -187,9 +187,9 @@
|
|||||||
this.selectBeginTime();
|
this.selectBeginTime();
|
||||||
} else {
|
} else {
|
||||||
if (this.tryTime <= 0) {
|
if (this.tryTime <= 0) {
|
||||||
this.$confirm('您没有权限,请前往购买产品', '提示', {
|
this.$confirm(this.$('tip.noPermissionHint'), this.$t('global.tips'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.buy();
|
this.buy();
|
||||||
|
Loading…
Reference in New Issue
Block a user