This commit is contained in:
ival 2019-08-22 09:45:31 +08:00
commit 52bacce3a3
60 changed files with 964 additions and 402 deletions

View File

@ -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) { export function dumpScriptData(group) {
return request({ return request({

View File

@ -58,5 +58,10 @@ export default {
updateOperateStepFailed: 'The update action step failed', updateOperateStepFailed: 'The update action step failed',
packagePermissionFailed: 'Packaging authority failed', packagePermissionFailed: 'Packaging authority failed',
acquisitionTimeFailed: 'Acquisition Time Failed', acquisitionTimeFailed: 'Acquisition Time Failed',
getProductListFailed: 'Failed to get product list' getProductListFailed: 'Failed to get product list',
obtainChapterDataFailed: 'Failed to obtain chapter data',
obtainCourseDetailsFailed: 'Failed to obtain course details',
obtainCourseInformationFailed: 'Failed to obtain course information',
obtainStepDataFailed: 'Failed to obtain step data'
}; };

16
src/i18n/langs/en/exam.js Normal file
View File

@ -0,0 +1,16 @@
export default {
testSystem: '城市轨道交通考试系统',
testSystemDescription: ' 该系统具有自定义考试规则、自动生成考卷、学员成绩统计、数据曲线分析及题库管理等功能,从实战操作、业务流程、故障模拟及考试规则等多角度出发,力求打造最符合用户需求的城市轨道交通在线交互实操类考试系统',
examResultsDetails: '考试结果详情',
testQuestionsName: '试题名称',
testScores: '考试得分',
points: '分',
whetherThrough: '是否通过',
didNotCalculate: '未计算',
pass: '通过',
notPass: '未通过',
examTime: '考试用时',
trainingName: '实训名称',
trainingScore: '实训得分',
returnToExamList: '返回考试列表'
};

View File

@ -103,5 +103,8 @@ export default {
mapList: 'Map list', mapList: 'Map list',
updateTime: 'Update time:', updateTime: 'Update time:',
line: 'Line:', line: 'Line:',
permissionList: 'Permissions list:' permissionList: 'Permissions list:',
remove: 'remove',
append: 'append',
release: 'release'
}; };

View File

@ -16,6 +16,7 @@ import replay from './replay';
import planMonitor from './planMonitor'; import planMonitor from './planMonitor';
import screenMonitor from './screenMonitor'; import screenMonitor from './screenMonitor';
import demonstration from './demonstration'; import demonstration from './demonstration';
import exam from './exam';
export default { export default {
...enLocale, ...enLocale,
@ -35,5 +36,6 @@ export default {
replay, replay,
planMonitor, planMonitor,
screenMonitor, screenMonitor,
demonstration demonstration,
exam
}; };

View File

@ -48,5 +48,44 @@ export default {
eidtStepInfo: 'Edit Step Information', eidtStepInfo: 'Edit Step Information',
product: 'Product', product: 'Product',
remarks: 'Remarks', remarks: 'Remarks',
operateSuccess: 'Operation successfully' operateSuccess: 'Operation successfully',
createChapter: 'Create chapter',
contentSorting: 'Content sorting',
courseList: 'Course list',
createNewCoursesFromRelease: 'Create new courses from release',
courseName: 'Course name',
parentChapter: 'Parent chapter',
chapterName: 'Chapter name',
chapterInstructions: 'Chapter instructions',
associatedTraining: 'Associated training',
updateChapter: 'Update chapter',
automaticOrManual: 'Auto/Manual',
automatic: 'Automatic',
manual: 'Manual',
publishCourseName: 'Publish course name',
draftCourseName: 'Draft course name',
associatedSkin: 'Associated skin',
associatedProducts: 'Associated products',
courseDescription: 'Course description',
editCourse: 'Edit course',
createCourse: 'Create course',
courseRelease: 'Course release',
releaseAssociatedCity: 'Release associated city',
releaseAssociatedMap: 'Release associated map',
trainingSequence: 'Training sequence',
creationTime: 'Creation time',
finishTime: 'Finish time',
createResults: 'Create results',
start: 'start',
toPerform: 'To perform',
productType: 'Product type:',
minTime: 'Minimum time:',
maxTime: 'Largest time:',
trainingDescription: 'Training description:',
generateTraining: 'Generate training',
updateTraining: 'Update training',
deleteTraining: 'Delete training',
automaticGenerationOfTraining: 'Automatic generation of training',
modifyTrainingByCategory: 'Modify training by category',
deleteAutoGeneratedTraining: 'Delete auto-generated training'
}; };

View File

@ -222,6 +222,20 @@ export default {
selectMapProductName: 'Please select map product name', selectMapProductName: 'Please select map product name',
inputTime: 'Please enter time', inputTime: 'Please enter time',
inputPermissionNumber: 'Please enter the number of permissions', inputPermissionNumber: 'Please enter the number of permissions',
permissionNumberGreater0: 'The number of permissions must be greater than 0' permissionNumberGreater0: 'The number of permissions must be greater than 0',
enterChapterName: 'Please enter chapter name',
enterChapterInstructions: 'Please enter chapter instructions',
selectCourseName: 'Please select the course name',
enterCourseName: 'Please enter the course name',
selectAssociatedProduct: 'Please select the associated product',
enterCourseDescription: 'Please enter the course description',
courseIdIsEmpty: 'Course Id is empty',
selectCity: 'Please select city',
enterStandardTime: 'Please enter standard time',
enterNumericValue: 'Please enter a numeric value',
greaterThanMinTime: 'Must be greater than the minimum time',
selectTrainingType: 'Please select training type',
selectOneTrainingType: 'Only one training type can be selected',
enterProductType: 'Please enter product type',
selectAssociatedStation: 'Please select the associated station'
}; };

View File

@ -108,6 +108,23 @@ export default {
purchaseMonth: 'Please enter a valid purchase month', purchaseMonth: 'Please enter a valid purchase month',
createRoomFailedHint: 'Each user can only create one comprehensive drill room. Do you want to enter the room?', createRoomFailedHint: 'Each user can only create one comprehensive drill room. Do you want to enter the room?',
noPermissionHint: 'You do not have permission, please go to purchase products', noPermissionHint: 'You do not have permission, please go to purchase products',
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'
}; };

View File

@ -58,6 +58,9 @@ export default {
updateOperateStepFailed: '更新操作步骤失败', updateOperateStepFailed: '更新操作步骤失败',
packagePermissionFailed: '打包权限失败', packagePermissionFailed: '打包权限失败',
acquisitionTimeFailed: '获取时间失败', acquisitionTimeFailed: '获取时间失败',
getProductListFailed: '获取产品列表失败' getProductListFailed: '获取产品列表失败',
obtainChapterDataFailed: '获取章节数据失败',
obtainCourseDetailsFailed: '获取课程详情失败',
obtainCourseInformationFailed: '获取课程信息失败',
obtainStepDataFailed: '获取步骤数据失败'
}; };

16
src/i18n/langs/zh/exam.js Normal file
View File

@ -0,0 +1,16 @@
export default {
testSystem: '城市轨道交通考试系统',
testSystemDescription: ' 该系统具有自定义考试规则、自动生成考卷、学员成绩统计、数据曲线分析及题库管理等功能,从实战操作、业务流程、故障模拟及考试规则等多角度出发,力求打造最符合用户需求的城市轨道交通在线交互实操类考试系统',
examResultsDetails: '考试结果详情',
testQuestionsName: '试题名称',
testScores: '考试得分',
points: '分',
whetherThrough: '是否通过',
didNotCalculate: '未计算',
pass: '通过',
notPass: '未通过',
examTime: '考试用时',
trainingName: '实训名称',
trainingScore: '实训得分',
returnToExamList: '返回考试列表'
};

View File

@ -142,5 +142,8 @@ export default {
mapList: '地图列表', mapList: '地图列表',
updateTime: '更新时间:', updateTime: '更新时间:',
line: '线路:', line: '线路:',
permissionList: '权限列表:' permissionList: '权限列表:',
remove: '移除',
append: '添加',
release: '发布'
}; };

View File

@ -16,6 +16,7 @@ import replay from './replay';
import planMonitor from './planMonitor'; import planMonitor from './planMonitor';
import screenMonitor from './screenMonitor'; import screenMonitor from './screenMonitor';
import demonstration from './demonstration'; import demonstration from './demonstration';
import exam from './exam';
export default { export default {
...cnLocale, ...cnLocale,
@ -35,5 +36,6 @@ export default {
replay, replay,
planMonitor, planMonitor,
screenMonitor, screenMonitor,
demonstration demonstration,
exam
}; };

View File

@ -45,9 +45,48 @@ export default {
stepReturn: '步骤返回值', stepReturn: '步骤返回值',
stepTips: '步骤提示信息', stepTips: '步骤提示信息',
createStepInfo: '创建步骤信息', createStepInfo: '创建步骤信息',
eidtStepInfo: '编辑步骤信息', editStepInfo: '编辑步骤信息',
product: '产品', product: '产品',
remarks: '描述', remarks: '描述',
operateSuccess: '操作成功' operateSuccess: '操作成功',
createChapter: '创建章节',
contentSorting: '内容排序',
courseList: '课程列表',
createNewCoursesFromRelease: '从发布课程新建',
courseName: '课程名称:',
parentChapter: '父级章节:',
chapterName: '章节名称:',
chapterInstructions: '章节说明:',
associatedTraining: '关联实训:',
updateChapter: '更新章节',
automaticOrManual: '自动/人工',
automatic: '自动',
manual: '人工',
publishCourseName: '发布课程名称:',
draftCourseName: '草稿课程名称:',
associatedSkin: '关联皮肤:',
associatedProducts: '关联产品:',
courseDescription: '课程说明:',
editCourse: '编辑课程',
createCourse: '创建课程',
courseRelease: '课程发布',
releaseAssociatedCity: '发布关联城市:',
releaseAssociatedMap: '发布关联地图:',
trainingSequence: '实训排序',
creationTime: '创建时间',
finishTime: '完成时间',
createResults: '创建结果',
start: '开始',
toPerform: '重新执行',
productType: '产品类型:',
minTime: '最小用时:',
maxTime: '最大用时:',
trainingDescription: '实训描述:',
generateTraining: '生成实训',
updateTraining: '修改实训',
deleteTraining: '删除实训',
automaticGenerationOfTraining: '自动生成实训',
modifyTrainingByCategory: '按类别修改实训',
deleteAutoGeneratedTraining: '删除自动生成实训'
}; };

View File

