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