合并冲突
This commit is contained in:
commit
7bb5aa785d
@ -52,6 +52,11 @@ export default {
|
||||
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'
|
||||
};
|
||||
|
@ -97,6 +97,9 @@ export default {
|
||||
transferQRCode: 'Transfer QRCode',
|
||||
minutes: 'minutes',
|
||||
minute: 'minute',
|
||||
totoal: 'Totoal',
|
||||
publishPermission: 'The public authority',
|
||||
specialPermission: 'Special permission',
|
||||
mapList: 'Map list',
|
||||
updateTime: 'Update time:',
|
||||
line: 'Line:',
|
||||
|
@ -9,6 +9,7 @@ import scriptRecord from './scriptRecord';
|
||||
import tip from './tip';
|
||||
import system from './system';
|
||||
import orderAuthor from './orderAuthor';
|
||||
import teach from './teach';
|
||||
import publish from './publish';
|
||||
import permission from './permission';
|
||||
import replay from './replay';
|
||||
@ -22,6 +23,7 @@ export default {
|
||||
global,
|
||||
router,
|
||||
lesson,
|
||||
teach,
|
||||
error,
|
||||
rules,
|
||||
scriptRecord,
|
||||
|
@ -7,6 +7,7 @@ export default {
|
||||
hasCalcelDelete: 'Canceled deletion',
|
||||
isConfirmDelete: 'Whether to confirm deletion?',
|
||||
trainingName: 'Training Name',
|
||||
trainingType: 'Training Type',
|
||||
stationList: 'Station List',
|
||||
stepInfo: 'Step Information',
|
||||
selectMap: 'Please select the map',
|
||||
@ -21,5 +22,31 @@ export default {
|
||||
startRecording: 'Start Recording',
|
||||
endRecording: 'End Recording',
|
||||
nextStep: 'Next Step',
|
||||
selectMode: 'Mode'
|
||||
selectMode: 'Mode',
|
||||
deleteSuccess: 'Delete successfully',
|
||||
wellDelTrainingRule: 'This action will delete the training rule. Do you want to continue?',
|
||||
stepDetail: 'Detail',
|
||||
generation: 'Generation',
|
||||
skinType: 'Skin Type',
|
||||
minDuration: 'The Best Available',
|
||||
maxDuration: 'The Largest Available',
|
||||
trainingRemark: 'Explain',
|
||||
createOperateRule: 'Create Action Rules',
|
||||
editOperateRule: 'Edit Action Rules',
|
||||
tipNamePlaceholderInfo: "Select the placeholder '{}' not to be deleted, otherwise the name will display incorrectly!",
|
||||
tipExplainPlaceholderInfo: "Select placeholder '{}' not to be deleted, otherwise the display will be problematic!",
|
||||
generationOperation: 'Automatic Generation Operation',
|
||||
wellClearOperate: 'This operation clears all operation definitions under the skin. Do you want to continue?',
|
||||
batchCreateSuccess: 'Batch build operation definition successful',
|
||||
createOperateSuccess: 'The operation definition was created successfully',
|
||||
updateOperateSuccess: 'The update steps were successful',
|
||||
wellDelOperate: 'This action will delete the training step. Do you want to continue?',
|
||||
operateCode: 'Opcode',
|
||||
stepReturn: 'Return Value',
|
||||
stepTips: 'Tips',
|
||||
createStepInfo: 'Create Step Information',
|
||||
eidtStepInfo: 'Edit Step Information',
|
||||
product: 'Product',
|
||||
remarks: 'Remarks',
|
||||
operateSuccess: 'Operation successfully'
|
||||
};
|
||||
|
@ -23,6 +23,7 @@ export default {
|
||||
layerDisplay: 'The layer display',
|
||||
viewShows: 'View shows',
|
||||
contentShows: 'content show',
|
||||
createBatch: 'Create a batch',
|
||||
|
||||
save: 'save',
|
||||
updata: 'update',
|
||||
@ -299,6 +300,7 @@ export default {
|
||||
zzkContent: 'Station control content:',
|
||||
stationControlZok: 'central',
|
||||
|
||||
skinStyleColon: 'Skin type:',
|
||||
skinDesignation: 'SkinName',
|
||||
skinCoding: 'SkinCoding',
|
||||
coordinatesOrigin: 'CoordinatesOrigin',
|
||||
@ -341,9 +343,13 @@ export default {
|
||||
productType: 'ProductType',
|
||||
productCode: 'ProductCode',
|
||||
productName: 'ProductName',
|
||||
createProductCategories: 'Create product categories',
|
||||
productDescription: 'ProductDescription',
|
||||
associateTrainingTypes: 'AssociateTrainingTypes',
|
||||
createTrainingCategories: 'CreateTrainingCategories',
|
||||
editTraining: 'Edit product categories',
|
||||
productCategories: 'The product category',
|
||||
selectOperation: 'Please select operation',
|
||||
editTrainingCategories: 'EditTrainingCategories',
|
||||
linkWidth: 'LinkWidth',
|
||||
maxLinkWidth: '(Link width is at most 20)',
|
||||
@ -380,6 +386,7 @@ export default {
|
||||
|
||||
trainCode: 'Train number:',
|
||||
groupNumber: 'The number of:',
|
||||
groupNumberInterval: 'Group number interval:',
|
||||
modelCode: 'Car type:',
|
||||
|
||||
trainmodelCreate: 'New car type',
|
||||
@ -488,6 +495,8 @@ export default {
|
||||
switchBCode: 'Switch number 2',
|
||||
|
||||
switchACodeNum: 'Switch ID 1:',
|
||||
switchBCodeNum: 'Switch ID 2:'
|
||||
switchBCodeNum: 'Switch ID 2:',
|
||||
|
||||
wellDelTrianModel: 'Deleting the train model will delete the associated class cars together, please confirm whether to continue?'
|
||||
|
||||
};
|
||||
|
@ -15,5 +15,17 @@ export default {
|
||||
startTime: 'Start Time',
|
||||
endTime: 'End Time',
|
||||
belonger: 'Owner',
|
||||
userList: 'User List'
|
||||
userList: 'User List',
|
||||
customPackageRules: 'Custom packaging rules',
|
||||
addRules: 'Add rules',
|
||||
package: 'Pack',
|
||||
getQrcode: 'Get qr code',
|
||||
hasExitRule: 'This type rule already exists',
|
||||
pleaseAddRule: 'Please add rules',
|
||||
selectDate: 'Select time',
|
||||
addPermissionPackageRule: 'Add authority packaging rules',
|
||||
editPermissionPackageRule: 'edit authority packaging rule',
|
||||
restPermissionMaxNumber: '(maximum number of remaining permissions: {0})',
|
||||
pleaseSelectTransferPermission: 'Select transfer permissions'
|
||||
|
||||
};
|
||||
|
@ -213,5 +213,15 @@ export default {
|
||||
sectionWidthInputPrompt: 'Please enter a valid segment width',
|
||||
selectShowWatermark: 'Select whether or not to watermark',
|
||||
pleaseInputMapName: 'Please enter a new name for the map',
|
||||
inputTemplateRunPlan: 'Please select the template run diagram'
|
||||
inputTemplateRunPlan: 'Please select the template run diagram',
|
||||
inputSkinType: 'Please select skin type',
|
||||
inputOperateCode: 'Please enter the step code',
|
||||
inputStepNo: 'Please enter the step number',
|
||||
inputStepTips: 'Please enter step number. Please enter step prompt',
|
||||
selectMapName: 'Please select a map name',
|
||||
selectMapProductName: 'Please select map product name',
|
||||
inputTime: 'Please enter time',
|
||||
inputPermissionNumber: 'Please enter the number of permissions',
|
||||
permissionNumberGreater0: 'The number of permissions must be greater than 0'
|
||||
|
||||
};
|
||||
|
19
src/i18n/langs/en/teach.js
Normal file
19
src/i18n/langs/en/teach.js
Normal file
@ -0,0 +1,19 @@
|
||||
export default {
|
||||
title: 'Urban rail transit teaching system',
|
||||
describe: 'This system is equipped with real business logic and software architecture based on the business and process-driven mode of metro employees and training sites. From the perspective of business process, standard operation, training mode and open principle, it strives to build a practical training and teaching system that best meets user needs and responds to changes quickly.',
|
||||
trainingName: 'Training name:',
|
||||
trainingTime: 'Best time to complete the training:',
|
||||
trainingMaximum: 'Maximum time to complete the training:',
|
||||
trainingInstructions: 'Training instructions:',
|
||||
startTraining: 'Began to practice',
|
||||
|
||||
courseName: 'Course name',
|
||||
courseDescription: 'Course description',
|
||||
courseDetails: 'Course details',
|
||||
free: 'free',
|
||||
permissionsDetails: 'Permissions for details',
|
||||
buy: 'buy',
|
||||
permissionDistribute: 'Permission distribution (class)',
|
||||
authorityTransferred: 'Authority transferred',
|
||||
courseList: 'Course list'
|
||||
};
|
@ -5,7 +5,7 @@ export default {
|
||||
creatingFailed: 'Create a failure',
|
||||
confirmDeletion: 'Confirm deletion?',
|
||||
confirmBatchGeneration: 'Is batch generation confirmed?',
|
||||
hint: 'hint',
|
||||
hint: 'Tips',
|
||||
cancelledDelete: 'Cancelled delete',
|
||||
cancelGeneration: 'Batch generation has been cancelled',
|
||||
|
||||
@ -25,6 +25,8 @@ export default {
|
||||
selectedSectionEmpty: 'The selected section is empty',
|
||||
selectedStationEmpty: 'The selected station is empty',
|
||||
|
||||
enterKeywordsFiltering: 'Enter keywords for filtering',
|
||||
|
||||
selectMap: 'Please select the map first',
|
||||
selectTrainType: 'Please select the train model to view',
|
||||
|
||||
@ -90,6 +92,11 @@ export default {
|
||||
skinCodingExist: 'Map skin codes already exist',
|
||||
underImport: 'UnderImport...',
|
||||
deleteTypeHint: 'This action deletes the type. Do you want to continue?',
|
||||
selectValidInterval: 'Please select a valid interval',
|
||||
|
||||
failedCourse: 'Failed to obtain course information',
|
||||
createSimulationFaild: 'Failed to create simulation',
|
||||
accessCourseNo: 'No access to this course, please go and buy it!',
|
||||
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'
|
||||
};
|
||||
|
@ -52,6 +52,12 @@ export default {
|
||||
setFailed: '设置失败',
|
||||
deleteException: '删除异常,请联系管理员',
|
||||
paperHasUseNotDel: '该试卷已被使用,不能删除',
|
||||
batchCreateFailed: '批量生成操作定义失败',
|
||||
createOperateRuleFailed: '创建操作定义失败',
|
||||
createOperateStepFailed: '创建操作步骤失败',
|
||||
updateOperateStepFailed: '更新操作步骤失败',
|
||||
packagePermissionFailed: '打包权限失败',
|
||||
acquisitionTimeFailed: '获取时间失败',
|
||||
getProductListFailed: '获取产品列表失败'
|
||||
|
||||
};
|
||||
|
@ -85,6 +85,30 @@ export default {
|
||||
inputRoomNumber: '请输入房间号',
|
||||
chooseRoom: '选择房间',
|
||||
month: '月',
|
||||
|
||||
permissions: '权限',
|
||||
yuanMonth: '元/月',
|
||||
permissionType: '权限类型:',
|
||||
purchaseDuration: '购买时长:',
|
||||
custom: '自定义',
|
||||
permissionNum: '权限数量:',
|
||||
indexA: '个',
|
||||
purchasePrice: '购买总价:',
|
||||
submitOrders: '提交订单',
|
||||
|
||||
january: '一月',
|
||||
march: '三月',
|
||||
year: '一年',
|
||||
twoYears: '两年',
|
||||
fiveYears: '五年',
|
||||
tenYears: '十年',
|
||||
courseName: '课程名称',
|
||||
screenName: '大屏名称',
|
||||
productName: '产品名称',
|
||||
coursePrice: '课程单价',
|
||||
testPrice: '考试单价',
|
||||
simulationPrice: '仿真单价',
|
||||
timeUnitPrice: '大屏单价',
|
||||
putaway: '上 架',
|
||||
soldOut: '下 架',
|
||||
exportMap: '导出地图',
|
||||
@ -98,6 +122,9 @@ export default {
|
||||
transferQRCode: '权限转赠',
|
||||
minutes: '分钟',
|
||||
minute: '分钟',
|
||||
totoal: '总数',
|
||||
publishPermission: '公用权限',
|
||||
specialPermission: '专用权限',
|
||||
mapList: '地图列表',
|
||||
updateTime: '更新时间:',
|
||||
line: '线路:',
|
||||
|
@ -9,6 +9,7 @@ import scriptRecord from './scriptRecord';
|
||||
import tip from './tip';
|
||||
import system from './system';
|
||||
import orderAuthor from './orderAuthor';
|
||||
import teach from './teach';
|
||||
import publish from './publish';
|
||||
import permission from './permission';
|
||||
import replay from './replay';
|
||||
@ -23,6 +24,7 @@ export default {
|
||||
router,
|
||||
lesson,
|
||||
error,
|
||||
teach,
|
||||
rules,
|
||||
scriptRecord,
|
||||
tip,
|
||||
|
@ -7,6 +7,7 @@ export default {
|
||||
hasCalcelDelete: '已取消删除',
|
||||
isConfirmDelete: '是否确认删除?',
|
||||
trainingName: '实训名称',
|
||||
trainingType: '实训类型',
|
||||
stationList: '车站列表',
|
||||
stepInfo: '步骤信息',
|
||||
selectMap: '请选择地图',
|
||||
@ -21,5 +22,32 @@ export default {
|
||||
startRecording: '开始录制',
|
||||
endRecording: '结束录制',
|
||||
nextStep: '下一步',
|
||||
selectMode: '模式选择'
|
||||
selectMode: '模式选择',
|
||||
deleteSuccess: '删除成功',
|
||||
wellDelTrainingRule: '此操作将删除此实训规则, 是否继续?',
|
||||
stepDetail: '步骤明细',
|
||||
generation: '自动生成',
|
||||
skinType: '皮肤类型',
|
||||
minDuration: '最佳用时',
|
||||
maxDuration: '最大用时',
|
||||
trainingRemark: '实训说明',
|
||||
createOperateRule: '创建操作规则',
|
||||
editOperateRule: '编辑操作规则',
|
||||
tipNamePlaceholderInfo: '选择占位符 ‘{}’ 不可删除,否则名称显示会有问题!',
|
||||
tipExplainPlaceholderInfo: '选择占位符 ‘{}’ 不可删除,否则说明显示会有问题!',
|
||||
generationOperation: '自动生成操作',
|
||||
wellClearOperate: '此操作将清空改皮肤下所有操作定义, 是否继续?',
|
||||
batchCreateSuccess: '批量生成操作定义成功',
|
||||
createOperateSuccess: '创建操作定义成功',
|
||||
updateOperateSuccess: '更新操作步骤成功',
|
||||
wellDelOperate: '此操作将删除此实训步骤, 是否继续?',
|
||||
operateCode: '操作码',
|
||||
stepReturn: '步骤返回值',
|
||||
stepTips: '步骤提示信息',
|
||||
createStepInfo: '创建步骤信息',
|
||||
eidtStepInfo: '编辑步骤信息',
|
||||
product: '产品',
|
||||
remarks: '描述',
|
||||
operateSuccess: '操作成功'
|
||||
};
|
||||
|
||||
|
@ -23,6 +23,7 @@ export default {
|
||||
layerDisplay: '图层显示',
|
||||
viewShows: '视图显示',
|
||||
contentShows: '内容显示',
|
||||
createBatch: '批量创建',
|
||||
|
||||
save: '保存',
|
||||
updata: '更新',
|
||||
@ -330,6 +331,7 @@ export default {
|
||||
|
||||
trainCode: '列车编号:',
|
||||
groupNumber: '车组号:',
|
||||
groupNumberInterval: '车组号区间:',
|
||||
trainNumber: '车组号',
|
||||
modelCode: '车类型:',
|
||||
|
||||
@ -414,6 +416,7 @@ export default {
|
||||
startStation: '起始站',
|
||||
endStation: '终到站',
|
||||
|
||||
skinStyleColon: '皮肤类型:',
|
||||
skinDesignation: '皮肤名称',
|
||||
skinCoding: '皮肤编码',
|
||||
coordinatesOrigin: '坐标原点',
|
||||
@ -456,9 +459,13 @@ export default {
|
||||
productType: '产品类型',
|
||||
productCode: '产品编码',
|
||||
productName: '产品名称',
|
||||
createProductCategories: '创建产品类目',
|
||||
productDescription: '产品说明',
|
||||
associateTrainingTypes: '关联实训类型',
|
||||
createTrainingCategories: '创建实训类目',
|
||||
editTraining: '编辑产品类目',
|
||||
productCategories: '产品类目',
|
||||
selectOperation: '请选择操作',
|
||||
editTrainingCategories: '编辑实训类目',
|
||||
linkWidth: 'link宽度',
|
||||
maxLinkWidth: '(Link宽度最大为20)',
|
||||
@ -490,6 +497,8 @@ export default {
|
||||
switchBCode: '道岔2编号',
|
||||
|
||||
switchACodeNum: '道岔ID 1:',
|
||||
switchBCodeNum: '道岔ID 2:'
|
||||
switchBCodeNum: '道岔ID 2:',
|
||||
|
||||
wellDelTrianModel: '删除车模型会将关联的类车一起删除,请确认是否继续?'
|
||||
|
||||
};
|
||||
|
@ -15,5 +15,17 @@ export default {
|
||||
startTime: '开始时间',
|
||||
endTime: '结束时间',
|
||||
belonger: '归属人',
|
||||
userList: '用户列表'
|
||||
userList: '用户列表',
|
||||
customPackageRules: '定制打包规则',
|
||||
addRules: '添加规则',
|
||||
package: '打包',
|
||||
getQrcode: '获取二维码',
|
||||
hasExitRule: '已存在此类型规则',
|
||||
pleaseAddRule: '请添加规则',
|
||||
selectDate: '选择时间',
|
||||
addPermissionPackageRule: '增加权限打包规则',
|
||||
editPermissionPackageRule: '编辑权限打包规则',
|
||||
restPermissionMaxNumber: '(剩余最大权限个数:{0})',
|
||||
pleaseSelectTransferPermission: '选择转赠权限'
|
||||
|
||||
};
|
||||
|
@ -212,6 +212,26 @@ export default {
|
||||
sectionWidthInputPrompt: '请输入有效区段宽度',
|
||||
selectShowWatermark: '请选择是否水印',
|
||||
|
||||
courseNameEmpty: '课程名称不能为空',
|
||||
purchaseMonth: '请输入购买月数',
|
||||
accessNumber: '请输入权限数量',
|
||||
pleaseInputMapName: '请输入地图新名称',
|
||||
inputTemplateRunPlan: '请选择模板运行图'
|
||||
inputTemplateRunPlan: '请选择模板运行图',
|
||||
inputSkinType: '请选择皮肤类型',
|
||||
|
||||
inputTrainingName: '请输入实训名称',
|
||||
inputTrainingType: '请输入实训类型',
|
||||
inputOperationType: '请输入操作类型',
|
||||
inputMinDuration: '请输入最佳用时',
|
||||
inputMaxDuration: '请输入最大用时',
|
||||
inputTrainingRemark: '请输入实训说明',
|
||||
inputOperateCode: '请输入步骤操作码',
|
||||
inputStepNo: '请输入步骤序号',
|
||||
inputStepTips: '请输入步骤提示信息',
|
||||
selectMapName: '请选择地图名称',
|
||||
selectMapProductName: '请选择地图产品名称',
|
||||
inputTime: '请输入时间',
|
||||
inputPermissionNumber: '请输入权限个数',
|
||||
permissionNumberGreater0: '权限个数必须大于0'
|
||||
|
||||
};
|
||||
|
19
src/i18n/langs/zh/teach.js
Normal file
19
src/i18n/langs/zh/teach.js
Normal file
@ -0,0 +1,19 @@
|
||||
export default {
|
||||
title: '城市轨道交通教学系统',
|
||||
describe: '该系统具备真实的业务逻辑,以地铁员工和培训点为要素的业务和流程驱动方式进行软件架构,从业务流程、标准作业、培训方式及开放原则等角度出发,力求打造最符合用户需求及快速响应变化的实训教学系统。',
|
||||
trainingName: '实训名称:',
|
||||
trainingTime: '完成实训最佳用时:',
|
||||
trainingMaximum: '完成实训最大用时:',
|
||||
trainingInstructions: '实训说明:',
|
||||
startTraining: '开始实训',
|
||||
|
||||
courseName: '课程名称',
|
||||
courseDescription: '课程说明',
|
||||
courseDetails: '课程详情',
|
||||
free: '免费',
|
||||
permissionsDetails: '权限详情',
|
||||
buy: '购买',
|
||||
permissionDistribute: '权限分发(上课)',
|
||||
authorityTransferred: '权限转赠',
|
||||
courseList: '课程列表'
|
||||
};
|
@ -8,6 +8,7 @@ export default {
|
||||
hint: '提示',
|
||||
cancelledDelete: '已取消删除',
|
||||
cancelGeneration: '已取消批量生成',
|
||||
refreshFailure: '刷新失败',
|
||||
|
||||
updateSuccessfully: '更新成功',
|
||||
saveSuccessfully: '保存成功',
|
||||
@ -25,6 +26,8 @@ export default {
|
||||
selectedSectionEmpty: '选择的区段为空',
|
||||
selectedStationEmpty: '选择的车站为空',
|
||||
|
||||
enterKeywordsFiltering: '输入关键字进行过滤',
|
||||
|
||||
selectMap: '请先选择地图',
|
||||
selectTrainType: '请选择查看的列车模型',
|
||||
|
||||
@ -59,6 +62,9 @@ export default {
|
||||
deleteProductSuccessfully: '删除产品成功',
|
||||
deleteProductFailed: '删除产品失败',
|
||||
cannotDeleteProduct: '产品已被使用无法删除',
|
||||
productCodeExists: '产品Code已存在',
|
||||
narrowScope: '不能缩小上次创建的实训列表的范围',
|
||||
|
||||
pathCreationSuccessful: '创建交路成功!',
|
||||
createRoutingFailed: '创建交路失败',
|
||||
pathUpdataSuccessful: '更新交路成功!',
|
||||
@ -90,7 +96,15 @@ export default {
|
||||
skinCodingExist: '地图皮肤编码已存在',
|
||||
underImport: '正在导入中...',
|
||||
deleteTypeHint: '此操作将删除该类型, 是否继续?',
|
||||
selectValidInterval: '请选择有效的区间',
|
||||
|
||||
failedCourse: '获取课程信息失败',
|
||||
createSimulationFaild: '创建仿真失败',
|
||||
accessCourseNo: '无此课程权限, 请前往购买!',
|
||||
|
||||
failedSubmitOrder: '提交订单失败',
|
||||
permissionsNumber: '请输入有效的权限个数',
|
||||
purchaseMonth: '请输入有效的购买月数',
|
||||
createRoomFailedHint: '每个用户只能创建一个综合演练房间, 是否进入房间?',
|
||||
noPermissionHint: '您没有权限,请前往购买产品'
|
||||
|
||||
};
|
||||
|
@ -27,8 +27,8 @@ import SkinCodeDraft from '@/views/map/skinCode/draft';
|
||||
import Mapdraft from '@/views/map/mapdraft/index';
|
||||
import Mapedit from '@/views/map/mapdraft/mapedit/index';
|
||||
import Runplan from '@/views/map/runplan/index';
|
||||
import MapProduct from '@/views/map/product/index';
|
||||
import RunplanView from '@/views/map/runplan/chart';
|
||||
import Trainingcategory from '@/views/lesson/trainingcategory/index';
|
||||
import Trainingrecord from '@/views/lesson/trainingrecord/index';
|
||||
import TrainingrecordManage from '@/views/lesson/trainingrecord/manage/index';
|
||||
import Taskmanage from '@/views/lesson/taskmanage/list';
|
||||
@ -389,7 +389,7 @@ export const asyncRouter = [
|
||||
},
|
||||
{
|
||||
path: 'product',
|
||||
component: Trainingcategory,
|
||||
component: MapProduct,
|
||||
meta: {
|
||||
i18n: 'router.productEdit'
|
||||
}
|
||||
|
@ -12,30 +12,30 @@
|
||||
<el-form-item :label="nameTitle + ':'" prop="name">
|
||||
<span style="color: #808080 !important;"> {{ saleModel.name }} </span>
|
||||
</el-form-item>
|
||||
<el-form-item label="权限类型: " prop="systemName">
|
||||
<span style="color: #808080 !important;"> {{ systemName }}权限 </span>
|
||||
<el-form-item :label="$t('global.permissionType')" prop="systemName">
|
||||
<span style="color: #808080 !important;"> {{ systemName }}{{ $t('global.permissions') }} </span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="priceTitle + ':'" prop="price">
|
||||
<span style="font-size: 16px;color: #fb7a1b;"> {{ saleModel.price.toFixed(2) }}</span>
|
||||
<span style="color: #333;">元/月</span>
|
||||
<span style="color: #333;">{{ $t('global.yuanMonth') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="购买时长: " prop="choose">
|
||||
<el-form-item :label="$t('global.purchaseDuration')" prop="choose">
|
||||
<el-radio-group v-model="choose" @change="chooseEvent">
|
||||
<template v-for="(item,idx) in chooseList">
|
||||
<el-radio-button :key="idx" :label="item.label" />
|
||||
</template>
|
||||
<el-radio-button label="自定义" />
|
||||
<el-radio-button :label="$t('global.custom')" />
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="!disabled" prop="months">
|
||||
<el-input-number v-model="saleModel.months" :min="1" :max="1000" :disabled="disabled " />
|
||||
<span>月</span>
|
||||
<span>{{ $t('global.month') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="权限数量: " prop="total">
|
||||
<el-form-item :label="$t('global.permissionNum')" prop="total">
|
||||
<el-input-number v-model="saleModel.total" :min="1" :max="200" />
|
||||
<span>个</span>
|
||||
<span>{{ $t('global.indexA') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="购买总价: " prop="sumPrice">
|
||||
<el-form-item :label="$t('global.purchasePrice')" prop="sumPrice">
|
||||
<span style="font-size: 24px; color: #fb7a1b;"> {{ parseInt(sumPrice) }}</span>
|
||||
<span style="font-size: 16px;color: #fb7a1b;">. {{ (sumPrice -
|
||||
parseInt(sumPrice)).toFixed(2).toString().replace('.0', '').replace(' ', '') }}
|
||||
@ -44,9 +44,9 @@
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<el-button style="float: right; margin-bottom: 20px; margin-right: 20px;" type="primary " @click="commit">提交订单
|
||||
<el-button style="float: right; margin-bottom: 20px; margin-right: 20px;" type="primary " @click="commit">{{ $t('global.submitOrders') }}
|
||||
</el-button>
|
||||
<el-button style="float: right; margin-bottom: 20px; margin-right: 10px;" @click="back">返回</el-button>
|
||||
<el-button style="float: right; margin-bottom: 20px; margin-right: 10px;" @click="back">{{ $t('global.back') }}</el-button>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
@ -69,14 +69,14 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
disabled: true,
|
||||
choose: '一月',
|
||||
choose: this.$t('global.january'),
|
||||
chooseList: [
|
||||
{ label: '一月', value: 1 },
|
||||
{ label: '三月', value: 3 },
|
||||
{ label: '一年', value: 12 },
|
||||
{ label: '两年', value: 24 },
|
||||
{ label: '五年', value: 60 },
|
||||
{ label: '十年', value: 120 }
|
||||
{ label: this.$t('global.january'), value: 1 },
|
||||
{ label: this.$t('global.march'), value: 3 },
|
||||
{ label: this.$t('global.year'), value: 12 },
|
||||
{ label: this.$t('global.twoYears'), value: 24 },
|
||||
{ label: this.$t('global.fiveYears'), value: 60 },
|
||||
{ label: this.$t('global.tenYears'), value: 120 }
|
||||
],
|
||||
saleModel: {
|
||||
goodsId: '',
|
||||
@ -94,48 +94,48 @@ export default {
|
||||
nameTitle() {
|
||||
if (this.$route.query.permissionType == PermissionType.EXAM ||
|
||||
this.$route.query.permissionType == PermissionType.LESSON) {
|
||||
return '课程名称';
|
||||
return this.$t('global.courseName');
|
||||
} else if (this.$route.query.permissionType == PermissionType.SCREEN) {
|
||||
return '大屏名称';
|
||||
return this.$t('global.screenName');
|
||||
} else {
|
||||
return '产品名称';
|
||||
return this.$t('global.productName');
|
||||
}
|
||||
},
|
||||
priceTitle() {
|
||||
switch (this.$route.query.permissionType) {
|
||||
case PermissionType.LESSON: return '课程单价';
|
||||
case PermissionType.EXAM: return '考试单价';
|
||||
case PermissionType.SIMULATION: return '仿真单价';
|
||||
case PermissionType.SCREEN: return '大屏单价';
|
||||
case PermissionType.LESSON: return this.$t('global.coursePrice');
|
||||
case PermissionType.EXAM: return this.$t('global.testPrice');
|
||||
case PermissionType.SIMULATION: return this.$t('global.simulationPrice');
|
||||
case PermissionType.SCREEN: return this.$t('global.timeUnitPrice');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
'name': [
|
||||
{ required: true, message: '课程名称不能为空', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.courseNameEmpty'), trigger: 'blur' }
|
||||
],
|
||||
'months': [
|
||||
{ required: true, message: '请输入购买月数', trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.purchaseMonth'), trigger: 'blur' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (Number.isInteger(Number(value)) && Number(value) >= 0) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('请输入有效的购买月数'));
|
||||
callback(new Error(this.$t('tip.purchaseMonth')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
'total': [
|
||||
{ required: true, message: '请输入权限数量', trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.accessNumber'), trigger: 'blur' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (Number.isInteger(Number(value)) && Number(value) >= 0) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('请输入有效的权限个数'));
|
||||
callback(new Error(this.$t('tip.permissionsNumber')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
@ -163,7 +163,7 @@ export default {
|
||||
methods: {
|
||||
// 选择自定义时长,修改页面控件状态
|
||||
chooseEvent(label) {
|
||||
this.disabled = label !== '自定义';
|
||||
this.disabled = label !== this.$t('global.custom');
|
||||
this.chooseList.forEach(elem => {
|
||||
if (label === elem.label) {
|
||||
this.saleModel.months = elem.value;
|
||||
@ -184,7 +184,7 @@ export default {
|
||||
commitOrder(model).then(response => {
|
||||
this.$emit('commit', response.data);
|
||||
}).catch(() => {
|
||||
this.$messageBox('提交订单失败');
|
||||
this.$messageBox(this.$t('tip.failedSubmitOrder'));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -27,7 +27,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
option: {
|
||||
backgroundColor: '#F0F2F5',
|
||||
backgroundColor: '#f0f0f0',
|
||||
title: {
|
||||
text: '',
|
||||
subtext: '',
|
||||
@ -35,8 +35,7 @@ export default {
|
||||
color: '#909399'
|
||||
},
|
||||
y: 10,
|
||||
left: 'center',
|
||||
textAlign: 'center'
|
||||
left: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
},
|
||||
@ -44,7 +43,7 @@ export default {
|
||||
top: '17%',
|
||||
width: '45%',
|
||||
bottom: '5%',
|
||||
left: 50,
|
||||
left: 30,
|
||||
containLabel: true
|
||||
}],
|
||||
xAxis: {
|
||||
@ -68,15 +67,37 @@ export default {
|
||||
series: [{
|
||||
type: 'bar',
|
||||
z: 3,
|
||||
barWidth: 10,
|
||||
barWidth: 25,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0, 0, 0, 1,
|
||||
[
|
||||
{offset: 0, color: '#83bff6'},
|
||||
{offset: 0.5, color: '#188df0'},
|
||||
{offset: 1, color: '#188df0'}
|
||||
]
|
||||
)
|
||||
},
|
||||
emphasis: {
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0, 0, 0, 1,
|
||||
[
|
||||
{offset: 0, color: '#2378f7'},
|
||||
{offset: 0.7, color: '#2378f7'},
|
||||
{offset: 1, color: '#83bff6'}
|
||||
]
|
||||
)
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
formatter: params => { return `${params.marker} ${params.name}: ${params.value}个`; }
|
||||
},
|
||||
data: []
|
||||
}, {
|
||||
type: 'pie',
|
||||
radius: [0, '70%'],
|
||||
center: ['75%', '52%'],
|
||||
radius: [0, '72%'],
|
||||
center: ['74%', '55%'],
|
||||
tooltip: {
|
||||
formatter: params => { return `${params.marker} ${params.name}: ${params.percent}% (${params.value}个)`; }
|
||||
},
|
||||
|
@ -34,7 +34,7 @@
|
||||
queryObject: {
|
||||
status: {
|
||||
type: 'select',
|
||||
label: '状态',
|
||||
label: this.$t('global.status'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
@ -47,7 +47,7 @@
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '皮肤类型',
|
||||
title: this.$t('lesson.skinType'),
|
||||
prop: 'parameter',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.parameter, this.skinCodeList, ['code', 'name']) },
|
||||
@ -58,7 +58,7 @@
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
title: this.$t('global.status'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.taskStatusList, ['code', 'name']) },
|
||||
@ -79,7 +79,7 @@
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
@ -130,32 +130,32 @@
|
||||
})
|
||||
},
|
||||
taskStart(index, node) {
|
||||
this.$confirm('此操作将开始任务, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm('此操作将开始任务, 是否继续?', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
postTask({ id: node.id }).then(res => {
|
||||
this.$message.success('操作成功');
|
||||
this.$message.success(this.$t('lesson.operateSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(error => {
|
||||
this.reloadTable();
|
||||
this.$messageBox('操作失败');
|
||||
this.$messageBox(this.$t('error.operationFailure'));
|
||||
})
|
||||
})
|
||||
},
|
||||
taskCancel(index, node) {
|
||||
this.$confirm('此操作将取消任务, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm('此操作将取消任务, 是否继续?', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
postTaskCancel(node.id).then(res => {
|
||||
this.$message.success('操作成功');
|
||||
this.$message.success(this.$t('lesson.operateSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(error => {
|
||||
this.reloadTable();
|
||||
this.$messageBox('操作失败');
|
||||
this.$messageBox(this.$t('error.operationFailure'));
|
||||
})
|
||||
})
|
||||
},
|
||||
|
@ -2,8 +2,8 @@
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%" :before-close="handleClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button v-loading="loading" type="primary" @click="doSave">确 定</el-button>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -32,7 +32,7 @@ export default {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items: [
|
||||
{ prop: 'skinCode', label: '皮肤类型', type: 'select', required: true, options: this.skinCodeList }
|
||||
{ prop: 'skinCode', label: this.$t('lesson.skinType'), type: 'select', required: true, options: this.skinCodeList }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -40,13 +40,13 @@ export default {
|
||||
rules() {
|
||||
const crules = {
|
||||
skinCode: [
|
||||
{ required: true, message: '请选择皮肤类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
},
|
||||
title() {
|
||||
return '自动生成操作';
|
||||
return this.$t('lesson.generationOperation');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -77,9 +77,9 @@ export default {
|
||||
const self = this;
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
if (this.isShow) {
|
||||
this.$confirm('此操作将清空改皮肤下所有操作定义, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('global.wellClearOperate'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
self.create();
|
||||
@ -94,12 +94,12 @@ export default {
|
||||
this.loading = true;
|
||||
addTrainingRulesList(this.formModel.skinCode, OperationList[this.formModel.skinCode].list).then(response => {
|
||||
self.loading = false;
|
||||
self.$message.success('批量生成操作定义成功');
|
||||
self.$message.success(this.$t('lesson.batchCreateSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable'); // 刷新列表
|
||||
}).catch(error => {
|
||||
self.loading = false;
|
||||
self.$message.error('批量生成操作定义失败:' + error.message);
|
||||
self.$message.error(`${this.$('error.batchCreateFailed')}:${error.message}`);
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
|
@ -2,8 +2,8 @@
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button v-loading="loading" type="primary" @click="doSave">确 定</el-button>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -46,15 +46,15 @@ export default {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items: [
|
||||
{ prop: 'skinCode', label: '皮肤类型', type: 'select', required: true, options: this.skinCodeList, disabled: !isAdd },
|
||||
{ prop: 'trainingType', label: '实训类型', type: 'select', required: true, options: this.trainingTypeList, disabled: !isAdd, change: true, onChange: this.changeList },
|
||||
{ prop: 'operateType', label: '操作类型', type: 'select', required: true, options: this.trainingOperateTypeMap[this.formModel.trainingType], disabled: !isAdd },
|
||||
{ prop: 'skinCode', label: this.$t('lesson.skinType'), type: 'select', required: true, options: this.skinCodeList, disabled: !isAdd },
|
||||
{ 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: '实训名称', type: 'text', required: true, rightWidth: true, tooltip: true, info: '选择占位符 ‘{}’ 不可删除,否则名称显示会有问题!' },
|
||||
{ prop: 'minDuration', label: '最佳用时', type: 'text', required: true },
|
||||
{ prop: 'maxDuration', label: '最大用时', type: 'text', required: true },
|
||||
{ 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 },
|
||||
{ label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainRemark },
|
||||
{ prop: 'trainingRemark', label: '实训说明', type: 'textarea', required: true, tooltip: true, info: '选择占位符 ‘{}’ 不可删除,否则说明显示会有问题!' }
|
||||
{ prop: 'trainingRemark', label: this.$t('lesson.trainingRemark'), type: 'textarea', required: true, tooltip: true, info: this.$t('lesson.tipExplainPlaceholderInfo') }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -62,34 +62,34 @@ export default {
|
||||
rules() {
|
||||
const crules = {
|
||||
trainingName: [
|
||||
{ required: true, message: '请输入实训名称', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.inputTrainingName'), trigger: 'blur' }
|
||||
],
|
||||
trainingType: [
|
||||
{ required: true, message: '请输入实训类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.inputTrainingType'), trigger: 'change' }
|
||||
],
|
||||
operateType: [
|
||||
{ required: true, message: '请输入操作类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.inputOperationType'), trigger: 'change' }
|
||||
],
|
||||
skinCode: [
|
||||
{ required: true, message: '请选择皮肤类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' }
|
||||
],
|
||||
minDuration: [
|
||||
{ required: true, message: '请输入最佳用时', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.inputMinDuration'), trigger: 'blur' }
|
||||
],
|
||||
maxDuration: [
|
||||
{ required: true, message: '请输入最大用时', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.inputMaxDuration'), trigger: 'blur' }
|
||||
],
|
||||
trainingRemark: [
|
||||
{ required: true, max: 500, message: '请输入实训说明', trigger: 'blur' }
|
||||
{ required: true, max: 500, message: this.$t('rules.inputTrainingRemark'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
},
|
||||
title() {
|
||||
if (this.type === 'ADD') {
|
||||
return '创建操作规则';
|
||||
return this.$t('lesson.createOperateRule');
|
||||
} else {
|
||||
return '编辑操作规则';
|
||||
return this.$t('lesson.editOperateRule');
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -247,12 +247,12 @@ export default {
|
||||
this.loading = true;
|
||||
postTrainingRulesData(this.formModel).then(response => {
|
||||
self.loading = false;
|
||||
self.$message.success('创建操作定义成功');
|
||||
self.$message.success(this.$t('lesson.createOperateSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.loading = false;
|
||||
self.$message.error('创建操作定义失败:' + error.message);
|
||||
self.$message.error(`${this.$t('error.createOperateRuleFailed')}:${error.message}`);
|
||||
});
|
||||
},
|
||||
update() {
|
||||
@ -271,12 +271,12 @@ export default {
|
||||
this.loading = true;
|
||||
putTrainingRulesData(this.formModel).then(response => {
|
||||
self.loading = false;
|
||||
self.$message.success('创建操作定义成功');
|
||||
self.$message.success(this.$t('lesson.createOperateSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.loading = false;
|
||||
self.$message.error('创建操作定义失败:' + error.message);
|
||||
self.$message.error(`${this.$t('error.createOperateRuleFailed')}:${error.message}`);
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
|
@ -2,8 +2,8 @@
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -22,6 +22,12 @@
|
||||
dicId: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
deviceList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -34,18 +40,7 @@
|
||||
val: '',
|
||||
tip: ''
|
||||
},
|
||||
placeholderList: [],
|
||||
deviceList: [
|
||||
{ label: '菜单', value: 'bar' },
|
||||
{ label: '道岔', value: '02' },
|
||||
{ label: '区段', value: '03' },
|
||||
{ label: '信号机', value: '04' },
|
||||
{ label: '控制模式', value: '05' },
|
||||
{ label: '站台', value: '06' },
|
||||
{ label: '列车', value: '07' },
|
||||
{ label: '车站', value: '08' },
|
||||
{ label: '车次窗', value: '09' }
|
||||
],
|
||||
placeholderList: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -54,12 +49,12 @@
|
||||
let form = {
|
||||
labelWidth: '120px',
|
||||
items: [
|
||||
{ prop: 'orderNum', label: '步骤序号', type: 'text', required: true, disabled: !isAdd },
|
||||
{ prop: 'operateCode', label: '步骤操作码', type: 'text', required: true, disabled: !isAdd },
|
||||
{ prop: 'deviceType', label: '设备类型', type: 'select', required: true, options: this.deviceList, disabled: !isAdd },
|
||||
{ prop: 'val', label: '步骤返回值', type: 'text', required: false, disabled: !isAdd },
|
||||
{ prop: 'orderNum', label: this.$t('lesson.stepNo'), type: 'text', required: true, disabled: !isAdd },
|
||||
{ prop: 'operateCode', label: this.$t('lesson.operateCode'), type: 'text', required: true, disabled: !isAdd },
|
||||
{ prop: 'deviceType', label: this.$t('lesson.deviceType'), type: 'select', required: true, options: this.deviceList, disabled: !isAdd },
|
||||
{ prop: 'val', label: this.$t('lesson.stepReturn'), type: 'text', required: false, disabled: !isAdd },
|
||||
{ label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainRemark },
|
||||
{ prop: 'tip', label: '步骤提示信息', type: 'textarea', required: true, tooltip: true, info: '选择占位符 ‘{}’ 不可删除,否则说明显示会有问题!' },
|
||||
{ prop: 'tip', label: this.$t('lesson.stepTips'), type: 'textarea', required: true, tooltip: true, info: this.$t('lesson.tipExplainPlaceholderInfo') },
|
||||
]
|
||||
}
|
||||
return form
|
||||
@ -67,22 +62,22 @@
|
||||
rules() {
|
||||
let crules = {
|
||||
operateCode: [
|
||||
{ required: true, message: '请输入步骤操作码', trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.inputOperateCode'), trigger: 'blur' },
|
||||
],
|
||||
orderNum: [
|
||||
{ required: true, message: '请输入步骤序号', trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.inputStepNo'), trigger: 'blur' },
|
||||
],
|
||||
tip: [
|
||||
{ required: true, max: 500, message: '请输入步骤提示信息', trigger: 'blur' }
|
||||
{ required: true, max: 500, message: this.$t('rules.inputStepTips'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
return crules;
|
||||
},
|
||||
title() {
|
||||
if (this.type === 'ADD') {
|
||||
return '创建步骤信息'
|
||||
return this.$t('lesson.createStepInfo');
|
||||
} else {
|
||||
return '编辑步骤信息'
|
||||
return this.$t('lesson.editStepInfo');
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -138,11 +133,11 @@
|
||||
this.formModel.definitionId = this.$route.query.id;
|
||||
this.formModel.orderNum = Number(this.formModel.orderNum);
|
||||
postOperateStepData(this.formModel).then(response => {
|
||||
self.$message.success('创建操作步骤成功')
|
||||
self.$message.success(this.$t('lesson.createOperateSuccess'))
|
||||
self.handleClose()
|
||||
self.$emit('reloadTable')
|
||||
}).catch(error => {
|
||||
self.$message.error('创建操作步骤失败:' + error.message)
|
||||
self.$message.error(`${this.$t('error.createOperateStepFailed')}:${error.message}`)
|
||||
})
|
||||
},
|
||||
update() {
|
||||
@ -155,11 +150,11 @@
|
||||
})
|
||||
this.formModel.orderNum = Number(this.formModel.orderNum);
|
||||
putOperateStepData(this.formModel).then(response => {
|
||||
self.$message.success('更新操作步骤成功')
|
||||
self.$message.success(this.$t('lesson.updateOperateSuccess'))
|
||||
self.handleClose()
|
||||
self.$emit('reloadTable')
|
||||
}).catch(error => {
|
||||
self.$message.error('更新操作步骤失败' + error.message)
|
||||
self.$message.error(`${this.$t('error.updateOperateStepFailed')}:${error.message}`)
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
|
@ -1,10 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<turnback-bar :title="turnbackBarTitle"></turnback-bar>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
||||
</QueryListPage>
|
||||
<training-detail-edit ref="create" type="ADD" :dicId="dicId" @reloadTable="reloadTable"></training-detail-edit>
|
||||
<training-detail-edit ref="edit" type="EDIT" :dicId="dicId" @reloadTable="reloadTable"></training-detail-edit>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<training-detail-edit ref="create" type="ADD" :dicId="dicId" :deviceList="deviceList" @reloadTable="reloadTable"></training-detail-edit>
|
||||
<training-detail-edit ref="edit" type="EDIT" :dicId="dicId" :deviceList="deviceList" @reloadTable="reloadTable"></training-detail-edit>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -43,7 +47,7 @@
|
||||
queryObject: {
|
||||
operateCode: {
|
||||
type: 'text',
|
||||
label: '操作码'
|
||||
label: this.$t('lesson.operateCode')
|
||||
},
|
||||
}
|
||||
|
||||
@ -54,45 +58,40 @@
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '步骤序号',
|
||||
title: this.$t('lesson.stepNo'),
|
||||
prop: 'orderNum'
|
||||
},
|
||||
{
|
||||
title: '设备类型',
|
||||
title: this.$t('lesson.deviceType'),
|
||||
prop: 'deviceType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.deviceType, this.deviceList, ['value', 'label']) },
|
||||
tagType: (row) => { return 'success' }
|
||||
},
|
||||
{
|
||||
title: '操作码',
|
||||
title: this.$t('lesson.operateCode'),
|
||||
prop: 'operateCode'
|
||||
},
|
||||
{
|
||||
title: '提示信息',
|
||||
title: this.$t('lesson.stepTips'),
|
||||
prop: 'tip',
|
||||
type: 'replicText',
|
||||
columnValue: (row) => { return this.repliceName(row.tip, this.placeholderList) },
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: '编辑',
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.handleEdit
|
||||
},
|
||||
// {
|
||||
// name: '删除',
|
||||
// handleClick: this.handleDelete,
|
||||
// type: 'danger'
|
||||
// },
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '新增', btnCode: 'employee_insert', handler: this.handleAdd },
|
||||
{ text: this.$t('global.add'), btnCode: 'employee_insert', handler: this.handleAdd },
|
||||
]
|
||||
},
|
||||
|
||||
@ -100,12 +99,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
turnbackBarTitle() {
|
||||
return this.dic.name + '(' + this.dic.code + ')'
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.dicId = this.$route.query.id;
|
||||
this.init();
|
||||
@ -145,17 +138,17 @@
|
||||
},
|
||||
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除此实训步骤, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('lesson.wellDelOperate'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText:this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteOperateStepData(row.id).then(response => {
|
||||
this.$message.success('删除成功')
|
||||
this.$message.success(this.$t('lesson.deleteSuccess'))
|
||||
this.reloadTable()
|
||||
}).catch(error => {
|
||||
this.reloadTable()
|
||||
this.$messageBox('删除失败')
|
||||
this.$messageBox(this.$t('error.deleteFailed'))
|
||||
})
|
||||
})
|
||||
},
|
||||
@ -170,3 +163,10 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.draft {
|
||||
width: 400px;
|
||||
text-align: center;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
@ -1,15 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
||||
</QueryListPage>
|
||||
<training-edit ref="create" type="ADD" @reloadTable="reloadTable"></training-edit>
|
||||
<training-edit ref="edit" type="EDIT" @reloadTable="reloadTable"></training-edit>
|
||||
<add-batch ref="addBatch" @reloadTable="reloadTable"></add-batch>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<training-edit ref="create" type="ADD" @reloadTable="reloadTable" />
|
||||
<training-edit ref="edit" type="EDIT" @reloadTable="reloadTable" />
|
||||
<add-batch ref="addBatch" @reloadTable="reloadTable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { create, del } from '@/api/management/dictionary';
|
||||
import { getTrainingRulesList, deleteTrainingRulesData, getPlaceholderList } from '@/api/management/operation';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import TrainingEdit from './addEdit';
|
||||
@ -33,27 +31,27 @@
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
skinCode: {
|
||||
type: 'select',
|
||||
label: '皮肤类型',
|
||||
label: this.$t('lesson.skinType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
trainingType: {
|
||||
type: 'select',
|
||||
label: '实训类型',
|
||||
label: this.$t('lesson.trainingType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
trainingName: {
|
||||
type: 'text',
|
||||
label: '名称'
|
||||
},
|
||||
label: this.$t('lesson.trainingName')
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
@ -63,82 +61,82 @@
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '实训名称',
|
||||
title: this.$t('lesson.trainingName'),
|
||||
prop: 'trainingName',
|
||||
type: 'replicText',
|
||||
columnValue: (row) => { return this.repliceName(row.trainingName, this.placeholderMap[row.trainingType]) },
|
||||
columnValue: (row) => { return this.repliceName(row.trainingName, this.placeholderMap[row.trainingType]); }
|
||||
},
|
||||
{
|
||||
title: '皮肤类型',
|
||||
title: this.$t('lesson.skinType'),
|
||||
prop: 'skinCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']) },
|
||||
tagType: (row) => { return '' }
|
||||
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '实训类型',
|
||||
title: this.$t('lesson.trainingType'),
|
||||
prop: 'trainingType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.trainingType, this.trainingTypeList, ['code', 'name']) },
|
||||
tagType: (row) => { return 'success' }
|
||||
columnValue: (row) => { return this.$convertField(row.trainingType, this.trainingTypeList, ['code', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '操作类型',
|
||||
title: this.$t('lesson.operationType'),
|
||||
prop: 'operateType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.trainingType], ['code', 'name']) },
|
||||
tagType: (row) => { return 'success' }
|
||||
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.trainingType], ['code', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '最佳用时',
|
||||
title: this.$t('lesson.minDuration'),
|
||||
prop: 'minDuration'
|
||||
},
|
||||
{
|
||||
title: '最大用时',
|
||||
title: this.$t('lesson.maxDuration'),
|
||||
prop: 'maxDuration'
|
||||
},
|
||||
|
||||
{
|
||||
title: '实训说明',
|
||||
title: this.$t('lesson.trainingRemark'),
|
||||
prop: 'trainingRemark',
|
||||
type: 'replicText',
|
||||
columnValue: (row) => { return this.repliceName(row.trainingRemark, this.placeholderMap[row.trainingType]) },
|
||||
columnValue: (row) => { return this.repliceName(row.trainingRemark, this.placeholderMap[row.trainingType]); }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: '步骤明细',
|
||||
name: this.$t('lesson.stepDetail'),
|
||||
handleClick: this.handleViewDetail
|
||||
},
|
||||
{
|
||||
name: '编辑',
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.handleEdit
|
||||
},
|
||||
{
|
||||
name: '删除',
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handleDelete,
|
||||
type: 'danger'
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '新增', handler: this.handleAdd },
|
||||
{ text: '自动生成', handler: this.handleBatchAdd },
|
||||
{ text: this.$t('global.add'), handler: this.handleAdd },
|
||||
{ text: this.$t('lesson.generation'), handler: this.handleBatchAdd }
|
||||
]
|
||||
},
|
||||
currentModel: {}
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.trainingOperateTypeMap = {}
|
||||
this.trainingOperateTypeMap = {};
|
||||
this.$Dictionary.stationControl().then(list => {
|
||||
this.trainingOperateTypeMap['01'] = list; // 控制权实训
|
||||
});
|
||||
@ -170,8 +168,8 @@
|
||||
this.placeholderMap[item.trainingType] = [];
|
||||
}
|
||||
this.placeholderMap[item.trainingType].push(item);
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
// 获取皮肤列表
|
||||
this.skinCodeList = [];
|
||||
@ -180,7 +178,7 @@
|
||||
response.data.forEach(elem => {
|
||||
this.queryForm.queryObject.skinCode.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
// 获取实训类型
|
||||
this.trainingTypeList = [];
|
||||
@ -189,13 +187,13 @@
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.trainingType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
this.reloadTable();
|
||||
},
|
||||
repliceName(fieldValue, enumList) {
|
||||
if (enumList && enumList.length > 0) {
|
||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
||||
for (let i = 0; i < enumList.length; i++) {
|
||||
if (fieldValue.includes(`{${enumList[i].id}}`)) {
|
||||
fieldValue = fieldValue.replace(`{${enumList[i].id}}`, `{${enumList[i].name}}`);
|
||||
}
|
||||
@ -212,49 +210,49 @@
|
||||
form.operateType = '';
|
||||
this.trainingOperateTypeMap[form.trainingType].forEach(elem => {
|
||||
this.queryForm.queryObject.operateType.config.data.push({ value: elem.code, label: elem.name });
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
async getList(params) {
|
||||
let res = await getTrainingRulesList(params);
|
||||
const res = await getTrainingRulesList(params);
|
||||
this.totals = res.data.total;
|
||||
return res;
|
||||
},
|
||||
handleViewDetail(index, row) {
|
||||
this.$router.push({ path: `/lesson/manage/trainingRule/detail`, query: { id: row.id, type: row.trainingType, skinCode: row.skinCode } })
|
||||
this.$router.push({ path: `/lesson/manage/trainingRule/detail`, query: { id: row.id, type: row.trainingType, skinCode: row.skinCode } });
|
||||
},
|
||||
|
||||
handleEdit(index, row) {
|
||||
this.$refs.edit.show(row)
|
||||
this.$refs.edit.show(row);
|
||||
},
|
||||
|
||||
handleAdd() {
|
||||
this.$refs.create.show()
|
||||
this.$refs.create.show();
|
||||
},
|
||||
|
||||
handleBatchAdd() {
|
||||
this.$refs.addBatch.show(this.totals)
|
||||
this.$refs.addBatch.show(this.totals);
|
||||
},
|
||||
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除此实训规则, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('lesson.wellDelTrainingRule'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteTrainingRulesData(row.id).then(response => {
|
||||
this.$message.success('删除成功')
|
||||
this.reloadTable()
|
||||
}).catch(error => {
|
||||
this.reloadTable()
|
||||
this.$messageBox('删除失败')
|
||||
})
|
||||
})
|
||||
this.$message.success(this.$t('lesson.deleteSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.reloadTable();
|
||||
this.$messageBox(this.$t('error.deleteFailed'));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
reloadTable() {
|
||||
this.queryList.reload()
|
||||
}
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -42,7 +42,7 @@ export default {
|
||||
queryObject: {
|
||||
skinCode: {
|
||||
type: 'select',
|
||||
label: '皮肤类型',
|
||||
label: this.$t('lesson.skinType'),
|
||||
change: this.skinCodeChoose,
|
||||
config: {
|
||||
data: []
|
||||
@ -58,7 +58,7 @@ export default {
|
||||
},
|
||||
type: {
|
||||
type: 'select',
|
||||
label: '实训类型',
|
||||
label: this.$t('lesson.trainingType'),
|
||||
change: this.typeChoose,
|
||||
config: {
|
||||
data: []
|
||||
@ -66,7 +66,7 @@ export default {
|
||||
},
|
||||
operateType: {
|
||||
type: 'select',
|
||||
label: '操作类型',
|
||||
label: this.$t('lesson.operationType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
@ -80,7 +80,7 @@ export default {
|
||||
},
|
||||
name: {
|
||||
type: 'text',
|
||||
label: '实训名称'
|
||||
label: this.$t('lesson.trainingName')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -90,56 +90,56 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '实训名称',
|
||||
title: this.$t('lesson.trainingName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '皮肤类型',
|
||||
title: this.$t('lesson.skinType'),
|
||||
prop: 'skinCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '产品',
|
||||
title: this.$t('lesson.product'),
|
||||
prop: 'prdCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '实训类型',
|
||||
title: this.$t('lesson.trainingType'),
|
||||
prop: 'type',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.type, this.trainingTypeList, ['code', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '操作类型',
|
||||
title: this.$t('lesson.operationType'),
|
||||
prop: 'operateType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['code', 'name']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '最小用时',
|
||||
title: this.$t('lesson.minDuration'),
|
||||
prop: 'minDuration'
|
||||
},
|
||||
{
|
||||
title: '最大用时',
|
||||
title: this.$t('lesson.maxDuration'),
|
||||
prop: 'maxDuration'
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
title: this.$t('lesson.remarks'),
|
||||
prop: 'remarks'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: '演示',
|
||||
name: this.$t('lesson.demonstration'),
|
||||
handleClick: this.demoDisplay,
|
||||
type: ''
|
||||
}
|
||||
|
@ -1,23 +1,23 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="批量创建"
|
||||
:title="$t('map.createBatch')"
|
||||
:visible.sync="visible"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
>
|
||||
<el-radio-group v-model="mode" class="radio-mode">
|
||||
<el-radio label="01">创建</el-radio>
|
||||
<el-radio label="02">批量创建</el-radio>
|
||||
<el-radio label="01">{{ $t('map.create') }}</el-radio>
|
||||
<el-radio label="02">{{ $t('map.createBatch') }}</el-radio>
|
||||
</el-radio-group>
|
||||
<el-form ref="form" :model="addModel" label-width="90px" size="mini" :rules="rules">
|
||||
<el-form-item v-if="mode == '01'" label="车组号:" prop="groupNumber">
|
||||
<el-form-item v-if="mode == '01'" :label="$t('map.groupNumber')" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="mode == '02'" label="车组号区间:" prop="range">
|
||||
<el-form-item v-if="mode == '02'" :label="$t('map.groupNumberInterval')" prop="range">
|
||||
<el-input-number v-model="addModel.range.beg" :min="1" :max="999" />
|
||||
<el-input-number v-model="addModel.range.end" :min="1" :max="999" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车类型:" prop="modelCode">
|
||||
<el-form-item :label="$t('map.modelCode')" prop="modelCode">
|
||||
<el-select v-model="addModel.modelCode" filterable>
|
||||
<el-option
|
||||
v-for="item in trainModelList"
|
||||
@ -27,18 +27,18 @@
|
||||
/>
|
||||
</el-select>
|
||||
<el-button-group>
|
||||
<el-button type="primary" size="small" @click="newTrainMode">添加</el-button>
|
||||
<el-button type="primary" size="small" @click="uptTrainMode(addModel.modelCode)">更新
|
||||
<el-button type="primary" size="small" @click="newTrainMode">{{ $t('map.add') }}</el-button>
|
||||
<el-button type="primary" size="small" @click="uptTrainMode(addModel.modelCode)">{{ $t('map.updata') }}
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" @click="delTrainMode(addModel.modelCode)">删除
|
||||
<el-button type="primary" size="small" @click="delTrainMode(addModel.modelCode)">{{ $t('map.deleteObj') }}
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleConfirm">确 定</el-button>
|
||||
<el-button @click="visible = false">{{ $t('map.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="handleConfirm">{{ $t('map.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -79,14 +79,14 @@ export default {
|
||||
range.end >= range.beg) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('请选择有效的区间'));
|
||||
callback(new Error(this.$t('tip.selectValidInterval')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
modelCode: [
|
||||
{ required: true, message: '请选择车类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectTrainType'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
@ -109,6 +109,8 @@ export default {
|
||||
this.$emit('dispatch', { callback: 'delTrainMode', params: code});
|
||||
},
|
||||
handleConfirm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const list = [];
|
||||
|
||||
switch (this.mode) {
|
||||
@ -135,6 +137,8 @@ export default {
|
||||
this.$emit('dispatch', { callback: 'create', params: list});
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -62,13 +62,13 @@ export default {
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: '请重新选择设备', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.pleaseReSelectDevice'), trigger: 'change' }
|
||||
],
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.pleaseEnterGroupNumber'), trigger: 'blur' }
|
||||
],
|
||||
modelCode: [
|
||||
{ required: true, message: '请选择车类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectTrainType'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
search: ''
|
||||
@ -130,7 +130,7 @@ export default {
|
||||
if (Object.keys(this.$store.state.map.map || {}).length) {
|
||||
this.$refs.trainMode.doShow({}, 'ADD');
|
||||
} else {
|
||||
this.$messageBox('请先选择地图');
|
||||
this.$messageBox(this.$t('tip.selectMap'));
|
||||
}
|
||||
},
|
||||
uptTrainMode(code) {
|
||||
@ -138,7 +138,7 @@ export default {
|
||||
if (index >= 0) {
|
||||
this.$refs.trainMode.doShow(this.trainModelList[index], 'UPT');
|
||||
} else {
|
||||
this.$messageBox('请选择查看的列车模型');
|
||||
this.$messageBox(this.$t('tip.selectTrainType'));
|
||||
}
|
||||
},
|
||||
delTrainMode(code) {
|
||||
@ -154,15 +154,15 @@ export default {
|
||||
const train = this.$store.getters['map/getDeviceByCode'](row.code);
|
||||
if (train) {
|
||||
const _that = this;
|
||||
this.$confirm('是否确认删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', train);
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info('已取消删除');
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -156,7 +156,13 @@ export default {
|
||||
} else if (this.isUpt) {
|
||||
this.operateTrainModel({ model: this.formModel, type: 'UPT' });
|
||||
} else if (this.isDel) {
|
||||
this.$confirm(this.$t('map.wellDelTrianModel'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.operateTrainModel({ model: this.formModel, type: 'DEL'});
|
||||
}).catch(() => { });
|
||||
}
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -1,318 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<turnback-bar :title="turnbackBarTitle" />
|
||||
<div class="card-box">
|
||||
<el-steps class="steps" :active="display">
|
||||
<el-step :title="title" icon="el-icon-edit-outline" />
|
||||
<el-step title="" icon="el-icon-upload" />
|
||||
</el-steps>
|
||||
<el-card class="forms">
|
||||
<el-scrollbar
|
||||
wrap-class="scrollbar-wrapper"
|
||||
:style="{height:height - 300 + 'px'}"
|
||||
style="padding-top: 60px"
|
||||
>
|
||||
<el-form ref="form" :model="addModel" label-width="140px">
|
||||
<el-form-item :label="this.$t('map.belongsToMapName')+':'" prop="mapName">
|
||||
<el-input v-model="addModel.mapName" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('map.productType')+':'" prop="prdType">
|
||||
<el-radio-group v-model="addModel.prdType">
|
||||
<template v-for="item in chooseList">
|
||||
<el-radio-button :key="item" :label="item.code">{{ item.name }}</el-radio-button>
|
||||
</template>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="this.$t('map.productCode')+':'"
|
||||
prop="code"
|
||||
:rules="node && node.data.type ==='map' ? baseRules.code:{}"
|
||||
>
|
||||
<el-input v-model="addModel.code" :disabled="codeDisabled" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('map.productName')+':'" prop="name" :rules="baseRules.name">
|
||||
<el-input v-model="addModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('map.productDescription')+':'" prop="remarks" :rules="baseRules.remarks">
|
||||
<el-input v-model="addModel.remarks" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('map.associateTrainingTypes')+':'" prop="trainTypes" :rules="baseRules.trainTypes">
|
||||
<el-select
|
||||
v-model="addModel.trainTypes"
|
||||
multiple
|
||||
:placeholder="this.$t('map.pleaseSelect')"
|
||||
@change="trainTypesChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in trainTypesList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="isAdd" type="primary" @click="create">{{$t('global.create')}}</el-button>
|
||||
<el-button v-if="isEdit" type="warning" @click="update">{{$t('global.update')}}</el-button>
|
||||
<el-button v-if="isEdit" type="danger" @click="deleteObj">{{$t('global.delete')}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { createTrainingCategory, updateTrainingCategory, deleteTrainingCategory } from '@/api/management/mapprd';
|
||||
import { getProductDetail } from '@/api/management/mapprd';
|
||||
import localStore from 'storejs';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
|
||||
export default {
|
||||
name: 'ShowDetail',
|
||||
mixins: [
|
||||
WindowResizeHandler
|
||||
],
|
||||
props: {
|
||||
height: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
node: null,
|
||||
display: 1,
|
||||
// height: 0,
|
||||
codeDisabled: true,
|
||||
rules: {},
|
||||
trainTypesList: [],
|
||||
initTrainTypes: [],
|
||||
chooseList: [],
|
||||
addModel: {
|
||||
id: '',
|
||||
mapId: '',
|
||||
mapName: '',
|
||||
skinCode: '',
|
||||
name: '',
|
||||
remarks: '',
|
||||
code: '',
|
||||
prdType: '01',
|
||||
trainTypes: []
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
if (this.isAdd) {
|
||||
return this.$t('map.createTrainingCategories');
|
||||
} else if (this.isEdit) {
|
||||
return this.$t('map.editTrainingCategories');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
turnbackBarTitle() {
|
||||
return '';
|
||||
},
|
||||
isAdd() {
|
||||
return this.$route.params.mode == 'add';
|
||||
},
|
||||
isEdit() {
|
||||
return this.$route.params.mode == 'edit';
|
||||
},
|
||||
baseRules() {
|
||||
return {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.productCodeEnter'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.productNameEnter'), trigger: 'change' }
|
||||
],
|
||||
remarks: [
|
||||
{ required: true, message: this.$t('rules.productDescriptionEnter'), trigger: 'change' }
|
||||
],
|
||||
trainTypes: [
|
||||
{ required: true, message: this.$t('rules.trainingTypeSelect'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$Dictionary.trainingType().then(list => {
|
||||
this.trainTypesList = list;
|
||||
});
|
||||
this.$Dictionary.productPostType().then(list => {
|
||||
this.chooseList = list;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
resizeHandler: function () {
|
||||
this.height = this._clientHeight;
|
||||
},
|
||||
loadData(node) {
|
||||
if (node) {
|
||||
// 清除数据
|
||||
this.node = node;
|
||||
this.initTrainTypes = [];
|
||||
this.$refs.form.resetFields();
|
||||
if (node.data.type === 'map') {
|
||||
this.codeDisabled = false;
|
||||
getPublishMapInfo(node.data.id).then(response => {
|
||||
const data = response.data;
|
||||
this.addModel.mapName = data.name;
|
||||
this.addModel.skinCode = data.skinCode;
|
||||
this.loading = false;
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
} else if (node.data.type === 'prd') {
|
||||
this.codeDisabled = true;
|
||||
getProductDetail(node.data.id).then(response => {
|
||||
this.addModel.mapName = node.parent.data.name;
|
||||
this.addModel.mapId = node.parent.data.id;
|
||||
this.addModel.name = response.data.name;
|
||||
this.addModel.remarks = response.data.remarks;
|
||||
this.addModel.prdType = response.data.prdType || '01';
|
||||
this.addModel.code = response.data.code;
|
||||
this.addModel.skinCode = response.data.skinCode;
|
||||
this.addModel.trainTypes = this.initTrainTypes = response.data.trainTypes;
|
||||
this.addModel.id = response.data.id;
|
||||
this.loading = false;
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 清除表单验证提示信息
|
||||
this.$nextTick(function () {
|
||||
this.$refs.form.clearValidate();
|
||||
});
|
||||
}
|
||||
},
|
||||
create() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
skinCode: this.addModel.skinCode,
|
||||
mapName: this.addModel.mapName,
|
||||
name: this.addModel.name,
|
||||
remarks: this.addModel.remarks,
|
||||
prdType: this.addModel.prdType,
|
||||
code: this.addModel.code,
|
||||
trainTypes: this.addModel.trainTypes
|
||||
};
|
||||
createTrainingCategory(data).then(response => {
|
||||
this.initTrainTypes = this.addModel.trainTypes;
|
||||
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('mapId') || '']);
|
||||
this.$message.success(this.$t('tip.productCreationSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.productCreationFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
update() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
updateTrainingCategory(this.addModel).then(response => {
|
||||
this.initTrainTypes = this.addModel.trainTypes;
|
||||
this.$message.success(this.$t('tip.updateProductSuccessfully'));
|
||||
// this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('mapId') || '']);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.updateProductFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
trainTypesChange(tag) {
|
||||
if (this.initTrainTypes && this.initTrainTypes.length > 0) {
|
||||
this.initTrainTypes.forEach(elem => {
|
||||
if (this.addModel.trainTypes.indexOf(elem) < 0) {
|
||||
this.addModel.trainTypes = this.initTrainTypes;
|
||||
this.$messageBox(this.$t('error.cannotNarrowDown'));
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
deleteObj() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
deleteTrainingCategory(this.addModel).then(response => {
|
||||
this.$message.success(this.$t('tip.deleteProductSuccessfully'));
|
||||
this.$refs.form.resetFields();
|
||||
this.node = null;
|
||||
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('mapId') || '']);
|
||||
}).catch(error => {
|
||||
if (error.code === 500009) {
|
||||
this.$messageBox(this.$t('tip.cannotDeleteProduct'));
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.deleteProductFailed'));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
turnback() {
|
||||
this.$router.go(-1);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.card-box {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.steps {
|
||||
width: 980px;
|
||||
margin: 0 auto;
|
||||
padding-top: 20px;
|
||||
height: 100%;
|
||||
|
||||
/deep/ {
|
||||
.el-step__icon.is-icon {
|
||||
width: 95px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.forms {
|
||||
width: 800px;
|
||||
margin: 0 auto;
|
||||
margin-top: 15px;
|
||||
|
||||
/deep/ {
|
||||
.el-select {
|
||||
float: left;
|
||||
width: calc(600px);
|
||||
}
|
||||
|
||||
.el-textarea {
|
||||
float: left;
|
||||
width: calc(600px);
|
||||
}
|
||||
|
||||
.el-form-item__content>.el-input {
|
||||
float: left;
|
||||
width: calc(600px);
|
||||
}
|
||||
|
||||
.el-input-number {
|
||||
float: left;
|
||||
width: calc(250px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.draft {
|
||||
width: 300px;
|
||||
text-align: center;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
@ -7,10 +7,10 @@
|
||||
<el-card class="forms">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height:height -120 + 'px'}" style="padding-top: 40px">
|
||||
<el-form ref="form" :model="addModel" label-width="140px">
|
||||
<el-form-item label="皮肤类型:" prop="mapName">
|
||||
<el-form-item :label="$t('map.skinStyleColon')" prop="mapName">
|
||||
<el-input v-model="addModel.mapName" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品类型:" prop="prdType">
|
||||
<el-form-item :label="$t('map.productType') + ':'" prop="prdType">
|
||||
<el-radio-group v-model="addModel.prdType" :disabled="isUpdate">
|
||||
<template v-for="item in chooseList">
|
||||
<el-radio-button :key="item.code" :label="item.code">{{ item.name }}</el-radio-button>
|
||||
@ -18,22 +18,22 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="产品编码:"
|
||||
:label="$t('map.productCode') + ':'"
|
||||
prop="code"
|
||||
:rules="node && node.data.type ==='skin' ? baseRules.code:{}"
|
||||
>
|
||||
<el-input v-model="addModel.code" :disabled="codeDisabled" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称:" prop="name" :rules="baseRules.name">
|
||||
<el-form-item :label="$t('map.productName') + ':'" prop="name" :rules="baseRules.name">
|
||||
<el-input v-model="addModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="isShowTrainTypes"
|
||||
label="关联实训类型:"
|
||||
:label="$t('map.associateTrainingTypes') + ':'"
|
||||
prop="trainTypes"
|
||||
:rules="baseRules.trainTypes"
|
||||
>
|
||||
<el-select v-model="addModel.trainTypes" multiple placeholder="请选择" @change="trainTypesChange">
|
||||
<el-select v-model="addModel.trainTypes" multiple :placeholder="$t('map.pleaseSelect')" @change="trainTypesChange">
|
||||
<el-option
|
||||
v-for="item in trainTypesList"
|
||||
:key="item.code"
|
||||
@ -42,7 +42,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品说明:" prop="remarks" :rules="baseRules.remarks">
|
||||
<el-form-item :label="$t('map.productDescription') + ':'" prop="remarks" :rules="baseRules.remarks">
|
||||
<el-input v-model="addModel.remarks" type="textarea" :rows="4" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -50,24 +50,23 @@
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="isCreate" type="primary" @click="create">创建</el-button>
|
||||
<el-button v-if="isUpdate" type="primary" @click="update">更新</el-button>
|
||||
<el-button v-if="isDelete" type="danger" @click="deleteObj">删除</el-button>
|
||||
<el-button v-if="isCreate" type="primary" @click="create">{{ $t('map.create') }}</el-button>
|
||||
<el-button v-if="isUpdate" type="primary" @click="update">{{ $t('map.updata') }}</el-button>
|
||||
<el-button v-if="isDelete" type="danger" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { createTrainingCategory, updateTrainingCategory, getProductDetail, deleteTrainingCategory, checkMapProductCodeExist } from '@/api/management/mapprd';
|
||||
// import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'ShowDetail',
|
||||
props: {
|
||||
height: {
|
||||
type: Number
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -97,13 +96,13 @@ export default {
|
||||
title() {
|
||||
if (this.node && this.node.data) {
|
||||
if (this.node.data.type === 'skin') {
|
||||
return '创建产品类目';
|
||||
return this.$t('map.createProductCategories');
|
||||
} else if (this.node.data.type === 'prd' ||
|
||||
this.node.data.type === 'prd') {
|
||||
return '编辑产品类目';
|
||||
return this.$t('map.editTraining');
|
||||
}
|
||||
}
|
||||
return '请选择操作';
|
||||
return this.$t('map.selectOperation');
|
||||
},
|
||||
isCreate() {
|
||||
return this.node && this.node.data.type === 'skin';
|
||||
@ -120,16 +119,16 @@ export default {
|
||||
baseRules() {
|
||||
return {
|
||||
code: [
|
||||
{ required: true, message: '请输入产品编码', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.productCodeEnter'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入产品名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.productNameEnter'), trigger: 'change' }
|
||||
],
|
||||
remarks: [
|
||||
{ required: true, message: '请输入产品说明', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.productDescriptionEnter'), trigger: 'change' }
|
||||
],
|
||||
trainTypes: [
|
||||
{ required: true, message: '请选择关联实训类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.trainingTypeSelect'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
@ -198,15 +197,15 @@ export default {
|
||||
createTrainingCategory(data).then(response => {
|
||||
this.initTrainTypes = this.addModel.trainTypes;
|
||||
this.$emit('refresh');
|
||||
this.$message.success('创建产品成功');
|
||||
this.$message.success(this.$t('tip.productCreationSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox('创建产品失败');
|
||||
this.$messageBox(this.$t('tip.productCreationFailed'));
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('产品Code已存在');
|
||||
this.$messageBox(this.$t('tip.productCodeExists'));
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox('校验产品Code是否已存在失败');
|
||||
this.$messageBox(this.$t('tip.productCodeExists'));
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -217,10 +216,10 @@ export default {
|
||||
this.addModel.trainTypes = this.isShowTrainTypes ? this.addModel.trainTypes : [];
|
||||
updateTrainingCategory(this.addModel).then(response => {
|
||||
this.initTrainTypes = this.addModel.trainTypes;
|
||||
this.$message.success('更新产品成功');
|
||||
this.$message.success(this.$t('tip.updateProductSuccessfully'));
|
||||
this.$emit('refresh');
|
||||
}).catch(() => {
|
||||
this.$messageBox('更新产品失败');
|
||||
this.$messageBox(this.$t('tip.updateProductFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -230,7 +229,7 @@ export default {
|
||||
this.initTrainTypes.forEach(elem => {
|
||||
if (this.addModel.trainTypes.indexOf(elem) < 0) {
|
||||
this.addModel.trainTypes = this.initTrainTypes;
|
||||
this.$messageBox('不能缩小上次创建的实训列表的范围');
|
||||
this.$messageBox(this.$t('tip.narrowScope'));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -239,15 +238,15 @@ export default {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
deleteTrainingCategory(this.addModel).then(response => {
|
||||
this.$message.success('删除产品成功');
|
||||
this.$message.success(this.$t('tip.deleteProductSuccessfully'));
|
||||
this.$refs.form.resetFields();
|
||||
this.node = null;
|
||||
this.$emit('refresh');
|
||||
}).catch(error => {
|
||||
if (error.code === 500009) {
|
||||
this.$messageBox('产品已被使用无法删除');
|
||||
this.$messageBox(this.$t('tip.cannotDeleteProduct'));
|
||||
} else {
|
||||
this.$messageBox('删除产品失败');
|
||||
this.$messageBox(this.$t('tip.deleteProductFailed'));
|
||||
}
|
||||
});
|
||||
}
|
@ -10,7 +10,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { deleteMap, listMap, newMap, getMapDetail, publishMap, editMap, saveAsMap } from '@/api/jmap/mapdraft';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import TrainingTreeOperate from './tree';
|
||||
import EditDetailOperate from './edit';
|
@ -1,154 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPublishMapList, delPublishMap } from '@/api/jmap/map';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'ProductList',
|
||||
data() {
|
||||
return {
|
||||
cityList: [],
|
||||
skinCodeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('map.name')
|
||||
},
|
||||
cityCode: {
|
||||
type: 'select',
|
||||
label: this.$t('map.selectCity'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
queryList: {
|
||||
query: getPublishMapList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('map.mapName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('map.skinType'),
|
||||
prop: 'skinCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('map.turnoverTime'),
|
||||
prop: 'updateTime'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('map.productList'),
|
||||
handleClick: this.handleList,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('global.modify'),
|
||||
handleClick: this.handleEdit,
|
||||
type: 'warning'
|
||||
},
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handleDelete,
|
||||
type: 'danger'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('global.add'), btnCode: 'employee_insert', handler: this.handleAdd }
|
||||
]
|
||||
},
|
||||
currentModel: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShow() {
|
||||
return this.$store.getters['roles'].indexOf('05');
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.cityList = [];
|
||||
this.$Dictionary.cityType().then(list => {
|
||||
this.cityList = list;
|
||||
this.cityList.forEach(elem => {
|
||||
this.queryForm.queryObject.cityCode.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.loadingCityListFailed'));
|
||||
});
|
||||
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.$router.push({ path: `${UrlConfig.map.productDraft}/add/0` });
|
||||
},
|
||||
|
||||
// 列表
|
||||
handleList(index, row) {
|
||||
|
||||
},
|
||||
|
||||
// 编辑
|
||||
handleEdit(index, row) {
|
||||
this.$router.push({ path: `${UrlConfig.map.productDraft}/edit/0` });
|
||||
},
|
||||
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.$confirm(this.$t('tip.deleteTypeHint'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delPublishMap(row.id).then(response => {
|
||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||
this.reloadTable();
|
||||
localStore.remove('mapId');
|
||||
}).catch(() => {
|
||||
this.reloadTable();
|
||||
this.$messageBox(this.$t('tip.failDelete'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>产品类目</span>
|
||||
<span>{{ $t('map.productCategories') }}</span>
|
||||
</div>
|
||||
<el-input v-model="filterText" placeholder="输入关键字进行过滤" clearable />
|
||||
<el-input v-model="filterText" :placeholder="$t('tip.enterKeywordsFiltering')" clearable />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height +'px' }">
|
||||
<el-tree
|
||||
ref="trainingTree"
|
||||
@ -99,7 +99,7 @@ export default {
|
||||
this.treeData = this.convertTreeData(response.data);
|
||||
this.$nextTick(() => { this.loading = false; });
|
||||
}).catch(() => {
|
||||
this.$messageBox('刷新失败');
|
||||
this.$messageBox(this.$t('tip.refreshFailure'));
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
@ -2,9 +2,14 @@
|
||||
<el-dialog :title="this.$t('map.setupOperationGraph')" :visible.sync="dialogShow" width="600px" :before-close="doClose" append-to-body>
|
||||
<el-form ref="form" :model="formModel" label-width="160px" size="mini" :rules="rules">
|
||||
<el-form-item :label="this.$t('map.selectOperationGraphDataRange')+':'" prop="timeArea">
|
||||
<el-time-picker is-range v-model="formModel.timeArea" range-separator="this.$t('map.to')" start-placeholder="this.$t('global.startTime')"
|
||||
end-placeholder="this.$t('global.endTime')" placeholder="this.$t('map.selectionTimeRange')">
|
||||
</el-time-picker>
|
||||
<el-time-picker
|
||||
v-model="formModel.timeArea"
|
||||
is-range
|
||||
range-separator="this.$t('map.to')"
|
||||
start-placeholder="this.$t('global.startTime')"
|
||||
end-placeholder="this.$t('global.endTime')"
|
||||
placeholder="this.$t('map.selectionTimeRange')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@ -16,7 +21,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'ChartSetting',
|
||||
data() {
|
||||
@ -25,12 +29,12 @@
|
||||
intervalList: [
|
||||
{ code: '01', value: this.$t('map.pointSystem1') },
|
||||
{ code: '02', value: this.$t('map.pointSystem2') },
|
||||
{ code: '05', value: this.$t('map.pointSystem5') },
|
||||
{ code: '05', value: this.$t('map.pointSystem5') }
|
||||
],
|
||||
formModel: {
|
||||
timeArea: [new Date(2018, 10, 1), new Date(2018, 10, 1)],
|
||||
}
|
||||
timeArea: [new Date(2018, 10, 1), new Date(2018, 10, 1)]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
rules() {
|
||||
@ -38,7 +42,7 @@
|
||||
timeArea: [
|
||||
{ required: true, message: this.$t('rules.selectDataRange'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -51,19 +55,19 @@
|
||||
handle() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
let baseDate = new Date(2018, 10, 1);
|
||||
let model = {
|
||||
const baseDate = new Date(2018, 10, 1);
|
||||
const model = {
|
||||
startValue: this.formModel.timeArea[0].valueOf() - baseDate.valueOf(),
|
||||
endValue: this.formModel.timeArea[1].valueOf() - baseDate.valueOf(),
|
||||
intervalLevel: parseFloat('01')
|
||||
}
|
||||
};
|
||||
this.$emit('settingExac', model);
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<div class="list" :style="{width: widthLeft+'px'}">
|
||||
<chart-list ref="list" :height="height"></chart-list>
|
||||
<chart-list ref="list" :height="height" />
|
||||
</div>
|
||||
<drap-left :widthLeft="widthLeft" @drapWidth="drapWidth"></drap-left>
|
||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||
<transition>
|
||||
<router-view style="float: right;" :style="{width: width+'px'}"></router-view>
|
||||
<router-view style="float: right;" :style="{width: width+'px'}" />
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
@ -16,18 +16,18 @@
|
||||
import ChartList from './manage/list';
|
||||
|
||||
export default {
|
||||
name: 'runPlan',
|
||||
mixins: [WindowResizeHandler],
|
||||
name: 'RunPlan',
|
||||
components: {
|
||||
DrapLeft,
|
||||
ChartList,
|
||||
ChartList
|
||||
},
|
||||
mixins: [WindowResizeHandler],
|
||||
data() {
|
||||
return {
|
||||
width: 0,
|
||||
height: 0,
|
||||
widthLeft: 320,
|
||||
}
|
||||
widthLeft: 320
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
widthLeft(val) {
|
||||
@ -44,14 +44,14 @@
|
||||
this.height = this._clientHeight - 150;
|
||||
this.$store.dispatch('runPlan/resize', { width: this.width, height: this.height + 90 });
|
||||
} else {
|
||||
setTimeout(() => { this.setRunPlanResize(LeftWidth); }, 300)
|
||||
setTimeout(() => { this.setRunPlanResize(LeftWidth); }, 300);
|
||||
}
|
||||
},
|
||||
resizeHandler() {
|
||||
this.setRunPlanResize(this.widthLeft);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -98,7 +98,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" :disabled="isSpeed" @click="back"><span>{{$t('global.lastStep')}}</span></el-button>
|
||||
<el-button type="primary" :disabled="isSpeed" @click="back"><span>{{ $t('global.previousStep') }}</span></el-button>
|
||||
<el-button type="primary" :loading="loading" @click="next">
|
||||
<span v-if="isSpeed && disabled">{{ $t('global.skip') }}</span>
|
||||
<span v-if="isSpeed && !disabled">{{ $t('global.create') }}</span>
|
||||
@ -118,7 +118,9 @@ export default {
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
requited: true
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -21,7 +21,9 @@ export default {
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
requited: true
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -22,7 +22,9 @@ export default {
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
requited: true
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -25,11 +25,11 @@ export default {
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('map.skinDesignation'),
|
||||
label: this.$t('map.skinDesignation')
|
||||
},
|
||||
code: {
|
||||
type: 'text',
|
||||
label: this.$t('map.skinCoding'),
|
||||
label: this.$t('map.skinCoding')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1,10 +1,18 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="show" width="360px" :before-close="doClose" :zIndex="2000" :modal="false"
|
||||
:close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="text-align:center">
|
||||
<el-radio-group v-model="formModel.canDistribute">
|
||||
<el-radio :label="true">公用权限</el-radio>
|
||||
<el-radio :label="false">专用权限</el-radio>
|
||||
<el-radio :label="true">{{ $t('global.publishPermission') }}</el-radio>
|
||||
<el-radio :label="false">{{ $t('global.specialPermission') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@ -20,16 +28,16 @@
|
||||
return {
|
||||
dialogShow: false,
|
||||
formModel: {
|
||||
canDistribute: true,
|
||||
},
|
||||
|
||||
canDistribute: true
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() { return '选择转赠权限'; }
|
||||
title() { return this.$t('permission.pleaseSelectTransferPermission'); }
|
||||
},
|
||||
methods: {
|
||||
doShow(data) {
|
||||
@ -47,5 +55,5 @@
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -51,7 +51,7 @@ export default {
|
||||
},
|
||||
DatePicker: {
|
||||
shortcuts: [{
|
||||
text: '今天',
|
||||
text: this.$t('global.today'),
|
||||
onClick(picker) {
|
||||
picker.$emit('pick', new Date());
|
||||
}
|
||||
@ -66,13 +66,13 @@ export default {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items: [
|
||||
{ prop: 'permissionType', label: '权限类型', type: 'select', required: false, disabled: !this.isAdd, options: this.PermissionTypeList, change: true, onChange: this.permissionTypeChange },
|
||||
{ prop: 'mapId', label: '地图名称', type: 'select', required: false, disabled: !this.isAdd, show: this.isShowMap, options: this.PublishMapList, change: true, onChange: this.mapChange },
|
||||
{ prop: 'mapProductCode', label: '地图产品名称', type: 'select', required: false, disabled: !this.isAdd, show: this.isShowMapProduct, options: this.mapProductList, change: true, onChange: this.mapProductChange },
|
||||
{ prop: 'lessonId', label: '课程名称', type: 'select', required: false, disabled: !this.isAdd, show: this.isShowLesson, options: this.filterPublisLessonList },
|
||||
{ prop: 'roleName', label: '选择权限所有者', type: 'complete', required: false, disabled: !this.isAdd, show: this.isShowRole, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
||||
{ prop: 'date', label: '选择时间', type: 'daterange', required: false, viewFormat: 'yyyy-MM-dd HH:mm:ss', valueFormat: 'yyyy-MM-dd HH:mm:ss' },
|
||||
{ prop: 'amount', label: '权限个数', type: 'number', required: false, min: 0, max: this.maxTotal, message: this.numberMessage }
|
||||
{ prop: 'permissionType', label: this.$t('permission.permissionType'), type: 'select', required: false, disabled: !this.isAdd, options: this.PermissionTypeList, change: true, onChange: this.permissionTypeChange },
|
||||
{ prop: 'mapId', label: this.$t('permission.mapName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowMap, options: this.PublishMapList, change: true, onChange: this.mapChange },
|
||||
{ prop: 'mapProductCode', label: this.$t('permission.mapProductName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowMapProduct, options: this.mapProductList, change: true, onChange: this.mapProductChange },
|
||||
{ prop: 'lessonId', label: this.$t('permission.lessonName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowLesson, options: this.filterPublisLessonList },
|
||||
{ prop: 'roleName', label: this.$t('permission.belonger'), type: 'complete', required: false, disabled: !this.isAdd, show: this.isShowRole, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
||||
{ prop: 'date', label: this.$t('permission.selectDate'), type: 'daterange', required: false, viewFormat: 'yyyy-MM-dd HH:mm:ss', valueFormat: 'yyyy-MM-dd HH:mm:ss' },
|
||||
{ prop: 'amount', label: this.$t('permission.permissionTotal'), type: 'number', required: false, min: 0, max: this.maxTotal, message: this.numberMessage }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -80,28 +80,28 @@ export default {
|
||||
rules() {
|
||||
const crules = {
|
||||
permissionType: [
|
||||
{ required: true, message: '请选择权限类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.permissionTypeInput'), trigger: 'change' }
|
||||
],
|
||||
mapId: [
|
||||
{ required: true, message: '请选择地图名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
|
||||
],
|
||||
mapProductCode: [
|
||||
{ required: true, message: '请选择地图产品名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectMapProductName'), trigger: 'change' }
|
||||
],
|
||||
lessonId: [
|
||||
{ required: true, message: '请选择课程', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.lessonInput'), trigger: 'change' }
|
||||
],
|
||||
date: [
|
||||
{ required: true, message: '请输入时间', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.inputTime'), trigger: 'blur' }
|
||||
],
|
||||
amount: [
|
||||
{ required: true, message: '请输入权限个数', trigger: 'change' },
|
||||
{ required: true, message: this.$t('rules.inputPermissionNumber'), trigger: 'change' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (Number.isInteger(Number(value)) && Number(value) > 0) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('权限个数必须大于0'));
|
||||
callback(new Error(this.$t('rules.permissionNumberGreater0')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
@ -112,9 +112,9 @@ export default {
|
||||
},
|
||||
title() {
|
||||
if (this.isAdd) {
|
||||
return '增加权限打包规则';
|
||||
return this.$t('permission.addPermissionPackageRule');
|
||||
} else {
|
||||
return '编辑权限打包规则';
|
||||
return this.$t('permission.editPermissionPackageRule');
|
||||
}
|
||||
},
|
||||
disabled() {
|
||||
@ -179,7 +179,7 @@ export default {
|
||||
|
||||
getTotalRemains(model).then(response => {
|
||||
this.maxTotal = response.data;
|
||||
this.numberMessage = `(剩余最大权限个数:${this.maxTotal})`;
|
||||
this.numberMessage = this.$t('permission.restPermissionMaxNumber').replace('{0}', this.maxTotal);
|
||||
}).catch(() => {
|
||||
this.numberMessage = '';
|
||||
});
|
||||
|
@ -3,11 +3,11 @@
|
||||
<div class="pack-box" :style="{ height: height +'px' }">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" style="">
|
||||
<el-steps class="steps" :active="display">
|
||||
<el-step title="制定打包规则" icon="el-icon-edit" />
|
||||
<el-step :title="$t('permission.customPackageRules')" icon="el-icon-edit" />
|
||||
<el-step icon="el-icon-setting" />
|
||||
</el-steps>
|
||||
<el-card class="forms pack-rule">
|
||||
<el-button class="addList" size="small" @click="dialogAdd">添加规则</el-button>
|
||||
<el-button class="addList" size="small" @click="dialogAdd">{{ $t('permission.addRules') }}</el-button>
|
||||
<el-table
|
||||
:data="ruleList"
|
||||
border
|
||||
@ -16,41 +16,41 @@
|
||||
style="width: 100%"
|
||||
:height="height-300"
|
||||
>
|
||||
<el-table-column prop="permissionType" label="权限类型" width="80">
|
||||
<el-table-column prop="permissionType" :label="$t('permission.permissionType')" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(PermissionTypeList, scope.row.permissionType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mapId" label="地图名称">
|
||||
<el-table-column prop="mapId" :label="$t('permission.mapName')">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(PublishMapList, scope.row.mapId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="mapProductCode" label="产品名称" width="80">
|
||||
<el-table-column prop="mapProductCode" :label="$t('permission.mapProductName')" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.mapProductCode }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lessonId" label="课程名称">
|
||||
<el-table-column prop="lessonId" :label="$t('permission.lessonName')">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(PublisLessonList, scope.row.lessonId) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="起始时间" width="80" />
|
||||
<el-table-column prop="endTime" label="结束时间" width="80" />
|
||||
<el-table-column prop="amount" label="分配权限数量" width="110" />
|
||||
<el-table-column label="操作" width="90">
|
||||
<el-table-column prop="startTime" :label="$t('permission.startTime')" width="80" />
|
||||
<el-table-column prop="endTime" :label="$t('permission.endTime')" width="80" />
|
||||
<el-table-column prop="amount" :label="$t('permission.permissionTotal')" width="110" />
|
||||
<el-table-column l:abel="$t('global.operate')" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="dialogEdit(scope.row)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteForm(scope.row)">删除</el-button>
|
||||
<el-button type="text" size="small" @click="dialogEdit(scope.row)">{{ $t('global.edit') }}</el-button>
|
||||
<el-button type="text" size="small" @click="deleteForm(scope.row)">{{ $t('global.delete') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="!urlInfo.url" type="primary" @click="packForm">打包</el-button>
|
||||
<el-button v-if="urlInfo.url" type="primary" @click="qrcodeShow">获取二维码</el-button>
|
||||
<el-button v-if="!urlInfo.url" type="primary" @click="packForm">{{ $t('permission.package') }}</el-button>
|
||||
<el-button v-if="urlInfo.url" type="primary" @click="qrcodeShow">{{ $t('permission.getQrcode') }}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
@ -109,7 +109,7 @@ export default {
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总数';
|
||||
sums[index] = this.$t('global.totoal');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ export default {
|
||||
if (index < 0) {
|
||||
this.ruleList.push(item);
|
||||
} else {
|
||||
this.$message.warning('已存在此类型规则');
|
||||
this.$message.warning(this.$t('permission.hasExitRule'));
|
||||
}
|
||||
},
|
||||
editRuleForm(item) {
|
||||
@ -231,7 +231,7 @@ export default {
|
||||
if (this.ruleList.length) {
|
||||
this.$refs.canDistribute.doShow();
|
||||
} else {
|
||||
this.$messageBox('请添加规则');
|
||||
this.$messageBox(this.$t('permission.pleaseAddRule'));
|
||||
}
|
||||
},
|
||||
distribute(data) {
|
||||
@ -242,11 +242,11 @@ export default {
|
||||
packagePermissionDistribute(this.ruleList).then(resp => {
|
||||
this.urlInfo = {
|
||||
url: resp.data,
|
||||
title: '权限分发二维码'
|
||||
title: this.$t('global.distributeQrcode')
|
||||
};
|
||||
this.qrcodeShow();
|
||||
}).catch(() => {
|
||||
this.$messageBox('打包权限失败');
|
||||
this.$messageBox(this.$t('error.packagePermissionFailed'));
|
||||
});
|
||||
},
|
||||
qrcodeShow() {
|
||||
|
@ -133,7 +133,7 @@ export default {
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '300',
|
||||
width: '380',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('global.fastCreate'),
|
||||
|
@ -24,7 +24,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
size: {
|
||||
width: document.documentElement.clientWidth - 970,
|
||||
width: document.documentElement.clientWidth - 780,
|
||||
height: document.documentElement.clientHeight
|
||||
},
|
||||
group:this.$route.query.group,
|
||||
@ -36,7 +36,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
resizeHandler() {
|
||||
this.size = { width: this._clientWidth - 970, height: this._clientHeight};
|
||||
this.size = { width: this._clientWidth - 780, height: this._clientHeight};
|
||||
},
|
||||
loadInitData() {
|
||||
}
|
||||
@ -49,7 +49,7 @@ export default {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
.script-card {
|
||||
width: 970px;
|
||||
width: 780px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -162,10 +162,6 @@ import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation, scr
|
||||
this.initAutoSaveScript();
|
||||
})
|
||||
},
|
||||
saveMaplocation()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -190,7 +186,7 @@ import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation, scr
|
||||
float: left;
|
||||
left: 0px;
|
||||
top:0px;
|
||||
width: 955px;
|
||||
width: 765px;
|
||||
height:100%;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
|
@ -98,6 +98,11 @@
|
||||
this.$parent.$parent.$parent.setIsParse(this.isPause);
|
||||
this.$refs['modalData'].clearValidate();
|
||||
this.$refs['commandData'].clearValidate();
|
||||
if(!val)
|
||||
{
|
||||
this.initActionData();
|
||||
this.initCommandActionData();
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
@ -219,7 +224,7 @@
|
||||
this.adding=false;
|
||||
this.$message.success('添加指令成功');
|
||||
this.$emit('create',true);
|
||||
this.initCommandActionData();
|
||||
// this.initCommandActionData();
|
||||
}).catch(error => {
|
||||
this.adding=false;
|
||||
this.$messageBox(`添加指令失败: ${error.message}`);
|
||||
@ -245,7 +250,7 @@
|
||||
this.modifying=false;
|
||||
this.$message.success('添加对话成功');
|
||||
this.$emit('create',true);
|
||||
this.initActionData();
|
||||
// this.initActionData();
|
||||
}).catch(error => {
|
||||
this.modifying=false;
|
||||
this.$messageBox(`添加对话失败: ${error.message}`);
|
||||
@ -261,7 +266,7 @@
|
||||
this.$emit('modifyButtonName');
|
||||
this.$message.success('修改对话成功');
|
||||
this.$emit('create',false);
|
||||
this.initActionData();
|
||||
// this.initActionData();
|
||||
}).catch(error => {
|
||||
this.modifying=false;
|
||||
this.$messageBox(`修改对话失败: ${error.message}`);
|
||||
@ -373,11 +378,11 @@
|
||||
// width:98%;
|
||||
}
|
||||
.inputStyle{
|
||||
width:300px;
|
||||
width:200px;
|
||||
height:30px;
|
||||
}
|
||||
.textareaStyle{
|
||||
width:300px;
|
||||
width:200px;
|
||||
}
|
||||
.conversitionCard{
|
||||
margin-left: 20px;
|
||||
|
@ -14,12 +14,25 @@
|
||||
<el-timeline-item v-for="(actionInfo,index) in actionInfoList" :key="index">
|
||||
<el-card>
|
||||
<div class="actionTable">
|
||||
|
||||
<span class="detail" v-html="actionInfo.detail">
|
||||
</span>
|
||||
<span class="otherInfo">{{actionInfo.otherInfo}}</span>
|
||||
<span class="otherInfo" v-html="actionInfo.otherInfo"></span>
|
||||
<span v-if="actionInfo.isCoversition">
|
||||
<span class="roleClass">{{actionInfo.memberName}}</span>
|
||||
<span>对</span>
|
||||
<span class="roleClass">{{actionInfo.targetName}}</span>
|
||||
<span>: </span>
|
||||
<span>{{actionInfo.reply}}</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
<span class="roleClass">{{actionInfo.memberName}}</span>
|
||||
<span>执行指令: </span>
|
||||
<span class="commandStyle">{{actionInfo.command}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="btnGroup">
|
||||
<el-button type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)" :disabled="actionInfo.disabled">修改</el-button>
|
||||
<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>
|
||||
@ -100,7 +113,7 @@
|
||||
{
|
||||
let target=memberVOList.find(elem=>{return elem.id==element.targetId});
|
||||
let targetName=target.name==undefined?"":" - "+target.name;
|
||||
this.actionInfoList.push({id:element.id,detail:"<span style='color:#409EFF'>"+member.role+memberName+"</span>"+" 对 "+"<span style='color:#409EFF'>"+target.role+targetName+"</span>:",otherInfo:element.reply,row:element,disabled:false});
|
||||
this.actionInfoList.push({id:element.id,isCoversition:true,memberName:member.role+memberName,targetName:target.role+targetName,reply:element.reply,row:element,visible:true});
|
||||
break;
|
||||
}
|
||||
case "Command":
|
||||
@ -110,12 +123,12 @@
|
||||
{
|
||||
case 'Train_Manual_Route_Blocking_Drive':
|
||||
{
|
||||
this.actionInfoList.push({id:element.id,detail:"<span style='color:#409EFF'>"+member.role+memberName+"</span>执行指令 :",otherInfo:deviceCommand.label,row:element,disabled:true});
|
||||
this.actionInfoList.push({id:element.id,isCoversition:false,memberName:member.role+memberName,command:deviceCommand.label,row:element,visible:false});
|
||||
break;
|
||||
}
|
||||
case 'Train_Manual_Limit_Drive':
|
||||
{
|
||||
this.actionInfoList.push({id:element.id,detail:"<span style='color:#409EFF'>"+member.role+memberName+"</span>执行指令 : ",otherInfo:deviceCommand.label,row:element,disabled:true});
|
||||
this.actionInfoList.push({id:element.id,isCoversition:false,memberName:member.role+memberName,command:deviceCommand.label,row:element,visible:false});
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -169,14 +182,14 @@
|
||||
}
|
||||
.addScript{
|
||||
float:left;
|
||||
width:450px;
|
||||
width:380px;
|
||||
display: inline-block;
|
||||
}
|
||||
.actionListTable{
|
||||
font-size: 15px;
|
||||
width:490px;
|
||||
width:380px;
|
||||
display: inline-block;
|
||||
margin-left:450px;
|
||||
margin-left:380px;
|
||||
height:100%;
|
||||
}
|
||||
.actionList{
|
||||
@ -188,7 +201,7 @@
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin-right: 20px;
|
||||
width: 940px;
|
||||
width: 740px;
|
||||
border-bottom: 1px #ccc solid;
|
||||
}
|
||||
.titleStyle{
|
||||
@ -200,7 +213,7 @@
|
||||
position: relative;
|
||||
}
|
||||
.actionTable{
|
||||
width:370px;
|
||||
width:280px;
|
||||
padding: 15px 0px 10px 15px;
|
||||
display: inline-block;
|
||||
line-height: 200%;
|
||||
@ -219,11 +232,17 @@
|
||||
width: 0px;
|
||||
}
|
||||
.el_timeline{
|
||||
width: 470px;
|
||||
width: 360px;
|
||||
margin-top:10px;
|
||||
}
|
||||
.elScrollbar{
|
||||
width: 450px;
|
||||
width: 380px;
|
||||
position: absolute;
|
||||
}
|
||||
.roleClass{
|
||||
color:#409EFF
|
||||
}
|
||||
.commandStyle{
|
||||
color:#f00;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>课程列表</span>
|
||||
<!-- <div v-if="role" class="back-home" @click="backHome">返回首页</div> -->
|
||||
<span>{{ $t('teach.courseList') }}</span>
|
||||
</div>
|
||||
<filter-city
|
||||
ref="filerCity"
|
||||
@ -11,7 +10,7 @@
|
||||
:query-function="queryFunction"
|
||||
@filterSelectChange="refresh"
|
||||
/>
|
||||
<el-input v-model="filterText" placeholder="输入关键字进行过滤" clearable />
|
||||
<el-input v-model="filterText" :placeholder="$t('tip.enterKeywordsFiltering')" clearable />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-125) +'px', width:'100%' }">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
@ -159,9 +158,9 @@ export default {
|
||||
if (obj.valid) {
|
||||
this.trainingStart(obj, node);
|
||||
} else {
|
||||
this.$confirm('无此课程权限, 请前往购买!', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel')
|
||||
}).then(() => {
|
||||
while (node) {
|
||||
if (node.data.type === 'lesson') {
|
||||
@ -201,7 +200,7 @@ export default {
|
||||
});
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox('刷新失败');
|
||||
this.$messageBox(this.$t('tip.refreshFailure'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<b>课程名称: {{ courseModel.name }}</b>
|
||||
<b>{{ $t('teach.courseName') }}: {{ courseModel.name }}</b>
|
||||
</div>
|
||||
<div style="margin:50px" :style="{ height: height - 190 +'px' }">
|
||||
<p style="font-size: 14px; margin-bottom: 20px"> 课程说明:
|
||||
<p style="font-size: 14px; margin-bottom: 20px"> {{ $t('teach.courseDescription') }}:
|
||||
<span style="color: #808080 !important;">
|
||||
{{ courseModel.remarks }}
|
||||
</span>
|
||||
</p>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="课程详情" name="first">
|
||||
<el-tab-pane :label="$t('teach.courseDetails')" name="first">
|
||||
<div :style="{ height: height - 270 +'px' }">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<template v-for="item in courseModel.detail">
|
||||
@ -20,7 +20,7 @@
|
||||
<ul :key="it.code" style="float:none;" type="circle">
|
||||
<li :style="{color: it.trial? 'green':'' }">
|
||||
<span>{{ it.name }}
|
||||
<span v-if="it.trial">(免费)</span>
|
||||
<span v-if="it.trial">({{ $t('teach.free') }})</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@ -31,7 +31,7 @@
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="权限详情" name="second">
|
||||
<el-tab-pane :label="$t('teach.permissionsDetails')" name="second">
|
||||
<div :style="{ height: height - 270 +'px' }">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<limit-list ref="limitList" :course-model="courseModel" @initLoadPage="initLoadPage" />
|
||||
@ -41,9 +41,9 @@
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="btn-buy">
|
||||
<el-button type="success" @click="buy">购买</el-button>
|
||||
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="distribute">权限分发(上课)</el-button>
|
||||
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="transfer">权限转赠</el-button>
|
||||
<el-button type="success" @click="buy">{{ $t('teach.buy') }}</el-button>
|
||||
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="distribute">{{ $t('teach.permissionDistribute') }}</el-button>
|
||||
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="transfer">{{ $t('teach.authorityTransferred') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -117,7 +117,7 @@ export default {
|
||||
PermissionType: PermissionType.LESSON
|
||||
};
|
||||
}).catch(error => {
|
||||
this.$message.error('获取课程信息失败:' + error.message);
|
||||
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="home-box" :style="{height: height+'px'}">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<h1 class="title">
|
||||
城市轨道交通教学系统
|
||||
{{ $t('teach.title') }}
|
||||
<img :src="logo" alt="" class="logo-img">
|
||||
</h1>
|
||||
<div class="card-box">
|
||||
@ -14,7 +14,7 @@
|
||||
</el-carousel>
|
||||
</div>
|
||||
<div class="brief-box">
|
||||
该系统具备真实的业务逻辑,以地铁员工和培训点为要素的业务和流程驱动方式进行软件架构,从业务流程、标准作业、培训方式及开放原则等角度出发,力求打造最符合用户需求及快速响应变化的实训教学系统。</div>
|
||||
{{ $t('teach.describe') }}</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-card>
|
||||
|
@ -1,26 +1,26 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<b>实训名称: {{ courseModel.name }}</b>
|
||||
<b>{{ $t('teach.trainingName') }} {{ courseModel.name }}</b>
|
||||
</div>
|
||||
<div style="margin:50px">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height - 190 +'px' }">
|
||||
<p class="list-item">
|
||||
<span class="list-label">完成实训最佳用时:</span>
|
||||
<span class="list-label">{{ $t('teach.trainingTime') }}</span>
|
||||
<span class="list-elem"> {{ courseModel.minDuration | setTime }} 秒</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">完成实训最大用时:</span>
|
||||
<span class="list-label">{{ $t('teach.trainingMaximum') }}</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration | setTime }} 秒</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">实训说明:</span>
|
||||
<span class="list-label">{{ $t('teach.trainingInstructions') }}</span>
|
||||
<span class="list-elem">{{ courseModel.remarks }}</span>
|
||||
</p>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="btn-start">
|
||||
<el-button :loading="loading" type="primary" @click="start">开始实训</el-button>
|
||||
<el-button :loading="loading" type="primary" @click="start">{{ $t('teach.startTraining') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -81,7 +81,7 @@ export default {
|
||||
};
|
||||
})
|
||||
.catch(error => {
|
||||
this.$message.error('获取课程信息失败:' + error.message);
|
||||
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -95,7 +95,7 @@ export default {
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||
this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user