@ -2,9 +2,11 @@ export default {
drawData: '绘图数据', drawData: '绘图数据',
mapData: '地图数据', mapData: '地图数据',
pleaseSelect: '请选择', pleaseSelect: '请选择',
pleaseEnter: '请输入',
sketchMap: '草稿地图列表', sketchMap: '草稿地图列表',
newConstruction: '新建', newConstruction: '新建',
importMap: '导入地图', bothCreate: '批量生成',
importMap: '导入',
createNewMap: '新建地图', createNewMap: '新建地图',
normalCreate: '正常创建', normalCreate: '正常创建',
saveMapAs: '地图另存为', saveMapAs: '地图另存为',
@ -19,11 +21,12 @@ export default {
deny: '否', deny: '否',
drawMap: '绘图', drawMap: '绘图',
advanced: '高级', advanced: '高级',
viewLayer: '视图图层', viewLayer: '显示',
layerDisplay: '图层显示', layerDisplay: '显示',
viewShows: '视图显示', viewShows: '视图显示',
contentShows: '内容显示', contentShows: '设备显示',
createBatch: '批量创建', createBatch: '批量创建',
deleteBoth: '批量删除',
save: '保存', save: '保存',
updata: '更新', updata: '更新',
@ -31,6 +34,7 @@ export default {
updateObjAxis: '更新坐标', updateObjAxis: '更新坐标',
saveAs: '另存为', saveAs: '另存为',
publish: '发布', publish: '发布',
publishMap: '发布地图',
deleteObj: '删除', deleteObj: '删除',
remove: '移除', remove: '移除',
lastStep: '上一步', lastStep: '上一步',
@ -56,7 +60,7 @@ export default {
text: '文字', text: '文字',
mapName: '地图名称:', mapName: '地图名称:',
skinName: '皮肤风格:', skinName: '皮肤:',
selectCity: '所属城市:', selectCity: '所属城市:',
offsetXColon: 'X偏移:', offsetXColon: 'X偏移:',
offsetYColon: 'Y偏移:', offsetYColon: 'Y偏移:',

View File

@ -232,6 +232,25 @@ export default {
selectMapProductName: '请选择地图产品名称', selectMapProductName: '请选择地图产品名称',
inputTime: '请输入时间', inputTime: '请输入时间',
inputPermissionNumber: '请输入权限个数', inputPermissionNumber: '请输入权限个数',
permissionNumberGreater0: '权限个数必须大于0' permissionNumberGreater0: '权限个数必须大于0',
enterChapterName: '请输入章节名称',
enterChapterInstructions: '请输入章节说明',
selectCourseName: '请选择课程名称',
enterCourseName: '请输入课程名称',
selectAssociatedProduct: '请选择关联产品',
enterCourseDescription: '请输入课程说明',
courseIdIsEmpty: '课程Id为空',
selectCity: '请选择城市',
enterStandardTime: '请输入标准用时',
enterNumericValue: '请输入数字值',
greaterThanMinTime: '必须大于最小时间',
selectTrainingType: '请选择实训类型',
selectOneTrainingType: '只能选择一个实训类型',
enterProductType: '请输入产品类型',
selectAssociatedStation: '请选择关联的车站',
enterScale: '请输入缩放比例',
enterXOffset: '请输入X偏移',
enterYOffset: '请输入Y偏移'
}; };

View File

@ -113,5 +113,21 @@ export default {
createRoomFailedHint: '每个用户只能创建一个综合演练房间, 是否进入房间?', createRoomFailedHint: '每个用户只能创建一个综合演练房间, 是否进入房间?',
noPermissionHint: '您没有权限,请前往购买产品', noPermissionHint: '您没有权限,请前往购买产品',
trainModelNameRepeat: '列车模型数据重复' trainModelNameRepeat: '列车模型数据重复',
coursePublishSuccessful: '课程发布成功',
coursePublishFailed: '课程发布失败',
startOperationHint: '此操作将开始任务, 是否继续?',
cancelsTaskHint: '此操作将取消任务, 是否继续?',
automaticGenerationTrainingSuccess: '自动生成实训成功',
automaticGenerationTrainingFailure: '自动生成实训失败',
updateAutomaticGenerationTrainingSuccess: '更新自动生成实训成功',
updateAutomaticGenerationTrainingFailure: '更新自动生成实训失败',
deleteAutomaticGenerationTrainingSuccess: '删除自动生成实训成功',
deleteAutomaticGenerationTrainingFailure: '删除自动生成实训失败',
addTrainingSuccessfully: '添加实训成功!',
addTrainingFailed: '添加实训失败',
updateTrainingSuccessfully: '更新实训成功!',
updateTrainingFailed: '更新实训失败',
savedStepDataSuccessfully: '保存步骤数据成功',
savedStepDataFailed: '保存步骤数据失败'
}; };

View File

@ -80,6 +80,9 @@ class Jlmap {
// 保存皮肤类型 // 保存皮肤类型
if (map.skinVO) { if (map.skinVO) {
this.skinCode = map.skinVO.code; 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 }); this.$painter.updateTransform({ scaleRate: map.skinVO.scaling, offsetX: map.skinVO.origin.x, offsetY: map.skinVO.origin.y });
} }

View File

@ -3,7 +3,7 @@
<div class="home-box" :style="{height: height+'px'}"> <div class="home-box" :style="{height: height+'px'}">
<el-scrollbar wrap-class="scrollbar-wrapper" style="margin-top:5px;"> <el-scrollbar wrap-class="scrollbar-wrapper" style="margin-top:5px;">
<h1 class="title"> <h1 class="title">
城市轨道交通考试系统 {{$t('exam.testSystem')}}
<img :src="logo" alt="" class="logo-img"> <img :src="logo" alt="" class="logo-img">
</h1> </h1>
<div class="card-box"> <div class="card-box">
@ -14,7 +14,7 @@
</el-carousel> </el-carousel>
</div> </div>
<div class="brief-box"> <div class="brief-box">
该系统具有自定义考试规则自动生成考卷学员成绩统计数据曲线分析及题库管理等功能从实战操作业务流程故障模拟及考试规则等多角度出发力求打造最符合用户需求的城市轨道交通在线交互实操类考试系统 {{$t('exam.testSystemDescription')}}
</div> </div>
</el-scrollbar> </el-scrollbar>
</div> </div>

View File

@ -33,17 +33,17 @@
menu: [], menu: [],
lessonMenu: [ lessonMenu: [
{ {
label: '创建章节', label: this.$t('lesson.createChapter'),
handler: this.addSection, handler: this.addSection,
}, },
{ {
label: '内容排序', label: this.$t('lesson.contentSorting'),
handler: this.treeSort, handler: this.treeSort,
} }
], ],
chapterMenu: [ chapterMenu: [
{ {
label: '创建章节', label: this.$t('lesson.createChapter'),
handler: this.addSection, handler: this.addSection,
} }
] ]
@ -101,15 +101,15 @@
}, },
deleteObj() { deleteObj() {
let _that = this; let _that = this;
this.$confirm('是否确认删除?', '提示', { this.$confirm(this.$('tip.confirmDeletion'), this.$('global.tips'), {
confirmButtonText: '确定', confirmButtonText: this.$('global.confirm'),
cancelButtonText: '取消', cancelButtonText: this.$('global.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
}).catch(() => { }).catch(() => {
this.$messageBox('已取消删除'); this.$messageBox(this.$('tip.cancelledDelete'));
}); });
} }
} }
} }
</script> </script>

View File

@ -1,10 +1,10 @@
<template> <template>
<el-card class="map-list-main" v-loading="loading"> <el-card class="map-list-main" v-loading="loading">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>课程列表</span> <span>{{$t('lesson.courseList')}}</span>
<el-button type="text" @click="publishCreate" style="float: right; padding: 3px 0">从发布课程新建</el-button> <el-button type="text" @click="publishCreate" style="float: right; padding: 3px 0">{{$t('lesson.createNewCoursesFromRelease')}}</el-button>
</div> </div>
<el-input placeholder="输入关键字进行过滤" v-model="filterText" clearable> </el-input> <el-input :placeholder="this.$t('global.filteringKeywords')" v-model="filterText" clearable> </el-input>
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height: (height - 55) + 'px'}"> <el-scrollbar wrapClass="scrollbar-wrapper" :style="{height: (height - 55) + 'px'}">
<el-tree ref="lessonTree" :data="treeData" :props="defaultProps" :filter-node-method="filterNode" <el-tree ref="lessonTree" :data="treeData" :props="defaultProps" :filter-node-method="filterNode"
@node-contextmenu="showContextMenu" draggable :allow-drop="allowDrop" :allow-drag="allowDrag" @node-contextmenu="showContextMenu" draggable :allow-drop="allowDrop" :allow-drag="allowDrag"
@ -156,7 +156,7 @@
this.treeData = this.convertTreeData(response.data); this.treeData = this.convertTreeData(response.data);
this.$nextTick(() => { this.loading = false; }); this.$nextTick(() => { this.loading = false; });
}).catch(error => { }).catch(error => {
this.$messageBox('刷新失败'); this.$messageBox(this.$t('error.refreshFailed'));
this.loading = false; this.loading = false;
}); });
} }
@ -167,4 +167,4 @@
.el-tree-node.is-current>.el-tree-node__content { .el-tree-node.is-current>.el-tree-node__content {
background-color: #e4e3e3 !important; background-color: #e4e3e3 !important;
} }
</style> </style>

View File

