接口调整

This commit is contained in:
joylink_cuiweidong 2019-10-30 19:36:29 +08:00
parent 2d8547182b
commit de76904dfc
11 changed files with 250 additions and 277 deletions

View File

@ -90,9 +90,9 @@ export function deleteOperateStepData(id) {
/**
* 批量生成操作列表
*/
export function addTrainingRulesList(skinCode, data) {
export function addTrainingRulesList(mapId, data) {
return request({
url: `/api/operate/${skinCode}/generate`,
url: `/api/operate/${mapId}/generate`,
method: 'post',
data: data
});

View File

@ -1,105 +1,106 @@
export default {
refreshFailed: 'Refresh failed',
createSimulationFailed: 'Failure to create simulation',
loadMapDataFailed: 'Failed to load map data',
getMapStepsFailed: 'Failed to get map step data',
getMapDetailFailed: 'Failed to get map detail',
resetFailed: 'Reset failure',
startTrainingFailed: 'Failure to start training',
saveBackgroundFailed: 'Failed to save background',
deleteFailed: 'Failed to delete',
exportFailed: 'Export Execution Exceptions',
getListFailed: 'Failed to retrieve list data',
getDistributeQrcodeFailed: 'Failure to obtain permission to distribute two-dimensional code',
obtainMaxNumberFailed: 'Failed to obtain the maximum number of user privileges',
getTransferQrcodeFailed: 'Failure to obtain permission to transfer two-dimensional code',
requestFailed: 'Failed to request',
transferredQRCodeFailed: 'Failed to acquiring transferred qrcode',
loadingDataFailed: 'Failed to loading data',
addingFailure: 'Failure to add',
cancelled: 'Cancelled',
getItemListFailed: 'Failed to get the item list',
getItemDetailFailed: 'Failed to obtain product details',
getMapProductListFailed: 'Failed to get map product list',
getLessonListFailed: 'Failed to get product course list',
remoteQueryError: 'Remote query error',
obtainOperationGraphFailed: 'Failed to obtain operation graph data',
obtainStationListFailed: 'Failed to get station list',
loadingOperationGraphFailed: 'Failed to load operation graph data',
cannotPublished: 'Data in creation cannot be published',
cannotDeleted: 'Deletion cannot be done while creating',
refreshOperationGraphFailed: 'Failed to refresh the running diagram list',
getSpeedLevelFailed: 'Failed to get speed level',
speedRatingExists: 'The speed rating already exists',
createSpeedLevelFailed: 'Failed to create speed level',
createOperationGraphFailed: 'Failed to create operation diagram',
loadingCityListFailed: 'Failed to load city list',
cannotNarrowDown: 'You cannot narrow down the training list you created last time',
scanningError: 'Scanning error',
serviceException: 'Service exception',
codeHasExist: 'Coding already exists',
formartError: 'The format is incorrect, only characters/numbers/_',
createDictionaryFailed: 'Failed to create dictionary',
updateDictionaryFailed: 'Failed to update dictionary',
createDetailFailed: 'Failed to create details',
updateDetailFailed: 'Failed to update details',
addFailed: 'Failure to add',
updateFailed: 'Failure to update',
exportException: 'Export exception',
operationFailure: 'Operation Failure',
createCommonRunPlanFailed: 'Failed to create a common run plan',
templateHasBeUse: 'The template has been used by the load plan and cannot be deleted',
setFailed: 'Setup failed',
deleteException: 'To remove exceptions, contact your administrator',
paperHasUseNotDel: 'The paper has been used and cannot be deleted',
batchCreateFailed: 'Batch build operation definition failed',
createOperateRuleFailed: 'Failed to create operation definition',
createOperateStepFailed: 'The create action step failed',
updateOperateStepFailed: 'The update action step failed',
packagePermissionFailed: 'Packaging authority failed',
acquisitionTimeFailed: 'Acquisition Time Failed',
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',
submitExamFailed: 'Automatic submission of test results failed',
getTestInformationFailed: 'Failed to get test information',
gifSource: 'gif source',
page: 'page',
noPermissionToGoToThisPage: 'You don\'t have permission to go to this page',
dissatisfied: 'If you are dissatisfied, please contact your leader.',
orYouCanGo: 'Or you can go:',
backToHome: 'Back to home',
justLookingAround: 'Just looking around',
pointMeToSeeThePicture: 'Point me to see the picture',
casualLook: 'Casual look',
problemWithAudioQuality: 'There is a problem with audio quality',
audioIsTooLong: 'The audio is too long, it is recommended to be below 60s',
audioIsTooShort: 'The audio is too short, it is recommended to re-record',
networkProblem: 'Network problem, please try again',
initializationFailed: 'Initialization failed:',
getMapDataFailed: 'Failed to get map data',
ibpNoDraw: 'Unbound station or the station IBP disk is not drawn yet',
startSimulationFailed: 'Start simulation failed, please go back and try again',
endSimulationFailed: 'End simulation failed, please return',
runGraphIsNotLoaded: 'Today\'s run graph is not loaded',
startedComprehensiveDrillFailure: 'Started a comprehensive drill failure.',
stationAttendantStationCannotBeEmpty: 'Station attendant station cannot be empty',
destroyedRoomFailed: 'Destroyed room failed!',
exceededTheTotalNumberOfAssignableRoles: 'The number of assigned roles has exceeded the total number of assignable roles!',
getRunGraphDataFailed: 'Failed to get run graph data',
getStationListFail: 'Failed to get station list',
obtainTrainGroupNumberFailed: 'Failed to obtain train group number',
getTrainListFailed: 'Failed to get train list',
getDraftCourseDataFailed: 'Failed to get draft course data!',
failedToGetCourseData: 'Failed to get course data!',
failedToGetSystemData: 'Failed to get system data!',
inquiryPLCDeviceFailed: 'Inquiry PLC device failed!',
getScreenDoorsListFailed: 'Get the list of screen doors failed!',
theDeviceTypeAlreadyExists: 'The device type already exists!',
connectToRealDeviceFailed: 'Connect to real device failed!',
getRealDeviceListFailed: 'Get real device list failed!',
deleteRealDeviceFailed: 'Delete real device failed!',
checkTheValidityFirst: 'Please check the validity first!'
refreshFailed: 'Refresh failed',
createSimulationFailed: 'Failure to create simulation',
loadMapDataFailed: 'Failed to load map data',
getMapStepsFailed: 'Failed to get map step data',
getMapDetailFailed: 'Failed to get map detail',
resetFailed: 'Reset failure',
startTrainingFailed: 'Failure to start training',
saveBackgroundFailed: 'Failed to save background',
deleteFailed: 'Failed to delete',
exportFailed: 'Export Execution Exceptions',
getListFailed: 'Failed to retrieve list data',
getDistributeQrcodeFailed: 'Failure to obtain permission to distribute two-dimensional code',
obtainMaxNumberFailed: 'Failed to obtain the maximum number of user privileges',
getTransferQrcodeFailed: 'Failure to obtain permission to transfer two-dimensional code',
requestFailed: 'Failed to request',
transferredQRCodeFailed: 'Failed to acquiring transferred qrcode',
loadingDataFailed: 'Failed to loading data',
addingFailure: 'Failure to add',
cancelled: 'Cancelled',
getItemListFailed: 'Failed to get the item list',
getItemDetailFailed: 'Failed to obtain product details',
getMapProductListFailed: 'Failed to get map product list',
getLessonListFailed: 'Failed to get product course list',
remoteQueryError: 'Remote query error',
obtainOperationGraphFailed: 'Failed to obtain operation graph data',
obtainStationListFailed: 'Failed to get station list',
loadingOperationGraphFailed: 'Failed to load operation graph data',
cannotPublished: 'Data in creation cannot be published',
cannotDeleted: 'Deletion cannot be done while creating',
refreshOperationGraphFailed: 'Failed to refresh the running diagram list',
getSpeedLevelFailed: 'Failed to get speed level',
speedRatingExists: 'The speed rating already exists',
createSpeedLevelFailed: 'Failed to create speed level',
createOperationGraphFailed: 'Failed to create operation diagram',
loadingCityListFailed: 'Failed to load city list',
cannotNarrowDown: 'You cannot narrow down the training list you created last time',
scanningError: 'Scanning error',
serviceException: 'Service exception',
codeHasExist: 'Coding already exists',
formartError: 'The format is incorrect, only characters/numbers/_',
createDictionaryFailed: 'Failed to create dictionary',
updateDictionaryFailed: 'Failed to update dictionary',
createDetailFailed: 'Failed to create details',
updateDetailFailed: 'Failed to update details',
addFailed: 'Failure to add',
updateFailed: 'Failure to update',
exportException: 'Export exception',
operationFailure: 'Operation Failure',
createCommonRunPlanFailed: 'Failed to create a common run plan',
templateHasBeUse: 'The template has been used by the load plan and cannot be deleted',
setFailed: 'Setup failed',
deleteException: 'To remove exceptions, contact your administrator',
paperHasUseNotDel: 'The paper has been used and cannot be deleted',
batchCreateFailed: 'Batch build operation definition failed',
createOperateRuleFailed: 'Failed to create operation definition',
updateOperateRuleFailed:'Failed to update operation definition',
createOperateStepFailed: 'The create action step failed',
updateOperateStepFailed: 'The update action step failed',
packagePermissionFailed: 'Packaging authority failed',
acquisitionTimeFailed: 'Acquisition Time Failed',
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',
submitExamFailed: 'Automatic submission of test results failed',
getTestInformationFailed: 'Failed to get test information',
gifSource: 'gif source',
page: 'page',
noPermissionToGoToThisPage: 'You don\'t have permission to go to this page',
dissatisfied: 'If you are dissatisfied, please contact your leader.',
orYouCanGo: 'Or you can go:',
backToHome: 'Back to home',
justLookingAround: 'Just looking around',
pointMeToSeeThePicture: 'Point me to see the picture',
casualLook: 'Casual look',
problemWithAudioQuality: 'There is a problem with audio quality',
audioIsTooLong: 'The audio is too long, it is recommended to be below 60s',
audioIsTooShort: 'The audio is too short, it is recommended to re-record',
networkProblem: 'Network problem, please try again',
initializationFailed: 'Initialization failed:',
getMapDataFailed: 'Failed to get map data',
ibpNoDraw: 'Unbound station or the station IBP disk is not drawn yet',
startSimulationFailed: 'Start simulation failed, please go back and try again',
endSimulationFailed: 'End simulation failed, please return',
runGraphIsNotLoaded: 'Today\'s run graph is not loaded',
startedComprehensiveDrillFailure: 'Started a comprehensive drill failure.',
stationAttendantStationCannotBeEmpty: 'Station attendant station cannot be empty',
destroyedRoomFailed: 'Destroyed room failed!',
exceededTheTotalNumberOfAssignableRoles: 'The number of assigned roles has exceeded the total number of assignable roles!',
getRunGraphDataFailed: 'Failed to get run graph data',
getStationListFail: 'Failed to get station list',
obtainTrainGroupNumberFailed: 'Failed to obtain train group number',
getTrainListFailed: 'Failed to get train list',
getDraftCourseDataFailed: 'Failed to get draft course data!',
failedToGetCourseData: 'Failed to get course data!',
failedToGetSystemData: 'Failed to get system data!',
inquiryPLCDeviceFailed: 'Inquiry PLC device failed!',
getScreenDoorsListFailed: 'Get the list of screen doors failed!',
theDeviceTypeAlreadyExists: 'The device type already exists!',
connectToRealDeviceFailed: 'Connect to real device failed!',
getRealDeviceListFailed: 'Get real device list failed!',
deleteRealDeviceFailed: 'Delete real device failed!',
checkTheValidityFirst: 'Please check the validity first!'
};

View File

@ -1,105 +1,106 @@
export default {
refreshFailed: '刷新失败',
createSimulationFailed: '创建仿真失败',
loadMapDataFailed: '加载地图数据失败',
getMapStepsFailed: '获取地图步骤数据失败',
getMapDetailFailed: '获取地图详细信息失败',
resetFailed: '重置失败',
startTrainingFailed: '开始实训失败',
saveBackgroundFailed: '保存背景失败',
deleteFailed: '删除失败',
exportFailed: '导出执行异常',
getListFailed: '获取列表数据失败',
getDistributeQrcodeFailed: '获取权限分发二维码失败',
obtainMaxNumberFailed: '获取用户最大权限个数失败',
getTransferQrcodeFailed: '获取权限转赠二维码失败',
requestFailed: '请求失败',
transferredQRCodeFailed: '获取转赠二维码失败',
loadingDataFailed: '加载数据错误',
addingFailure: '加载失败',
cancelled: '已取消',
getItemListFailed: '获取商品列表失败',
getItemDetailFailed: '获取商品详情失败',
getMapProductListFailed: '获取地图产品列表失败',
getLessonListFailed: '获取产品课程列表失败',
remoteQueryError: '远程查询失败',
obtainOperationGraphFailed: '获取运行图数据失败',
obtainStationListFailed: '获取车站列表失败',
loadingOperationGraphFailed: '加载运行图数据失败',
cannotPublished: '创建中的数据不能发布',
cannotDeleted: '正创建中不能做删除操作',
refreshOperationGraphFailed: '刷新运行图列表失败',
getSpeedLevelFailed: '获取速度等级失败',
speedRatingExists: '速度等级已存在',
createSpeedLevelFailed: '创建速度等级失败',
createOperationGraphFailed: '创建运行图失败',
loadingCityListFailed: '加载城市列表失败',
cannotNarrowDown: '不能缩小上次创建的实训列表的范围',
scanningError: '扫码错误',
serviceException: '服务异常',
codeHasExist: '编码已存在',
formartError: '格式不正确,只能是字符/数字/_',
createDictionaryFailed: '创建字典失败',
updateDictionaryFailed: '更新字典失败',
createDetailFailed: '创建明细失败',
updateDetailFailed: '更新明细失败',
addFailed: '添加失败',
updateFailed: '更新失败',
exportException: '导出异常',
operationFailure: '操作失败',
createCommonRunPlanFailed: '创建通用运行图失败',
templateHasBeUse: '该模板已被加载计划使用,无法删除',
setFailed: '设置失败',
deleteException: '删除异常,请联系管理员',
paperHasUseNotDel: '该试卷已被使用,不能删除',
batchCreateFailed: '批量生成操作定义失败',
createOperateRuleFailed: '创建操作定义失败',
createOperateStepFailed: '创建操作步骤失败',
updateOperateStepFailed: '更新操作步骤失败',
packagePermissionFailed: '打包权限失败',
acquisitionTimeFailed: '获取时间失败',
getProductListFailed: '获取产品列表失败',
obtainChapterDataFailed: '获取章节数据失败',
obtainCourseDetailsFailed: '获取课程详情失败',
obtainCourseInformationFailed: '获取课程信息失败',
obtainStepDataFailed: '获取步骤数据失败',
submitExamFailed: '自动提交考试结果失败',
getTestInformationFailed: '获取试题息失败',
gifSource: 'gif来源',
page: '页面',
noPermissionToGoToThisPage: '你没有权限去该页面',
dissatisfied: '如有不满请联系你领导',
orYouCanGo: '或者你可以去:',
backToHome: '回首页',
justLookingAround: '随便看看',
pointMeToSeeThePicture: '点我看图',
casualLook: '随便看',
problemWithAudioQuality: '音频质量有问题',
audioIsTooLong: '音频过长,建议60s以下',
audioIsTooShort: '音频太短,建议重录',
networkProblem: '网络问题,请重试',
initializationFailed: '初始化失败:',
getMapDataFailed: '获取地图数据失败',
ibpNoDraw: '未绑定车站或该车站IBP盘暂未绘制',
startSimulationFailed: '开始仿真失败,请返回重试',
endSimulationFailed: '结束仿真失败,请返回',
runGraphIsNotLoaded: '今日运行图未加载',
startedComprehensiveDrillFailure: '开始综合演练失败。',
stationAttendantStationCannotBeEmpty: '值班员所属车站不能为空',
destroyedRoomFailed: '销毁房间失败!',
exceededTheTotalNumberOfAssignableRoles: '分配角色数量已超过可分配角色总数!',
getRunGraphDataFailed: '获取运行图数据失败',
getStationListFail: '获取车站列表失败',
obtainTrainGroupNumberFailed: '获取列车车组号失败',
getTrainListFailed: '获取列车列表失败',
getDraftCourseDataFailed: '获取草稿课程数据失败!',
failedToGetCourseData: '获取课程数据失败!',
failedToGetSystemData: '获取系统数据失败!',
inquiryPLCDeviceFailed: '查询PLC设备失败',
getScreenDoorsListFailed: '获取屏蔽门列表失败!',
theDeviceTypeAlreadyExists: '已存在该设备类型!',
connectToRealDeviceFailed: '关联真实设备失败!',
getRealDeviceListFailed: '获取真实设备列表失败!',
deleteRealDeviceFailed: '删除真实设备失败!',
checkTheValidityFirst: '请先进行有效性检查!'
refreshFailed: '刷新失败',
createSimulationFailed: '创建仿真失败',
loadMapDataFailed: '加载地图数据失败',
getMapStepsFailed: '获取地图步骤数据失败',
getMapDetailFailed: '获取地图详细信息失败',
resetFailed: '重置失败',
startTrainingFailed: '开始实训失败',
saveBackgroundFailed: '保存背景失败',
deleteFailed: '删除失败',
exportFailed: '导出执行异常',
getListFailed: '获取列表数据失败',
getDistributeQrcodeFailed: '获取权限分发二维码失败',
obtainMaxNumberFailed: '获取用户最大权限个数失败',
getTransferQrcodeFailed: '获取权限转赠二维码失败',
requestFailed: '请求失败',
transferredQRCodeFailed: '获取转赠二维码失败',
loadingDataFailed: '加载数据错误',
addingFailure: '加载失败',
cancelled: '已取消',
getItemListFailed: '获取商品列表失败',
getItemDetailFailed: '获取商品详情失败',
getMapProductListFailed: '获取地图产品列表失败',
getLessonListFailed: '获取产品课程列表失败',
remoteQueryError: '远程查询失败',
obtainOperationGraphFailed: '获取运行图数据失败',
obtainStationListFailed: '获取车站列表失败',
loadingOperationGraphFailed: '加载运行图数据失败',
cannotPublished: '创建中的数据不能发布',
cannotDeleted: '正创建中不能做删除操作',
refreshOperationGraphFailed: '刷新运行图列表失败',
getSpeedLevelFailed: '获取速度等级失败',
speedRatingExists: '速度等级已存在',
createSpeedLevelFailed: '创建速度等级失败',
createOperationGraphFailed: '创建运行图失败',
loadingCityListFailed: '加载城市列表失败',
cannotNarrowDown: '不能缩小上次创建的实训列表的范围',
scanningError: '扫码错误',
serviceException: '服务异常',
codeHasExist: '编码已存在',
formartError: '格式不正确,只能是字符/数字/_',
createDictionaryFailed: '创建字典失败',
updateDictionaryFailed: '更新字典失败',
createDetailFailed: '创建明细失败',
updateDetailFailed: '更新明细失败',
addFailed: '添加失败',
updateFailed: '更新失败',
exportException: '导出异常',
operationFailure: '操作失败',
createCommonRunPlanFailed: '创建通用运行图失败',
templateHasBeUse: '该模板已被加载计划使用,无法删除',
setFailed: '设置失败',
deleteException: '删除异常,请联系管理员',
paperHasUseNotDel: '该试卷已被使用,不能删除',
batchCreateFailed: '批量生成操作定义失败',
createOperateRuleFailed: '创建操作定义失败',
updateOperateRuleFailed:'更新操作定义失败',
createOperateStepFailed: '创建操作步骤失败',
updateOperateStepFailed: '更新操作步骤失败',
packagePermissionFailed: '打包权限失败',
acquisitionTimeFailed: '获取时间失败',
getProductListFailed: '获取产品列表失败',
obtainChapterDataFailed: '获取章节数据失败',
obtainCourseDetailsFailed: '获取课程详情失败',
obtainCourseInformationFailed: '获取课程信息失败',
obtainStepDataFailed: '获取步骤数据失败',
submitExamFailed: '自动提交考试结果失败',
getTestInformationFailed: '获取试题息失败',
gifSource: 'gif来源',
page: '页面',
noPermissionToGoToThisPage: '你没有权限去该页面',
dissatisfied: '如有不满请联系你领导',
orYouCanGo: '或者你可以去:',
backToHome: '回首页',
justLookingAround: '随便看看',
pointMeToSeeThePicture: '点我看图',
casualLook: '随便看',
problemWithAudioQuality: '音频质量有问题',
audioIsTooLong: '音频过长,建议60s以下',
audioIsTooShort: '音频太短,建议重录',
networkProblem: '网络问题,请重试',
initializationFailed: '初始化失败:',
getMapDataFailed: '获取地图数据失败',
ibpNoDraw: '未绑定车站或该车站IBP盘暂未绘制',
startSimulationFailed: '开始仿真失败,请返回重试',
endSimulationFailed: '结束仿真失败,请返回',
runGraphIsNotLoaded: '今日运行图未加载',
startedComprehensiveDrillFailure: '开始综合演练失败。',
stationAttendantStationCannotBeEmpty: '值班员所属车站不能为空',
destroyedRoomFailed: '销毁房间失败!',
exceededTheTotalNumberOfAssignableRoles: '分配角色数量已超过可分配角色总数!',
getRunGraphDataFailed: '获取运行图数据失败',
getStationListFail: '获取车站列表失败',
obtainTrainGroupNumberFailed: '获取列车车组号失败',
getTrainListFailed: '获取列车列表失败',
getDraftCourseDataFailed: '获取草稿课程数据失败!',
failedToGetCourseData: '获取课程数据失败!',
failedToGetSystemData: '获取系统数据失败!',
inquiryPLCDeviceFailed: '查询PLC设备失败',
getScreenDoorsListFailed: '获取屏蔽门列表失败!',
theDeviceTypeAlreadyExists: '已存在该设备类型!',
connectToRealDeviceFailed: '关联真实设备失败!',
getRealDeviceListFailed: '获取真实设备列表失败!',
deleteRealDeviceFailed: '删除真实设备失败!',
checkTheValidityFirst: '请先进行有效性检查!'
};

View File

@ -43,7 +43,7 @@ export default {
wellClearOperate: '此操作将清空改皮肤下所有操作定义, 是否继续?',
batchCreateSuccess: '批量生成操作定义成功',
createOperateSuccess: '创建操作定义成功',
updateOperateSuccess: '更新操作步骤成功',
updateOperateSuccess: '更新操作定义成功',
wellDelOperate: '此操作将删除此实训步骤, 是否继续?',
operateCode: '操作码',
stepReturn: '步骤返回值',

View File

@ -27,7 +27,7 @@ export default {
loading: false,
dialogVisible: false,
formModel: {
skinCode: this.$route.query.skinCode
skinCode: this.$route.query.mapId
},
skinCodeList: [],
isShow: false
@ -117,8 +117,8 @@ export default {
const self = this;
this.loading = true;
addTrainingRulesList(
this.formModel.skinCode,
OperationList[this.formModel.skinCode].list
this.formModel.mapId,
OperationList[this.formModel.mapId].list
)
.then(response => {
self.loading = false;
@ -135,7 +135,7 @@ export default {
},
handleClose() {
this.formModel = {
skinCode: this.$route.query.skinCode
skinCode: this.$route.query.mapId
};
this.$refs.dataform.resetForm();
this.isShow = false;

View File

@ -10,7 +10,7 @@
<script>
import { postTrainingRulesData, putTrainingRulesData, getPlaceholderList } from '@/api/management/operation';
import { getSkinCodeList } from '@/api/management/mapskin';
import { listPublishMap } from '@/api/jmap/map';
export default {
name: 'TrainingEdit',
@ -28,13 +28,13 @@ export default {
trainingName: '',
trainingType: '',
operateType: '',
skinCode: '',
mapId: '',
minDuration: '',
maxDuration: '',
trainingRemark: '',
productTypes: []
},
skinCodeList: [],
mapIdList: [],
trainingTypeList: [],
trainingOperateTypeMap: {},
placeholderList: []
@ -46,13 +46,13 @@ export default {
const form = {
labelWidth: '120px',
items: [
{ prop: 'skinCode', label: this.$t('lesson.skinType'), type: 'select', required: true, options: this.skinCodeList, disabled: true },
{ prop: 'mapId', label: this.$t('lesson.mapName'), type: 'select', required: true, options: this.mapIdList, disabled: true },
{ prop: 'trainingType', label: this.$t('lesson.trainingType'), type: 'select', required: true, options: this.trainingTypeList, disabled: !isAdd, change: true, onChange: this.changeList },
{ prop: 'operateType', label: this.$t('lesson.operationType'), type: 'select', required: true, options: this.trainingOperateTypeMap[this.formModel.trainingType], disabled: !isAdd },
{ label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainName },
{ prop: 'trainingName', label: this.$t('lesson.trainingName'), type: 'text', required: true, rightWidth: true, tooltip: true, info: this.$t('lesson.tipNamePlaceholderInfo') },
{ prop: 'minDuration', label: this.$t('lesson.minDuration'), type: 'text', required: true },
{ prop: 'maxDuration', label: this.$t('lesson.maxDuration'), type: 'text', required: true },
{ prop: 'minDuration', label: this.$t('lesson.minDuration'), type: 'number', required: true, min:1},
{ prop: 'maxDuration', label: this.$t('lesson.maxDuration'), type: 'number', required: true, min:1},
{ label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainRemark },
{ prop: 'trainingRemark', label: this.$t('lesson.trainingRemark'), type: 'textarea', required: true, tooltip: true, info: this.$t('lesson.tipExplainPlaceholderInfo') }
]
@ -70,8 +70,8 @@ export default {
operateType: [
{ required: true, message: this.$t('rules.inputOperationType'), trigger: 'change' }
],
skinCode: [
{ required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' }
mapId: [
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
],
minDuration: [
{ required: true, message: this.$t('rules.inputMinDuration'), trigger: 'blur' }
@ -98,13 +98,13 @@ export default {
},
methods: {
init() {
//
this.skinCodeList = [];
getSkinCodeList().then(response => {
this.skinCodeList = response.data.map(item => {
//
this.mapIdList = [];
listPublishMap().then(response => {
this.mapIdList = response.data.map(item => {
const params = {};
params.label = item.name;
params.value = item.code;
params.value = item.id;
return params;
});
});
@ -184,7 +184,7 @@ export default {
this.dialogVisible = true;
if (data && data.id) {
//
const res = await getPlaceholderList({ trainingType: data.trainingType, skinCode: data.skinCode });
const res = await getPlaceholderList({ trainingType: data.trainingType });
this.placeholderList = res.data;
this.formModel = {
id: data.id,
@ -192,14 +192,14 @@ export default {
trainingType: data.trainingType,
operateType: data.operateType,
productTypes: data.productTypes,
skinCode: data.skinCode,
mapId: data.mapId,
minDuration: data.minDuration,
maxDuration: data.maxDuration,
trainingRemark: this.repliceName(data.trainingRemark, this.placeholderList)
};
} else {
this.formModel = {
skinCode: this.$route.query.skinCode
mapId: this.$route.query.mapId
};
}
},
@ -215,7 +215,7 @@ export default {
},
changeList(val) {
//
getPlaceholderList({ trainingType: val, skinCode: '02' }).then(res => {
getPlaceholderList({ trainingType: val}).then(res => {
this.placeholderList = res.data;
});
},
@ -275,12 +275,12 @@ export default {
this.loading = true;
putTrainingRulesData(this.formModel).then(response => {
self.loading = false;
self.$message.success(this.$t('lesson.createOperateSuccess'));
self.$message.success(this.$t('lesson.updateOperateSuccess'));
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.loading = false;
self.$message.error(`${this.$t('error.createOperateRuleFailed')}:${error.message}`);
self.$message.error(`${this.$t('error.updateOperateRuleFailed')}:${error.message}`);
});
},
handleClose() {
@ -288,7 +288,7 @@ export default {
trainingName: '',
trainingType: '',
operateType: '',
skinCode: '',
mapId: '',
minDuration: '',
maxDuration: '',
trainingRemark: ''

View File

@ -83,7 +83,7 @@ export default {
methods: {
async show(data) {
this.dialogVisible = true;
const res = await getPlaceholderList({ trainingType: this.$route.query.type, skinCode: this.$route.query.skinCode });
const res = await getPlaceholderList({ trainingType: this.$route.query.type });
this.placeholderList = res.data;
if (data && data.operateCode) {
//

View File

@ -112,7 +112,7 @@ export default {
methods: {
async init() {
const res = await getPlaceholderList({ trainingType: this.$route.query.type, skinCode: this.$route.query.skinCode });
const res = await getPlaceholderList({ trainingType: this.$route.query.type });
this.placeholderList = res.data;
},
repliceName(fieldValue, enumList) {

View File

@ -19,7 +19,6 @@ import {
deleteTrainingRulesData,
getPlaceholderList
} from '@/api/management/operation';
import { listPublishMap } from '@/api/jmap/map';
import TrainingEdit from './addEdit';
import AddBatch from './addBatch';
import SaveAs from './saveAs.vue';
@ -37,7 +36,6 @@ export default {
placeholderMap: {},
trainingOperateTypeMap: {},
trainingTypeList: [],
mapIdList: [],
totals: '',
pagerConfig: {
pageSize: 'pageSize',
@ -76,20 +74,6 @@ export default {
);
}
},
{
title: this.$t('lesson.mapName'),
prop: 'mapId',
type: 'tag',
columnValue: row => {
return this.$convertField(row.id, this.mapIdList, [
'id',
'name'
]);
},
tagType: row => {
return '';
}
},
{
title: this.$t('lesson.trainingType'),
prop: 'trainingType',
@ -163,7 +147,7 @@ export default {
],
actions: [
{ text: this.$t('global.add'), handler: this.handleAdd },
{ text: this.$t('lesson.generation'), handler: this.handleBatchAdd },
// { text: this.$t('lesson.generation'), handler: this.handleBatchAdd},
{ text: this.$t('lesson.saveAs'), handler: this.handleSaveAs }
]
},
@ -201,7 +185,7 @@ export default {
this.trainingOperateTypeMap['08'] = list; //
});
this.placeholderMap = {};
getPlaceholderList({ skinCode: '', trainingType: '' }).then(res => {
getPlaceholderList({ trainingType: '' }).then(res => {
res.data.forEach(item => {
if (!this.placeholderMap[item.trainingType]) {
this.placeholderMap[item.trainingType] = [];
@ -210,12 +194,6 @@ export default {
});
});
//
this.mapIdList = [];
listPublishMap().then(response => {
this.mapIdList = response.data;
});
//
this.trainingTypeList = [];
this.$Dictionary.trainingType().then(list => {

View File

@ -5,12 +5,12 @@
<el-input v-model="operateModel.name" style="width: 300px" />
</el-form-item>
<el-form-item :label="this.$t('lesson.mapName') + ':'" prop="mapId">
<el-select v-model="operateModel.skinCode" style="width: 300px" :disabled="this.disable" @change="skinCodeChoose">
<el-select v-model="operateModel.mapId" style="width: 300px" :disabled="this.disable" @change="mapIdChoose">
<el-option
v-for="option in mapIdList"
:key="option.code"
:label="option.name"
:value="option.code"
:value="option.id"
/>
</el-select>
</el-form-item>
@ -146,7 +146,7 @@ export default {
operateModel: {
name: '',
type: '',
skinCode: this.$route.params.skinCode,
mapId: this.$route.query.mapId,
prdCode: '',
operateType: [],
maxDuration: 0,
@ -164,7 +164,7 @@ export default {
name: [
{ required: true, validator: checkName, trigger: 'blur'}
],
skinCode: [
mapId: [
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
],
prdCode: [
@ -225,10 +225,9 @@ export default {
this.trainingTypeMap = {};
this.operateModel.operateType = [];
debugger;
const skinCodeObj = this.mapIdList.find(elem => { return elem.code === this.operateModel.skinCode; }) || {};
const mapIdObj = this.mapIdList.find(elem => { return elem.id === this.operateModel.mapId; }) || {};
const prdTypeObj = this.productList.find(elem => { return elem.code === prdCode; }) || {};
const res = await getOperateTrainingList({ skinCode: skinCodeObj.mapId, productType: prdTypeObj.prdType });
const res = await getOperateTrainingList({ mapId: mapIdObj.id, productType: prdTypeObj.prdType });
if (res && res.code == 200) {
this.trainingTypeLists = res.data;
this.trainingTypeList.forEach(elem => {
@ -279,7 +278,7 @@ export default {
if (this.operation.event == '01') { // add
//
const data = {
skinCode: this.operateModel.skinCode,
mapId: this.operateModel.mapId,
name: this.operateModel.name,
prdCode: this.operateModel.prdCode,
trainingType: this.operateModel.type,
@ -288,6 +287,7 @@ export default {
addAutoTraining(data).then(response => {
this.$message.success(this.$t('tip.automaticGenerationTrainingSuccess'));
debugger;
this.$emit('refresh');
this.close();
}).catch(() => {
@ -297,7 +297,7 @@ export default {
} else if (this.operation.event == '02') { // edit
//
const data = {
skinCode: this.operateModel.skinCode,
mapId: this.operateModel.mapId,
name: this.operateModel.name,
prdCode: this.operateModel.prdCode,
trainingType: this.operateModel.type,
@ -318,7 +318,7 @@ export default {
} else if (this.operation.event == '03') { // delete
//
const data = {
skinCode: this.operateModel.skinCode,
mapId: this.operateModel.mapId,
name: this.operateModel.name,
prdCode: this.operateModel.prdCode,
trainingType: `${this.operateModel.type}`,
@ -338,7 +338,7 @@ export default {
name: this.operateModel.name,
type: this.operateModel.type,
prdCode: this.operateModel.prdCode,
skinCode: this.operateModel.skinCode,
mapId: this.operateModel.mapId,
operateType: this.operateModel.operateType[0],
minDuration: this.operateModel.minDuration,
maxDuration: this.operateModel.maxDuration,

View File

@ -89,13 +89,6 @@ export default {
title: this.$t('lesson.trainingName'),
prop: 'name'
},
{
title: this.$t('lesson.skinType'),
prop: 'skinCode',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.mapId, this.mapIdList, ['id', 'name']); },
tagType: (row) => { return ''; }
},
{
title: this.$t('lesson.product'),
prop: 'prdCode',