Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
52bacce3a3
@ -209,6 +209,40 @@ export function getScriptMemberData(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取剧本出演成员角色 */
|
||||
export function getScriptPlayMember(group) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/scriptWrite/players`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 取消剧本演出成员角色 */
|
||||
export function cancleScriptMembers(group, data) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/scriptWrite/removePlayers`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择剧本演出成员角色 */
|
||||
export function selectScriptMembers(group, data) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/scriptWrite/choosePlayers`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改剧本演出成员性别 */
|
||||
export function modifyScriptMemberSex(group, playerId, data) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/scriptWrite/player/${playerId}?gender=${data.gender}`,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
/** 清除仿真剧本数据*/
|
||||
export function dumpScriptData(group) {
|
||||
return request({
|
||||
|
@ -58,5 +58,10 @@ export default {
|
||||
updateOperateStepFailed: 'The update action step failed',
|
||||
packagePermissionFailed: 'Packaging authority 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',
|
||||
updateTime: 'Update time:',
|
||||
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 screenMonitor from './screenMonitor';
|
||||
import demonstration from './demonstration';
|
||||
import exam from './exam';
|
||||
|
||||
export default {
|
||||
...enLocale,
|
||||
@ -35,5 +36,6 @@ export default {
|
||||
replay,
|
||||
planMonitor,
|
||||
screenMonitor,
|
||||
demonstration
|
||||
demonstration,
|
||||
exam
|
||||
};
|
||||
|
@ -48,5 +48,44 @@ export default {
|
||||
eidtStepInfo: 'Edit Step Information',
|
||||
product: 'Product',
|
||||
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',
|
||||
inputTime: 'Please enter time',
|
||||
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'
|
||||
};
|
||||
|
@ -108,6 +108,23 @@ export default {
|
||||
purchaseMonth: 'Please enter a valid purchase month',
|
||||
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',
|
||||
trainModelNameRepeat: 'Train model data duplication'
|
||||
trainModelNameRepeat: 'Train model data duplication',
|
||||
|
||||
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: '更新操作步骤失败',
|
||||
packagePermissionFailed: '打包权限失败',
|
||||
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: '返回考试列表'
|
||||
};
|
@ -142,5 +142,8 @@ export default {
|
||||
mapList: '地图列表',
|
||||
updateTime: '更新时间:',
|
||||
line: '线路:',
|
||||
permissionList: '权限列表:'
|
||||
permissionList: '权限列表:',
|
||||
remove: '移除',
|
||||
append: '添加',
|
||||
release: '发布'
|
||||
};
|
||||
|
@ -16,6 +16,7 @@ import replay from './replay';
|
||||
import planMonitor from './planMonitor';
|
||||
import screenMonitor from './screenMonitor';
|
||||
import demonstration from './demonstration';
|
||||
import exam from './exam';
|
||||
|
||||
export default {
|
||||
...cnLocale,
|
||||
@ -35,5 +36,6 @@ export default {
|
||||
replay,
|
||||
planMonitor,
|
||||
screenMonitor,
|
||||
demonstration
|
||||
demonstration,
|
||||
exam
|
||||
};
|
||||
|
@ -45,9 +45,48 @@ export default {
|
||||
stepReturn: '步骤返回值',
|
||||
stepTips: '步骤提示信息',
|
||||
createStepInfo: '创建步骤信息',
|
||||
eidtStepInfo: '编辑步骤信息',
|
||||
editStepInfo: '编辑步骤信息',
|
||||
product: '产品',
|
||||
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: '删除自动生成实训'
|
||||
};
|
||||
|
||||
|
@ -2,9 +2,11 @@ export default {
|
||||
drawData: '绘图数据',
|
||||
mapData: '地图数据',
|
||||
pleaseSelect: '请选择',
|
||||
pleaseEnter: '请输入',
|
||||
sketchMap: '草稿地图列表',
|
||||
newConstruction: '新建',
|
||||
importMap: '导入地图',
|
||||
bothCreate: '批量生成',
|
||||
importMap: '导入',
|
||||
createNewMap: '新建地图',
|
||||
normalCreate: '正常创建',
|
||||
saveMapAs: '地图另存为',
|
||||
@ -19,11 +21,12 @@ export default {
|
||||
deny: '否',
|
||||
drawMap: '绘图',
|
||||
advanced: '高级',
|
||||
viewLayer: '视图图层',
|
||||
layerDisplay: '图层显示',
|
||||
viewLayer: '显示',
|
||||
layerDisplay: '显示',
|
||||
viewShows: '视图显示',
|
||||
contentShows: '内容显示',
|
||||
contentShows: '设备显示',
|
||||
createBatch: '批量创建',
|
||||
deleteBoth: '批量删除',
|
||||
|
||||
save: '保存',
|
||||
updata: '更新',
|
||||
@ -31,6 +34,7 @@ export default {
|
||||
updateObjAxis: '更新坐标',
|
||||
saveAs: '另存为',
|
||||
publish: '发布',
|
||||
publishMap: '发布地图',
|
||||
deleteObj: '删除',
|
||||
remove: '移除',
|
||||
lastStep: '上一步',
|
||||
@ -56,7 +60,7 @@ export default {
|
||||
text: '文字',
|
||||
|
||||
mapName: '地图名称:',
|
||||
skinName: '皮肤风格:',
|
||||
skinName: '皮肤:',
|
||||
selectCity: '所属城市:',
|
||||
offsetXColon: 'X偏移:',
|
||||
offsetYColon: 'Y偏移:',
|
||||
|
@ -232,6 +232,25 @@ export default {
|
||||
selectMapProductName: '请选择地图产品名称',
|
||||
inputTime: '请输入时间',
|
||||
inputPermissionNumber: '请输入权限个数',
|
||||
permissionNumberGreater0: '权限个数必须大于0'
|
||||
permissionNumberGreater0: '权限个数必须大于0',
|
||||
enterChapterName: '请输入章节名称',
|
||||
enterChapterInstructions: '请输入章节说明',
|
||||
selectCourseName: '请选择课程名称',
|
||||
enterCourseName: '请输入课程名称',
|
||||
selectAssociatedProduct: '请选择关联产品',
|
||||
enterCourseDescription: '请输入课程说明',
|
||||
courseIdIsEmpty: '课程Id为空',
|
||||
selectCity: '请选择城市',
|
||||
enterStandardTime: '请输入标准用时',
|
||||
enterNumericValue: '请输入数字值',
|
||||
greaterThanMinTime: '必须大于最小时间',
|
||||
selectTrainingType: '请选择实训类型',
|
||||
selectOneTrainingType: '只能选择一个实训类型',
|
||||
enterProductType: '请输入产品类型',
|
||||
selectAssociatedStation: '请选择关联的车站',
|
||||
|
||||
enterScale: '请输入缩放比例',
|
||||
enterXOffset: '请输入X偏移',
|
||||
enterYOffset: '请输入Y偏移'
|
||||
|
||||
};
|
||||
|
@ -113,5 +113,21 @@ export default {
|
||||
|
||||
createRoomFailedHint: '每个用户只能创建一个综合演练房间, 是否进入房间?',
|
||||
noPermissionHint: '您没有权限,请前往购买产品',
|
||||
trainModelNameRepeat: '列车模型数据重复'
|
||||
trainModelNameRepeat: '列车模型数据重复',
|
||||
coursePublishSuccessful: '课程发布成功',
|
||||
coursePublishFailed: '课程发布失败',
|
||||
startOperationHint: '此操作将开始任务, 是否继续?',
|
||||
cancelsTaskHint: '此操作将取消任务, 是否继续?',
|
||||
automaticGenerationTrainingSuccess: '自动生成实训成功',
|
||||
automaticGenerationTrainingFailure: '自动生成实训失败',
|
||||
updateAutomaticGenerationTrainingSuccess: '更新自动生成实训成功',
|
||||
updateAutomaticGenerationTrainingFailure: '更新自动生成实训失败',
|
||||
deleteAutomaticGenerationTrainingSuccess: '删除自动生成实训成功',
|
||||
deleteAutomaticGenerationTrainingFailure: '删除自动生成实训失败',
|
||||
addTrainingSuccessfully: '添加实训成功!',
|
||||
addTrainingFailed: '添加实训失败',
|
||||
updateTrainingSuccessfully: '更新实训成功!',
|
||||
updateTrainingFailed: '更新实训失败',
|
||||
savedStepDataSuccessfully: '保存步骤数据成功',
|
||||
savedStepDataFailed: '保存步骤数据失败'
|
||||
};
|
||||
|
@ -80,6 +80,9 @@ class Jlmap {
|
||||
// 保存皮肤类型
|
||||
if (map.skinVO) {
|
||||
this.skinCode = map.skinVO.code;
|
||||
this.$options.scaleRate = map.skinVO.scaling;
|
||||
this.$options.offsetX = map.skinVO.origin.x;
|
||||
this.$options.offsetY = map.skinVO.origin.y;
|
||||
this.$painter.updateTransform({ scaleRate: map.skinVO.scaling, offsetX: map.skinVO.origin.x, offsetY: map.skinVO.origin.y });
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="home-box" :style="{height: height+'px'}">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" style="margin-top:5px;">
|
||||
<h1 class="title">
|
||||
城市轨道交通考试系统
|
||||
{{$t('exam.testSystem')}}
|
||||
<img :src="logo" alt="" class="logo-img">
|
||||
</h1>
|
||||
<div class="card-box">
|
||||
@ -14,7 +14,7 @@
|
||||
</el-carousel>
|
||||
</div>
|
||||
<div class="brief-box">
|
||||
该系统具有自定义考试规则、自动生成考卷、学员成绩统计、数据曲线分析及题库管理等功能,从实战操作、业务流程、故障模拟及考试规则等多角度出发,力求打造最符合用户需求的城市轨道交通在线交互实操类考试系统
|
||||
{{$t('exam.testSystemDescription')}}
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
|
@ -33,17 +33,17 @@
|
||||
menu: [],
|
||||
lessonMenu: [
|
||||
{
|
||||
label: '创建章节',
|
||||
label: this.$t('lesson.createChapter'),
|
||||
handler: this.addSection,
|
||||
},
|
||||
{
|
||||
label: '内容排序',
|
||||
label: this.$t('lesson.contentSorting'),
|
||||
handler: this.treeSort,
|
||||
}
|
||||
],
|
||||
chapterMenu: [
|
||||
{
|
||||
label: '创建章节',
|
||||
label: this.$t('lesson.createChapter'),
|
||||
handler: this.addSection,
|
||||
}
|
||||
]
|
||||
@ -101,15 +101,15 @@
|
||||
},
|
||||
deleteObj() {
|
||||
let _that = this;
|
||||
this.$confirm('是否确认删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$('tip.confirmDeletion'), this.$('global.tips'), {
|
||||
confirmButtonText: this.$('global.confirm'),
|
||||
cancelButtonText: this.$('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
}).catch(() => {
|
||||
this.$messageBox('已取消删除');
|
||||
this.$messageBox(this.$('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<el-card class="map-list-main" v-loading="loading">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>课程列表</span>
|
||||
<el-button type="text" @click="publishCreate" style="float: right; padding: 3px 0">从发布课程新建</el-button>
|
||||
<span>{{$t('lesson.courseList')}}</span>
|
||||
<el-button type="text" @click="publishCreate" style="float: right; padding: 3px 0">{{$t('lesson.createNewCoursesFromRelease')}}</el-button>
|
||||
</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-tree ref="lessonTree" :data="treeData" :props="defaultProps" :filter-node-method="filterNode"
|
||||
@node-contextmenu="showContextMenu" draggable :allow-drop="allowDrop" :allow-drag="allowDrag"
|
||||
@ -156,7 +156,7 @@
|
||||
this.treeData = this.convertTreeData(response.data);
|
||||
this.$nextTick(() => { this.loading = false; });
|
||||
}).catch(error => {
|
||||
this.$messageBox('刷新失败');
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
@ -167,4 +167,4 @@
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
background-color: #e4e3e3 !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -7,48 +7,48 @@
|
||||
<el-card class="forms">
|
||||
<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-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-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-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-form-item>
|
||||
<el-form-item label="章节说明:" prop="remarks">
|
||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" placeholder="请输入内容"
|
||||
<el-form-item :label="this.$t('lesson.chapterInstructions')" prop="remarks">
|
||||
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" :placeholder="this.$t('rules.pleaseEnterContent')"
|
||||
v-model="chapterModel.remarks">
|
||||
</el-input>
|
||||
</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
|
||||
:height="237">
|
||||
<el-table-column type="index" width="50">
|
||||
</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 property="trial" label="是否试用" width="80">
|
||||
<el-table-column property="trial" :label="this.$t('global.isTry')" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.trial"></el-checkbox>
|
||||
</template>
|
||||
</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">
|
||||
<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>
|
||||
</el-table-column>
|
||||
</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>
|
||||
</el-scrollbar>
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="create" v-show="!isEdit">添加</el-button>
|
||||
<el-button type="primary" @click="update" 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">{{$t('global.update')}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<train-list ref="pathRoute" :trainings="this.chapterModel.trainings" :detail="detail"
|
||||
@ -95,15 +95,15 @@
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.isEdit ? '更新章节' : '创建章节';
|
||||
return this.isEdit ? this.$t('lesson.updateChapter') : this.$t('lesson.createChapter');
|
||||
},
|
||||
rules() {
|
||||
let baseRules = {
|
||||
name: [
|
||||
{ required: true, message: '请输入章节名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.enterChapterName'), trigger: 'change' }
|
||||
],
|
||||
remarks: [
|
||||
{ required: true, message: '请输入章节说明', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.enterChapterInstructions'), trigger: 'change' }
|
||||
],
|
||||
}
|
||||
return baseRules;
|
||||
@ -135,7 +135,7 @@
|
||||
getLessonChapterDetail(data).then(response => {
|
||||
this.setChapterModel(response.data);
|
||||
}).catch(error => {
|
||||
this.$messageBox('获取章节数据失败')
|
||||
this.$messageBox(this.$t('error.obtainChapterDataFailed'))
|
||||
});
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
@ -193,7 +193,7 @@
|
||||
this.getChapter(node.data);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$messageBox('获取课程详情失败');
|
||||
this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
|
||||
})
|
||||
},
|
||||
create() {
|
||||
@ -201,9 +201,9 @@
|
||||
if (valid) {
|
||||
createLessonChapter(this.chapterModel).then(response => {
|
||||
this.$emit('refresh');
|
||||
this.$message.success('创建成功');
|
||||
this.$message.success(this.$t('tip.createSuccess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox('刷新失败')
|
||||
this.$messageBox(this.$t('error.refreshFailed'))
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -213,9 +213,9 @@
|
||||
if (valid) {
|
||||
updateLessonChapter(this.chapterModel).then(response => {
|
||||
this.$emit('refresh');
|
||||
this.$message.success('更新成功');
|
||||
this.$message.success(this.$t('tip.updateSuccessfully'));
|
||||
}).catch(error => {
|
||||
this.$messageBox('刷新失败')
|
||||
this.$messageBox(this.$t('error.refreshFailed'))
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -283,4 +283,4 @@
|
||||
text-align: center;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="实训列表"
|
||||
:title="this.$t('lesson.trainingList')"
|
||||
:visible.sync="show"
|
||||
top="20px"
|
||||
width="90%"
|
||||
@ -46,7 +46,7 @@ export default {
|
||||
queryObject: {
|
||||
type: {
|
||||
type: 'select',
|
||||
label: '实训类型',
|
||||
label: this.$t('lesson.trainingType'),
|
||||
change: this.typeChoose,
|
||||
config: {
|
||||
data: []
|
||||
@ -54,16 +54,16 @@ export default {
|
||||
},
|
||||
operateType: {
|
||||
type: 'select',
|
||||
label: '操作类型',
|
||||
label: this.$t('lesson.operationType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
generateType: {
|
||||
type: 'select',
|
||||
label: '自动/人工',
|
||||
label: this.$t('lesson.automaticOrManual'),
|
||||
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,
|
||||
columns: [
|
||||
{
|
||||
title: '实训名称',
|
||||
title: this.$t('lesson.trainingName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '皮肤类型',
|
||||
title: this.$t('lesson.skinType'),
|
||||
prop: 'skinCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '产品',
|
||||
title: this.$t('lesson.product'),
|
||||
prop: 'prdCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '实训类型',
|
||||
title: this.$t('lesson.trainingType'),
|
||||
prop: 'type',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.type, this.trainingTypeList, ['code', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '操作类型',
|
||||
title: this.$t('lesson.operationType'),
|
||||
prop: 'operateType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['code', 'name']); },
|
||||
@ -107,16 +107,16 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '200',
|
||||
buttons: [
|
||||
{
|
||||
name: '添加',
|
||||
name: this.$t('global.append'),
|
||||
handleClick: this.addObj,
|
||||
showControl: (row) => { return !row.isShow; }
|
||||
},
|
||||
{
|
||||
name: '移除',
|
||||
name: this.$t('global.remove'),
|
||||
handleClick: this.delObj,
|
||||
type: 'warning',
|
||||
showControl: (row) => { return row.isShow; }
|
||||
|
@ -1,19 +1,19 @@
|
||||
<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-item label="发布课程名称:" prop="code">
|
||||
<el-select v-model="courseModel.code" placeholder="请选择">
|
||||
<el-form-item :label="this.$t('lesson.publishCourseName')" prop="code">
|
||||
<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>
|
||||
</el-select>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="create" :loading="loading">确 定</el-button>
|
||||
<el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="create" :loading="loading">{{$t('global.confirm')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
@ -40,10 +40,10 @@
|
||||
rules() {
|
||||
let baseRules = {
|
||||
code: [
|
||||
{ required: true, message: '请选择课程名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectCourseName'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入课程名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
return baseRules;
|
||||
@ -54,7 +54,7 @@
|
||||
getPublishLessonList().then(response => {
|
||||
this.lessonList = response.data.map(elem => { return { code: elem.id, name: elem.name }; })
|
||||
}).catch(error => {
|
||||
this.$messageBox('刷新失败')
|
||||
this.$messageBox(this.$t('error.refreshFailed'))
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
@ -74,9 +74,9 @@
|
||||
createLessonFromPublish(model).then(response => {
|
||||
this.$emit('refresh');
|
||||
this.doClose();
|
||||
this.$message.success('创建成功');
|
||||
this.$message.success(this.$t('tip.createSuccess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox('创建失败')
|
||||
this.$messageBox(this.$t('tip.creatingFailed'))
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -88,4 +88,4 @@
|
||||
.option-group {
|
||||
margin: 10px 100px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -7,11 +7,11 @@
|
||||
<el-card class="forms">
|
||||
<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-item label="课程名称:" prop="name">
|
||||
<el-form-item :label="this.$t('lesson.courseName')" prop="name">
|
||||
<el-input v-model="courseModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联皮肤:" prop="skinCode">
|
||||
<el-select v-model="courseModel.skinCode" placeholder="请选择" :disabled="true">
|
||||
<el-form-item :label="this.$t('lesson.associatedSkin')" prop="skinCode">
|
||||
<el-select v-model="courseModel.skinCode" :placeholder="this.$t('rules.pleaseSelect')" :disabled="true">
|
||||
<el-option
|
||||
v-for="(item,index) in skinCodeList"
|
||||
:key="index"
|
||||
@ -20,8 +20,8 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联产品:" prop="prdCode">
|
||||
<el-select v-model="courseModel.prdCode" placeholder="请选择" :disabled="isEdit">
|
||||
<el-form-item :label="this.$t('lesson.associatedProducts')" prop="prdCode">
|
||||
<el-select v-model="courseModel.prdCode" :placeholder="this.$t('rules.pleaseSelect')" :disabled="isEdit">
|
||||
<el-option
|
||||
v-for="(item,index) in productList"
|
||||
:key="index"
|
||||
@ -30,12 +30,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="课程说明:" prop="remarks">
|
||||
<el-form-item :label="this.$t('lesson.courseDescription')" prop="remarks">
|
||||
<el-input
|
||||
v-model="courseModel.remarks"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 6, maxRows: 6}"
|
||||
placeholder="请输入内容"
|
||||
:placeholder="this.$t('rules.pleaseEnterContent')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -44,12 +44,12 @@
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<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 v-else>
|
||||
<el-button type="primary" @click="update">更新</el-button>
|
||||
<el-button type="primary" @click="publish">发布</el-button>
|
||||
<el-button type="danger" @click="deleteLesson">删除</el-button>
|
||||
<el-button type="primary" @click="update">{{$t('global.update')}}</el-button>
|
||||
<el-button type="primary" @click="publish">{{$t('global.release')}}</el-button>
|
||||
<el-button type="danger" @click="deleteLesson">{{$t('global.delete')}}</el-button>
|
||||
</template>
|
||||
</el-button-group>
|
||||
</div>
|
||||
@ -92,21 +92,21 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.isEdit ? '编辑课程' : '创建课程';
|
||||
return this.isEdit ? this.$t('lesson.editCourse') : this.$t('lesson.createCourse');
|
||||
},
|
||||
rules() {
|
||||
const baseRules = {
|
||||
name: [
|
||||
{ required: true, message: '请输入课程名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
|
||||
],
|
||||
skinCode: [
|
||||
{ required: true, message: '请选择皮肤类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' }
|
||||
],
|
||||
prdCode: [
|
||||
{ required: true, message: '请选择关联产品', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectAssociatedProduct'), trigger: 'change' }
|
||||
],
|
||||
remarks: [
|
||||
{ required: true, message: '请输入课程说明', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.enterCourseDescription'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
return baseRules;
|
||||
@ -150,9 +150,9 @@ export default {
|
||||
};
|
||||
createLesson(model).then(response => {
|
||||
this.$emit('refresh');
|
||||
this.$message.success('创建成功');
|
||||
this.$message.success(this.$t('tip.createSuccess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox('创建失败');
|
||||
this.$messageBox(this.$t('tip.creatingFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -169,9 +169,9 @@ export default {
|
||||
};
|
||||
updateLesson(model).then(response => {
|
||||
this.$emit('refresh');
|
||||
this.$message.success('更新成功');
|
||||
this.$message.success(this.$t('tip.updateSuccessfully'));
|
||||
}).catch(error => {
|
||||
this.$messageBox('更新失败');
|
||||
this.$messageBox(this.$t('tip.updateFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -181,12 +181,12 @@ export default {
|
||||
},
|
||||
deleteLesson() {
|
||||
delLesson(this.courseModel).then(response => {
|
||||
this.$message.success('删除成功');
|
||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||
this.$refs.form.resetFields();
|
||||
this.isEdit = false,
|
||||
this.$emit('refresh');
|
||||
}).catch(error => {
|
||||
this.$messageBox('删除失败');
|
||||
this.$messageBox(this.$t('tip.failDelete'));
|
||||
});
|
||||
},
|
||||
getParentSkin(node) {
|
||||
@ -212,7 +212,7 @@ export default {
|
||||
remarks: data.remarks
|
||||
};
|
||||
}).catch(error => {
|
||||
this.$messageBox('获取课程信息失败');
|
||||
this.$messageBox(this.$t('error.obtainCourseInformationFailed'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,28 +1,28 @@
|
||||
<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>
|
||||
<el-form label-position="right" ref="form" :rules="rules" :model="editModel" label-width="140px"
|
||||
@submit.native.prevent>
|
||||
<el-form-item label="发布关联城市:" prop="cityCode">
|
||||
<el-select v-model="editModel.cityCode" @change="cityChange" placeholder="请选择">
|
||||
<el-form-item :label="this.$t('lesson.releaseAssociatedCity')" prop="cityCode">
|
||||
<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>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布关联地图:" prop="mapId">
|
||||
<el-select v-model="editModel.mapId" @change="mapChange" placeholder="请选择">
|
||||
<el-form-item :label="this.$t('lesson.releaseAssociatedMap')" prop="mapId">
|
||||
<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>
|
||||
</el-select>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doSave" :loading="loading">确 定</el-button>
|
||||
<el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="doSave" :loading="loading">{{$t('global.confirm')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -54,16 +54,16 @@
|
||||
rules() {
|
||||
return {
|
||||
id: [
|
||||
{ required: true, message: '课程Id为空', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.courseIdIsEmpty'), trigger: 'change' }
|
||||
],
|
||||
cityCode: [
|
||||
{ required: true, message: '请选择城市', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectCity'), trigger: 'change' }
|
||||
],
|
||||
mapId: [
|
||||
{ required: true, message: '请选择地图名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入地图名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
||||
],
|
||||
}
|
||||
}
|
||||
@ -119,11 +119,11 @@
|
||||
if (valid) {
|
||||
publishLesson(this.editModel).then(response => {
|
||||
this.loading = false;
|
||||
this.$message.success('发布课程成功');
|
||||
this.$message.success(this.$t('tip.coursePublishSuccessful'));
|
||||
this.doClose();
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.$messageBox('发布课程失败');
|
||||
this.$messageBox(this.$t('tip.coursePublishFailed'));
|
||||
});
|
||||
} else {
|
||||
this.loading = false;
|
||||
@ -133,4 +133,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="card-box">
|
||||
<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-steps>
|
||||
<el-card class="forms">
|
||||
@ -61,7 +61,7 @@
|
||||
getLessonTree({ mapId: '' }).then(response => {
|
||||
this.treeData = this.convertTreeData(response.data, node);
|
||||
}).catch(error => {
|
||||
this.$messageBox('刷新失败')
|
||||
this.$messageBox(this.$t('error.refreshFailed'))
|
||||
});
|
||||
},
|
||||
allowDrop(draggingNode, dropNode, type) {
|
||||
@ -135,4 +135,4 @@
|
||||
margin: 0 auto;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<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>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
<el-button type="primary" @click="doSave">{{$t('global.confirm')}}</el-button>
|
||||
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -35,7 +35,7 @@
|
||||
let form = {
|
||||
labelWidth: '120px',
|
||||
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
|
||||
@ -43,13 +43,13 @@
|
||||
rules() {
|
||||
let crules = {
|
||||
parameter: [
|
||||
{ required: true, message: '请选择地图', trigger: 'change' },
|
||||
{ required: true, message: this.$t('rules.mapInput'), trigger: 'change' },
|
||||
]
|
||||
}
|
||||
return crules
|
||||
},
|
||||
title() {
|
||||
return '自动生成操作'
|
||||
return this.$t('lesson.generationOperation')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -92,9 +92,9 @@
|
||||
self.doClose()
|
||||
self.$emit('reloadTable'); // 刷新列表
|
||||
} catch (error) {
|
||||
this.$messageBox('创建失败');
|
||||
this.$messageBox(this.$t('tip.creatingFailed'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
@ -54,7 +54,7 @@
|
||||
tagType: (row) => { return '' }
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
title: this.$t('lesson.creationTime'),
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
@ -65,15 +65,15 @@
|
||||
tagType: (row) => { if (row.status != '03') { return 'warning' } else { return 'success' } }
|
||||
},
|
||||
{
|
||||
title: '开始时间',
|
||||
title: this.$t('global.startTime'),
|
||||
prop: 'startTime'
|
||||
},
|
||||
{
|
||||
title: '完成时间',
|
||||
title: this.$t('lesson.finishTime'),
|
||||
prop: 'finishTime'
|
||||
},
|
||||
{
|
||||
title: '创建结果',
|
||||
title: this.$t('lesson.createResults'),
|
||||
prop: 'result',
|
||||
width: '400px'
|
||||
},
|
||||
@ -83,19 +83,19 @@
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: '开始',
|
||||
name: this.$t('lesson.start'),
|
||||
handleClick: this.taskStart,
|
||||
type: '',
|
||||
showControl: (row) => { return row.status == '01' }
|
||||
},
|
||||
{
|
||||
name: '取消',
|
||||
name: this.$t('global.cancel'),
|
||||
handleClick: this.taskCancel,
|
||||
type: '',
|
||||
showControl: (row) => { return row.status == '04' }
|
||||
},
|
||||
{
|
||||
name: '重新执行',
|
||||
name: this.$t('lesson.toPerform'),
|
||||
handleClick: this.taskStart,
|
||||
type: '',
|
||||
showControl: (row) => { return row.status == '03' || row.status == '05' }
|
||||
@ -104,7 +104,7 @@
|
||||
}
|
||||
],
|
||||
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) {
|
||||
this.$confirm('此操作将开始任务, 是否继续?', this.$t('global.tips'), {
|
||||
this.$confirm( this.$t('tip.startOperationHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
@ -145,7 +145,7 @@
|
||||
})
|
||||
},
|
||||
taskCancel(index, node) {
|
||||
this.$confirm('此操作将取消任务, 是否继续?', this.$t('global.tips'), {
|
||||
this.$confirm( this.$t('tip.startOperationHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
@ -167,4 +167,4 @@
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<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-item label="皮肤类型:" prop="skinCode">
|
||||
<el-form ref="form" :model="operateModel" label-width="auto" :rules="rules" size="mini" label-position="right" class="dialog-form">
|
||||
<el-form-item :label="this.$t('lesson.skinType') + ':'" prop="skinCode">
|
||||
<el-select v-model="operateModel.skinCode" @change="skinCodeChoose">
|
||||
<el-option
|
||||
v-for="option in skinCodeList"
|
||||
@ -11,7 +11,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</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-option
|
||||
v-for="option in productList"
|
||||
@ -21,7 +21,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</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-option
|
||||
v-for="option in trainingTypeLists"
|
||||
@ -31,7 +31,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</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-option
|
||||
v-for="option in trainingTypeMap[operateModel.type]"
|
||||
@ -41,19 +41,19 @@
|
||||
/>
|
||||
</el-select>
|
||||
</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-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-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-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="handleDeal">确 定</el-button>
|
||||
<el-button @click="handleClose">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="handleDeal">{{$t('global.confirm')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -82,11 +82,11 @@ export default {
|
||||
data() {
|
||||
var minDurations = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error('请输入标准用时'));
|
||||
return callback(new Error(this.$t('rules.enterStandardTime')));
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (!Number.isInteger(value)) {
|
||||
callback(new Error('请输入数字值'));
|
||||
callback(new Error(this.$t('rules.enterNumericValue')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@ -94,14 +94,14 @@ export default {
|
||||
};
|
||||
var maxDurations = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error('请输入标准用时'));
|
||||
return callback(new Error(this.$t('rules.enterStandardTime')));
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (!Number.isInteger(value)) {
|
||||
callback(new Error('请输入数字值'));
|
||||
callback(new Error(this.$t('rules.enterNumericValue')));
|
||||
} else {
|
||||
if (value < this.operateModel.minDuration) {
|
||||
callback(new Error('必须大于最小时间'));
|
||||
callback(new Error(this.$t('rules.greaterThanMinTime')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@ -111,9 +111,9 @@ export default {
|
||||
|
||||
var checkOperateType = (rule, value, callback) => {
|
||||
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) {
|
||||
return callback(new Error('只能选择一个实训类型'));
|
||||
return callback(new Error(this.$t('rules.selectOneTrainingType')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@ -151,13 +151,13 @@ export default {
|
||||
},
|
||||
rules: {
|
||||
skinCode: [
|
||||
{ required: true, message: '请输入地图名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
||||
],
|
||||
prdCode: [
|
||||
{ required: true, message: '请输入产品类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.enterProductType'), trigger: 'change' }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '请输入实训类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.inputTrainingType'), trigger: 'change' }
|
||||
],
|
||||
operateType: [
|
||||
{ required: true, validator: checkOperateType, trigger: 'change' }
|
||||
@ -266,11 +266,11 @@ export default {
|
||||
};
|
||||
|
||||
addAutoTraining(data).then(response => {
|
||||
this.$message.success('自动生成实训成功!');
|
||||
this.$message.success(this.$t('tip.automaticGenerationTrainingSuccess'));
|
||||
this.$emit('refresh');
|
||||
this.close();
|
||||
}).catch(() => {
|
||||
this.$messageBox('生成实训失败');
|
||||
this.$messageBox(this.$t('tip.automaticGenerationTrainingFailure'));
|
||||
this.loading = false;
|
||||
});
|
||||
} else if (this.operation.event == '02') { // edit
|
||||
@ -287,11 +287,11 @@ export default {
|
||||
};
|
||||
|
||||
updateAutoTraining(data).then(response => {
|
||||
this.$message.success('更新自动生成实训成功!');
|
||||
this.$message.success(this.$t('tip.updateAutomaticGenerationTrainingSuccess'));
|
||||
this.$emit('refresh');
|
||||
this.close();
|
||||
}).catch(() => {
|
||||
this.$messageBox('更新自动生成实训失败');
|
||||
this.$messageBox(this.$t('tip.updateAutomaticGenerationTrainingFailure'));
|
||||
this.loading = false;
|
||||
});
|
||||
} else if (this.operation.event == '03') { // delete
|
||||
@ -305,11 +305,11 @@ export default {
|
||||
};
|
||||
|
||||
deleteAutoTraining(data).then(response => {
|
||||
this.$message.success('删除自动生成实训成功!');
|
||||
this.$message.success(this.$t('tip.deleteAutomaticGenerationTrainingSuccess'));
|
||||
this.$emit('refresh');
|
||||
this.close();
|
||||
}).catch(() => {
|
||||
this.$messageBox('删除自动生成实训失败');
|
||||
this.$messageBox(this.$t('tip.deleteAutomaticGenerationTrainingFailure'));
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
@ -324,4 +324,8 @@ export default {
|
||||
.el-checkbox {
|
||||
margin-left: 20px;
|
||||
}
|
||||
.dialog-form {
|
||||
position: relative;
|
||||
left: 15px;
|
||||
}
|
||||
</style>
|
||||
|
@ -37,7 +37,7 @@ export default {
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
labelWidth: '120px',
|
||||
initLoadCallback: this.loadInitQueryList,
|
||||
queryObject: {
|
||||
skinCode: {
|
||||
@ -50,7 +50,7 @@ export default {
|
||||
},
|
||||
prdCode: {
|
||||
type: 'select',
|
||||
label: '产品',
|
||||
label: this.$t('lesson.product'),
|
||||
change: this.prdChoose,
|
||||
config: {
|
||||
data: []
|
||||
@ -73,9 +73,9 @@ export default {
|
||||
},
|
||||
generateType: {
|
||||
type: 'select',
|
||||
label: '自动/人工',
|
||||
label: this.$t('lesson.automaticOrManual'),
|
||||
config: {
|
||||
data: [{ value: '02', label: '人工' }, { value: '01', label: '自动' }]
|
||||
data: [{ value: '02', label: this.$t('lesson.manual') }, { value: '01', label: this.$t('lesson.automatic') }]
|
||||
}
|
||||
},
|
||||
name: {
|
||||
@ -147,9 +147,9 @@ export default {
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '生成实训', btnCode: 'employee_insert', handler: this.autoMaticTrainging },
|
||||
{ text: '修改实训', btnCode: 'employee_insert', handler: this.editTrainingByType, type: 'warning' },
|
||||
{ text: '删除实训', btnCode: 'employee_insert', handler: this.delAutoMaticTrainging, type: 'danger' }
|
||||
{ text: this.$t('lesson.generateTraining'), btnCode: 'employee_insert', handler: this.autoMaticTrainging },
|
||||
{ text: this.$t('lesson.updateTraining'), btnCode: 'employee_insert', handler: this.editTrainingByType, type: 'warning'},
|
||||
{ text: this.$t('lesson.deleteTraining'), btnCode: 'employee_insert', handler: this.delAutoMaticTrainging, type: 'danger'}
|
||||
]
|
||||
},
|
||||
|
||||
@ -249,13 +249,13 @@ export default {
|
||||
}
|
||||
},
|
||||
autoMaticTrainging() {
|
||||
this.$refs.draftTrain.show({ event: '01', title: '自动生成实训' });
|
||||
this.$refs.draftTrain.show({ event: '01', title: this.$t('lesson.automaticGenerationOfTraining') });
|
||||
},
|
||||
editTrainingByType() {
|
||||
this.$refs.draftTrain.show({ event: '02', title: '按类别修改实训' });
|
||||
this.$refs.draftTrain.show({ event: '02', title: this.$t('lesson.modifyTrainingByCategory') });
|
||||
},
|
||||
delAutoMaticTrainging() {
|
||||
this.$refs.draftTrain.show({ event: '03', title: '删除自动生成实训' });
|
||||
this.$refs.draftTrain.show({ event: '03', title: this.$t('lesson.deleteAutoGeneratedTraining') });
|
||||
},
|
||||
demoDisplay(index, node) {
|
||||
trainingNotify({ trainingId: node.id }).then(resp => {
|
||||
@ -264,7 +264,7 @@ export default {
|
||||
this.$router.push({ path: `${UrlConfig.display}/manage`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||
this.$messageBox(this.$t('error.createSimulationFailed') +error.message);
|
||||
});
|
||||
|
||||
},
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<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-item label="实训名称:" prop="name">
|
||||
<el-form-item :label="this.$t('lesson.trainingName')+':'" prop="name">
|
||||
<el-input v-model="operateModel.name" />
|
||||
</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-option
|
||||
v-for="option in productTypesList"
|
||||
@ -14,7 +14,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</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-option
|
||||
v-for="option in trainTypesList"
|
||||
@ -24,7 +24,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作类型:">
|
||||
<el-form-item :label="this.$t('lesson.operationType')+':'">
|
||||
<el-select v-model="operateModel.operateType">
|
||||
<el-option
|
||||
v-for="(option, index) in operationList"
|
||||
@ -34,24 +34,24 @@
|
||||
/>
|
||||
</el-select>
|
||||
</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-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-form-item>
|
||||
<el-form-item label="实训说明:" prop="remarks">
|
||||
<el-form-item :label="this.$t('lesson.trainingDescription')" prop="remarks">
|
||||
<el-input
|
||||
v-model="operateModel.remarks"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 4}"
|
||||
placeholder="请输入内容"
|
||||
:placeholder="this.$t('rules.pleaseEnterContent')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="handleDeal">确 定</el-button>
|
||||
<el-button @click="handleClose">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="handleDeal">{{$t('global.confirm')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -71,11 +71,11 @@ export default {
|
||||
data() {
|
||||
var minDurations = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error('请输入标准用时'));
|
||||
return callback(new Error(this.$t('rules.enterStandardTime')));
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (!Number.isInteger(value)) {
|
||||
callback(new Error('请输入数字值'));
|
||||
callback(new Error(this.$t('rules.enterNumericValue')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@ -83,14 +83,14 @@ export default {
|
||||
};
|
||||
var maxDurations = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error('请输入标准用时'));
|
||||
return callback(new Error(this.$t('rules.enterStandardTime')));
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (!Number.isInteger(value)) {
|
||||
callback(new Error('请输入数字值'));
|
||||
callback(new Error(this.$t('rules.enterNumericValue')));
|
||||
} else {
|
||||
if (value < this.operateModel.minDuration) {
|
||||
callback(new Error('必须大于最小时间'));
|
||||
callback(new Error(this.$t('rules.greaterThanMinTime')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@ -120,7 +120,7 @@ export default {
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入实训名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.inputTrainingName'), trigger: 'change' }
|
||||
],
|
||||
minDuration: [
|
||||
{ required: true, validator: minDurations, trigger: 'blur' }
|
||||
@ -129,7 +129,7 @@ export default {
|
||||
{ required: true, validator: maxDurations, trigger: 'blur' }
|
||||
],
|
||||
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.remarks = response.data.remarks;
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取骤数据失败');
|
||||
this.$messageBox(this.$t('error.obtainStepDataFailed'));
|
||||
});
|
||||
break;
|
||||
}
|
||||
@ -271,9 +271,9 @@ export default {
|
||||
addTraining(data).then(response => {
|
||||
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']);
|
||||
this.close();
|
||||
this.$message.success('添加实训成功!');
|
||||
this.$message.success(this.$t('tip.addTrainingSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox('新增实训失败');
|
||||
this.$messageBox(this.$t('tip.addTrainingFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -295,9 +295,9 @@ export default {
|
||||
updateTraining(data).then(response => {
|
||||
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']);
|
||||
this.close();
|
||||
this.$message.success('更新实训成功!');
|
||||
this.$message.success(this.$t('tip.updateTrainingSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox('更新实训失败');
|
||||
this.$messageBox(this.$t('tip.updateTrainingFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -217,14 +217,14 @@ export default {
|
||||
saveTrainingStepsData(model).then(response => {
|
||||
this.$refs.form.resetFields();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$message.success('保存步骤数据成功');
|
||||
this.$message.success(this.$t('tip.savedStepDataSuccessfully'));
|
||||
this.saveDisabled = false;
|
||||
}).catch(() => {
|
||||
this.saveDisabled = false;
|
||||
this.$messageBox('保存步骤数据失败');
|
||||
this.$messageBox(this.$t('tip.savedStepDataFailed'));
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('请选择关联的车站');
|
||||
this.$messageBox(this.$t('rules.selectAssociatedStation'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -148,9 +148,13 @@ export default {
|
||||
/deep/{
|
||||
.el-form-item__label{
|
||||
text-align: left;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.el-checkbox-group{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -167,7 +171,7 @@ export default {
|
||||
.title{
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 9px;
|
||||
padding: 8px 15px;
|
||||
.fl-title{
|
||||
float: left;
|
||||
}
|
||||
@ -190,10 +194,24 @@ export default {
|
||||
.el-checkbox{
|
||||
margin-right: 10px;
|
||||
width: 75px;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-form-item{
|
||||
margin-bottom: -4px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
// ckect框选中颜色
|
||||
.content_box .el-checkbox__input.is-checked .el-checkbox__inner,
|
||||
.content_box .el-checkbox__input.is-indeterminate .el-checkbox__inner {
|
||||
background-color: #85bef9;
|
||||
border-color: #85bef9;
|
||||
}
|
||||
// 文字选中颜色
|
||||
.content_box .el-checkbox__input.is-checked+.el-checkbox__label {
|
||||
color: #3c93ec;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -315,9 +315,10 @@ export default {
|
||||
float: right;
|
||||
width: 520px;
|
||||
|
||||
/deep/ .el-scrollbar__view {
|
||||
width: 510px !important;
|
||||
}
|
||||
// /deep/ .el-scrollbar__view {
|
||||
// width: 510px !important;
|
||||
// height: calc(100% - 40px);
|
||||
// }
|
||||
}
|
||||
|
||||
.physical-view {
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<config-data ref="make" :form="makeForm" :form-model="addModel" :rules="createRules" />
|
||||
</el-scrollbar>
|
||||
@ -120,7 +120,7 @@ export default {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.code'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.resourceList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'code', label: `${this.$t('map.image')}${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.resourceList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.imageName'), type: 'input' },
|
||||
{ prop: 'width', label: this.$t('map.imageWidth'), type: 'number', min: 0 },
|
||||
{ prop: 'height', label: this.$t('map.imageHeight'), type: 'number', min: 0 },
|
||||
|
@ -59,7 +59,7 @@
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'input')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-input v-model="formModel[item.prop]" :disabled="item.disabled" />
|
||||
<el-input v-model="formModel[item.prop]" type="text" :disabled="item.disabled" maxlength="30" show-word-limit />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'number')">
|
||||
|
@ -62,7 +62,7 @@
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'input')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-input v-model="formModel[item.prop]" :disabled="item.disabled" />
|
||||
<el-input v-model="formModel[item.prop]" type="text" :disabled="item.disabled" maxlength="30" :show-word-limit="true" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'number')">
|
||||
@ -85,7 +85,7 @@
|
||||
<template v-if="checkFieldType(item, 'radio')">
|
||||
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
|
||||
<el-radio-group v-model="formModel[item.prop]" :disabled="item.disabled">
|
||||
<el-radio v-for="(opts, index) in item.radioList" :key="index" :border="item.border" :label="opts.value">{{ opts.label }}</el-radio>
|
||||
<el-radio v-for="(opts, indexs) in item.radioList" :key="indexs" :border="item.border" :label="opts.value">{{ opts.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" label-width="120px" :model="addModel" :rules="createRules" size="mini">
|
||||
<el-form-item :label="$t('map.stationName')" prop="stationCode">
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" label-width="120px" :rules="createRules" :model="addModel" size="mini">
|
||||
<el-form-item :label="$t('map.stationName')" prop="stationCode">
|
||||
|
@ -74,46 +74,6 @@
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.zcZoneControl')" name="ZcControl">
|
||||
<zc-control-draft
|
||||
ref="ZcControl"
|
||||
:card-height="cardHeights"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.temporaryLimit')" name="LimitControl">
|
||||
<limit-control-draft
|
||||
ref="LimitControl"
|
||||
:card-height="cardHeights"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.lcControl')" name="LcControl">
|
||||
<lc-control-draft
|
||||
ref="LcControl"
|
||||
:card-height="cardHeights"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.image')" name="ImageControl">
|
||||
<Image-control-draft
|
||||
ref="ImageControl"
|
||||
:card-height="cardHeights"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.station')" name="Station">
|
||||
<station-draft
|
||||
ref="Station"
|
||||
@ -144,6 +104,36 @@
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.zcZoneControl')" name="ZcControl">
|
||||
<zc-control-draft
|
||||
ref="ZcControl"
|
||||
:card-height="cardHeights"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.temporaryLimit')" name="LimitControl">
|
||||
<limit-control-draft
|
||||
ref="LimitControl"
|
||||
:card-height="cardHeights"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.lcControl')" name="LcControl">
|
||||
<lc-control-draft
|
||||
ref="LcControl"
|
||||
:card-height="cardHeights"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.counter')" name="Counter">
|
||||
<counter-draft
|
||||
ref="Counter"
|
||||
@ -204,6 +194,16 @@
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.image')" name="ImageControl">
|
||||
<Image-control-draft
|
||||
ref="ImageControl"
|
||||
:card-height="cardHeights"
|
||||
:selected="selected"
|
||||
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||
@delMapModel="delMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</div>
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" label-width="150px" :rules="createRules" :model="addModel" size="mini">
|
||||
<el-form-item :label="$t('map.statusSignalName')" prop="name">
|
||||
@ -138,7 +138,7 @@ export default {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.code'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.lcList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'code', label: `${this.$t('map.lcControl')}${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.lcList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.statusSignalName'), type: 'input' },
|
||||
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '150px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: false },
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
|
||||
</el-scrollbar>
|
||||
@ -104,7 +104,7 @@ export default {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.code'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.tempSpeedLimitList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'code', label: `${this.$t('map.temporaryLimit')}${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.tempSpeedLimitList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.statusSignalName'), type: 'input' },
|
||||
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
|
@ -10,7 +10,7 @@
|
||||
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||
</el-button-group>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" label-width="120px" :model="addModel" size="mini" :rules="makeRules">
|
||||
<el-form-item :label="$t('map.lineType')" prop="type">
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" label-width="120px" :model="addModel" size="mini">
|
||||
<el-form-item :label="$t('map.linkType')">
|
||||
|
@ -12,9 +12,9 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.create')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.bothCreate')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" size="mini">
|
||||
<el-form ref="make">
|
||||
<el-form-item>
|
||||
<el-transfer
|
||||
v-model="linksCollection"
|
||||
@ -304,7 +304,6 @@ export default {
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.blockCoding'), type: 'select', mode: false, optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.sectionNameColon'), type: 'input' },
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.stationList },
|
||||
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'code&&name', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
|
||||
{ prop: 'namePoint', label: this.$t('map.sectionNameOffset'), type: 'coordinate', width: '150px', children: [
|
||||
{ prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
@ -362,6 +361,7 @@ export default {
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.stationList },
|
||||
{ prop: 'offsetLeft', label: this.$t('map.sectionOffsetLeft'), type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
|
||||
{ prop: 'offsetRight', label: this.$t('map.sectionOffsetRight'), type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
|
||||
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList },
|
||||
@ -1387,4 +1387,26 @@ export default {
|
||||
.view-control {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/deep/ {
|
||||
.card .el-transfer-panel__filter{
|
||||
margin: 5px 15px;
|
||||
}
|
||||
.card .el-transfer-panel__list.is-filterable{
|
||||
height: 290px;
|
||||
}
|
||||
|
||||
.card .el-transfer-panel__body{
|
||||
height: 328px;
|
||||
}
|
||||
.card .el-transfer__buttons{
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.card .el-transfer{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" label-width="130px" :model="addModel" size="mini" :rules="mergeRules">
|
||||
<el-form-item :label="$t('map.physicalSegmentName')" prop="sectionCode">
|
||||
@ -178,6 +178,15 @@ export default {
|
||||
mergeRules: {
|
||||
sectionCode: [
|
||||
{ required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' }
|
||||
],
|
||||
directionType: [
|
||||
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('rules.directionType'), trigger: 'change' }
|
||||
],
|
||||
leftOrRight: [
|
||||
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('rules.leftOrRight'), trigger: 'change' }
|
||||
],
|
||||
positionType: [
|
||||
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('rules.positionType'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -210,7 +219,6 @@ export default {
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.signalCodeColon'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.signalNameColon'), type: 'input' },
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'nameShow', label: this.$t('map.signalDisplayName'), type: 'checkbox' },
|
||||
{ prop: 'lampPostType', label: this.$t('map.lampPostType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPostTypeList },
|
||||
{ prop: 'lampPositionType', label: this.$t('map.lampPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
|
||||
@ -232,6 +240,7 @@ export default {
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'uniqueName', label: this.$t('map.signalUniqueName'), type: 'input' },
|
||||
{ prop: 'useType', label: this.$t('map.signalUseType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalUseTypeList },
|
||||
{ prop: 'potLampType', label: this.$t('map.potLampType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPotLampTypeList },
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" label-width="140px" :model="addModel" size="mini" :rules="mergeRules">
|
||||
<el-form-item :label="$t('map.physicalSegmentName')" prop="sectionCode">
|
||||
@ -114,7 +114,6 @@ export default {
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.stationCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.stationName'), type: 'input' },
|
||||
{ prop: 'concentrateStationCode', label: this.$t('map.concentrateStationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
|
||||
{ prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
|
||||
{ prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' },
|
||||
@ -130,6 +129,7 @@ export default {
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'concentrateStationCode', label: this.$t('map.concentrateStationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList },
|
||||
{ prop: 'centralized', label: this.$t('map.centralized'), type: 'checkbox' },
|
||||
{ prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' }
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" :model="addModel" label-width="120px" size="mini" :rules="makeRules">
|
||||
<el-form-item :label="$t('map.stationName')" prop="stationCode">
|
||||
@ -105,7 +105,6 @@ export default {
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.stationControlCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.stationControlName'), type: 'input' },
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'zokContent', label: this.$t('map.zokContent'), type: 'input' },
|
||||
{ prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
|
||||
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
|
||||
@ -117,6 +116,7 @@ export default {
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList }
|
||||
]
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" label-width="140px" :model="addModel" :rules="createRules" size="mini">
|
||||
<el-form-item :label="$t('map.stationstandName')" prop="stationCode">
|
||||
@ -135,7 +135,6 @@ export default {
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.relStandCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.stationstandNameColon'), type: 'input', disabled: true },
|
||||
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'direction', label: this.$t('map.stationstandTopBottom'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.RunDirectionTypeList },
|
||||
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
|
||||
{ prop: 'nameShow', label: this.$t('map.stationstandShowName'), type: 'checkbox' },
|
||||
@ -150,6 +149,7 @@ export default {
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'stationCode', label: this.$t('map.belongsStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList }
|
||||
]
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make">
|
||||
<el-form-item size="mini">
|
||||
@ -110,7 +110,6 @@ export default {
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.switchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.switchName'), type: 'input' },
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'nameShow', label: this.$t('map.switchShowName'), type: 'checkbox' },
|
||||
{ prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: this.$t('map.switchPositionX'), type: 'number', placeholder: 'px' },
|
||||
{ prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: this.$t('map.switchPositionY'), type: 'number', placeholder: 'px' },
|
||||
@ -122,6 +121,7 @@ export default {
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'turnTime', label: this.$t('map.turnTime'), type: 'number', min: 0, max: 1000, placeholder: 's' },
|
||||
{ prop: 'sectionACode', label: this.$t('map.sectionACode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList },
|
||||
{ prop: 'sectionBCode', label: this.$t('map.sectionBCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList },
|
||||
@ -428,4 +428,26 @@ export default {
|
||||
.el-transfer {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/deep/ {
|
||||
.card .el-transfer-panel__filter{
|
||||
margin: 5px 15px;
|
||||
}
|
||||
.card .el-transfer-panel__list.is-filterable{
|
||||
height: 290px;
|
||||
}
|
||||
|
||||
.card .el-transfer-panel__body{
|
||||
height: 328px;
|
||||
}
|
||||
.card .el-transfer__buttons{
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.card .el-transfer{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" label-width="110px" :model="addModel" size="mini" :rules="makeRules">
|
||||
<el-form-item :label="$t('map.textContent')" prop="content">
|
||||
@ -106,6 +106,12 @@ export default {
|
||||
],
|
||||
content: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterContent'), trigger: 'blur' }
|
||||
],
|
||||
'position.x': [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterXCoordinate'), trigger: 'blur' }
|
||||
],
|
||||
'position.y': [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterYCoordinate'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -12,14 +12,8 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" label-width="110px">
|
||||
<el-form-item>
|
||||
<el-button type="danger" size="big" @click="removeTrainWindow">{{ $t('map.deleteTrainWindow') }}</el-button>
|
||||
<el-button type="primary" size="big" @click="createTrainWindow">{{ $t('map.createTrainWindow') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-transfer
|
||||
v-model="sectionsCollection"
|
||||
filterable
|
||||
@ -36,6 +30,14 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.deleteBoth')" name="three">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
<el-button type="danger" size="big" @click="removeTrainWindow">{{ $t('map.deleteTrainWindow') }}</el-button>
|
||||
<!-- <el-button type="primary" size="big" @click="createTrainWindow">{{ $t('map.createTrainWindow') }}</el-button> -->
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
@ -257,42 +259,50 @@ export default {
|
||||
return model;
|
||||
},
|
||||
removeTrainWindow() {
|
||||
const remove = [];
|
||||
if (this.trainWindowList && this.trainWindowList.length) {
|
||||
this.trainWindowList.forEach(elem => {
|
||||
remove.push({
|
||||
_type: 'TrainWindow',
|
||||
code: elem.code
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const remove = [];
|
||||
if (this.trainWindowList && this.trainWindowList.length) {
|
||||
this.trainWindowList.forEach(elem => {
|
||||
remove.push({
|
||||
_type: 'TrainWindow',
|
||||
code: elem.code
|
||||
});
|
||||
});
|
||||
});
|
||||
this.$emit('delMapModel', remove);
|
||||
}
|
||||
this.$emit('delMapModel', remove);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
},
|
||||
createTrainWindow() {
|
||||
const models = [];
|
||||
const collection = this.sectionList;
|
||||
// createTrainWindow() {
|
||||
// const models = [];
|
||||
// const collection = this.sectionList;
|
||||
|
||||
this.removeTrainWindow();
|
||||
if (collection && collection.length) {
|
||||
collection.forEach(elem => {
|
||||
if (elem.type !== '03' && !elem.isSwitchSection && (
|
||||
elem.logicSectionNum.length == 0 ||
|
||||
elem.logicSectionNum.length == 1 && elem.logicSectionNum[0] == 0)) {
|
||||
const triangle = new JTriangle(elem.points[0], elem.points[elem.points.length - 1]);
|
||||
models.push(this.createModel({
|
||||
triangle: triangle,
|
||||
section: elem
|
||||
}));
|
||||
} else if (elem.type === '03' && elem.isSwitchSection) {
|
||||
models.push(this.createModel({
|
||||
section: elem
|
||||
}));
|
||||
}
|
||||
});
|
||||
}
|
||||
// this.removeTrainWindow();
|
||||
// if (collection && collection.length) {
|
||||
// collection.forEach(elem => {
|
||||
// if (elem.type !== '03' && !elem.isSwitchSection && (
|
||||
// elem.logicSectionNum.length == 0 ||
|
||||
// elem.logicSectionNum.length == 1 && elem.logicSectionNum[0] == 0)) {
|
||||
// const triangle = new JTriangle(elem.points[0], elem.points[elem.points.length - 1]);
|
||||
// models.push(this.createModel({
|
||||
// triangle: triangle,
|
||||
// section: elem
|
||||
// }));
|
||||
// } else if (elem.type === '03' && elem.isSwitchSection) {
|
||||
// models.push(this.createModel({
|
||||
// section: elem
|
||||
// }));
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
this.$emit('addOrUpdateMapModel', models);
|
||||
},
|
||||
// this.$emit('addOrUpdateMapModel', models);
|
||||
// },
|
||||
createTrainWindowByCollection() {
|
||||
const models = [];
|
||||
let remove = [];
|
||||
@ -377,4 +387,26 @@ export default {
|
||||
background: #f0f0f0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/deep/ {
|
||||
.card .el-transfer-panel__filter{
|
||||
margin: 5px 15px;
|
||||
}
|
||||
.card .el-transfer-panel__list.is-filterable{
|
||||
height: 290px;
|
||||
}
|
||||
|
||||
.card .el-transfer-panel__body{
|
||||
height: 328px;
|
||||
}
|
||||
.card .el-transfer__buttons{
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.card .el-transfer{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -12,7 +12,7 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
|
||||
</el-scrollbar>
|
||||
@ -109,7 +109,7 @@ export default {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.code'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.zcList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'code', label: `${this.$t('map.zcZoneControl')}${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.zcList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.statusSignalName'), type: 'input' },
|
||||
{ prop: 'visible', label: this.$t('map.showZc'), type: 'checkboxx' },
|
||||
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [
|
||||
|
@ -18,9 +18,6 @@
|
||||
:rules="newRules"
|
||||
@submit.native.prevent
|
||||
>
|
||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||
<el-input v-model="newModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.skinName')" prop="skinCode">
|
||||
<el-select v-model="newModel.skinCode" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
@ -31,6 +28,9 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||
<el-input v-model="newModel.name" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.publishMapCreation')" name="second">
|
||||
@ -42,7 +42,7 @@
|
||||
label-width="140px"
|
||||
size="mini"
|
||||
>
|
||||
<el-form-item :label="$t('map.mapName')" prop="id">
|
||||
<el-form-item :label="$t('map.publishMap')+ ':'" prop="id">
|
||||
<el-select v-model="pullModel.id" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in publishMapList"
|
||||
|
@ -42,13 +42,14 @@
|
||||
@submit.native.prevent
|
||||
>
|
||||
<el-form-item :label="$t('map.offsetXColon')" :prop="'origin.x'">
|
||||
<el-input v-model="updtModel.origin.x" :label="$t('map.offsetX')" disabled />
|
||||
<el-input v-model="updtModel.origin.x" :label="$t('map.offsetX')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.offsetYColon')" :prop="'origin.y'">
|
||||
<el-input v-model="updtModel.origin.y" :label="$t('map.offsetY')" disabled />
|
||||
<el-input v-model="updtModel.origin.y" :label="$t('map.offsetY')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.scalingColon')" prop="scaling">
|
||||
<el-input v-model="updtModel.scaling" :label="$t('map.scaling')" disabled />
|
||||
<el-input-number v-model="updtModel.scaling" :min="1" :precision="1" :step="0.2" :max="8" />
|
||||
<!-- <el-input v-model="updtModel.scaling" :label="$t('map.scaling')" /> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
@ -64,7 +65,7 @@
|
||||
<script>
|
||||
import { updateMap, getMapDetail } from '@/api/jmap/mapdraft';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { updateSkinCodeByCode } from '@/api/management/mapskin';
|
||||
import { saveMap } from '@/api/jmap/mapdraft';
|
||||
|
||||
export default {
|
||||
name: 'MapEdit',
|
||||
@ -124,11 +125,14 @@ export default {
|
||||
},
|
||||
updtRules() {
|
||||
return {
|
||||
linkWidth: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnteMapLinkWidth'), trigger: 'blur' }
|
||||
'origin.x': [
|
||||
{ required: true, message: this.$t('map.enterXOffset'), trigger: 'blur' }
|
||||
],
|
||||
zoneWidth: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapSectionWidth'), trigger: 'blur' }
|
||||
'origin.y': [
|
||||
{ required: true, message: this.$t('map.enterYOffset'), trigger: 'blur' }
|
||||
],
|
||||
scaling: [
|
||||
{ required: true, message: this.$t('rules.enterScale'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
}
|
||||
@ -150,11 +154,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
const dataZoom = this.$store.state.map.dataZoom;
|
||||
const dataZoom = this.$store.state.map.map.skinVO;
|
||||
if (dataZoom) {
|
||||
this.updtModel.origin.x = Number.parseInt(dataZoom.offsetX);
|
||||
this.updtModel.origin.y = Number.parseInt(dataZoom.offsetY);
|
||||
this.updtModel.scaling = dataZoom.scaleRate;
|
||||
this.updtModel.origin.x = Number.parseInt(dataZoom.origin.x);
|
||||
this.updtModel.origin.y = Number.parseInt(dataZoom.origin.y);
|
||||
this.updtModel.scaling = dataZoom.scaling;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
},
|
||||
@ -197,15 +201,30 @@ export default {
|
||||
});
|
||||
} else {
|
||||
this.updtModel.code = this.skinCode;
|
||||
const map = this.$store.state.map.map;
|
||||
this.$refs['updt'].validate((valid) => {
|
||||
if (valid) {
|
||||
updateSkinCodeByCode(this.updtModel).then(response => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
this.$message.success(this.$t('map.updateSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('map.updateFailed'));
|
||||
this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
skinVO: {
|
||||
code: this.$store.state.map.map.skinVO.code,
|
||||
name: this.$store.state.map.map.skinVO.name,
|
||||
origin: {
|
||||
x: this.updtModel.origin.x,
|
||||
y: this.updtModel.origin.y
|
||||
},
|
||||
scaling: this.updtModel.scaling
|
||||
}
|
||||
};
|
||||
saveMap(Object.assign(map, param)).then(response => {
|
||||
this.loading = false;
|
||||
this.close();
|
||||
this.$message.success(this.$t('map.updateSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('map.updateFailed'));
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.loading = false;
|
||||
|
@ -179,7 +179,7 @@
|
||||
launchFullscreen();
|
||||
|
||||
}).catch(error => {
|
||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
|
||||
})
|
||||
},
|
||||
start() {
|
||||
@ -187,9 +187,9 @@
|
||||
this.selectBeginTime();
|
||||
} else {
|
||||
if (this.tryTime <= 0) {
|
||||
this.$confirm('您没有权限,请前往购买产品', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$('tip.noPermissionHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.buy();
|
||||
|
@ -161,11 +161,13 @@ import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation, scr
|
||||
// this.isSaveStage = true;
|
||||
this.$parent.$refs['display'].$refs['menuScript'].resetBeginTime();
|
||||
this.$refs["getAction"].loadInitData();
|
||||
this.$refs["getAction"].$refs["addRole"].initData();
|
||||
this.$refs["getAction"].$refs["addBehavior"].initData();
|
||||
this.initAutoSaveScript();
|
||||
this.$store.dispatch('scriptRecord/updateBgSet',false);
|
||||
this.$message.success('重置剧本成功');
|
||||
this.$message.success('重置数据成功');
|
||||
}).catch(error => {
|
||||
this.$messageBox('重置剧本失败!');
|
||||
this.$messageBox('重置数据失败!');
|
||||
})
|
||||
}).catch(error => {
|
||||
this.initAutoSaveScript();
|
||||
|
@ -1,8 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <el-card class="scriptTop">
|
||||
<add-role :group="group" ref="addRole"></add-role>
|
||||
</el-card> -->
|
||||
<el-card class="conversitionCard">
|
||||
<div class="addConversition">添加对话</div>
|
||||
<el-form :model="modalData" ref="modalData" :rules="rules" label-width="100px" class="conversitionInfo" label-position="right">
|
||||
<el-form size="mini" :model="modalData" ref="modalData" :rules="rules" label-width="100px" class="conversitionInfo" label-position="right">
|
||||
<!-- <el-form-item label="动作类型" class="conditionVO" prop="actionVO.type" >
|
||||
<el-select v-model="modalData.actionVO.type " placeholder="请选择动作类型" @change="changeType" :disabled="deviceTypeReadOnly||isPause">
|
||||
<el-option v-for="actionType in actionTypeList" :key="actionType.label" :label="actionType.label" :value="actionType.value"></el-option>
|
||||
@ -38,7 +41,7 @@
|
||||
</el-card>
|
||||
<el-card class="commandCard">
|
||||
<div class="addCommand">添加指令</div>
|
||||
<el-form :model="commandData" ref="commandData" :rules="commandRules" label-width="100px" class="actionInfo" label-position="right">
|
||||
<el-form size="mini" :model="commandData" ref="commandData" :rules="commandRules" label-width="100px" class="actionInfo" label-position="right">
|
||||
<el-form-item label="执行者" class="conditionVO" prop="action.memberId">
|
||||
<el-select v-model="commandData.action.memberId" placeholder="请选择执行者" :disabled="isPause" @change="changeRole">
|
||||
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id"></el-option>
|
||||
@ -71,7 +74,7 @@
|
||||
import DeviceTypeDic from '@/scripts/DeviceTypeDic';
|
||||
// import CommandForm from "./commandForm";
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import {addScriptAction,modifyScriptAction,getAvailableDeviceCommand,getDeviceCodeByDeviceType,getScriptMemberData} from '@/api/simulation';
|
||||
import {addScriptAction,modifyScriptAction,getAvailableDeviceCommand,getDeviceCodeByDeviceType,getScriptPlayMember} from '@/api/simulation';
|
||||
export default {
|
||||
name: 'addAction',
|
||||
props: {
|
||||
@ -88,14 +91,11 @@
|
||||
required: true
|
||||
}
|
||||
},
|
||||
// components:{
|
||||
// CommandForm,
|
||||
// },
|
||||
watch:{
|
||||
'$store.state.socket.simulationStart': function (val) {
|
||||
if(val)
|
||||
{
|
||||
this.initData();
|
||||
this.$parent.$parent.$refs['addRole'].initData();
|
||||
}
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
@ -186,7 +186,7 @@
|
||||
},
|
||||
methods:{
|
||||
initData(){
|
||||
getScriptMemberData(this.group).then(resp => {
|
||||
getScriptPlayMember(this.group).then(resp => {
|
||||
let roleTypeList=ConstConfig.ConstSelect.roleType;
|
||||
this.orginMemberList=resp.data;
|
||||
let lastData=JSON.stringify(resp.data);
|
||||
@ -197,6 +197,8 @@
|
||||
lastData=JSON.parse(lastData);
|
||||
this.memberList=lastData;
|
||||
this.getDeviceCode();
|
||||
this.resetDisabled();
|
||||
this.initCommandActionData();
|
||||
}).catch(error => {})
|
||||
},
|
||||
changeRole(index){
|
||||
@ -234,6 +236,7 @@
|
||||
this.adding=false;
|
||||
this.$message.success('添加指令成功');
|
||||
this.$emit('create',true);
|
||||
this.$parent.$parent.$refs['addRole'].resetData([this.commandData.action.memberId]);
|
||||
// this.initCommandActionData();
|
||||
}).catch(error => {
|
||||
this.adding=false;
|
||||
@ -261,6 +264,7 @@
|
||||
this.$message.success('添加对话成功');
|
||||
this.$emit('create',true);
|
||||
// this.initActionData();
|
||||
this.$parent.$parent.$refs['addRole'].resetData([this.modalData.actionVO.memberId,this.modalData.actionVO.targetId]);
|
||||
}).catch(error => {
|
||||
this.modifying=false;
|
||||
this.$messageBox(`添加对话失败: ${error.message}`);
|
||||
@ -276,7 +280,8 @@
|
||||
this.$emit('modifyButtonName');
|
||||
this.$message.success('修改对话成功');
|
||||
this.$emit('create',false);
|
||||
// this.initActionData();
|
||||
// this.$parent.$parent.$refs['addRole'].resetData([this.modalData.action.memberId,this.modalData.action.targetId]);
|
||||
this.initActionData();
|
||||
}).catch(error => {
|
||||
this.modifying=false;
|
||||
this.$messageBox(`修改对话失败: ${error.message}`);
|
||||
@ -333,7 +338,6 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
changeItem(){
|
||||
if(!(this.isPause&&this.isNotModify))
|
||||
@ -349,7 +353,7 @@
|
||||
this.clearValidate();
|
||||
this.isNotModify=false;
|
||||
this.$parent.$parent.$parent.setDisabled(this.isNotModify);
|
||||
this.initData();
|
||||
// this.initData();
|
||||
this.modalData.actionVO.id=data.id;
|
||||
this.modalData.actionVO.memberId=data.memberId;
|
||||
this.modalData.actionVO.type=data.type;
|
||||
@ -423,18 +427,18 @@
|
||||
padding: 20px 10px;
|
||||
}
|
||||
.itemGroup{
|
||||
width:310px;
|
||||
width:290px;
|
||||
float:left;
|
||||
}
|
||||
.changeGroup{
|
||||
display:inline-block;
|
||||
}
|
||||
.changeTop{
|
||||
margin-top: 15px;
|
||||
margin-top: 10px;
|
||||
width: 25px;
|
||||
border-top: 1px #c0c4cc solid;
|
||||
border-right: 1px #c0c4cc solid;
|
||||
height: 20px;
|
||||
height: 15px;
|
||||
}
|
||||
.changeItem{
|
||||
margin-left: 15px;
|
||||
@ -446,6 +450,11 @@
|
||||
width: 25px;
|
||||
border-bottom: 1px #c0c4cc solid;
|
||||
border-right: 1px #c0c4cc solid;
|
||||
height: 20px;
|
||||
height: 15px;
|
||||
}
|
||||
.scriptTop{
|
||||
margin-left: 20px;
|
||||
padding: 15px 0px 30px 0px;
|
||||
width: 360px;
|
||||
}
|
||||
</style>
|
||||
|
148
src/views/scriptManage/scriptRecord/addRole.vue
Normal file
148
src/views/scriptManage/scriptRecord/addRole.vue
Normal file
@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <div class="selectRole">选择角色</div> -->
|
||||
<el-transfer v-model="selectRoleData" :data="allRoleData" class="script-player-choose" :titles="['所有角色', '演员角色']" @change="handleChange">
|
||||
<span slot-scope="{option}">
|
||||
<span>{{option.role+(option.name==undefined?'':option.name)}}</span>
|
||||
<el-radio-group v-model="option.gender" size="mini" class="sexGroup" @change="changeSex($event,option.key)">
|
||||
<el-radio-button label="Male">男</el-radio-button>
|
||||
<el-radio-button label="Female">女</el-radio-button>
|
||||
</el-radio-group>
|
||||
</span>
|
||||
</el-transfer>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import {getScriptPlayMember,getScriptMemberData,cancleScriptMembers,selectScriptMembers,modifyScriptMemberSex} from '@/api/simulation';
|
||||
export default {
|
||||
name: 'addRole',
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
allRoleData:[],
|
||||
selectRoleData:[],
|
||||
sexGroup:"男",
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.initData();
|
||||
},
|
||||
methods:{
|
||||
initData(){
|
||||
let group=this.$props.group;
|
||||
getScriptMemberData(group).then(response=>{
|
||||
let lastData=JSON.stringify(response.data);
|
||||
this.allRoleData=this.coverData(lastData);
|
||||
getScriptPlayMember(group).then(response=>{
|
||||
let last=response.data;
|
||||
let data=[];
|
||||
last.forEach(function(element){data.push(element.id)});
|
||||
this.selectRoleData=data;
|
||||
})
|
||||
})
|
||||
},
|
||||
coverData(data){
|
||||
let roleTypeList=ConstConfig.ConstSelect.roleType;
|
||||
let lastData=data.replace(new RegExp('id','g'),'key');
|
||||
roleTypeList.forEach(function(element){
|
||||
let rolename=element.value;
|
||||
lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
|
||||
});
|
||||
lastData=JSON.parse(lastData);
|
||||
return lastData;
|
||||
},
|
||||
handleChange(value, direction, movedKeys) {
|
||||
switch(direction)
|
||||
{
|
||||
case 'right':{
|
||||
let group=this.$props.group;
|
||||
let data=movedKeys;
|
||||
selectScriptMembers(group,data).then(response=>{
|
||||
this.$message.success('选择剧本角色成功');
|
||||
this.$parent.$parent.$refs['addBehavior'].initData();
|
||||
})
|
||||
.catch(error => {
|
||||
this.$messageBox(`选择剧本角色失败: ${error.message}`);
|
||||
return false;
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'left':{
|
||||
let group=this.$props.group;
|
||||
let data=movedKeys;
|
||||
cancleScriptMembers(group,data).then(response=>{
|
||||
this.$parent.$parent.$refs['addBehavior'].initData();
|
||||
this.$message.success('取消剧本角色成功');
|
||||
})
|
||||
.catch(error => {
|
||||
this.$messageBox(`取消剧本角色失败: ${error.message}`);
|
||||
this.initData();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
resetData(data){
|
||||
// let allRoleData=this.allRoleData;
|
||||
// debugger;
|
||||
// data.forEach(function(element){
|
||||
// allRoleData.forEach(function(select){
|
||||
// if(select.key==element)
|
||||
// {
|
||||
// select.disabled=true;
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
},
|
||||
changeSex(event,id)
|
||||
{
|
||||
let group=this.$props.group;
|
||||
let data={"gender":event};
|
||||
modifyScriptMemberSex(group,id,data).then(response=>{
|
||||
this.$message.success('修改剧本成员性别成功');
|
||||
})
|
||||
.catch(error => {
|
||||
this.$messageBox(`修改剧本成员性别失败: ${error.message}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.selectRole{
|
||||
font-size: 15px;
|
||||
padding: 0px 20px 15px 15px;
|
||||
}
|
||||
.elTransfer{
|
||||
margin-left:20px;
|
||||
width:700px;
|
||||
}
|
||||
/deep/ {
|
||||
.script-player-choose .el-transfer-panel__body{
|
||||
height: 120px;
|
||||
}
|
||||
.script-player-choose .el-transfer-panel__list{
|
||||
height: 120px;
|
||||
}
|
||||
.script-player-choose .el-transfer-panel{
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.elTransfer .el-transfer-panel{
|
||||
width:300px ;
|
||||
}
|
||||
.sexGroup{
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -4,41 +4,53 @@
|
||||
<span class="titleStyle">剧本编制</span>
|
||||
</div>
|
||||
<div class="tab-pane-big">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elScrollbar" class="elScrollbar">
|
||||
<add-action ref="addBehavior" :group="group" @create="create" :buttonName="buttonName" :operateType="operateType" @modifyButtonName="modifyButtonName" class="addScript"></add-action>
|
||||
</el-scrollbar>
|
||||
<!-- <div class="vertialLine"></div> -->
|
||||
<div class="block actionListTable">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar">
|
||||
<el-timeline :reverse="reverse" class="el_timeline">
|
||||
<el-timeline-item v-for="(actionInfo,index) in actionInfoList" :key="index">
|
||||
<el-card>
|
||||
<div class="actionTable">
|
||||
<el-card class="scriptTop">
|
||||
<add-role :group="group" ref="addRole"></add-role>
|
||||
</el-card>
|
||||
<div class="scriptPane">
|
||||
<!-- <el-card class="scriptTop">
|
||||
<template>
|
||||
<div class="selectRole">选择角色</div>
|
||||
<el-transfer v-model="selectRoleData" :data="allRoleData" class="elTransfer" :titles="['待选成员角色', '已选成员角色']"></el-transfer>
|
||||
</template>
|
||||
</el-card> -->
|
||||
|
||||
<span class="detail" v-html="actionInfo.detail">
|
||||
</span>
|
||||
<span class="otherInfo" v-html="actionInfo.otherInfo"></span>
|
||||
<span v-if="actionInfo.isCoversition">
|
||||
<span class="roleClass">{{actionInfo.memberName}}</span>
|
||||
<span>对</span>
|
||||
<span class="roleClass">{{actionInfo.targetName}}</span>
|
||||
<span>: </span>
|
||||
<span>{{actionInfo.reply}}</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
<span class="roleClass">{{actionInfo.memberName}}</span>
|
||||
<span>执行指令: </span>
|
||||
<span class="commandStyle">{{actionInfo.command}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="btnGroup">
|
||||
<el-button type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)" v-if="actionInfo.visible">修改</el-button>
|
||||
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> -->
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</el-scrollbar>
|
||||
<div class="scriptBottom">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elScrollbar" class="elScrollbar">
|
||||
<add-action ref="addBehavior" :group="group" @create="create" :buttonName="buttonName" :operateType="operateType" @modifyButtonName="modifyButtonName" class="addScript"></add-action>
|
||||
</el-scrollbar>
|
||||
<div class="block actionListTable">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar">
|
||||
<el-timeline :reverse="reverse" class="el_timeline">
|
||||
<el-timeline-item v-for="(actionInfo,index) in actionInfoList" :key="index">
|
||||
<el-card>
|
||||
<div class="actionTable">
|
||||
<span class="detail" v-html="actionInfo.detail">
|
||||
</span>
|
||||
<span class="otherInfo" v-html="actionInfo.otherInfo"></span>
|
||||
<span v-if="actionInfo.isCoversition">
|
||||
<span class="roleClass">{{actionInfo.memberName}}</span>
|
||||
<span>对</span>
|
||||
<span class="roleClass">{{actionInfo.targetName}}</span>
|
||||
<span>: </span>
|
||||
<span>{{actionInfo.reply}}</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
<span class="roleClass">{{actionInfo.memberName}}</span>
|
||||
<span>执行指令: </span>
|
||||
<span class="commandStyle">{{actionInfo.command}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="btnGroup">
|
||||
<el-button type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)" v-if="actionInfo.visible">修改</el-button>
|
||||
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> -->
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -46,7 +58,8 @@
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import AddAction from './addAction';
|
||||
import {getScriptRecord,deleteScriptAction,getAvailableDeviceCommand} from '@/api/simulation';
|
||||
import AddRole from './addRole';
|
||||
import {getScriptRecord,deleteScriptAction,getAvailableDeviceCommand,getScriptPlayMember,getScriptMemberData} from '@/api/simulation';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
export default {
|
||||
name: 'getAction',
|
||||
@ -71,6 +84,7 @@
|
||||
},
|
||||
components: {
|
||||
AddAction,
|
||||
AddRole
|
||||
},
|
||||
mounted(){
|
||||
this.loadInitData();
|
||||
@ -179,7 +193,7 @@
|
||||
@import "src/styles/mixin.scss";
|
||||
.actionPaneInner{
|
||||
height:100%;
|
||||
padding-top:70px;
|
||||
padding-top:45px;
|
||||
}
|
||||
.addScript{
|
||||
float:left;
|
||||
@ -194,14 +208,12 @@
|
||||
height:100%;
|
||||
}
|
||||
.actionList{
|
||||
padding-top: 20px;
|
||||
margin-left: 20px;
|
||||
font-size: 15px;
|
||||
padding-bottom: 15px;
|
||||
height: 35px;
|
||||
font-size: 18px;
|
||||
padding-top: 5px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin-right: 20px;
|
||||
width: 740px;
|
||||
border-bottom: 1px #ccc solid;
|
||||
}
|
||||
@ -246,4 +258,27 @@
|
||||
.commandStyle{
|
||||
color:#F00;
|
||||
}
|
||||
.scriptPane{
|
||||
height: 100%;
|
||||
padding-top:200px;
|
||||
}
|
||||
.scriptBottom{
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.scriptTop{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 20px;
|
||||
padding: 10px 10px;
|
||||
width: 730px;
|
||||
}
|
||||
// .elTransfer{
|
||||
// height:230px;
|
||||
// margin-left:100px;
|
||||
// }
|
||||
// .selectRole{
|
||||
// font-size: 15px;
|
||||
// padding: 0px 20px 15px 15px;
|
||||
// }
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user