@ -7,48 +7,48 @@
<el-card class="forms"> <el-card class="forms">
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height:height -160 + 'px'}" style="padding-top: 40px"> <el-scrollbar wrapClass="scrollbar-wrapper" :style="{height:height -160 + 'px'}" style="padding-top: 40px">
<el-form ref="form" :model="chapterModel" :rules="rules" label-width="135px"> <el-form ref="form" :model="chapterModel" :rules="rules" label-width="135px">
<el-form-item label="课程名称:" prop="lessonName"> <el-form-item :label="this.$t('lesson.courseName')" prop="lessonName">
<el-input v-model="chapterModel.lessonName" :disabled="true"></el-input> <el-input v-model="chapterModel.lessonName" :disabled="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="父级章节:" prop="parentName"> <el-form-item :label="this.$t('lesson.parentChapter')" prop="parentName">
<el-input v-model="chapterModel.parentName" :disabled="true"></el-input> <el-input v-model="chapterModel.parentName" :disabled="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="章节名称:" prop="name"> <el-form-item :label="this.$t('lesson.chapterName')" prop="name">
<el-input v-model="chapterModel.name"></el-input> <el-input v-model="chapterModel.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="章节说明:" prop="remarks"> <el-form-item :label="this.$t('lesson.chapterInstructions')" prop="remarks">
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" placeholder="请输入内容" <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" :placeholder="this.$t('rules.pleaseEnterContent')"
v-model="chapterModel.remarks"> v-model="chapterModel.remarks">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="关联实训:"> <el-form-item :label="this.$t('lesson.associatedTraining')">
<el-table ref="singleTable" :data="chapterModel.trainings" border highlight-current-row <el-table ref="singleTable" :data="chapterModel.trainings" border highlight-current-row
:height="237"> :height="237">
<el-table-column type="index" width="50"> <el-table-column type="index" width="50">
</el-table-column> </el-table-column>
<el-table-column property="trainingName" label="实训名称"> <el-table-column property="trainingName" :label="this.$t('lesson.trainingName')">
</el-table-column> </el-table-column>
<el-table-column property="trial" label="是否试用" width="80"> <el-table-column property="trial" :label="this.$t('global.isTry')" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.trial"></el-checkbox> <el-checkbox v-model="scope.row.trial"></el-checkbox>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="70"> <el-table-column fixed="right" :label="this.$t('global.operate')" width="70">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click.native.prevent="deleteRow(scope.$index, chapterModel.trainings)" <el-button @click.native.prevent="deleteRow(scope.$index, chapterModel.trainings)"
type="text" size="small">移除</el-button> type="text" size="small">{{$t('global.remove')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-button type="primary" style="margin-top: 20px" @click='pushTrain'>添加实训</el-button> <el-button type="primary" style="margin-top: 20px" @click='pushTrain'>{{$t('lesson.addTraining')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-scrollbar> </el-scrollbar>
</el-card> </el-card>
<div class="draft"> <div class="draft">
<el-button-group> <el-button-group>
<el-button type="primary" @click="create" v-show="!isEdit">添加</el-button> <el-button type="primary" @click="create" v-show="!isEdit">{{$t('global.append')}}</el-button>
<el-button type="primary" @click="update" v-show="isEdit">更新</el-button> <el-button type="primary" @click="update" v-show="isEdit">{{$t('global.update')}}</el-button>
</el-button-group> </el-button-group>
</div> </div>
<train-list ref="pathRoute" :trainings="this.chapterModel.trainings" :detail="detail" <train-list ref="pathRoute" :trainings="this.chapterModel.trainings" :detail="detail"
@ -95,15 +95,15 @@
}, },
computed: { computed: {
title() { title() {
return this.isEdit ? '更新章节' : '创建章节'; return this.isEdit ? this.$t('lesson.updateChapter') : this.$t('lesson.createChapter');
}, },
rules() { rules() {
let baseRules = { let baseRules = {
name: [ name: [
{ required: true, message: '请输入章节名称', trigger: 'change' } { required: true, message: this.$t('rules.enterChapterName'), trigger: 'change' }
], ],
remarks: [ remarks: [
{ required: true, message: '请输入章节说明', trigger: 'change' } { required: true, message: this.$t('rules.enterChapterInstructions'), trigger: 'change' }
], ],
} }
return baseRules; return baseRules;
@ -135,7 +135,7 @@
getLessonChapterDetail(data).then(response => { getLessonChapterDetail(data).then(response => {
this.setChapterModel(response.data); this.setChapterModel(response.data);
}).catch(error => { }).catch(error => {
this.$messageBox('获取章节数据失败') this.$messageBox(this.$t('error.obtainChapterDataFailed'))
}); });
}, },
deleteRow(index, rows) { deleteRow(index, rows) {
@ -193,7 +193,7 @@
this.getChapter(node.data); this.getChapter(node.data);
} }
}).catch(error => { }).catch(error => {
this.$messageBox('获取课程详情失败'); this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
}) })
}, },
create() { create() {
@ -201,9 +201,9 @@
if (valid) { if (valid) {
createLessonChapter(this.chapterModel).then(response => { createLessonChapter(this.chapterModel).then(response => {
this.$emit('refresh'); this.$emit('refresh');
this.$message.success('创建成功'); this.$message.success(this.$t('tip.createSuccess'));
}).catch(error => { }).catch(error => {
this.$messageBox('刷新失败') this.$messageBox(this.$t('error.refreshFailed'))
}); });
} }
}); });
@ -213,9 +213,9 @@
if (valid) { if (valid) {
updateLessonChapter(this.chapterModel).then(response => { updateLessonChapter(this.chapterModel).then(response => {
this.$emit('refresh'); this.$emit('refresh');
this.$message.success('更新成功'); this.$message.success(this.$t('tip.updateSuccessfully'));
}).catch(error => { }).catch(error => {
this.$messageBox('刷新失败') this.$messageBox(this.$t('error.refreshFailed'))
}); });
} }
}); });
@ -283,4 +283,4 @@
text-align: center; text-align: center;
margin: 20px auto; margin: 20px auto;
} }
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<el-dialog <el-dialog
title="实训列表" :title="this.$t('lesson.trainingList')"
:visible.sync="show" :visible.sync="show"
top="20px" top="20px"
width="90%" width="90%"
@ -46,7 +46,7 @@ export default {
queryObject: { queryObject: {
type: { type: {
type: 'select', type: 'select',
label: '实训类型', label: this.$t('lesson.trainingType'),
change: this.typeChoose, change: this.typeChoose,
config: { config: {
data: [] data: []
@ -54,16 +54,16 @@ export default {
}, },
operateType: { operateType: {
type: 'select', type: 'select',
label: '操作类型', label: this.$t('lesson.operationType'),
config: { config: {
data: [] data: []
} }
}, },
generateType: { generateType: {
type: 'select', type: 'select',
label: '自动/人工', label: this.$t('lesson.automaticOrManual'),
config: { config: {
data: [{ value: '02', label: '人工' }, { value: '01', label: '自动' }] data: [{ value: '02', label: this.$t('lesson.automatic'), }, { value: '01', label: this.$t('lesson.manual'), }]
} }
} }
} }
@ -74,32 +74,32 @@ export default {
indexShow: true, indexShow: true,
columns: [ columns: [
{ {
title: '实训名称', title: this.$t('lesson.trainingName'),
prop: 'name' prop: 'name'
}, },
{ {
title: '皮肤类型', title: this.$t('lesson.skinType'),
prop: 'skinCode', prop: 'skinCode',
type: 'tag', type: 'tag',
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); }, columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
tagType: (row) => { return 'success'; } tagType: (row) => { return 'success'; }
}, },
{ {
title: '产品', title: this.$t('lesson.product'),
prop: 'prdCode', prop: 'prdCode',
type: 'tag', type: 'tag',
columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); }, columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
tagType: (row) => { return 'success'; } tagType: (row) => { return 'success'; }
}, },
{ {
title: '实训类型', title: this.$t('lesson.trainingType'),
prop: 'type', prop: 'type',
type: 'tag', type: 'tag',
columnValue: (row) => { return this.$convertField(row.type, this.trainingTypeList, ['code', 'name']); }, columnValue: (row) => { return this.$convertField(row.type, this.trainingTypeList, ['code', 'name']); },
tagType: (row) => { return 'success'; } tagType: (row) => { return 'success'; }
}, },
{ {
title: '操作类型', title: this.$t('lesson.operationType'),
prop: 'operateType', prop: 'operateType',
type: 'tag', type: 'tag',
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['code', 'name']); }, columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['code', 'name']); },
@ -107,16 +107,16 @@ export default {
}, },
{ {
type: 'button', type: 'button',
title: '操作', title: this.$t('global.operate'),
width: '200', width: '200',
buttons: [ buttons: [
{ {
name: '添加', name: this.$t('global.append'),
handleClick: this.addObj, handleClick: this.addObj,
showControl: (row) => { return !row.isShow; } showControl: (row) => { return !row.isShow; }
}, },
{ {
name: '移除', name: this.$t('global.remove'),
handleClick: this.delObj, handleClick: this.delObj,
type: 'warning', type: 'warning',
showControl: (row) => { return row.isShow; } showControl: (row) => { return row.isShow; }

View File

@ -1,19 +1,19 @@
<template> <template>
<el-dialog title="从发布课程创建" :visible.sync="dialogShow" width="600px" :before-close="doClose"> <el-dialog :title="this.$t('lesson.createNewCoursesFromRelease')" :visible.sync="dialogShow" width="600px" :before-close="doClose">
<el-form ref="form" :model="courseModel" :rules="rules" label-width="120px" size="mini"> <el-form ref="form" :model="courseModel" :rules="rules" label-width="120px" size="mini">
<el-form-item label="发布课程名称:" prop="code"> <el-form-item :label="this.$t('lesson.publishCourseName')" prop="code">
<el-select v-model="courseModel.code" placeholder="请选择"> <el-select v-model="courseModel.code" :placeholder="this.$t('rules.pleaseSelect')">
<el-option v-for="item in lessonList" :key="item.code" :value="item.code" :label="item.name"> <el-option v-for="item in lessonList" :key="item.code" :value="item.code" :label="item.name">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="草稿课程名称:" prop="name"> <el-form-item :label="this.$t('lesson.draftCourseName')" prop="name">
<el-input v-model="courseModel.name"></el-input> <el-input v-model="courseModel.name"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false"> </el-button> <el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
<el-button type="primary" @click="create" :loading="loading"> </el-button> <el-button type="primary" @click="create" :loading="loading">{{$t('global.confirm')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -40,10 +40,10 @@
rules() { rules() {
let baseRules = { let baseRules = {
code: [ code: [
{ required: true, message: '请选择课程名称', trigger: 'change' } { required: true, message: this.$t('rules.selectCourseName'), trigger: 'change' }
], ],
name: [ name: [
{ required: true, message: '请输入课程名称', trigger: 'change' } { required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
] ]
} }
return baseRules; return baseRules;
@ -54,7 +54,7 @@
getPublishLessonList().then(response => { getPublishLessonList().then(response => {
this.lessonList = response.data.map(elem => { return { code: elem.id, name: elem.name }; }) this.lessonList = response.data.map(elem => { return { code: elem.id, name: elem.name }; })
}).catch(error => { }).catch(error => {
this.$messageBox('刷新失败') this.$messageBox(this.$t('error.refreshFailed'))
}); });
}, },
methods: { methods: {
@ -74,9 +74,9 @@
createLessonFromPublish(model).then(response => { createLessonFromPublish(model).then(response => {
this.$emit('refresh'); this.$emit('refresh');
this.doClose(); this.doClose();
this.$message.success('创建成功'); this.$message.success(this.$t('tip.createSuccess'));
}).catch(error => { }).catch(error => {
this.$messageBox('创建失败') this.$messageBox(this.$t('tip.creatingFailed'))
}); });
} }
}); });
@ -88,4 +88,4 @@
.option-group { .option-group {
margin: 10px 100px; margin: 10px 100px;
} }
</style> </style>

View File

@ -7,11 +7,11 @@
<el-card class="forms"> <el-card class="forms">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height:height-160 + 'px'}" style="padding-top: 40px"> <el-scrollbar wrap-class="scrollbar-wrapper" :style="{height:height-160 + 'px'}" style="padding-top: 40px">
<el-form ref="form" :model="courseModel" :rules="rules" label-width="135px"> <el-form ref="form" :model="courseModel" :rules="rules" label-width="135px">
<el-form-item label="课程名称:" prop="name"> <el-form-item :label="this.$t('lesson.courseName')" prop="name">
<el-input v-model="courseModel.name" /> <el-input v-model="courseModel.name" />
</el-form-item> </el-form-item>
<el-form-item label="关联皮肤:" prop="skinCode"> <el-form-item :label="this.$t('lesson.associatedSkin')" prop="skinCode">
<el-select v-model="courseModel.skinCode" placeholder="请选择" :disabled="true"> <el-select v-model="courseModel.skinCode" :placeholder="this.$t('rules.pleaseSelect')" :disabled="true">
<el-option <el-option
v-for="(item,index) in skinCodeList" v-for="(item,index) in skinCodeList"
:key="index" :key="index"
@ -20,8 +20,8 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="关联产品:" prop="prdCode"> <el-form-item :label="this.$t('lesson.associatedProducts')" prop="prdCode">
<el-select v-model="courseModel.prdCode" placeholder="请选择" :disabled="isEdit"> <el-select v-model="courseModel.prdCode" :placeholder="this.$t('rules.pleaseSelect')" :disabled="isEdit">
<el-option <el-option
v-for="(item,index) in productList" v-for="(item,index) in productList"
:key="index" :key="index"
@ -30,12 +30,12 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="课程说明:" prop="remarks"> <el-form-item :label="this.$t('lesson.courseDescription')" prop="remarks">
<el-input <el-input
v-model="courseModel.remarks" v-model="courseModel.remarks"
type="textarea" type="textarea"
:autosize="{ minRows: 6, maxRows: 6}" :autosize="{ minRows: 6, maxRows: 6}"
placeholder="请输入内容" :placeholder="this.$t('rules.pleaseEnterContent')"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -44,12 +44,12 @@
<div class="draft"> <div class="draft">
<el-button-group> <el-button-group>
<template v-if="!isEdit"> <template v-if="!isEdit">
<el-button v-if="courseModel.skinCode" type="primary" @click="create">创建</el-button> <el-button v-if="courseModel.skinCode" type="primary" @click="create">{{$t('global.create')}}</el-button>
</template> </template>
<template v-else> <template v-else>
<el-button type="primary" @click="update">更新</el-button> <el-button type="primary" @click="update">{{$t('global.update')}}</el-button>
<el-button type="primary" @click="publish">发布</el-button> <el-button type="primary" @click="publish">{{$t('global.release')}}</el-button>
<el-button type="danger" @click="deleteLesson">删除</el-button> <el-button type="danger" @click="deleteLesson">{{$t('global.delete')}}</el-button>
</template> </template>
</el-button-group> </el-button-group>
</div> </div>
@ -92,21 +92,21 @@ export default {
}, },
computed: { computed: {
title() { title() {
return this.isEdit ? '编辑课程' : '创建课程'; return this.isEdit ? this.$t('lesson.editCourse') : this.$t('lesson.createCourse');
}, },
rules() { rules() {
const baseRules = { const baseRules = {
name: [ name: [
{ required: true, message: '请输入课程名称', trigger: 'change' } { required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
], ],
skinCode: [ skinCode: [
{ required: true, message: '请选择皮肤类型', trigger: 'change' } { required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' }
], ],
prdCode: [ prdCode: [
{ required: true, message: '请选择关联产品', trigger: 'change' } { required: true, message: this.$t('rules.selectAssociatedProduct'), trigger: 'change' }
], ],
remarks: [ remarks: [
{ required: true, message: '请输入课程说明', trigger: 'change' } { required: true, message: this.$t('rules.enterCourseDescription'), trigger: 'change' }
] ]
}; };
return baseRules; return baseRules;
@ -150,9 +150,9 @@ export default {
}; };
createLesson(model).then(response => { createLesson(model).then(response => {
this.$emit('refresh'); this.$emit('refresh');
this.$message.success('创建成功'); this.$message.success(this.$t('tip.createSuccess'));
}).catch(error => { }).catch(error => {
this.$messageBox('创建失败'); this.$messageBox(this.$t('tip.creatingFailed'));
}); });
} }
}); });
@ -169,9 +169,9 @@ export default {
}; };
updateLesson(model).then(response => { updateLesson(model).then(response => {
this.$emit('refresh'); this.$emit('refresh');
this.$message.success('更新成功'); this.$message.success(this.$t('tip.updateSuccessfully'));
}).catch(error => { }).catch(error => {
this.$messageBox('更新失败'); this.$messageBox(this.$t('tip.updateFailed'));
}); });
} }
}); });
@ -181,12 +181,12 @@ export default {
}, },
deleteLesson() { deleteLesson() {
delLesson(this.courseModel).then(response => { delLesson(this.courseModel).then(response => {
this.$message.success('删除成功'); this.$message.success(this.$t('tip.successfullyDelete'));
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.isEdit = false, this.isEdit = false,
this.$emit('refresh'); this.$emit('refresh');
}).catch(error => { }).catch(error => {
this.$messageBox('删除失败'); this.$messageBox(this.$t('tip.failDelete'));
}); });
}, },
getParentSkin(node) { getParentSkin(node) {
@ -212,7 +212,7 @@ export default {
remarks: data.remarks remarks: data.remarks
}; };
}).catch(error => { }).catch(error => {
this.$messageBox('获取课程信息失败'); this.$messageBox(this.$t('error.obtainCourseInformationFailed'));
}); });
} }
} }

View File

@ -1,28 +1,28 @@
<template> <template>
<el-dialog title="课程发布" :visible.sync="dialogShow" width="30%" :before-doClose="doClose"> <el-dialog :title="this.$t('lesson.courseRelease')" :visible.sync="dialogShow" width="30%" :before-doClose="doClose">
<div> <div>
<el-form label-position="right" ref="form" :rules="rules" :model="editModel" label-width="140px" <el-form label-position="right" ref="form" :rules="rules" :model="editModel" label-width="140px"
@submit.native.prevent> @submit.native.prevent>
<el-form-item label="发布关联城市:" prop="cityCode"> <el-form-item :label="this.$t('lesson.releaseAssociatedCity')" prop="cityCode">
<el-select v-model="editModel.cityCode" @change="cityChange" placeholder="请选择"> <el-select v-model="editModel.cityCode" @change="cityChange" :placeholder="this.$t('rules.pleaseSelect')">
<el-option v-for="item in cityList" :key="item.code" :label="item.name" :value="item.code"> <el-option v-for="item in cityList" :key="item.code" :label="item.name" :value="item.code">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="发布关联地图:" prop="mapId"> <el-form-item :label="this.$t('lesson.releaseAssociatedMap')" prop="mapId">
<el-select v-model="editModel.mapId" @change="mapChange" placeholder="请选择"> <el-select v-model="editModel.mapId" @change="mapChange" :placeholder="this.$t('rules.pleaseSelect')">
<el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="发布课程名称:" prop="name"> <el-form-item :label="this.$t('lesson.publishCourseName')" prop="name">
<el-input v-model="editModel.name"></el-input> <el-input v-model="editModel.name"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false"> </el-button> <el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
<el-button type="primary" @click="doSave" :loading="loading"> </el-button> <el-button type="primary" @click="doSave" :loading="loading">{{$t('global.confirm')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -54,16 +54,16 @@
rules() { rules() {
return { return {
id: [ id: [
{ required: true, message: '课程Id为空', trigger: 'change' } { required: true, message: this.$t('rules.courseIdIsEmpty'), trigger: 'change' }
], ],
cityCode: [ cityCode: [
{ required: true, message: '请选择城市', trigger: 'change' } { required: true, message: this.$t('rules.selectCity'), trigger: 'change' }
], ],
mapId: [ mapId: [
{ required: true, message: '请选择地图名称', trigger: 'change' } { required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
], ],
name: [ name: [
{ required: true, message: '请输入地图名称', trigger: 'change' } { required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
], ],
} }
} }
@ -119,11 +119,11 @@
if (valid) { if (valid) {
publishLesson(this.editModel).then(response => { publishLesson(this.editModel).then(response => {
this.loading = false; this.loading = false;
this.$message.success('发布课程成功'); this.$message.success(this.$t('tip.coursePublishSuccessful'));
this.doClose(); this.doClose();
}).catch(error => { }).catch(error => {
this.loading = false; this.loading = false;
this.$messageBox('发布课程失败'); this.$messageBox(this.$t('tip.coursePublishFailed'));
}); });
} else { } else {
this.loading = false; this.loading = false;
@ -133,4 +133,4 @@
} }
} }
} }
</script> </script>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="card-box"> <div class="card-box">
<el-steps class="steps" :active="display"> <el-steps class="steps" :active="display">
<el-step title="实训排序" icon="el-icon-edit-outline"></el-step> <el-step :title="this.$t('lesson.trainingSequence')" icon="el-icon-edit-outline"></el-step>
<el-step title="" icon="el-icon-upload"></el-step> <el-step title="" icon="el-icon-upload"></el-step>
</el-steps> </el-steps>
<el-card class="forms"> <el-card class="forms">
@ -61,7 +61,7 @@
getLessonTree({ mapId: '' }).then(response => { getLessonTree({ mapId: '' }).then(response => {
this.treeData = this.convertTreeData(response.data, node); this.treeData = this.convertTreeData(response.data, node);
}).catch(error => { }).catch(error => {
this.$messageBox('刷新失败') this.$messageBox(this.$t('error.refreshFailed'))
}); });
}, },
allowDrop(draggingNode, dropNode, type) { allowDrop(draggingNode, dropNode, type) {
@ -135,4 +135,4 @@
margin: 0 auto; margin: 0 auto;
margin-top: 10px; margin-top: 10px;
} }
</style> </style>

View File

@ -2,8 +2,8 @@
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%" :before-close="doClose" center> <el-dialog :title="title" :visible.sync="dialogVisible" width="25%" :before-close="doClose" center>
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form> <data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave"> </el-button> <el-button type="primary" @click="doSave">{{$t('global.confirm')}}</el-button>
<el-button @click="doClose"> </el-button> <el-button @click="doClose">{{$t('global.cancel')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -35,7 +35,7 @@
let form = { let form = {
labelWidth: '120px', labelWidth: '120px',
items: [ items: [
{ prop: 'parameter', label: '皮肤类型', type: 'select', required: true, options: this.skinCodeList }, { prop: 'parameter', label: this.$t('lesson.skinType'), type: 'select', required: true, options: this.skinCodeList },
] ]
} }
return form return form
@ -43,13 +43,13 @@
rules() { rules() {
let crules = { let crules = {
parameter: [ parameter: [
{ required: true, message: '请选择地图', trigger: 'change' }, { required: true, message: this.$t('rules.mapInput'), trigger: 'change' },
] ]
} }
return crules return crules
}, },
title() { title() {
return '自动生成操作' return this.$t('lesson.generationOperation')
} }
}, },
mounted() { mounted() {
@ -92,9 +92,9 @@
self.doClose() self.doClose()
self.$emit('reloadTable'); // self.$emit('reloadTable'); //
} catch (error) { } catch (error) {
this.$messageBox('创建失败'); this.$messageBox(this.$t('tip.creatingFailed'));
} }
} }
} }
} }
</script> </script>

View File

@ -54,7 +54,7 @@
tagType: (row) => { return '' } tagType: (row) => { return '' }
}, },
{ {
title: '创建时间', title: this.$t('lesson.creationTime'),
prop: 'createTime' prop: 'createTime'
}, },
{ {
@ -65,15 +65,15 @@
tagType: (row) => { if (row.status != '03') { return 'warning' } else { return 'success' } } tagType: (row) => { if (row.status != '03') { return 'warning' } else { return 'success' } }
}, },
{ {
title: '开始时间', title: this.$t('global.startTime'),
prop: 'startTime' prop: 'startTime'
}, },
{ {
title: '完成时间', title: this.$t('lesson.finishTime'),
prop: 'finishTime' prop: 'finishTime'
}, },
{ {
title: '创建结果', title: this.$t('lesson.createResults'),
prop: 'result', prop: 'result',
width: '400px' width: '400px'
}, },
@ -83,19 +83,19 @@
width: '250', width: '250',
buttons: [ buttons: [
{ {
name: '开始', name: this.$t('lesson.start'),
handleClick: this.taskStart, handleClick: this.taskStart,
type: '', type: '',
showControl: (row) => { return row.status == '01' } showControl: (row) => { return row.status == '01' }
}, },
{ {
name: '取消', name: this.$t('global.cancel'),
handleClick: this.taskCancel, handleClick: this.taskCancel,
type: '', type: '',
showControl: (row) => { return row.status == '04' } showControl: (row) => { return row.status == '04' }
}, },
{ {
name: '重新执行', name: this.$t('lesson.toPerform'),
handleClick: this.taskStart, handleClick: this.taskStart,
type: '', type: '',
showControl: (row) => { return row.status == '03' || row.status == '05' } showControl: (row) => { return row.status == '03' || row.status == '05' }
@ -104,7 +104,7 @@
} }
], ],
actions: [ actions: [
{ text: '创建', btnCode: 'employee_insert', handler: this.createTask } { text: this.$t('global.create'), btnCode: 'employee_insert', handler: this.createTask }
] ]
}, },
@ -130,7 +130,7 @@
}) })
}, },
taskStart(index, node) { taskStart(index, node) {
this.$confirm('此操作将开始任务, 是否继续?', this.$t('global.tips'), { this.$confirm( this.$t('tip.startOperationHint'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'), confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'), cancelButtonText: this.$t('global.cancel'),
type: 'warning' type: 'warning'
@ -145,7 +145,7 @@
}) })
}, },
taskCancel(index, node) { taskCancel(index, node) {
this.$confirm('此操作将取消任务, 是否继续?', this.$t('global.tips'), { this.$confirm( this.$t('tip.startOperationHint'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'), confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'), cancelButtonText: this.$t('global.cancel'),
type: 'warning' type: 'warning'
@ -167,4 +167,4 @@
}, },
} }
} }
</script> </script>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog :title="operation.title" :visible.sync="dialogShow" width="500px" :before-close="close"> <el-dialog :title="operation.title" :visible.sync="dialogShow" width="500px" :before-close="close">
<el-form ref="form" :model="operateModel" label-width="100px" :rules="rules" size="mini"> <el-form ref="form" :model="operateModel" label-width="auto" :rules="rules" size="mini" label-position="right" class="dialog-form">
<el-form-item label="皮肤类型:" prop="skinCode"> <el-form-item :label="this.$t('lesson.skinType') + ':'" prop="skinCode">
<el-select v-model="operateModel.skinCode" @change="skinCodeChoose"> <el-select v-model="operateModel.skinCode" @change="skinCodeChoose">
<el-option <el-option
v-for="option in skinCodeList" v-for="option in skinCodeList"
@ -11,7 +11,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="产品类型:" prop="prdCode"> <el-form-item :label="this.$t('lesson.productType')" prop="prdCode">
<el-select v-model="operateModel.prdCode" @change="prdChange"> <el-select v-model="operateModel.prdCode" @change="prdChange">
<el-option <el-option
v-for="option in productList" v-for="option in productList"
@ -21,7 +21,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="实训类型:" prop="type"> <el-form-item :label="this.$t('lesson.trainingType') + ':'" prop="type">
<el-select v-model="operateModel.type" @change="typeChange"> <el-select v-model="operateModel.type" @change="typeChange">
<el-option <el-option
v-for="option in trainingTypeLists" v-for="option in trainingTypeLists"
@ -31,7 +31,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="操作类型:" prop="operateType"> <el-form-item :label="this.$t('lesson.operationType') + ':'" prop="operateType">
<el-select v-model="operateModel.operateType" multiple> <el-select v-model="operateModel.operateType" multiple>
<el-option <el-option
v-for="option in trainingTypeMap[operateModel.type]" v-for="option in trainingTypeMap[operateModel.type]"
@ -41,19 +41,19 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="isUpdate" label="最小用时:" prop="minDuration"> <el-form-item v-if="isUpdate" :label="this.$t('lesson.minTime')" prop="minDuration">
<el-input-number v-model="operateModel.minDuration" :min="0" :max="10000" />s <el-input-number v-model="operateModel.minDuration" :min="0" :max="10000" />s
</el-form-item> </el-form-item>
<el-form-item v-if="isUpdate" label="最大用时:" prop="maxDuration"> <el-form-item v-if="isUpdate" :label="this.$t('lesson.maxTime')" prop="maxDuration">
<el-input-number v-model="operateModel.maxDuration" :min="0" :max="10000" />s <el-input-number v-model="operateModel.maxDuration" :min="0" :max="10000" />s
</el-form-item> </el-form-item>
<el-form-item v-if="isUpdate" label="实训描述:" prop="remarks"> <el-form-item v-if="isUpdate" :label="this.$t('lesson.trainingDescription')" prop="remarks">
<el-input v-model="operateModel.remarks" type="textarea" /> <el-input v-model="operateModel.remarks" type="textarea" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button> <el-button @click="handleClose">{{$t('global.cancel')}}</el-button>
<el-button type="primary" :loading="loading" @click="handleDeal"> </el-button> <el-button type="primary" :loading="loading" @click="handleDeal">{{$t('global.confirm')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -82,11 +82,11 @@ export default {
data() { data() {
var minDurations = (rule, value, callback) => { var minDurations = (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error('请输入标准用时')); return callback(new Error(this.$t('rules.enterStandardTime')));
} }
setTimeout(() => { setTimeout(() => {
if (!Number.isInteger(value)) { if (!Number.isInteger(value)) {
callback(new Error('请输入数字值')); callback(new Error(this.$t('rules.enterNumericValue')));
} else { } else {
callback(); callback();
} }
@ -94,14 +94,14 @@ export default {
}; };
var maxDurations = (rule, value, callback) => { var maxDurations = (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error('请输入标准用时')); return callback(new Error(this.$t('rules.enterStandardTime')));
} }
setTimeout(() => { setTimeout(() => {
if (!Number.isInteger(value)) { if (!Number.isInteger(value)) {
callback(new Error('请输入数字值')); callback(new Error(this.$t('rules.enterNumericValue')));
} else { } else {
if (value < this.operateModel.minDuration) { if (value < this.operateModel.minDuration) {
callback(new Error('必须大于最小时间')); callback(new Error(this.$t('rules.greaterThanMinTime')));
} else { } else {
callback(); callback();
} }
@ -111,9 +111,9 @@ export default {
var checkOperateType = (rule, value, callback) => { var checkOperateType = (rule, value, callback) => {
if (value.length <= 0) { if (value.length <= 0) {
return callback(new Error('请选择实训类型')); return callback(new Error(this.$t('rules.selectTrainingType')));
} else if (this.operation.event == '02' && value.length !== 1) { } else if (this.operation.event == '02' && value.length !== 1) {
return callback(new Error('只能选择一个实训类型')); return callback(new Error(this.$t('rules.selectOneTrainingType')));
} else { } else {
callback(); callback();
} }
@ -151,13 +151,13 @@ export default {
}, },
rules: { rules: {
skinCode: [ skinCode: [
{ required: true, message: '请输入地图名称', trigger: 'change' } { required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
], ],
prdCode: [ prdCode: [
{ required: true, message: '请输入产品类型', trigger: 'change' } { required: true, message: this.$t('rules.enterProductType'), trigger: 'change' }
], ],
type: [ type: [
{ required: true, message: '请输入实训类型', trigger: 'change' } { required: true, message: this.$t('rules.inputTrainingType'), trigger: 'change' }
], ],
operateType: [ operateType: [
{ required: true, validator: checkOperateType, trigger: 'change' } { required: true, validator: checkOperateType, trigger: 'change' }
@ -266,11 +266,11 @@ export default {
}; };
addAutoTraining(data).then(response => { addAutoTraining(data).then(response => {
this.$message.success('自动生成实训成功!'); this.$message.success(this.$t('tip.automaticGenerationTrainingSuccess'));
this.$emit('refresh'); this.$emit('refresh');
this.close(); this.close();
}).catch(() => { }).catch(() => {
this.$messageBox('生成实训失败'); this.$messageBox(this.$t('tip.automaticGenerationTrainingFailure'));
this.loading = false; this.loading = false;
}); });
} else if (this.operation.event == '02') { // edit } else if (this.operation.event == '02') { // edit
@ -287,11 +287,11 @@ export default {
}; };
updateAutoTraining(data).then(response => { updateAutoTraining(data).then(response => {
this.$message.success('更新自动生成实训成功!'); this.$message.success(this.$t('tip.updateAutomaticGenerationTrainingSuccess'));
this.$emit('refresh'); this.$emit('refresh');
this.close(); this.close();
}).catch(() => { }).catch(() => {
this.$messageBox('更新自动生成实训失败'); this.$messageBox(this.$t('tip.updateAutomaticGenerationTrainingFailure'));
this.loading = false; this.loading = false;
}); });
} else if (this.operation.event == '03') { // delete } else if (this.operation.event == '03') { // delete
@ -305,11 +305,11 @@ export default {
}; };
deleteAutoTraining(data).then(response => { deleteAutoTraining(data).then(response => {
this.$message.success('删除自动生成实训成功!'); this.$message.success(this.$t('tip.deleteAutomaticGenerationTrainingSuccess'));
this.$emit('refresh'); this.$emit('refresh');
this.close(); this.close();
}).catch(() => { }).catch(() => {
this.$messageBox('删除自动生成实训失败'); this.$messageBox(this.$t('tip.deleteAutomaticGenerationTrainingFailure'));
this.loading = false; this.loading = false;
}); });
} }
@ -324,4 +324,8 @@ export default {
.el-checkbox { .el-checkbox {
margin-left: 20px; margin-left: 20px;
} }
.dialog-form {
position: relative;
left: 15px;
}
</style> </style>

View File

@ -37,7 +37,7 @@ export default {
pageIndex: 'pageNum' pageIndex: 'pageNum'
}, },
queryForm: { queryForm: {
labelWidth: '80px', labelWidth: '120px',
initLoadCallback: this.loadInitQueryList, initLoadCallback: this.loadInitQueryList,
queryObject: { queryObject: {
skinCode: { skinCode: {
@ -50,7 +50,7 @@ export default {
}, },
prdCode: { prdCode: {
type: 'select', type: 'select',
label: '产品', label: this.$t('lesson.product'),
change: this.prdChoose, change: this.prdChoose,
config: { config: {
data: [] data: []
@ -73,9 +73,9 @@ export default {
}, },
generateType: { generateType: {
type: 'select', type: 'select',
label: '自动/人工', label: this.$t('lesson.automaticOrManual'),
config: { config: {
data: [{ value: '02', label: '人工' }, { value: '01', label: '自动' }] data: [{ value: '02', label: this.$t('lesson.manual') }, { value: '01', label: this.$t('lesson.automatic') }]
} }
}, },
name: { name: {
@ -147,9 +147,9 @@ export default {
} }
], ],
actions: [ actions: [
{ text: '生成实训', btnCode: 'employee_insert', handler: this.autoMaticTrainging }, { text: this.$t('lesson.generateTraining'), btnCode: 'employee_insert', handler: this.autoMaticTrainging },
{ text: '修改实训', btnCode: 'employee_insert', handler: this.editTrainingByType, type: 'warning' }, { text: this.$t('lesson.updateTraining'), btnCode: 'employee_insert', handler: this.editTrainingByType, type: 'warning'},
{ text: '删除实训', btnCode: 'employee_insert', handler: this.delAutoMaticTrainging, type: 'danger' } { text: this.$t('lesson.deleteTraining'), btnCode: 'employee_insert', handler: this.delAutoMaticTrainging, type: 'danger'}
] ]
}, },
@ -249,13 +249,13 @@ export default {
} }
}, },
autoMaticTrainging() { autoMaticTrainging() {
this.$refs.draftTrain.show({ event: '01', title: '自动生成实训' }); this.$refs.draftTrain.show({ event: '01', title: this.$t('lesson.automaticGenerationOfTraining') });
}, },
editTrainingByType() { editTrainingByType() {
this.$refs.draftTrain.show({ event: '02', title: '按类别修改实训' }); this.$refs.draftTrain.show({ event: '02', title: this.$t('lesson.modifyTrainingByCategory') });
}, },
delAutoMaticTrainging() { delAutoMaticTrainging() {
this.$refs.draftTrain.show({ event: '03', title: '删除自动生成实训' }); this.$refs.draftTrain.show({ event: '03', title: this.$t('lesson.deleteAutoGeneratedTraining') });
}, },
demoDisplay(index, node) { demoDisplay(index, node) {
trainingNotify({ trainingId: node.id }).then(resp => { trainingNotify({ trainingId: node.id }).then(resp => {
@ -264,7 +264,7 @@ export default {
this.$router.push({ path: `${UrlConfig.display}/manage`, query: query }); this.$router.push({ path: `${UrlConfig.display}/manage`, query: query });
launchFullscreen(); launchFullscreen();
}).catch(error => { }).catch(error => {
this.$messageBox(`创建仿真失败: ${error.message}`); this.$messageBox(this.$t('error.createSimulationFailed') +error.message);
}); });
}, },

View File

@ -1,10 +1,10 @@
<template> <template>
<el-dialog :title="operation.title" :visible.sync="dialogShow" width="30%" :before-close="close"> <el-dialog :title="operation.title" :visible.sync="dialogShow" width="30%" :before-close="close">
<el-form ref="form" :model="operateModel" label-width="120px" :rules="rules" size="mini"> <el-form ref="form" :model="operateModel" label-width="120px" :rules="rules" size="mini">
<el-form-item label="实训名称:" prop="name"> <el-form-item :label="this.$t('lesson.trainingName')+':'" prop="name">
<el-input v-model="operateModel.name" /> <el-input v-model="operateModel.name" />
</el-form-item> </el-form-item>
<el-form-item label="产品类型:" prop="prdCode"> <el-form-item :label="this.$t('lesson.productType')" prop="prdCode">
<el-select v-model="operateModel.prdCode" placeholder="" :disabled="true"> <el-select v-model="operateModel.prdCode" placeholder="" :disabled="true">
<el-option <el-option
v-for="option in productTypesList" v-for="option in productTypesList"
@ -14,7 +14,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="实训类型:" prop="type"> <el-form-item :label="this.$t('lesson.trainingType')+':'" prop="type">
<el-select v-model="operateModel.type" placeholder="" :disabled="true"> <el-select v-model="operateModel.type" placeholder="" :disabled="true">
<el-option <el-option
v-for="option in trainTypesList" v-for="option in trainTypesList"
@ -24,7 +24,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="操作类型:"> <el-form-item :label="this.$t('lesson.operationType')+':'">
<el-select v-model="operateModel.operateType"> <el-select v-model="operateModel.operateType">
<el-option <el-option
v-for="(option, index) in operationList" v-for="(option, index) in operationList"
@ -34,24 +34,24 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="最小用时:" prop="minDuration"> <el-form-item :label="this.$t('lesson.minTime')" prop="minDuration">
<el-input-number v-model="operateModel.minDuration" :min="0" :max="10000" />s <el-input-number v-model="operateModel.minDuration" :min="0" :max="10000" />s
</el-form-item> </el-form-item>
<el-form-item label="最大用时:" prop="maxDuration"> <el-form-item :label="this.$t('lesson.maxTime')" prop="maxDuration">
<el-input-number v-model="operateModel.maxDuration" :min="0" :max="10000" />s <el-input-number v-model="operateModel.maxDuration" :min="0" :max="10000" />s
</el-form-item> </el-form-item>
<el-form-item label="实训说明:" prop="remarks"> <el-form-item :label="this.$t('lesson.trainingDescription')" prop="remarks">
<el-input <el-input
v-model="operateModel.remarks" v-model="operateModel.remarks"
type="textarea" type="textarea"
:autosize="{ minRows: 4, maxRows: 4}" :autosize="{ minRows: 4, maxRows: 4}"
placeholder="请输入内容" :placeholder="this.$t('rules.pleaseEnterContent')"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button> <el-button @click="handleClose">{{$t('global.cancel')}}</el-button>
<el-button type="primary" @click="handleDeal"> </el-button> <el-button type="primary" @click="handleDeal">{{$t('global.confirm')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -71,11 +71,11 @@ export default {
data() { data() {
var minDurations = (rule, value, callback) => { var minDurations = (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error('请输入标准用时')); return callback(new Error(this.$t('rules.enterStandardTime')));
} }
setTimeout(() => { setTimeout(() => {
if (!Number.isInteger(value)) { if (!Number.isInteger(value)) {
callback(new Error('请输入数字值')); callback(new Error(this.$t('rules.enterNumericValue')));
} else { } else {
callback(); callback();
} }
@ -83,14 +83,14 @@ export default {
}; };
var maxDurations = (rule, value, callback) => { var maxDurations = (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error('请输入标准用时')); return callback(new Error(this.$t('rules.enterStandardTime')));
} }
setTimeout(() => { setTimeout(() => {
if (!Number.isInteger(value)) { if (!Number.isInteger(value)) {
callback(new Error('请输入数字值')); callback(new Error(this.$t('rules.enterNumericValue')));
} else { } else {
if (value < this.operateModel.minDuration) { if (value < this.operateModel.minDuration) {
callback(new Error('必须大于最小时间')); callback(new Error(this.$t('rules.greaterThanMinTime')));
} else { } else {
callback(); callback();
} }
@ -120,7 +120,7 @@ export default {
}, },
rules: { rules: {
name: [ name: [
{ required: true, message: '请输入实训名称', trigger: 'change' } { required: true, message: this.$t('rules.inputTrainingName'), trigger: 'change' }
], ],
minDuration: [ minDuration: [
{ required: true, validator: minDurations, trigger: 'blur' } { required: true, validator: minDurations, trigger: 'blur' }
@ -129,7 +129,7 @@ export default {
{ required: true, validator: maxDurations, trigger: 'blur' } { required: true, validator: maxDurations, trigger: 'blur' }
], ],
remarks: [ remarks: [
{ required: true, message: '请输入实训说明', trigger: 'change' } { required: true, message: this.$t('rules.inputTrainingRemark'), trigger: 'change' }
] ]
} }
}; };
@ -216,7 +216,7 @@ export default {
this.operateModel.operateType = response.data.operateType; this.operateModel.operateType = response.data.operateType;
this.operateModel.remarks = response.data.remarks; this.operateModel.remarks = response.data.remarks;
}).catch(() => { }).catch(() => {
this.$messageBox('获取骤数据失败'); this.$messageBox(this.$t('error.obtainStepDataFailed'));
}); });
break; break;
} }
@ -271,9 +271,9 @@ export default {
addTraining(data).then(response => { addTraining(data).then(response => {
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']); this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']);
this.close(); this.close();
this.$message.success('添加实训成功!'); this.$message.success(this.$t('tip.addTrainingSuccessfully'));
}).catch(() => { }).catch(() => {
this.$messageBox('新增实训失败'); this.$messageBox(this.$t('tip.addTrainingFailed'));
}); });
} }
}); });
@ -295,9 +295,9 @@ export default {
updateTraining(data).then(response => { updateTraining(data).then(response => {
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']); this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('skinCode') || '']);
this.close(); this.close();
this.$message.success('更新实训成功!'); this.$message.success(this.$t('tip.updateTrainingSuccessfully'));
}).catch(() => { }).catch(() => {
this.$messageBox('更新实训失败'); this.$messageBox(this.$t('tip.updateTrainingFailed'));
}); });
} }
}); });

View File

@ -217,14 +217,14 @@ export default {
saveTrainingStepsData(model).then(response => { saveTrainingStepsData(model).then(response => {
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$message.success('保存步骤数据成功'); this.$message.success(this.$t('tip.savedStepDataSuccessfully'));
this.saveDisabled = false; this.saveDisabled = false;
}).catch(() => { }).catch(() => {
this.saveDisabled = false; this.saveDisabled = false;
this.$messageBox('保存步骤数据失败'); this.$messageBox(this.$t('tip.savedStepDataFailed'));
}); });
} else { } else {
this.$messageBox('请选择关联的车站'); this.$messageBox(this.$t('rules.selectAssociatedStation'));
} }
}); });
} }

View File

@ -148,9 +148,13 @@ export default {
/deep/{ /deep/{
.el-form-item__label{ .el-form-item__label{
text-align: left; text-align: left;
height: 30px;
line-height: 30px;
} }
.el-checkbox-group{ .el-checkbox-group{
width: 100%; width: 100%;
display: flex;
flex-wrap: wrap;
} }
} }
} }
@ -167,7 +171,7 @@ export default {
.title{ .title{
overflow: hidden; overflow: hidden;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
padding: 9px; padding: 8px 15px;
.fl-title{ .fl-title{
float: left; float: left;
} }
@ -190,10 +194,24 @@ export default {
.el-checkbox{ .el-checkbox{
margin-right: 10px; margin-right: 10px;
width: 75px; width: 75px;
height: 30px;
display: flex;
align-items: center;
} }
.el-form-item{ .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;
} }
} }
} }

View File

@ -315,9 +315,10 @@ export default {
float: right; float: right;
width: 520px; width: 520px;
/deep/ .el-scrollbar__view { // /deep/ .el-scrollbar__view {
width: 510px !important; // width: 510px !important;
} // height: calc(100% - 40px);
// }
} }
.physical-view { .physical-view {

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-data ref="make" :form="makeForm" :form-model="addModel" :rules="createRules" /> <config-data ref="make" :form="makeForm" :form-model="addModel" :rules="createRules" />
</el-scrollbar> </el-scrollbar>
@ -120,7 +120,7 @@ export default {
draw: { draw: {
name: this.$t('map.drawData'), name: this.$t('map.drawData'),
item: [ 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: 'name', label: this.$t('map.imageName'), type: 'input' },
{ prop: 'width', label: this.$t('map.imageWidth'), type: 'number', min: 0 }, { prop: 'width', label: this.$t('map.imageWidth'), type: 'number', min: 0 },
{ prop: 'height', label: this.$t('map.imageHeight'), type: 'number', min: 0 }, { prop: 'height', label: this.$t('map.imageHeight'), type: 'number', min: 0 },

View File

@ -59,7 +59,7 @@
</template> </template>
<template v-if="checkFieldType(item, 'input')"> <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-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> </el-form-item>
</template> </template>
<template v-if="checkFieldType(item, 'number')"> <template v-if="checkFieldType(item, 'number')">

View File

@ -62,7 +62,7 @@
</template> </template>
<template v-if="checkFieldType(item, 'input')"> <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-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> </el-form-item>
</template> </template>
<template v-if="checkFieldType(item, 'number')"> <template v-if="checkFieldType(item, 'number')">
@ -85,7 +85,7 @@
<template v-if="checkFieldType(item, 'radio')"> <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-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-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-radio-group>
</el-form-item> </el-form-item>
</template> </template>

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="120px" :model="addModel" :rules="createRules" size="mini"> <el-form ref="make" label-width="120px" :model="addModel" :rules="createRules" size="mini">
<el-form-item :label="$t('map.stationName')" prop="stationCode"> <el-form-item :label="$t('map.stationName')" prop="stationCode">

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="120px" :rules="createRules" :model="addModel" size="mini"> <el-form ref="make" label-width="120px" :rules="createRules" :model="addModel" size="mini">
<el-form-item :label="$t('map.stationName')" prop="stationCode"> <el-form-item :label="$t('map.stationName')" prop="stationCode">

View File

@ -74,46 +74,6 @@
@setCenter="setCenter" @setCenter="setCenter"
/> />
</el-tab-pane> </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"> <el-tab-pane :label="$t('map.station')" name="Station">
<station-draft <station-draft
ref="Station" ref="Station"
@ -144,6 +104,36 @@
@setCenter="setCenter" @setCenter="setCenter"
/> />
</el-tab-pane> </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"> <el-tab-pane :label="$t('map.counter')" name="Counter">
<counter-draft <counter-draft
ref="Counter" ref="Counter"
@ -204,6 +194,16 @@
@setCenter="setCenter" @setCenter="setCenter"
/> />
</el-tab-pane> </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-tabs>
</el-card> </el-card>
</div> </div>

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="150px" :rules="createRules" :model="addModel" size="mini"> <el-form ref="make" label-width="150px" :rules="createRules" :model="addModel" size="mini">
<el-form-item :label="$t('map.statusSignalName')" prop="name"> <el-form-item :label="$t('map.statusSignalName')" prop="name">
@ -138,7 +138,7 @@ export default {
draw: { draw: {
name: this.$t('map.drawData'), name: this.$t('map.drawData'),
item: [ 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: 'name', label: this.$t('map.statusSignalName'), type: 'input' },
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '150px', children: [ { 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 }, { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: false },

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" /> <config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
</el-scrollbar> </el-scrollbar>
@ -104,7 +104,7 @@ export default {
draw: { draw: {
name: this.$t('map.drawData'), name: this.$t('map.drawData'),
item: [ 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: 'name', label: this.$t('map.statusSignalName'), type: 'input' },
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [ { 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' }, { prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },

View File

@ -10,7 +10,7 @@
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button> <el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group> </el-button-group>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="120px" :model="addModel" size="mini" :rules="makeRules"> <el-form ref="make" label-width="120px" :model="addModel" size="mini" :rules="makeRules">
<el-form-item :label="$t('map.lineType')" prop="type"> <el-form-item :label="$t('map.lineType')" prop="type">

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="120px" :model="addModel" size="mini"> <el-form ref="make" label-width="120px" :model="addModel" size="mini">
<el-form-item :label="$t('map.linkType')"> <el-form-item :label="$t('map.linkType')">

View File

@ -12,9 +12,9 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" size="mini"> <el-form ref="make">
<el-form-item> <el-form-item>
<el-transfer <el-transfer
v-model="linksCollection" v-model="linksCollection"
@ -304,7 +304,6 @@ export default {
item: [ 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: '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: '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: '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', label: this.$t('map.sectionNameOffset'), type: 'coordinate', width: '150px', children: [
{ prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' }, { prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
@ -362,6 +361,7 @@ export default {
map: { map: {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ 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: '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: '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 }, { prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList },
@ -1387,4 +1387,26 @@ export default {
.view-control { .view-control {
overflow-y: auto; 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> </style>

View File

@ -11,7 +11,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="130px" :model="addModel" size="mini" :rules="mergeRules"> <el-form ref="make" label-width="130px" :model="addModel" size="mini" :rules="mergeRules">
<el-form-item :label="$t('map.physicalSegmentName')" prop="sectionCode"> <el-form-item :label="$t('map.physicalSegmentName')" prop="sectionCode">
@ -178,6 +178,15 @@ export default {
mergeRules: { mergeRules: {
sectionCode: [ sectionCode: [
{ required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' } { 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: [ item: [
{ prop: 'code', label: this.$t('map.signalCodeColon'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange }, { 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: '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: '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: '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 }, { prop: 'lampPositionType', label: this.$t('map.lampPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
@ -232,6 +240,7 @@ export default {
map: { map: {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ 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: '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: '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 }, { prop: 'potLampType', label: this.$t('map.potLampType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPotLampTypeList },

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="140px" :model="addModel" size="mini" :rules="mergeRules"> <el-form ref="make" label-width="140px" :model="addModel" size="mini" :rules="mergeRules">
<el-form-item :label="$t('map.physicalSegmentName')" prop="sectionCode"> <el-form-item :label="$t('map.physicalSegmentName')" prop="sectionCode">
@ -114,7 +114,6 @@ export default {
item: [ item: [
{ prop: 'code', label: this.$t('map.stationCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange }, { 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: '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: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
{ prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') }, { prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
{ prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' }, { prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' },
@ -130,6 +129,7 @@ export default {
map: { map: {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ 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: '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: 'centralized', label: this.$t('map.centralized'), type: 'checkbox' },
{ prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' } { prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' }

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" :model="addModel" label-width="120px" size="mini" :rules="makeRules"> <el-form ref="make" :model="addModel" label-width="120px" size="mini" :rules="makeRules">
<el-form-item :label="$t('map.stationName')" prop="stationCode"> <el-form-item :label="$t('map.stationName')" prop="stationCode">
@ -105,7 +105,6 @@ export default {
item: [ item: [
{ prop: 'code', label: this.$t('map.stationControlCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange }, { 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: '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: 'zokContent', label: this.$t('map.zokContent'), type: 'input' },
{ prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' }, { prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' }, { prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
@ -117,6 +116,7 @@ export default {
map: { map: {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ 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 } { prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList }
] ]
} }

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="140px" :model="addModel" :rules="createRules" size="mini"> <el-form ref="make" label-width="140px" :model="addModel" :rules="createRules" size="mini">
<el-form-item :label="$t('map.stationstandName')" prop="stationCode"> <el-form-item :label="$t('map.stationstandName')" prop="stationCode">
@ -135,7 +135,6 @@ export default {
item: [ item: [
{ prop: 'code', label: this.$t('map.relStandCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange }, { 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: '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: '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: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
{ prop: 'nameShow', label: this.$t('map.stationstandShowName'), type: 'checkbox' }, { prop: 'nameShow', label: this.$t('map.stationstandShowName'), type: 'checkbox' },
@ -150,6 +149,7 @@ export default {
map: { map: {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ 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 } { prop: 'stationCode', label: this.$t('map.belongsStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList }
] ]
} }

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make"> <el-form ref="make">
<el-form-item size="mini"> <el-form-item size="mini">
@ -110,7 +110,6 @@ export default {
item: [ item: [
{ prop: 'code', label: this.$t('map.switchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange }, { 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: '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: '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.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' }, { prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: this.$t('map.switchPositionY'), type: 'number', placeholder: 'px' },
@ -122,6 +121,7 @@ export default {
map: { map: {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ 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: '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: '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 }, { 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 { .el-transfer {
text-align: left; 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> </style>

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="110px" :model="addModel" size="mini" :rules="makeRules"> <el-form ref="make" label-width="110px" :model="addModel" size="mini" :rules="makeRules">
<el-form-item :label="$t('map.textContent')" prop="content"> <el-form-item :label="$t('map.textContent')" prop="content">
@ -106,6 +106,12 @@ export default {
], ],
content: [ content: [
{ required: true, message: this.$t('rules.pleaseEnterContent'), trigger: 'blur' } { 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' }
] ]
} }
}; };

View File

@ -12,14 +12,8 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-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 <el-transfer
v-model="sectionsCollection" v-model="sectionsCollection"
filterable filterable
@ -36,6 +30,14 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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> </el-tabs>
</div> </div>
</template> </template>
@ -257,42 +259,50 @@ export default {
return model; return model;
}, },
removeTrainWindow() { removeTrainWindow() {
const remove = []; this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
if (this.trainWindowList && this.trainWindowList.length) { confirmButtonText: this.$t('tip.confirm'),
this.trainWindowList.forEach(elem => { cancelButtonText: this.$t('tip.cancel'),
remove.push({ type: 'warning'
_type: 'TrainWindow', }).then(() => {
code: elem.code 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() { // createTrainWindow() {
const models = []; // const models = [];
const collection = this.sectionList; // const collection = this.sectionList;
this.removeTrainWindow(); // this.removeTrainWindow();
if (collection && collection.length) { // if (collection && collection.length) {
collection.forEach(elem => { // collection.forEach(elem => {
if (elem.type !== '03' && !elem.isSwitchSection && ( // if (elem.type !== '03' && !elem.isSwitchSection && (
elem.logicSectionNum.length == 0 || // elem.logicSectionNum.length == 0 ||
elem.logicSectionNum.length == 1 && elem.logicSectionNum[0] == 0)) { // elem.logicSectionNum.length == 1 && elem.logicSectionNum[0] == 0)) {
const triangle = new JTriangle(elem.points[0], elem.points[elem.points.length - 1]); // const triangle = new JTriangle(elem.points[0], elem.points[elem.points.length - 1]);
models.push(this.createModel({ // models.push(this.createModel({
triangle: triangle, // triangle: triangle,
section: elem // section: elem
})); // }));
} else if (elem.type === '03' && elem.isSwitchSection) { // } else if (elem.type === '03' && elem.isSwitchSection) {
models.push(this.createModel({ // models.push(this.createModel({
section: elem // section: elem
})); // }));
} // }
}); // });
} // }
this.$emit('addOrUpdateMapModel', models); // this.$emit('addOrUpdateMapModel', models);
}, // },
createTrainWindowByCollection() { createTrainWindowByCollection() {
const models = []; const models = [];
let remove = []; let remove = [];
@ -377,4 +387,26 @@ export default {
background: #f0f0f0; background: #f0f0f0;
overflow: hidden; 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> </style>

View File

@ -12,7 +12,7 @@
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" /> <config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
</el-scrollbar> </el-scrollbar>
@ -109,7 +109,7 @@ export default {
draw: { draw: {
name: this.$t('map.drawData'), name: this.$t('map.drawData'),
item: [ 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: 'name', label: this.$t('map.statusSignalName'), type: 'input' },
{ prop: 'visible', label: this.$t('map.showZc'), type: 'checkboxx' }, { prop: 'visible', label: this.$t('map.showZc'), type: 'checkboxx' },
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [ { prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [

View File

@ -18,9 +18,6 @@
:rules="newRules" :rules="newRules"
@submit.native.prevent @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-form-item :label="$t('map.skinName')" prop="skinCode">
<el-select v-model="newModel.skinCode" :placeholder="$t('map.pleaseSelect')"> <el-select v-model="newModel.skinCode" :placeholder="$t('map.pleaseSelect')">
<el-option <el-option
@ -31,6 +28,9 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('map.mapName')" prop="name">
<el-input v-model="newModel.name" />
</el-form-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('map.publishMapCreation')" name="second"> <el-tab-pane :label="$t('map.publishMapCreation')" name="second">
@ -42,7 +42,7 @@
label-width="140px" label-width="140px"
size="mini" 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-select v-model="pullModel.id" :placeholder="$t('map.pleaseSelect')">
<el-option <el-option
v-for="item in publishMapList" v-for="item in publishMapList"

View File

@ -42,13 +42,14 @@
@submit.native.prevent @submit.native.prevent
> >
<el-form-item :label="$t('map.offsetXColon')" :prop="'origin.x'"> <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>
<el-form-item :label="$t('map.offsetYColon')" :prop="'origin.y'"> <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>
<el-form-item :label="$t('map.scalingColon')" prop="scaling"> <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-item>
</el-form> </el-form>
</template> </template>
@ -64,7 +65,7 @@
<script> <script>
import { updateMap, getMapDetail } from '@/api/jmap/mapdraft'; import { updateMap, getMapDetail } from '@/api/jmap/mapdraft';
import { getSkinCodeList } from '@/api/management/mapskin'; import { getSkinCodeList } from '@/api/management/mapskin';
import { updateSkinCodeByCode } from '@/api/management/mapskin'; import { saveMap } from '@/api/jmap/mapdraft';
export default { export default {
name: 'MapEdit', name: 'MapEdit',
@ -124,11 +125,14 @@ export default {
}, },
updtRules() { updtRules() {
return { return {
linkWidth: [ 'origin.x': [
{ required: true, message: this.$t('rules.pleaseEnteMapLinkWidth'), trigger: 'blur' } { required: true, message: this.$t('map.enterXOffset'), trigger: 'blur' }
], ],
zoneWidth: [ 'origin.y': [
{ required: true, message: this.$t('rules.pleaseEnterMapSectionWidth'), trigger: 'blur' } { 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: { methods: {
show() { show() {
const dataZoom = this.$store.state.map.dataZoom; const dataZoom = this.$store.state.map.map.skinVO;
if (dataZoom) { if (dataZoom) {
this.updtModel.origin.x = Number.parseInt(dataZoom.offsetX); this.updtModel.origin.x = Number.parseInt(dataZoom.origin.x);
this.updtModel.origin.y = Number.parseInt(dataZoom.offsetY); this.updtModel.origin.y = Number.parseInt(dataZoom.origin.y);
this.updtModel.scaling = dataZoom.scaleRate; this.updtModel.scaling = dataZoom.scaling;
} }
this.dialogShow = true; this.dialogShow = true;
}, },
@ -197,15 +201,30 @@ export default {
}); });
} else { } else {
this.updtModel.code = this.skinCode; this.updtModel.code = this.skinCode;
const map = this.$store.state.map.map;
this.$refs['updt'].validate((valid) => { this.$refs['updt'].validate((valid) => {
if (valid) { if (valid) {
updateSkinCodeByCode(this.updtModel).then(response => { this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => {
this.loading = false; const param = {
this.close(); mapId: this.$route.params.mapId,
this.$message.success(this.$t('map.updateSuccessfully')); skinVO: {
}).catch(() => { code: this.$store.state.map.map.skinVO.code,
this.loading = false; name: this.$store.state.map.map.skinVO.name,
this.$messageBox(this.$t('map.updateFailed')); 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 { } else {
this.loading = false; this.loading = false;

View File

@ -179,7 +179,7 @@
launchFullscreen(); launchFullscreen();
}).catch(error => { }).catch(error => {
this.$messageBox(`创建仿真失败: ${error.message}`); this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
}) })
}, },
start() { start() {
@ -187,9 +187,9 @@
this.selectBeginTime(); this.selectBeginTime();
} else { } else {
if (this.tryTime <= 0) { if (this.tryTime <= 0) {
this.$confirm('您没有权限,请前往购买产品', '提示', { this.$confirm(this.$('tip.noPermissionHint'), this.$t('global.tips'), {
confirmButtonText: '确定', confirmButtonText: this.$t('global.confirm'),
cancelButtonText: '取消', cancelButtonText: this.$t('global.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.buy(); this.buy();

View File

@ -161,11 +161,13 @@ import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation, scr
// this.isSaveStage = true; // this.isSaveStage = true;
this.$parent.$refs['display'].$refs['menuScript'].resetBeginTime(); this.$parent.$refs['display'].$refs['menuScript'].resetBeginTime();
this.$refs["getAction"].loadInitData(); this.$refs["getAction"].loadInitData();
this.$refs["getAction"].$refs["addRole"].initData();
this.$refs["getAction"].$refs["addBehavior"].initData();
this.initAutoSaveScript(); this.initAutoSaveScript();
this.$store.dispatch('scriptRecord/updateBgSet',false); this.$store.dispatch('scriptRecord/updateBgSet',false);
this.$message.success('重置剧本成功'); this.$message.success('重置数据成功');
}).catch(error => { }).catch(error => {
this.$messageBox('重置剧本失败!'); this.$messageBox('重置数据失败!');
}) })
}).catch(error => { }).catch(error => {
this.initAutoSaveScript(); this.initAutoSaveScript();

View File

@ -1,8 +1,11 @@
<template> <template>
<div> <div>
<!-- <el-card class="scriptTop">
<add-role :group="group" ref="addRole"></add-role>
</el-card> -->
<el-card class="conversitionCard"> <el-card class="conversitionCard">
<div class="addConversition">添加对话</div> <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-form-item label="动作类型" class="conditionVO" prop="actionVO.type" >
<el-select v-model="modalData.actionVO.type " placeholder="请选择动作类型" @change="changeType" :disabled="deviceTypeReadOnly||isPause"> <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> <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>
<el-card class="commandCard"> <el-card class="commandCard">
<div class="addCommand">添加指令</div> <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-form-item label="执行者" class="conditionVO" prop="action.memberId">
<el-select v-model="commandData.action.memberId" placeholder="请选择执行者" :disabled="isPause" @change="changeRole"> <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> <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 DeviceTypeDic from '@/scripts/DeviceTypeDic';
// import CommandForm from "./commandForm"; // import CommandForm from "./commandForm";
import ConstConfig from '@/scripts/ConstConfig'; 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 { export default {
name: 'addAction', name: 'addAction',
props: { props: {
@ -88,14 +91,11 @@
required: true required: true
} }
}, },
// components:{
// CommandForm,
// },
watch:{ watch:{
'$store.state.socket.simulationStart': function (val) { '$store.state.socket.simulationStart': function (val) {
if(val) if(val)
{ {
this.initData(); this.$parent.$parent.$refs['addRole'].initData();
} }
}, },
'$store.state.map.mapViewLoadedCount': function (val) { '$store.state.map.mapViewLoadedCount': function (val) {
@ -186,7 +186,7 @@
}, },
methods:{ methods:{
initData(){ initData(){
getScriptMemberData(this.group).then(resp => { getScriptPlayMember(this.group).then(resp => {
let roleTypeList=ConstConfig.ConstSelect.roleType; let roleTypeList=ConstConfig.ConstSelect.roleType;
this.orginMemberList=resp.data; this.orginMemberList=resp.data;
let lastData=JSON.stringify(resp.data); let lastData=JSON.stringify(resp.data);
@ -197,6 +197,8 @@
lastData=JSON.parse(lastData); lastData=JSON.parse(lastData);
this.memberList=lastData; this.memberList=lastData;
this.getDeviceCode(); this.getDeviceCode();
this.resetDisabled();
this.initCommandActionData();
}).catch(error => {}) }).catch(error => {})
}, },
changeRole(index){ changeRole(index){
@ -234,6 +236,7 @@
this.adding=false; this.adding=false;
this.$message.success('添加指令成功'); this.$message.success('添加指令成功');
this.$emit('create',true); this.$emit('create',true);
this.$parent.$parent.$refs['addRole'].resetData([this.commandData.action.memberId]);
// this.initCommandActionData(); // this.initCommandActionData();
}).catch(error => { }).catch(error => {
this.adding=false; this.adding=false;
@ -261,6 +264,7 @@
this.$message.success('添加对话成功'); this.$message.success('添加对话成功');
this.$emit('create',true); this.$emit('create',true);
// this.initActionData(); // this.initActionData();
this.$parent.$parent.$refs['addRole'].resetData([this.modalData.actionVO.memberId,this.modalData.actionVO.targetId]);
}).catch(error => { }).catch(error => {
this.modifying=false; this.modifying=false;
this.$messageBox(`添加对话失败: ${error.message}`); this.$messageBox(`添加对话失败: ${error.message}`);
@ -276,7 +280,8 @@
this.$emit('modifyButtonName'); this.$emit('modifyButtonName');
this.$message.success('修改对话成功'); this.$message.success('修改对话成功');
this.$emit('create',false); this.$emit('create',false);
// this.initActionData(); // this.$parent.$parent.$refs['addRole'].resetData([this.modalData.action.memberId,this.modalData.action.targetId]);
this.initActionData();
}).catch(error => { }).catch(error => {
this.modifying=false; this.modifying=false;
this.$messageBox(`修改对话失败: ${error.message}`); this.$messageBox(`修改对话失败: ${error.message}`);
@ -333,7 +338,6 @@
break; break;
} }
} }
}, },
changeItem(){ changeItem(){
if(!(this.isPause&&this.isNotModify)) if(!(this.isPause&&this.isNotModify))
@ -349,7 +353,7 @@
this.clearValidate(); this.clearValidate();
this.isNotModify=false; this.isNotModify=false;
this.$parent.$parent.$parent.setDisabled(this.isNotModify); this.$parent.$parent.$parent.setDisabled(this.isNotModify);
this.initData(); // this.initData();
this.modalData.actionVO.id=data.id; this.modalData.actionVO.id=data.id;
this.modalData.actionVO.memberId=data.memberId; this.modalData.actionVO.memberId=data.memberId;
this.modalData.actionVO.type=data.type; this.modalData.actionVO.type=data.type;
@ -423,18 +427,18 @@
padding: 20px 10px; padding: 20px 10px;
} }
.itemGroup{ .itemGroup{
width:310px; width:290px;
float:left; float:left;
} }
.changeGroup{ .changeGroup{
display:inline-block; display:inline-block;
} }
.changeTop{ .changeTop{
margin-top: 15px; margin-top: 10px;
width: 25px; width: 25px;
border-top: 1px #c0c4cc solid; border-top: 1px #c0c4cc solid;
border-right: 1px #c0c4cc solid; border-right: 1px #c0c4cc solid;
height: 20px; height: 15px;
} }
.changeItem{ .changeItem{
margin-left: 15px; margin-left: 15px;
@ -446,6 +450,11 @@
width: 25px; width: 25px;
border-bottom: 1px #c0c4cc solid; border-bottom: 1px #c0c4cc solid;
border-right: 1px #c0c4cc solid; border-right: 1px #c0c4cc solid;
height: 20px; height: 15px;
}
.scriptTop{
margin-left: 20px;
padding: 15px 0px 30px 0px;
width: 360px;
} }
</style> </style>

View 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>

View File

@ -4,41 +4,53 @@
<span class="titleStyle">剧本编制</span> <span class="titleStyle">剧本编制</span>
</div> </div>
<div class="tab-pane-big"> <div class="tab-pane-big">
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elScrollbar" class="elScrollbar"> <el-card class="scriptTop">
<add-action ref="addBehavior" :group="group" @create="create" :buttonName="buttonName" :operateType="operateType" @modifyButtonName="modifyButtonName" class="addScript"></add-action> <add-role :group="group" ref="addRole"></add-role>
</el-scrollbar> </el-card>
<!-- <div class="vertialLine"></div> --> <div class="scriptPane">
<div class="block actionListTable"> <!-- <el-card class="scriptTop">
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar"> <template>
<el-timeline :reverse="reverse" class="el_timeline"> <div class="selectRole">选择角色</div>
<el-timeline-item v-for="(actionInfo,index) in actionInfoList" :key="index"> <el-transfer v-model="selectRoleData" :data="allRoleData" class="elTransfer" :titles="['待选成员角色', '已选成员角色']"></el-transfer>
<el-card> </template>
<div class="actionTable"> </el-card> -->
<span class="detail" v-html="actionInfo.detail"> <div class="scriptBottom">
</span> <el-scrollbar wrapClass="scrollbar-wrapper" ref="elScrollbar" class="elScrollbar">
<span class="otherInfo" v-html="actionInfo.otherInfo"></span> <add-action ref="addBehavior" :group="group" @create="create" :buttonName="buttonName" :operateType="operateType" @modifyButtonName="modifyButtonName" class="addScript"></add-action>
<span v-if="actionInfo.isCoversition"> </el-scrollbar>
<span class="roleClass">{{actionInfo.memberName}}</span> <div class="block actionListTable">
<span></span> <el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar">
<span class="roleClass">{{actionInfo.targetName}}</span> <el-timeline :reverse="reverse" class="el_timeline">
<span>: </span> <el-timeline-item v-for="(actionInfo,index) in actionInfoList" :key="index">
<span>{{actionInfo.reply}}</span> <el-card>
</span> <div class="actionTable">
<span v-else> <span class="detail" v-html="actionInfo.detail">
<span class="roleClass">{{actionInfo.memberName}}</span> </span>
<span>执行指令: </span> <span class="otherInfo" v-html="actionInfo.otherInfo"></span>
<span class="commandStyle">{{actionInfo.command}}</span> <span v-if="actionInfo.isCoversition">
</span> <span class="roleClass">{{actionInfo.memberName}}</span>
</div> <span></span>
<div class="btnGroup"> <span class="roleClass">{{actionInfo.targetName}}</span>
<el-button type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)" v-if="actionInfo.visible">修改</el-button> <span>: </span>
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> --> <span>{{actionInfo.reply}}</span>
</div> </span>
</el-card> <span v-else>
</el-timeline-item> <span class="roleClass">{{actionInfo.memberName}}</span>
</el-timeline> <span>执行指令: </span>
</el-scrollbar> <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> </div>
</div> </div>
@ -46,7 +58,8 @@
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import AddAction from './addAction'; 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'; import ConstConfig from '@/scripts/ConstConfig';
export default { export default {
name: 'getAction', name: 'getAction',
@ -71,6 +84,7 @@
}, },
components: { components: {
AddAction, AddAction,
AddRole
}, },
mounted(){ mounted(){
this.loadInitData(); this.loadInitData();
@ -179,7 +193,7 @@
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.actionPaneInner{ .actionPaneInner{
height:100%; height:100%;
padding-top:70px; padding-top:45px;
} }
.addScript{ .addScript{
float:left; float:left;
@ -194,14 +208,12 @@
height:100%; height:100%;
} }
.actionList{ .actionList{
padding-top: 20px; height: 35px;
margin-left: 20px; font-size: 18px;
font-size: 15px; padding-top: 5px;
padding-bottom: 15px;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
margin-right: 20px;
width: 740px; width: 740px;
border-bottom: 1px #ccc solid; border-bottom: 1px #ccc solid;
} }
@ -246,4 +258,27 @@
.commandStyle{ .commandStyle{
color:#F00; 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> </style>