Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
# Conflicts: # src/views/map/mapdraft/mapedit/mapoperate/train.bak.vue
This commit is contained in:
commit
2f0519488f
@ -53,9 +53,9 @@ export function getTrainingTree() {
|
||||
}
|
||||
|
||||
/** 获取章节基本信息*/
|
||||
export function getTrainingDetail(args) {
|
||||
export function getTrainingDetail(trainingId) {
|
||||
return request({
|
||||
url: `/api/training/${args.id}`,
|
||||
url: `/api/training/${trainingId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -435,3 +435,19 @@ export function saveTaskScript(group, data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 暂停剧本编制的仿真 */
|
||||
export function scriptPause(group) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/scriptWrite/pause`,
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
||||
/** 恢复仿真运行并执行刚编辑的剧本动作 */
|
||||
export function executeScript(group) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/scriptWrite/execute`,
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ export default {
|
||||
createSimulationFailed: 'Failure to create simulation',
|
||||
loadMapDataFailed: 'Failed to load map data',
|
||||
getMapStepsFailed: 'Failed to get map step data',
|
||||
getMapDetailFailed: 'Failed to get map detail',
|
||||
resetFailed: 'Reset failure',
|
||||
startTrainingFailed: 'Failure to start training',
|
||||
saveBackgroundFailed: 'Failed to save background',
|
||||
@ -39,5 +40,10 @@ export default {
|
||||
codeHasExist: 'Coding already exists',
|
||||
formartError: 'The format is incorrect, only characters/numbers/_',
|
||||
createDictionaryFailed: 'Failed to create dictionary',
|
||||
updateDictionaryFailed: 'Failed to update dictionary'
|
||||
updateDictionaryFailed: 'Failed to update dictionary',
|
||||
createDetailFailed: 'Failed to create details',
|
||||
updateDetailFailed: 'Failed to update details',
|
||||
addFailed: 'Failure to add',
|
||||
updateFailed: 'Failure to update'
|
||||
|
||||
};
|
||||
|
@ -75,9 +75,10 @@ export default {
|
||||
synthesisTrainingTitle: 'Synthesis Training Fast Entrance',
|
||||
pleaseChooseRoom: 'You did not choose a room',
|
||||
inviteJoinRoom: 'Invite you to join the synthesis training!',
|
||||
trainingHasStart: "(name)'s room has begun",
|
||||
trainingNotStart: "(name)'s room hasn't started yet",
|
||||
trainingHasStart: "{name}'s room has begun",
|
||||
trainingNotStart: "{name}'s room hasn't started yet",
|
||||
inputRoomNumber: 'Please enter the room number.',
|
||||
chooseRoom: 'Choose Room'
|
||||
chooseRoom: 'Choose Room',
|
||||
month: 'month'
|
||||
|
||||
};
|
||||
|
@ -302,16 +302,8 @@ export default {
|
||||
skinDesignation: 'SkinName',
|
||||
skinCoding: 'SkinCoding',
|
||||
coordinatesOrigin: 'CoordinatesOrigin',
|
||||
skinDeleteConfirmation: 'This will permanently remove the skin. Do you want to continue?',
|
||||
addMapSkin: 'AddMapSkin',
|
||||
updateMapSkin: 'UpdateMapSkin',
|
||||
maxScaling: '(The maximum scale is 8 steps)',
|
||||
skinCodingInput: 'Please enter skin code',
|
||||
skinDesignationInput: 'Please enter skin name',
|
||||
coordinatesOriginInput: 'Please enter the origin coordinates',
|
||||
scalingInput: 'Please enter the scale',
|
||||
scalingInputPrompt: 'Please enter a valid scale',
|
||||
skinCodingExist: 'Map skin codes already exist',
|
||||
stationKilometerMark: 'StationKilometerMark',
|
||||
arrivalTime: 'ArrivalTime',
|
||||
operationGraphPublished: 'The operation diagram is published as',
|
||||
@ -320,10 +312,8 @@ export default {
|
||||
importOperationGraph: 'ImportOperationGraph',
|
||||
publishOperationGraph: 'PublishOperationGraph',
|
||||
deleteOperationGraph: 'DeleteOperationGraph',
|
||||
underImport: 'UnderImport...',
|
||||
mapList: 'MapList',
|
||||
import: 'Import',
|
||||
selectImportFiles: 'Select the file you want to import',
|
||||
createNewOperationGraph: 'CreateNewOperationGraph',
|
||||
setOperatingSpeed: 'SetOperatingSpeed',
|
||||
speedClass1: 'SpeedLevel 1',
|
||||
@ -336,29 +326,17 @@ export default {
|
||||
stopTime: 'StopTime',
|
||||
entranceStation: 'EntranceStation',
|
||||
exportStation: 'ExportStation',
|
||||
speedLevelEnter1: 'Please enter speed level 1',
|
||||
speedLevelEnter2: 'Please enter speed level 2',
|
||||
speedLevelEnter3: 'Please enter speed level 3',
|
||||
speedLevelEnter4: 'Please enter speed level 4',
|
||||
nameEnter: 'Please enter name',
|
||||
drivingDirectionSelect: 'Please choose your driving direction',
|
||||
timeBetweenDeparturesEnter: 'Please enter the interval',
|
||||
stopTimeEnter: 'Please enter the docking time',
|
||||
entranceStationSelect: 'Please select the entrance',
|
||||
exportStationSelect: 'Please select the exit gate',
|
||||
validityCheck: 'ValidityCheck',
|
||||
setupOperationGraph: 'SetupOperationGraph',
|
||||
selectOperationGraphDataRange: 'SelectOperationGraphDataRange',
|
||||
to: 'to',
|
||||
selectionTimeRange: 'Please select time range',
|
||||
selectDataRange: 'Please select the data range range',
|
||||
pointSystem1: 'OnePointSystem',
|
||||
pointSystem2: 'TwoPointSystem',
|
||||
pointSystem5: 'FivePointSystem',
|
||||
skinType: 'SkinType',
|
||||
turnoverTime: 'TurnoverTime',
|
||||
productList: 'ProductList',
|
||||
deleteTypeHint: 'This action deletes the type. Do you want to continue?',
|
||||
belongsToMapName: 'BelongsToMapName',
|
||||
productType: 'ProductType',
|
||||
productCode: 'ProductCode',
|
||||
@ -367,20 +345,11 @@ export default {
|
||||
associateTrainingTypes: 'AssociateTrainingTypes',
|
||||
createTrainingCategories: 'CreateTrainingCategories',
|
||||
editTrainingCategories: 'EditTrainingCategories',
|
||||
productCodeEnter: 'Please enter the product code',
|
||||
productNameEnter: 'Please enter product name',
|
||||
productDescriptionEnter: 'Please enter product description',
|
||||
trainingTypeSelect: 'Please select the associated training type',
|
||||
linkWidth: 'LinkWidth',
|
||||
maxLinkWidth: '(Link width is at most 20)',
|
||||
sectionWidth: 'SectionWidth',
|
||||
maxSectionWidth: '(Section width is maximum 30)',
|
||||
showWatermarkOrNot: 'ShowWatermarkOrNot',
|
||||
linkWidthInput: 'Please enter Link width',
|
||||
linkWidthInputPrompt: 'Please enter a valid Link width',
|
||||
sectionWidthInput: 'Please enter section width',
|
||||
sectionWidthInputPrompt: 'Please enter a valid segment width',
|
||||
selectShowWatermark: 'Select whether or not to watermark',
|
||||
stationstandName: 'Select station name:',
|
||||
stationstandDirection: 'Direction of the platform:',
|
||||
stationstandHasDoor: 'Whether to display screen door:',
|
||||
|
@ -1,86 +1,88 @@
|
||||
export default {
|
||||
name: 'Name',
|
||||
productType: 'ProductType',
|
||||
productType: 'Product type',
|
||||
map: 'Map',
|
||||
state: 'State',
|
||||
commodityName: 'CommodityName',
|
||||
mapName: 'MapName',
|
||||
courseName: 'CourseName',
|
||||
commodityName: 'Commodity name',
|
||||
mapName: 'Map name',
|
||||
courseName: 'Course name',
|
||||
price: 'Price',
|
||||
describtion: 'Describtion',
|
||||
creationTime: 'CreationTime',
|
||||
setupFailure: 'SetupFailure',
|
||||
setupEffective: 'SetupEffective',
|
||||
creationTime: 'Creation time',
|
||||
setupFailure: 'Setup failure',
|
||||
setupEffective: 'Setup effective',
|
||||
organizationOrEnterprise: 'Organization/Enterprise',
|
||||
userName: 'UserName',
|
||||
permissionType: 'PermissionType',
|
||||
permissionNumber: 'PermissionNumber',
|
||||
permanenceOrNot: 'PermanenceOrNot',
|
||||
userName: 'User Name',
|
||||
permissionType: 'Permission type',
|
||||
permissionNumber: 'Permission number',
|
||||
permanenceOrNot: 'Permanence or not',
|
||||
startDate: 'StartDate',
|
||||
purchaseMonths: 'PurchaseMonths',
|
||||
totalPrice: 'TotalPrice',
|
||||
paymentMethod: 'PaymentMethod',
|
||||
creationDate: 'CreationDate',
|
||||
orderType: 'OrderType',
|
||||
contractNumber: 'ContractNumber',
|
||||
businessType: 'BusinessType',
|
||||
paymentStatus: 'PaymentStatus',
|
||||
purchaseMonths: 'Purchase months',
|
||||
totalPrice: 'Total price',
|
||||
paymentMethod: 'Payment method',
|
||||
creationDate: 'Creation date',
|
||||
orderType: 'Order type',
|
||||
contractNumber: 'Contract number',
|
||||
businessType: 'Business type',
|
||||
paymentStatus: 'Payment status',
|
||||
salesman: 'Salesman',
|
||||
obtainQrCode: 'ObtainQrCode',
|
||||
userMobile: 'UserMobile',
|
||||
mapProductName: 'MapProductName',
|
||||
obtainQrCode: 'Obtain QrCode',
|
||||
userMobile: 'User mobile',
|
||||
mapProductName: 'Map product name',
|
||||
publicOrPrivate: 'Public/Private',
|
||||
totalPermissions: 'TotalPermissions',
|
||||
residualPermissionNumber: 'ResidualPermissionNumber',
|
||||
authorityStatus: 'AuthorityStatus',
|
||||
totalPermissions: 'Total permissions',
|
||||
residualPermissionNumber: 'Residual permissionNumber',
|
||||
authorityStatus: 'Authority status',
|
||||
startTime: 'StartTime',
|
||||
endTime: 'EndTime',
|
||||
courseAuthorityStatus: 'CourseAuthorityStatus',
|
||||
courseAuthorityStatus: 'Course authority status',
|
||||
source: 'Source',
|
||||
founderPhone: 'FounderPhone',
|
||||
founderPhone: 'Founder phone',
|
||||
founder: 'Founder',
|
||||
privilegePackaging: 'PrivilegePackaging',
|
||||
privilegePackaging: 'Privilege packaging',
|
||||
packaging: 'Packaging',
|
||||
unpacking: 'Unpacking',
|
||||
authorityDetails: 'AuthorityDetails',
|
||||
authorityDetails: 'Authority details',
|
||||
renew: 'Renew',
|
||||
productName: 'ProductName',
|
||||
productName: 'Product name',
|
||||
recovery: 'Recovery',
|
||||
permissionPack: 'PermissionPack',
|
||||
privilegeTransferQRCode: 'PrivilegeTransferQRCode',
|
||||
generatingQRCode: 'GeneratingQRCode',
|
||||
transferQRCode: 'TransferQRCode',
|
||||
permissionPack: 'Permission pack',
|
||||
privilegeTransferQRCode: 'Privilege transfer QRCode',
|
||||
generatingQRCode: 'Generating QRCode',
|
||||
transferQRCode: 'Transfer QRCode',
|
||||
today: 'Today',
|
||||
yesterday: 'Yesterday',
|
||||
aWeekAgo: 'AWeekAgo',
|
||||
updateOrder: 'UpdateOrder',
|
||||
renewOrder: 'RenewOrder',
|
||||
unknownRouter: 'UnknownRouter',
|
||||
increasePurchaseTime: 'IncreasePurchaseTime',
|
||||
choosePurchaseTime: 'ChoosePurchaseTime',
|
||||
increasePermissionNumber: 'IncreasePermissionNumber',
|
||||
choosePermissionNumber: 'ChoosePermissionNumber',
|
||||
addOrder: 'AddOrder',
|
||||
aWeekAgo: 'A week ago',
|
||||
updateOrder: 'Update order',
|
||||
renewOrder: 'Renew order',
|
||||
unknownRouter: 'Unknown router',
|
||||
increasePurchaseTime: 'Increase purchase time',
|
||||
choosePurchaseTime: 'Choose purchase time',
|
||||
increasePermissionNumber: 'Increase permission number',
|
||||
choosePermissionNumber: 'Choose permission number',
|
||||
itemPricing: 'itemPricing',
|
||||
addUserPermissions: 'Add user permissions',
|
||||
publicAuthority: 'PublicAuthority',
|
||||
privateAuthority: 'PrivateAuthority',
|
||||
publicAuthority: 'Public authority',
|
||||
privateAuthority: 'Private authority',
|
||||
optionPrivilegeTransfer: 'Option privilege transfer',
|
||||
trainingList: 'TrainingList',
|
||||
trainingList: 'Training list',
|
||||
selectPermissionsPackage: 'Select package authority',
|
||||
addRecords: 'AddRecords',
|
||||
totalNumber: 'TotalNumber',
|
||||
addRecords: 'Add records',
|
||||
totalNumber: 'Total number',
|
||||
permissionToDistributeQRCode: 'Permission to distribute qr code',
|
||||
selectPackagingRecord: 'Please select the packaging record',
|
||||
editPermissionRules: 'Edit permission rules',
|
||||
addGoods: 'AddGoods',
|
||||
updateGoods: 'UpdateGoods',
|
||||
addGoods: 'Add goods',
|
||||
updateGoods: 'Update goods',
|
||||
lesson: 'Lesson',
|
||||
whetherTrial: 'WhetherTrial',
|
||||
unitOfTime: 'UnitOfTime',
|
||||
trialTime: 'TrialTime',
|
||||
distributionUser: 'DistributionUser',
|
||||
orderNumber: 'OrderNumber',
|
||||
sourcesOfInformation: 'SourcesOfInformation',
|
||||
distributePermission: 'DistributePermission',
|
||||
orderCreation: 'OrderCreation'
|
||||
unitOfTime: 'Unit of time',
|
||||
trialTime: 'Trial time',
|
||||
distributionUser: 'Distribution user',
|
||||
orderNumber: 'Order Number',
|
||||
select: 'Select',
|
||||
sourcesOfInformation: 'Sources of information',
|
||||
distributePermission: 'Distribute permission',
|
||||
orderCreation: 'Order creation',
|
||||
chooseGoods: 'Choose goods'
|
||||
};
|
||||
|
@ -180,6 +180,37 @@ export default {
|
||||
unitOfTimeRadio: 'Please select a time unit',
|
||||
goodsDescribtionInput: 'Please enter product description',
|
||||
userNameInput: 'Please enter user name',
|
||||
permissionTypeInput: 'Please select the permission type'
|
||||
permissionTypeInput: 'Please select the permission type',
|
||||
timeInput: 'Please enter the time',
|
||||
chooseUser: 'Please select the user',
|
||||
pleaseInputLessonName: 'Please enter the course name',
|
||||
pleaseSelectTraining: 'Please select training',
|
||||
|
||||
maxScaling: '(The maximum scale is 8 steps)',
|
||||
skinCodingInput: 'Please enter skin code',
|
||||
skinDesignationInput: 'Please enter skin name',
|
||||
coordinatesOriginInput: 'Please enter the origin coordinates',
|
||||
scalingInput: 'Please enter the scale',
|
||||
scalingInputPrompt: 'Please enter a valid scale',
|
||||
selectImportFiles: 'Select the file you want to import',
|
||||
speedLevelEnter1: 'Please enter speed level 1',
|
||||
speedLevelEnter2: 'Please enter speed level 2',
|
||||
speedLevelEnter3: 'Please enter speed level 3',
|
||||
speedLevelEnter4: 'Please enter speed level 4',
|
||||
drivingDirectionSelect: 'Please choose your driving direction',
|
||||
timeBetweenDeparturesEnter: 'Please enter the interval',
|
||||
stopTimeEnter: 'Please enter the docking time',
|
||||
entranceStationSelect: 'Please select the entrance',
|
||||
exportStationSelect: 'Please select the exit gate',
|
||||
selectDataRange: 'Please select the data range range',
|
||||
productCodeEnter: 'Please enter the product code',
|
||||
productNameEnter: 'Please enter product name',
|
||||
productDescriptionEnter: 'Please enter product description',
|
||||
trainingTypeSelect: 'Please select the associated training type',
|
||||
linkWidthInput: 'Please enter Link width',
|
||||
linkWidthInputPrompt: 'Please enter a valid Link width',
|
||||
sectionWidthInput: 'Please enter section width',
|
||||
sectionWidthInputPrompt: 'Please enter a valid segment width',
|
||||
selectShowWatermark: 'Select whether or not to watermark'
|
||||
|
||||
};
|
||||
|
@ -11,8 +11,8 @@ export default {
|
||||
updateSuccess: 'Update successful',
|
||||
destory: 'Destory',
|
||||
simulationGroup: 'Simulation Group',
|
||||
username: 'User Name',
|
||||
phoneNumber: 'Cell-phone Number',
|
||||
userName: 'User Name',
|
||||
mobile: 'Cell-phone Number',
|
||||
skinCode: 'Skin Code',
|
||||
prdType: 'Product Type',
|
||||
simulationType: 'Simulation Type',
|
||||
@ -21,5 +21,34 @@ export default {
|
||||
isError: 'Is Error',
|
||||
isSuspend: 'Is Suspend',
|
||||
isDrivingAsplanned: 'Whether to drive as planned',
|
||||
delUserSimulationIsContinue: 'This operation will delete the user simulation data. Do you want to continue?'
|
||||
delUserSimulationIsContinue: 'This operation will delete the user simulation data. Do you want to continue?',
|
||||
createDetail: 'Create details',
|
||||
editDetail: 'Editorial details',
|
||||
mapName: 'Map Name',
|
||||
trainingName: 'Training Name',
|
||||
trainingUseTime: 'Training Time',
|
||||
minute: 'Minute',
|
||||
second: 'Second',
|
||||
createSimulationTitle: 'Create Simulation Information',
|
||||
addSuccess: 'Added Successfully',
|
||||
pleaseInputNames: 'Please enter your nickname/name/cell phone number',
|
||||
examUser: 'Examination Users',
|
||||
examScore: 'Examination Score',
|
||||
examResult: 'Examination Results',
|
||||
examName: 'Paper Name',
|
||||
delExamResultIsContinue: 'This operation will delete the test result. Do you want to continue?',
|
||||
editExamDetail: 'Edit exam details',
|
||||
subscribeMap: 'Subscribe',
|
||||
roles: 'Roles',
|
||||
email: 'Email',
|
||||
nickname: 'Nickname',
|
||||
delTypeIsContinue: 'This operation will delete the type. Do you want to continue?',
|
||||
permission: 'Permission',
|
||||
editUserPermission: 'Edit User Rights',
|
||||
lessonName: 'Lesson Name',
|
||||
selectTraining: 'Selection Training',
|
||||
createUserTraining: 'Creating User Training',
|
||||
editTrainingDetail: 'Editor Training Details',
|
||||
trainingTime: 'Training duration'
|
||||
|
||||
};
|
||||
|
@ -83,5 +83,11 @@ export default {
|
||||
updatePrivilegeTip: 'This action will modify the permission status. Do you want to continue?',
|
||||
addOrganizationPrefix: 'Whether to add "',
|
||||
addOrganizationSuffix: '" Organization/enterprise entry information?',
|
||||
packagingFailed: 'Authority distribution packaging failed'
|
||||
packagingFailed: 'Authority distribution packaging failed',
|
||||
selectPackagingRecord: 'Please select the packaging record',
|
||||
|
||||
skinDeleteConfirmation: 'This will permanently remove the skin. Do you want to continue?',
|
||||
skinCodingExist: 'Map skin codes already exist',
|
||||
underImport: 'UnderImport...',
|
||||
deleteTypeHint: 'This action deletes the type. Do you want to continue?'
|
||||
};
|
||||
|
@ -2,7 +2,8 @@ export default {
|
||||
refreshFailed: '刷新失败',
|
||||
createSimulationFailed: '创建仿真失败',
|
||||
loadMapDataFailed: '加载地图数据失败',
|
||||
getMapStepsFailed: '获取地图步骤数据',
|
||||
getMapStepsFailed: '获取地图步骤数据失败',
|
||||
getMapDetailFailed: '获取地图详细信息失败',
|
||||
resetFailed: '重置失败',
|
||||
startTrainingFailed: '开始实训失败',
|
||||
saveBackgroundFailed: '保存背景失败',
|
||||
@ -39,6 +40,10 @@ export default {
|
||||
codeHasExist: '编码已存在',
|
||||
formartError: '格式不正确,只能是字符/数字/_',
|
||||
createDictionaryFailed: '创建字典失败',
|
||||
updateDictionaryFailed: '更新字典失败'
|
||||
updateDictionaryFailed: '更新字典失败',
|
||||
createDetailFailed: '创建明细失败',
|
||||
updateDetailFailed: '更新明细失败',
|
||||
addFailed: '添加失败',
|
||||
updateFailed: '更新失败'
|
||||
|
||||
};
|
||||
|
@ -76,8 +76,9 @@ export default {
|
||||
synthesisTrainingTitle: '综合演练快速入口',
|
||||
pleaseChooseRoom: '您没有选择房间',
|
||||
inviteJoinRoom: '邀请你加入综合演练!',
|
||||
trainingHasStart: '{{name}}的房间已开始',
|
||||
trainingNotStart: '{{name}}的房间未开始',
|
||||
trainingHasStart: '{name}的房间已开始',
|
||||
trainingNotStart: '{name}的房间未开始',
|
||||
inputRoomNumber: '请输入房间号',
|
||||
chooseRoom: '选择房间'
|
||||
chooseRoom: '选择房间',
|
||||
month: '月'
|
||||
};
|
||||
|
@ -415,16 +415,8 @@ export default {
|
||||
skinDesignation: '皮肤名称',
|
||||
skinCoding: '皮肤编码',
|
||||
coordinatesOrigin: '坐标原点',
|
||||
skinDeleteConfirmation: '此操作将永久删除该皮肤, 是否继续?',
|
||||
addMapSkin: '添加地图皮肤',
|
||||
updateMapSkin: '更新地图皮肤',
|
||||
maxScaling: '(缩放比例最大为8级)',
|
||||
skinCodingInput: '请输入皮肤编码',
|
||||
skinDesignationInput: '请输入皮肤名称',
|
||||
coordinatesOriginInput: '请输入原点坐标',
|
||||
scalingInput: '请输入缩放比例',
|
||||
scalingInputPrompt: '请输入有效的缩放比例',
|
||||
skinCodingExist: '地图皮肤编码已存在',
|
||||
stationKilometerMark: '车站公里标',
|
||||
arrivalTime: '到站时间',
|
||||
operationGraphPublished: '运行图发布为',
|
||||
@ -433,10 +425,8 @@ export default {
|
||||
importOperationGraph: '导入运行图',
|
||||
publishOperationGraph: '发布运行图',
|
||||
deleteOperationGraph: '删除运行图',
|
||||
underImport: '正在导入中...',
|
||||
mapList: '地图列表',
|
||||
import: '导入',
|
||||
selectImportFiles: '请选择需要导入的文件',
|
||||
createNewOperationGraph: '新建运行图',
|
||||
setOperatingSpeed: '设置运行速度',
|
||||
speedClass1: '速度等级1',
|
||||
@ -449,29 +439,17 @@ export default {
|
||||
stopTime: '停靠时间',
|
||||
entranceStation: '入口车站',
|
||||
exportStation: '出口车站',
|
||||
speedLevelEnter1: '请输入速度等级1',
|
||||
speedLevelEnter2: '请输入速度等级2',
|
||||
speedLevelEnter3: '请输入速度等级3',
|
||||
speedLevelEnter4: '请输入速度等级4',
|
||||
nameEnter: '请输入名称',
|
||||
drivingDirectionSelect: '请选择行驶方向',
|
||||
timeBetweenDeparturesEnter: '请输入发车间隔时间',
|
||||
stopTimeEnter: '请输入停靠时间',
|
||||
entranceStationSelect: '请选择入站口',
|
||||
exportStationSelect: '请选择出站口',
|
||||
validityCheck: '有效性检查',
|
||||
setupOperationGraph: '设置运行图',
|
||||
selectOperationGraphDataRange: '选取运行图数据范围',
|
||||
to: '至',
|
||||
selectionTimeRange: '选择时间范围',
|
||||
selectDataRange: '请选择数据范围区间',
|
||||
pointSystem1: '1分制',
|
||||
pointSystem2: '2分制',
|
||||
pointSystem5: '5分制',
|
||||
skinType: '皮肤风格',
|
||||
turnoverTime: '更新时间',
|
||||
productList: '产品列表',
|
||||
deleteTypeHint: '此操作将删除该类型, 是否继续?',
|
||||
belongsToMapName: '所属地图名称',
|
||||
productType: '产品类型',
|
||||
productCode: '产品编码',
|
||||
@ -480,20 +458,11 @@ export default {
|
||||
associateTrainingTypes: '关联实训类型',
|
||||
createTrainingCategories: '创建实训类目',
|
||||
editTrainingCategories: '编辑实训类目',
|
||||
productCodeEnter: '请输入产品编码',
|
||||
productNameEnter: '请输入产品名称',
|
||||
productDescriptionEnter: '请输入产品说明',
|
||||
trainingTypeSelect: '请选择关联实训类型',
|
||||
linkWidth: 'link宽度',
|
||||
maxLinkWidth: '(Link宽度最大为20)',
|
||||
sectionWidth: '区段宽度',
|
||||
maxSectionWidth: '(区段宽度最大为30)',
|
||||
showWatermarkOrNot: '是否显示水印',
|
||||
linkWidthInput: '请输入Link宽度',
|
||||
linkWidthInputPrompt: '请输入有效Link宽度',
|
||||
sectionWidthInput: '请输入区段宽度',
|
||||
sectionWidthInputPrompt: '请输入有效区段宽度',
|
||||
selectShowWatermark: '请选择是否水印',
|
||||
routingCode: '交路code',
|
||||
routingName: '交路名称',
|
||||
startStationCodeColon: '起始站:',
|
||||
|
@ -71,7 +71,6 @@ export default {
|
||||
addRecords: '添加记录',
|
||||
totalNumber: '总数',
|
||||
permissionToDistributeQRCode: '权限分发二维码',
|
||||
selectPackagingRecord: '请选择打包记录',
|
||||
editPermissionRules: '编辑权限规则',
|
||||
addGoods: '添加商品',
|
||||
updateGoods: '修改商品',
|
||||
@ -83,5 +82,7 @@ export default {
|
||||
orderNumber: '订单号',
|
||||
sourcesOfInformation: '信息来源',
|
||||
distributePermission: '权限分发',
|
||||
orderCreation: '订单创建'
|
||||
orderCreation: '订单创建',
|
||||
select: '选择',
|
||||
chooseGoods: '选择商品'
|
||||
};
|
||||
|
@ -179,5 +179,36 @@ export default {
|
||||
unitOfTimeRadio: '请选择时间单位',
|
||||
goodsDescribtionInput: '请输入商品描述',
|
||||
userNameInput: '请输入用户名称',
|
||||
permissionTypeInput: '请选择权限类型'
|
||||
permissionTypeInput: '请选择权限类型',
|
||||
timeInput: '请输入时长',
|
||||
chooseUser: '请选择用户',
|
||||
pleaseInputLessonName: '请输入课程名称',
|
||||
pleaseSelectTraining: '请选择实训',
|
||||
|
||||
maxScaling: '(缩放比例最大为8级)',
|
||||
skinCodingInput: '请输入皮肤编码',
|
||||
skinDesignationInput: '请输入皮肤名称',
|
||||
coordinatesOriginInput: '请输入原点坐标',
|
||||
scalingInput: '请输入缩放比例',
|
||||
scalingInputPrompt: '请输入有效的缩放比例',
|
||||
selectImportFiles: '请选择需要导入的文件',
|
||||
speedLevelEnter1: '请输入速度等级1',
|
||||
speedLevelEnter2: '请输入速度等级2',
|
||||
speedLevelEnter3: '请输入速度等级3',
|
||||
speedLevelEnter4: '请输入速度等级4',
|
||||
drivingDirectionSelect: '请选择行驶方向',
|
||||
timeBetweenDeparturesEnter: '请输入发车间隔时间',
|
||||
stopTimeEnter: '请输入停靠时间',
|
||||
entranceStationSelect: '请选择入站口',
|
||||
exportStationSelect: '请选择出站口',
|
||||
selectDataRange: '请选择数据范围区间',
|
||||
productCodeEnter: '请输入产品编码',
|
||||
productNameEnter: '请输入产品名称',
|
||||
productDescriptionEnter: '请输入产品说明',
|
||||
trainingTypeSelect: '请选择关联实训类型',
|
||||
linkWidthInput: '请输入Link宽度',
|
||||
linkWidthInputPrompt: '请输入有效Link宽度',
|
||||
sectionWidthInput: '请输入区段宽度',
|
||||
sectionWidthInputPrompt: '请输入有效区段宽度',
|
||||
selectShowWatermark: '请选择是否水印'
|
||||
};
|
||||
|
@ -11,8 +11,8 @@ export default {
|
||||
updateSuccess: '更新成功',
|
||||
destory: '销 毁',
|
||||
simulationGroup: '仿真Group',
|
||||
username: '用户名',
|
||||
phoneNumber: '手机号',
|
||||
userName: '用户名',
|
||||
mobile: '手机号',
|
||||
skinCode: '皮肤编号',
|
||||
prdType: '产品类型',
|
||||
simulationType: '仿真类型',
|
||||
@ -21,5 +21,34 @@ export default {
|
||||
isError: '是否错误',
|
||||
isSuspend: '是否暂停',
|
||||
isDrivingAsplanned: '是否按计划行车',
|
||||
delUserSimulationIsContinue: '此操作将删除此用户仿真数据, 是否继续?'
|
||||
delUserSimulationIsContinue: '此操作将删除此用户仿真数据, 是否继续?',
|
||||
createDetail: '创建明细',
|
||||
editDetail: '编辑明细',
|
||||
mapName: '地图名称',
|
||||
trainingName: '实训名称',
|
||||
trainingUseTime: '实训用时',
|
||||
minute: '分',
|
||||
second: '秒',
|
||||
createSimulationTitle: '创建仿真信息',
|
||||
addSuccess: '添加成功',
|
||||
pleaseInputNames: '请输入昵称/名字/手机号',
|
||||
examUser: '考试用户',
|
||||
examScore: '考试成绩',
|
||||
examResult: '考试结果',
|
||||
examName: '试卷名称',
|
||||
delExamResultIsContinue: '此操作将删除此考试结果, 是否继续?',
|
||||
editExamDetail: '编辑考试详情',
|
||||
subscribeMap: '订阅地图',
|
||||
roles: '角色',
|
||||
email: '邮箱',
|
||||
nickname: '昵称',
|
||||
delTypeIsContinue: '此操作将删除该类型, 是否继续?',
|
||||
permission: '权限',
|
||||
editUserPermission: '编辑用户权限',
|
||||
lessonName: '课程名称',
|
||||
selectTraining: '选择实训',
|
||||
createUserTraining: '创建用户实训',
|
||||
editTrainingDetail: '编辑实训详情',
|
||||
trainingTime: '实训时长'
|
||||
|
||||
};
|
||||
|
@ -83,6 +83,12 @@ export default {
|
||||
updatePrivilegeTip: '此操作将修改权限状态,是否继续?',
|
||||
addOrganizationPrefix: '是否添加 "',
|
||||
addOrganizationSuffix: '" 组织/企业条目信息?',
|
||||
packagingFailed: '权限分发打包失败'
|
||||
packagingFailed: '权限分发打包失败',
|
||||
selectPackagingRecord: '请选择打包记录',
|
||||
|
||||
skinDeleteConfirmation: '此操作将永久删除该皮肤, 是否继续?',
|
||||
skinCodingExist: '地图皮肤编码已存在',
|
||||
underImport: '正在导入中...',
|
||||
deleteTypeHint: '此操作将删除该类型, 是否继续?'
|
||||
|
||||
};
|
||||
|
@ -374,6 +374,10 @@ class SkinCode extends defaultStyle {
|
||||
type: '03',
|
||||
serviceNumber: '---',
|
||||
nameFormat: 'groupNumber:serviceNumber'
|
||||
},
|
||||
{
|
||||
type: '03',
|
||||
nameFormat: 'serviceNumber:trainNumber'
|
||||
}
|
||||
], // 特殊列车类型需设置显示格式
|
||||
lrPadding: 4, // 两边间隔
|
||||
@ -435,6 +439,10 @@ class SkinCode extends defaultStyle {
|
||||
useSelfText: true // 使用配置项的字体大小
|
||||
},
|
||||
trainStatusStyle: {
|
||||
trainTypeStatus: [
|
||||
{type: '03', serviceNumberColor: '#FFF000', groupNumberColor: '#FFF000'},
|
||||
{type: '02', trainNumberColor: '#FFF000', groupNumberColor: '#FFF000'}
|
||||
], // 列车类型对应的识别号样式
|
||||
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
|
||||
destinationStatusSetText: 'trainWindowBorder', // 目的地状态设置的对应哪个颜色
|
||||
destinationStatus: [
|
||||
|
@ -248,7 +248,7 @@ class Jlmap {
|
||||
});
|
||||
|
||||
// 状态后处理
|
||||
this.postHandle(list);
|
||||
this.postHandle(list || []);
|
||||
|
||||
if (this.methods.stateUpdate instanceof Function) { this.methods.stateUpdate(list); }
|
||||
}
|
||||
|
@ -174,12 +174,20 @@ export default class TrainBody extends Group {
|
||||
this.trainBodyBox && this.trainBodyBox.setStyle('fill', color);
|
||||
}
|
||||
setTextTrainServerColor(color) {
|
||||
this.textTrainServer.setStyle('textFill', color);
|
||||
this.textTrainServer.setStyle('textStroke', color);
|
||||
this.textTrainServer&&this.textTrainServer.setStyle('textFill', color);
|
||||
this.textTrainServer&&this.textTrainServer.setStyle('textStroke', color);
|
||||
}
|
||||
setTextTrainTargetColor(color) {
|
||||
this.textTrainTarget.setStyle('textFill', color);
|
||||
this.textTrainTarget.setStyle('textStroke', color);
|
||||
this.textTrainTarget&&this.textTrainTarget.setStyle('textFill', color);
|
||||
this.textTrainTarget&&this.textTrainTarget.setStyle('textStroke', color);
|
||||
}
|
||||
setTextTrainNumberColor(color) {
|
||||
this.textTrainNumber&&this.textTrainNumber.setStyle('textFill', color);
|
||||
this.textTrainNumber&&this.textTrainNumber.setStyle('textStroke', color);
|
||||
}
|
||||
setTextTrainTargetNumberColor(color) {
|
||||
this.textTrainTargetNumber&&this.textTrainTargetNumber.setStyle('textFill', color);
|
||||
this.textTrainTargetNumber&&this.textTrainTargetNumber.setStyle('textStroke', color);
|
||||
}
|
||||
setHShow(isShow) {
|
||||
if (this.textH) {
|
||||
|
@ -282,7 +282,18 @@ export default class Train extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setTrainTypeStatus(type) {
|
||||
if (this.style.Train.trainStatusStyle.trainTypeStatus) {
|
||||
this.style.Train.trainStatusStyle.trainTypeStatus.some((item) => {
|
||||
if ( type === item.type) {
|
||||
item.serviceNumberColor && this.trainB && this.trainB.setTextTrainServerColor(item.serviceNumberColor);
|
||||
item.trainNumberColor && this.trainB && this.trainB.setTextTrainNumberColor(item.trainNumberColor);
|
||||
item.trainTargetColor && this.trainB && this.trainB.setTextTrainTargetColor(item.trainTargetColor);
|
||||
item.groupNumberColor && this.trainB && this.trainB.setTextTrainTargetNumberColor(item.groupNumberColor);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
@ -296,6 +307,7 @@ export default class Train extends Group {
|
||||
this.setDoorStatus(model.doorStatus); // 设置车门状态类型
|
||||
this.setCommunicationStatus(model.communicationStatus); // 设置通信状态类型
|
||||
this.setAlarmStatus(model.alarmStatus); // 设置报警状态
|
||||
this.setTrainTypeStatus(model.type); // 根据列车类型设置列车识别号样式
|
||||
}
|
||||
}
|
||||
// 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
|
@ -1,183 +1,188 @@
|
||||
<template>
|
||||
<el-dialog class="batong-01__systerm view-train-id" title="列车识别号显示设置" :visible.sync="show" width="420px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="1">表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="2">表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="5">目的地号+表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="6">目的地号+表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
|
||||
<span class="base-label">头码车显示模式</span>
|
||||
<el-radio-group v-model="headMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="8">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
<el-dialog
|
||||
class="batong-01__systerm view-train-id"
|
||||
title="列车识别号显示设置"
|
||||
:visible.sync="show" width="420px" :before-close="doClose"
|
||||
:z-index="2000"
|
||||
v-dialogDrag :modal="false" :close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="1">表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="2">表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="5">目的地号+表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="6">目的地号+表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
|
||||
<span class="base-label">头码车显示模式</span>
|
||||
<el-radio-group v-model="headMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="8">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99" />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewTrainId',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
planMode: 5,
|
||||
headMode: 5,
|
||||
fontSize: 16,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setTrainDispaly();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
export default {
|
||||
name: 'ViewTrainId',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
planMode: 5,
|
||||
headMode: 5,
|
||||
fontSize: 16
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setTrainDispaly();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: [this.planMode, this.headMode, this.fontSize].join('::')
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: [this.planMode, this.headMode, this.fontSize].join('::')
|
||||
};
|
||||
|
||||
this.loading = true
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false
|
||||
if (valid) {
|
||||
this.setTrainDispaly();
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
setTrainDispaly() {
|
||||
let updatList = [];
|
||||
let trainList = this.$store.getters['training/viewTrainList'];
|
||||
if (trainList && trainList.length > 0) {
|
||||
let nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFontSize = this.fontSize;
|
||||
updatList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); // 车次窗
|
||||
});
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.setTrainDispaly();
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setTrainDispaly() {
|
||||
const updatList = [];
|
||||
const trainList = this.$store.getters['training/viewTrainList']();
|
||||
if (trainList && trainList.length > 0) {
|
||||
const nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
const nameFontSize = this.fontSize;
|
||||
updatList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); // 车次窗
|
||||
});
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
switch (mode.toString()) {
|
||||
case '1': return 'serverNo:trainNo'; //表号+车次号
|
||||
case '2': return 'serverNo:trainNumber'; //表号+车组号
|
||||
case '3': return 'targetCode:trainNo'; //目的地号+车次号
|
||||
case '4': return 'targetCode:trainNumber'; //目的地号+车组号
|
||||
case '5': return 'targetCode:serverNo:trainNo'; //目的地号+表号+车次号
|
||||
case '6': return 'targetCode:serverNo:trainNumber'; //目的地号+表号+车组号
|
||||
}
|
||||
return ''; //无格式类型
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
switch (mode.toString()) {
|
||||
case '1': return 'serverNo:trainNo'; // 表号+车次号
|
||||
case '2': return 'serverNo:trainNumber'; // 表号+车组号
|
||||
case '3': return 'targetCode:trainNo'; // 目的地号+车次号
|
||||
case '4': return 'targetCode:trainNumber'; // 目的地号+车组号
|
||||
case '5': return 'targetCode:serverNo:trainNo'; // 目的地号+表号+车次号
|
||||
case '6': return 'targetCode:serverNo:trainNumber'; // 目的地号+表号+车组号
|
||||
}
|
||||
return ''; // 无格式类型
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,77 +1,84 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm view-train-id" title="列车识别号显示设置" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="1">表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="2">表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="5">目的地号+表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="6">目的地号+表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
|
||||
<span class="base-label">头码车显示模式</span>
|
||||
<el-radio-group v-model="headMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="8">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
<el-dialog
|
||||
class="beijing-01__systerm view-train-id"
|
||||
title="列车识别号显示设置" :visible.sync="show" width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="1">表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="2">表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="5">目的地号+表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="6">目的地号+表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
|
||||
<span class="base-label">头码车显示模式</span>
|
||||
<el-radio-group v-model="headMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="8">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99"/>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewTrainId',
|
||||
export default {
|
||||
name: 'ViewTrainId',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -83,101 +90,98 @@
|
||||
fontSize: 16,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setTrainDispaly();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setTrainDispaly();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: [this.planMode, this.headMode, this.fontSize].join('::')
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: [this.planMode, this.headMode, this.fontSize].join('::')
|
||||
};
|
||||
|
||||
this.loading = true
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false
|
||||
if (valid) {
|
||||
this.setTrainDispaly();
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
setTrainDispaly() {
|
||||
let updatList = [];
|
||||
let trainList = this.$store.getters['training/viewTrainList'];
|
||||
if (trainList && trainList.length > 0) {
|
||||
let nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFontSize = this.fontSize;
|
||||
updatList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); // 车次窗
|
||||
});
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.setTrainDispaly();
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setTrainDispaly() {
|
||||
const updatList = [];
|
||||
const trainList = this.$store.getters['training/viewTrainList']();
|
||||
if (trainList && trainList.length > 0) {
|
||||
const nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
const nameFontSize = this.fontSize;
|
||||
updatList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); // 车次窗
|
||||
});
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
switch (mode.toString()) {
|
||||
case '1': return 'serviceNumber:tripNumber'; //表号+车次号
|
||||
case '2': return 'serviceNumber:groupNumber'; //表号+车组号
|
||||
case '3': return 'targetCode:tripNumber'; //目的地号+车次号
|
||||
case '4': return 'targetCode:groupNumber'; //目的地号+车组号
|
||||
case '5': return 'targetCode:serviceNumber:tripNumber'; //目的地号+表号+车次号
|
||||
case '6': return 'targetCode:serviceNumber:groupNumber'; //目的地号+表号+车组号
|
||||
}
|
||||
return ''; //无格式类型
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
switch (mode.toString()) {
|
||||
case '1': return 'serviceNumber:tripNumber'; // 表号+车次号
|
||||
case '2': return 'serviceNumber:groupNumber'; // 表号+车组号
|
||||
case '3': return 'targetCode:tripNumber'; // 目的地号+车次号
|
||||
case '4': return 'targetCode:groupNumber'; // 目的地号+车组号
|
||||
case '5': return 'targetCode:serviceNumber:tripNumber'; // 目的地号+表号+车次号
|
||||
case '6': return 'targetCode:serviceNumber:groupNumber'; // 目的地号+表号+车组号
|
||||
}
|
||||
return ''; // 无格式类型
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,77 +1,84 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm view-train-id" title="列车识别号显示设置" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="1">表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="2">表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="5">目的地号+表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="6">目的地号+表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
|
||||
<span class="base-label">头码车显示模式</span>
|
||||
<el-radio-group v-model="headMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="8">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
<el-dialog
|
||||
class="chengdou-03__systerm view-train-id"
|
||||
title="列车识别号显示设置" :visible.sync="show" width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="1">表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="2">表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="5">目的地号+表号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-radio :label="6">目的地号+表号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
|
||||
<span class="base-label">头码车显示模式</span>
|
||||
<el-radio-group v-model="headMode">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio :label="3">目的地号+车次号</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="8">
|
||||
<el-radio :label="4">目的地号+车组号</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99"/>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewTrainId',
|
||||
export default {
|
||||
name: 'ViewTrainId',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -83,101 +90,98 @@
|
||||
fontSize: 16,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setTrainDispaly();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setTrainDispaly();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: [this.planMode, this.headMode, this.fontSize].join('::')
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: [this.planMode, this.headMode, this.fontSize].join('::')
|
||||
};
|
||||
|
||||
this.loading = true
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false
|
||||
if (valid) {
|
||||
this.setTrainDispaly();
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
setTrainDispaly() {
|
||||
let updatList = [];
|
||||
let trainList = this.$store.getters['training/viewTrainList'];
|
||||
if (trainList && trainList.length > 0) {
|
||||
let nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFontSize = this.fontSize;
|
||||
trainList.forEach(elem => {
|
||||
updatList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize }));
|
||||
});
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.setTrainDispaly();
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setTrainDispaly() {
|
||||
const updatList = [];
|
||||
const trainList = this.$store.getters['training/viewTrainList']();
|
||||
if (trainList && trainList.length > 0) {
|
||||
const nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
const nameFontSize = this.fontSize;
|
||||
trainList.forEach(elem => {
|
||||
updatList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize }));
|
||||
});
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
switch (mode.toString()) {
|
||||
case '1': return 'serviceNumber:tripNumber'; //表号+车次号
|
||||
case '2': return 'serviceNumber:groupNumber'; //表号+车组号
|
||||
case '3': return 'targetCode:tripNumber'; //目的地号+车次号
|
||||
case '4': return 'targetCode:groupNumber'; //目的地号+车组号
|
||||
case '5': return 'targetCode:serviceNumber:tripNumber'; //目的地号+表号+车次号
|
||||
case '6': return 'targetCode:serviceNumber:groupNumber'; //目的地号+表号+车组号
|
||||
}
|
||||
return ''; //无格式类型
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
switch (mode.toString()) {
|
||||
case '1': return 'serviceNumber:tripNumber'; // 表号+车次号
|
||||
case '2': return 'serviceNumber:groupNumber'; // 表号+车组号
|
||||
case '3': return 'targetCode:tripNumber'; // 目的地号+车次号
|
||||
case '4': return 'targetCode:groupNumber'; // 目的地号+车组号
|
||||
case '5': return 'targetCode:serviceNumber:tripNumber'; // 目的地号+表号+车次号
|
||||
case '6': return 'targetCode:serviceNumber:groupNumber'; // 目的地号+表号+车组号
|
||||
}
|
||||
return ''; // 无格式类型
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -166,7 +166,7 @@ export default {
|
||||
},
|
||||
setTrainDispaly() {
|
||||
const updatlist = [];
|
||||
const trainList = this.$store.getters['training/viewTrainList'];
|
||||
const trainList = this.$store.getters['training/viewTrainList']();
|
||||
if (trainList && trainList.length > 0) {
|
||||
const nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
const nameFontSize = this.fontSize;
|
||||
|
@ -4,26 +4,35 @@
|
||||
const scriptRecord = {
|
||||
namespaced: true,
|
||||
state: {
|
||||
mapLocation: {}, //地图定位
|
||||
mapLocation: {}, //地图定位,
|
||||
simulationPause: true ,
|
||||
},
|
||||
getters: {
|
||||
mapLocation:(state)=>{
|
||||
mapLocation: (state)=>{
|
||||
return state.mapLocation;
|
||||
}
|
||||
},
|
||||
simulationPause:(state)=>{
|
||||
return state.simulationPause;
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
setMapLocation:(state, mapLocation) => {
|
||||
setMapLocation: (state, mapLocation) => {
|
||||
state.mapLocation = mapLocation;
|
||||
},
|
||||
setSimulationPause: (state, simulationPause) => {
|
||||
state.simulationPause = simulationPause;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
/**
|
||||
* 设置地图定位
|
||||
*/
|
||||
updateMapLocation:({ commit }, mapLocation) => {
|
||||
updateMapLocation: ({ commit }, mapLocation) => {
|
||||
commit('setMapLocation', mapLocation);
|
||||
},
|
||||
|
||||
updateSimulationPause: ({ commit }, simulationPause) => {
|
||||
commit('setSimulationPause', simulationPause);
|
||||
},
|
||||
}
|
||||
};
|
||||
export default scriptRecord;
|
@ -78,7 +78,7 @@ const training = {
|
||||
return state.roles;
|
||||
},
|
||||
// 视图中的列车列表
|
||||
viewTrainList: (state) => {
|
||||
viewTrainList: (state) => () =>{
|
||||
const trainList = [];
|
||||
const mapDevice = Vue.prototype.$jlmap.mapDevice;
|
||||
Object.values(mapDevice).forEach(device => {
|
||||
|
@ -21,14 +21,13 @@
|
||||
@node-click="clickEvent"
|
||||
>
|
||||
<span slot-scope="{ node, data }">
|
||||
<span v-if="data.state=='01'">{{ $t('global.trainingHasStart').replace('(name)', data.creator.nickName) }}</span>
|
||||
<span v-else>{{ $t('global.trainingHasStart').replace('(name)', data.creator.nickName) }}</span>
|
||||
<span v-if="data.state=='01'">{{ $t('global.trainingHasStart').replace('{name}', data.creator.nickName) }}</span>
|
||||
<span v-else>{{ $t('global.trainingHasStart').replace('{name}', data.creator.nickName) }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
<span
|
||||
slot="
|
||||
footer"
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
>
|
||||
<el-button type="primary" @click="handleJoin">{{ $t('global.joinRoom') }}</el-button>
|
||||
|
@ -111,7 +111,7 @@ export default {
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: '加载任务',
|
||||
name: '加载剧本',
|
||||
type: 'primary',
|
||||
handleClick: this.handleLoad
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ import MenuScript from '@/views/display/menuScript';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import AddQuest from './demon/addQuest';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getTrainingStepsDetail } from '@/api/jmap/training';
|
||||
import { getTrainingDetail, getTrainingStepsDetail } from '@/api/jmap/training';
|
||||
import { setGoodsTryUse } from '@/api/management/goods';
|
||||
import { getProductDetail } from '@/api/management/mapprd';
|
||||
import { runDiagramQuit, loadScript, getSimulationInfo } from '@/api/simulation';
|
||||
@ -146,6 +146,18 @@ export default {
|
||||
...mapGetters('config', [
|
||||
'canvasId'
|
||||
]),
|
||||
trainingId() {
|
||||
return this.$route.query.trainingId;
|
||||
},
|
||||
skinCode() {
|
||||
return this.$route.query.skinCode;
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
prdType() {
|
||||
return this.$route.query.prdType;
|
||||
},
|
||||
isLesson() {
|
||||
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
|
||||
},
|
||||
@ -168,10 +180,7 @@ export default {
|
||||
return this.mode === 'plan';
|
||||
},
|
||||
isDrive() {
|
||||
return this.$route.query.prdType == '04';
|
||||
},
|
||||
trainingId() {
|
||||
return this.$route.query.trainingId;
|
||||
return this.prdType == '04';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -181,6 +190,14 @@ export default {
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
this.mapBoxP = document.getElementById(this.canvasId).children[0];
|
||||
this.mapBox = document.getElementsByTagName('canvas');
|
||||
|
||||
if (this.trainingId) {
|
||||
getTrainingStepsDetail(this.trainingId, { group: this.group }).then(resp => {
|
||||
this.trainingObj = resp.data;
|
||||
this.$store.dispatch('training/setTrainingData', this.trainingObj);
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
'$store.state.socket.permissionOver': function () {
|
||||
this.$alert('用户权限已被收回', '提示', {
|
||||
@ -191,7 +208,9 @@ export default {
|
||||
});
|
||||
},
|
||||
$route() {
|
||||
this.initLoadData();
|
||||
this.$nextTick(() => {
|
||||
this.initLoadData();
|
||||
});
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
@ -307,6 +326,7 @@ export default {
|
||||
async loadSimulationInfo() {
|
||||
const resp = await getSimulationInfo(this.group);
|
||||
if (resp && resp.code == 200) {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);
|
||||
this.questId = Number(resp.data.questId) || 0;
|
||||
}
|
||||
},
|
||||
@ -349,14 +369,14 @@ export default {
|
||||
if (parseInt(this.trainingId)) {
|
||||
// 设置地图数据
|
||||
// 设置实训数据
|
||||
const resp = await getTrainingStepsDetail(this.trainingId, { group: this.group });
|
||||
const resp = await getTrainingDetail(this.trainingId);
|
||||
if (resp && resp.code == 200) {
|
||||
const stepdData = this.trainingObj = resp.data;
|
||||
const rest = await getProductDetail(stepdData.prdCode);
|
||||
const detail = resp.data;
|
||||
const rest = await getProductDetail(detail.prdCode);
|
||||
if (rest && rest.code == 200) {
|
||||
await this.$store.dispatch('training/setPrdType', rest.data.prdType);
|
||||
await this.loadMapData(resp.data.skinCode);
|
||||
await this.$store.dispatch('training/setTrainingData', stepdData);
|
||||
const data = rest.data;
|
||||
await this.$store.dispatch('training/setPrdType', data.prdType);
|
||||
await this.loadMapData(detail.skinCode);
|
||||
}
|
||||
} else {
|
||||
this.$messageBox(`获取实训步骤数据失败`);
|
||||
@ -372,9 +392,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
if (parseInt(skinCode)) {
|
||||
await this.loadMapData(skinCode);
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
@ -384,11 +403,10 @@ export default {
|
||||
async initLoadDemonData() {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.$route.query.prdType]);
|
||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
||||
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
if (parseInt(skinCode)) {
|
||||
await this.loadMapData(skinCode);
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
@ -400,9 +418,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
if (parseInt(skinCode)) {
|
||||
await this.loadMapData(skinCode);
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
@ -414,9 +431,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.switchMode('01');
|
||||
|
||||
const mapId = this.$route.query.mapId;
|
||||
if (parseInt(mapId)) {
|
||||
await this.loadMapDataById(mapId);
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -427,9 +443,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
if (parseInt(skinCode)) {
|
||||
await this.loadMapData(skinCode);
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
@ -522,11 +537,11 @@ export default {
|
||||
if (this.isDrive) {
|
||||
this.panelShow = false;
|
||||
this.drivingShow = true;
|
||||
this.$refs.Jl3dDrive.show(this.$route.query.skinCode);
|
||||
this.$refs.Jl3dDrive.show(this.skinCode);
|
||||
} else {
|
||||
this.panelShow = false;
|
||||
this.simulationShow = true;
|
||||
this.$refs.Jl3dSimulation.show(this.$route.query.skinCode);
|
||||
this.$refs.Jl3dSimulation.show(this.skinCode);
|
||||
}
|
||||
},
|
||||
showpanel() {
|
||||
|
@ -101,6 +101,9 @@ export default {
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
resetBeginTime(){
|
||||
this.isDisable = false;
|
||||
},
|
||||
start(model) {
|
||||
this.isDisable = true;
|
||||
runDiagramStart(model, this.group).then(res => {
|
||||
|
@ -2,43 +2,40 @@
|
||||
<div>
|
||||
<el-form :model="modalData" ref="modalData" :rules="rules" label-width="100px" class="actionInfo" label-position="right">
|
||||
<el-form-item label="主体角色" class="conditionVO" prop="actionVO.memberId">
|
||||
<el-select v-model="modalData.actionVO.memberId" placeholder="请选择主体角色">
|
||||
<el-select v-model="modalData.actionVO.memberId" placeholder="请选择主体角色" :disabled="isPause&&isNotModify">
|
||||
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="完成时间" class="conditionVO">
|
||||
<el-input-number v-model="modalData.actionVO.time " class="inputStyle" :min="0"></el-input-number>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="动作类型" class="conditionVO" prop="actionVO.type">
|
||||
<el-select v-model="modalData.actionVO.type " placeholder="请选择动作类型" @change="changeType">
|
||||
<el-form-item label="动作类型" class="conditionVO" prop="actionVO.type" >
|
||||
<el-select v-model="modalData.actionVO.type " placeholder="请选择动作类型" @change="changeType" :disabled="deviceTypeReadOnly||isPause">
|
||||
<el-option v-for="actionType in actionTypeList" :key="actionType.label" :label="actionType.label" :value="actionType.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="目标角色" class="conditionVO" prop="actionVO.targetId" v-if="isConversitionAdd">
|
||||
<el-select v-model="modalData.actionVO.targetId" placeholder="请选择目标角色">
|
||||
<el-select v-model="modalData.actionVO.targetId" placeholder="请选择目标角色" :disabled="isPause&&isNotModify">
|
||||
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容" class="conditionVO" prop="actionVO.reply" v-if="isConversitionAdd">
|
||||
<el-input v-model="modalData.actionVO.reply" type="textarea" class="textareaStyle" rows="3"></el-input>
|
||||
<el-input v-model="modalData.actionVO.reply" type="textarea" class="textareaStyle" rows="3" :disabled="isPause&&isNotModify"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备指令" class="conditionVO" prop="actionVO.type" v-if="isCommandAdd">
|
||||
<el-select v-model="modalData.actionVO.deviceCommand " placeholder="请选择设备指令" @change="changeCommand" class="inputStyle">
|
||||
<el-form-item label="设备指令" class="conditionVO" prop="actionVO.deviceCommand" v-if="isCommandAdd">
|
||||
<el-select v-model="modalData.actionVO.deviceCommand " placeholder="请选择设备指令" @change="changeCommand" class="inputStyle" :disabled="isPause&&isModify">
|
||||
<el-option v-for="deviceCommand in deviceCommandList" :key="deviceCommand.deviceCommand" :label="deviceCommand.label" :value="deviceCommand.deviceCommand"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始站台" class="conditionVO" v-if="isJinLu" prop="param.startStation">
|
||||
<el-select v-model="modalData.param.startStation " placeholder="请选择起始站台" class="inputStyle">
|
||||
<el-select v-model="modalData.param.startStation " placeholder="请选择起始站台" class="inputStyle" :disabled="isPause&&isNotModify">
|
||||
<el-option v-for="station in stationList" :key="station.code" :label="station.name" :value="station.code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="终点站台" class="conditionVO" v-if="isJinLu" prop="param.endStation">
|
||||
<el-select v-model="modalData.param.endStation " placeholder="请选择终点站台" class="inputStyle">
|
||||
<el-select v-model="modalData.param.endStation " placeholder="请选择终点站台" class="inputStyle" :disabled="isPause&&isNotModify">
|
||||
<el-option v-for="station in stationList" :key="station.code" :label="station.name" :value="station.code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="addScriptActionInfo('modalData')">{{buttonName}}</el-button>
|
||||
<el-button type="primary" @click="addScriptActionInfo('modalData')" :disabled="isPause&&isNotModify" :loading="modifying">{{buttonName}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -74,7 +71,16 @@
|
||||
{
|
||||
this.initData();
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
Vue.prototype.$jlmap.setOptions(this.$store.state.scriptRecord.mapLocation);
|
||||
this.isPause=!(this.$store.state.scriptRecord.simulationPause);
|
||||
this.$parent.$parent.$parent.setIsParse(this.isPause);
|
||||
},
|
||||
'$store.state.scriptRecord.simulationPause': function(val){
|
||||
this.isPause=!(this.$store.state.scriptRecord.simulationPause);
|
||||
this.$parent.$parent.$parent.setIsParse(this.isPause);
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -82,7 +88,6 @@
|
||||
actionVO:{
|
||||
memberId:"",
|
||||
targetId:"",
|
||||
// time:0,
|
||||
reply:"",
|
||||
type:"Conversation",
|
||||
deviceCommand:"",
|
||||
@ -93,6 +98,10 @@
|
||||
endStation:"",
|
||||
}
|
||||
},
|
||||
deviceTypeReadOnly:false,
|
||||
isPause:false,
|
||||
isNotModify:true,
|
||||
modifying:false,
|
||||
isConversitionAdd:true,
|
||||
isCommandAdd:false,
|
||||
actionTypeList:DeviceTypeDic.ConstSelect.actionType,
|
||||
@ -163,15 +172,17 @@
|
||||
{this.modalData.actionVO.commandParamList=[this.modalData.param.startStation,this.modalData.param.endStation];}
|
||||
let data=this.modalData.actionVO;
|
||||
let obj=this;
|
||||
|
||||
this.modifying=true;
|
||||
if(this.$props.operateType=="add")
|
||||
{
|
||||
addScriptAction(group,data).then(response=>{
|
||||
this.initActionData();
|
||||
this.modifying=false;
|
||||
this.$message.success('添加动作成功');
|
||||
this.$emit('create');
|
||||
this.resetDisabled();
|
||||
// this.resetDisabled();
|
||||
this.initActionData();
|
||||
}).catch(error => {
|
||||
this.modifying=false;
|
||||
this.$messageBox(`添加动作失败: ${error.message}`);
|
||||
});
|
||||
}
|
||||
@ -179,12 +190,17 @@
|
||||
{
|
||||
let actionId=this.modalData.actionVO.id;
|
||||
modifyScriptAction(group,actionId,data).then(response=>{
|
||||
this.initActionData();
|
||||
this.modifying=false;
|
||||
|
||||
this.isNotModify=true;
|
||||
this.$parent.$parent.$parent.setDisabled(this.isNotModify);
|
||||
this.$emit('modifyButtonName');
|
||||
this.$message.success('修改动作成功');
|
||||
this.$emit('create');
|
||||
this.resetDisabled();
|
||||
// this.resetDisabled();
|
||||
this.initActionData();
|
||||
}).catch(error => {
|
||||
this.modifying=false;
|
||||
this.$messageBox(`修改动作失败: ${error.message}`);
|
||||
});
|
||||
}
|
||||
@ -199,6 +215,19 @@
|
||||
if(this.$refs['modalData'])
|
||||
{
|
||||
this.$refs['modalData'].resetFields();
|
||||
// this.$nextTick(function(){
|
||||
this.deviceTypeReadOnly=false;
|
||||
this.modalData.actionVO.type="Conversation";
|
||||
this.modalData.actionVO.memberId="";
|
||||
this.modalData.actionVO.targetId="";
|
||||
// this.modalData.actionVO.deviceCommand="";
|
||||
this.modalData.actionVO.reply="";
|
||||
this.modalData.param.startStation="";
|
||||
this.isConversitionAdd=true;
|
||||
this.isCommandAdd=false;
|
||||
this.isJinLu=false;
|
||||
this.modalData.param.endStation="";
|
||||
// });
|
||||
}
|
||||
},
|
||||
clearValidate(){
|
||||
@ -208,18 +237,7 @@
|
||||
}
|
||||
},
|
||||
initActionData(){
|
||||
// debugger;
|
||||
this.modalData.actionVO.memberId="";
|
||||
this.modalData.actionVO.targetId="";
|
||||
this.modalData.actionVO.type="Conversation";
|
||||
// this.modalData.actionVO.time=0;
|
||||
this.modalData.actionVO.reply="";
|
||||
this.modalData.param.startStation="";
|
||||
this.isConversitionAdd=true;
|
||||
this.isCommandAdd=false;
|
||||
this.isJinLu=false;
|
||||
this.modalData.actionVO.deviceCommand=null;
|
||||
this.modalData.param.endStation="";
|
||||
this.resetDisabled();
|
||||
},
|
||||
changeType(index){
|
||||
switch(index)
|
||||
@ -254,6 +272,7 @@
|
||||
|
||||
},
|
||||
changeCommand(index){
|
||||
this.modalData.actionVO.deviceCommand
|
||||
switch(index)
|
||||
{
|
||||
case "Train_Manual_Route_Blocking_Drive":{
|
||||
@ -273,14 +292,18 @@
|
||||
doShow(data){
|
||||
if(data)
|
||||
{
|
||||
// debugger;
|
||||
this.clearValidate();
|
||||
this.isNotModify=false;
|
||||
this.$parent.$parent.$parent.setDisabled(this.isNotModify);
|
||||
this.initData();
|
||||
this.modalData.actionVO.id=data.id;
|
||||
this.modalData.actionVO.memberId=data.memberId;
|
||||
this.modalData.actionVO.type=data.type;
|
||||
this.deviceTypeReadOnly=true;
|
||||
// this.modalData.actionVO.time=data.time;
|
||||
if(data.type=="Conversation")
|
||||
{
|
||||
this.isJinLu=false;
|
||||
this.modalData.actionVO.targetId=data.targetId;
|
||||
this.isConversitionAdd=true;
|
||||
this.isCommandAdd=false;
|
||||
@ -288,6 +311,7 @@
|
||||
}
|
||||
else if(data.type=="Command")
|
||||
{
|
||||
this.isJinLu=false;
|
||||
this.isConversitionAdd=false;
|
||||
this.isCommandAdd=true;
|
||||
this.modalData.actionVO.reply="";
|
||||
@ -312,10 +336,10 @@
|
||||
font-size: 15px;
|
||||
}
|
||||
.actionInfo{
|
||||
margin-top:20px;
|
||||
margin-top:10px;
|
||||
margin-left: 5px;
|
||||
font-size: 15px;
|
||||
width:98%;
|
||||
// width:98%;
|
||||
}
|
||||
.inputStyle{
|
||||
width:300px;
|
||||
|
@ -6,43 +6,24 @@
|
||||
<div class="tab-pane-big">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar">
|
||||
<add-action ref="addBehavior" :group="group" @create="create" :buttonName="buttonName" :operateType="operateType" @modifyButtonName="modifyButtonName" class="addScript"></add-action>
|
||||
<div class="vertialLine"></div>
|
||||
<div class="block actionListTable">
|
||||
<el-timeline :reverse="reverse">
|
||||
<el-timeline-item v-for="(actionInfo,index) in actionInfoList" :key="index">
|
||||
<el-card>
|
||||
<div class="actionTable">
|
||||
<span class="detail" v-html="actionInfo.detail">
|
||||
<!-- <span class="actionColor"></span> -->
|
||||
</span>
|
||||
<span class="otherInfo">{{actionInfo.otherInfo}}</span>
|
||||
</div>
|
||||
<div class="btnGroup">
|
||||
<el-button type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)">修改</el-button>
|
||||
<el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button>
|
||||
<el-button type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)" :disabled="actionInfo.disabled">修改</el-button>
|
||||
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> -->
|
||||
</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
|
||||
<!-- <el-table
|
||||
v-loading="loading"
|
||||
:data="actionList" border class="actionListTable">
|
||||
<el-table-column prop="reply" label="内容" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column prop="time" label="完成时间" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column prop="type" label="动作类型" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-row>
|
||||
<el-button type="primary" size="mini" @click="modifyAction(scope.row)">修改</el-button>
|
||||
<el-button type="primary" size="mini" @click="deleteAction(scope.row)">删除</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
@ -77,13 +58,11 @@
|
||||
AddAction,
|
||||
},
|
||||
mounted(){
|
||||
this.loadInitData(this.$route.query);
|
||||
// this.memberName=this.$store.state.scriptRecord.memberName;
|
||||
// this.behaviorName=this.$store.state.scriptRecord.behaviorName;
|
||||
this.loadInitData();
|
||||
},
|
||||
methods:{
|
||||
loadInitData(obj) {
|
||||
let group=obj.group;
|
||||
loadInitData() {
|
||||
let group=this.$route.query.group;
|
||||
getAvailableDeviceCommand().then(response=>{
|
||||
this.deviceCommandList=response.data;
|
||||
this.loadOtherData(this.$route.query);
|
||||
@ -101,7 +80,6 @@
|
||||
});
|
||||
memberVOList=JSON.parse(memberVOList);
|
||||
let actionList=response.data.actionVOList;
|
||||
// actionList=actionList.reverse();
|
||||
actionList.forEach(element => {
|
||||
let member=memberVOList.find(elem=>{return elem.id==element.memberId});
|
||||
let memberName=member.name==undefined?"":" - "+member.name;
|
||||
@ -111,7 +89,7 @@
|
||||
{
|
||||
let target=memberVOList.find(elem=>{return elem.id==element.targetId});
|
||||
let targetName=target.name==undefined?"":" - "+target.name;
|
||||
this.actionInfoList.push({id:element.id,detail:"<span style='color:#409EFF'>"+member.role+memberName+"</span>"+" 对 "+"<span style='color:#409EFF'>"+target.role+targetName+"</span>:",otherInfo:element.reply,row:element});
|
||||
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});
|
||||
break;
|
||||
}
|
||||
case "Command":
|
||||
@ -121,12 +99,12 @@
|
||||
{
|
||||
case 'Train_Manual_Route_Blocking_Drive':
|
||||
{
|
||||
this.actionInfoList.push({id:element.id,detail:"<span style='color:#409EFF'>"+member.role+memberName+"</span>执行指令 :",otherInfo:deviceCommand.label,row:element});
|
||||
this.actionInfoList.push({id:element.id,detail:"<span style='color:#409EFF'>"+member.role+memberName+"</span>执行指令 :",otherInfo:deviceCommand.label,row:element,disabled:true});
|
||||
break;
|
||||
}
|
||||
case 'Train_Manual_Limit_Drive':
|
||||
{
|
||||
this.actionInfoList.push({id:element.id,detail:"<span style='color:#409EFF'>"+member.role+memberName+"</span>执行指令 : ",otherInfo:deviceCommand.label,row:element});
|
||||
this.actionInfoList.push({id:element.id,detail:"<span style='color:#409EFF'>"+member.role+memberName+"</span>执行指令 : ",otherInfo:deviceCommand.label,row:element,disabled:true});
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -137,7 +115,6 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
// this.actionList=response.data.actionVOList;
|
||||
if(response.data.mapLocation)
|
||||
{
|
||||
let mapLocation={"offsetX":response.data.mapLocation.x,"offsetY":response.data.mapLocation.y,"scaleRate":response.data.mapLocation.scale};
|
||||
@ -156,7 +133,7 @@
|
||||
});
|
||||
},
|
||||
reloadTable(){
|
||||
this.loadInitData(this.$route.query);
|
||||
this.loadInitData();
|
||||
},
|
||||
create(){
|
||||
this.reloadTable();
|
||||
@ -215,5 +192,11 @@
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.vertialLine{
|
||||
height: 380px;
|
||||
margin-left: 440px;
|
||||
border-right: 1px #dadada solid;
|
||||
position: fixed;
|
||||
width: 0px;
|
||||
}
|
||||
</style>
|
||||
|
@ -140,10 +140,8 @@ export default {
|
||||
}
|
||||
});
|
||||
if (obj) {
|
||||
const that = this;
|
||||
const data = { id: obj.trainingId };
|
||||
getTrainingDetail(data).then(res => {
|
||||
that.courseModel = {
|
||||
getTrainingDetail(obj.trainingId ).then(res => {
|
||||
this.courseModel = {
|
||||
id: res.data.id,
|
||||
name: res.data.name,
|
||||
maxDuration: res.data.maxDuration,
|
||||
@ -152,7 +150,7 @@ export default {
|
||||
updateTime: res.data.updateTime
|
||||
};
|
||||
}).catch(error => {
|
||||
that.$message.error('获取试题息失败:' + error.message);
|
||||
this.$message.error('获取试题息失败:' + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -13,9 +13,14 @@
|
||||
<div>
|
||||
<get-action ref="getAction" :group="group"></get-action>
|
||||
</div>
|
||||
<!-- <el-button-group class="button-group1"> -->
|
||||
|
||||
<!-- </el-button-group> -->
|
||||
<el-button-group class="button-group">
|
||||
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
|
||||
<el-button type="primary" @click="pauseScript" v-if="isPause" :disabled="executeDisabled">暂停</el-button>
|
||||
<el-button type="primary" @click="executePlayScript" v-else :disabled="executeDisabled">恢复并执行</el-button>
|
||||
<el-button type="primary" @click="saveMaplocation">{{$t('scriptRecord.saveMaplocation')}}</el-button>
|
||||
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
|
||||
<el-button type="primary" @click="saveScenesStage">{{$t('scriptRecord.saveBackground')}}</el-button>
|
||||
<el-button type="success" @click="saveScenesData" :loading="isSavingScript" >{{$t('scriptRecord.saveData')}}</el-button>
|
||||
<!-- 暂停 -->
|
||||
@ -29,7 +34,7 @@
|
||||
import Vue from 'vue';
|
||||
import GetAction from './scriptRecord/getAction';
|
||||
import { launchFullscreen, exitFullscreen } from '@/utils/screen';
|
||||
import {saveScriptScenes, saveScriptData, dumpScriptData,updateMapLocation} from '@/api/simulation';
|
||||
import {saveScriptScenes, saveScriptData, dumpScriptData,updateMapLocation,scriptPause,executeScript} from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
name: 'TipScriptRecord',
|
||||
@ -50,14 +55,11 @@
|
||||
mapLocation:{},
|
||||
autoSaveScript: null,
|
||||
isSavingScript:false,
|
||||
isPause:false,
|
||||
executeDisabled:false,
|
||||
// isSaveStage: true,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
Vue.prototype.$jlmap.setOptions(this.$store.state.scriptRecord.mapLocation);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted(){
|
||||
@ -83,6 +85,13 @@
|
||||
this.isShrink = true;
|
||||
}
|
||||
},
|
||||
setIsParse(isPause){
|
||||
this.isPause=isPause;
|
||||
},
|
||||
setDisabled(data)
|
||||
{
|
||||
this.executeDisabled=!data;
|
||||
},
|
||||
initAutoSaveScript() {
|
||||
const timeout = 1000 * 20;
|
||||
this.clearAutoSave(this.autoSaveScript);
|
||||
@ -94,13 +103,25 @@
|
||||
this.autoSaveScript = null;
|
||||
}
|
||||
},
|
||||
// getActions(row){
|
||||
// this.displayType="action";
|
||||
// this.behaviorId=row.id;
|
||||
// this.$store.dispatch('scriptRecord/updateBehaviorName',row.description);
|
||||
// },
|
||||
pauseScript(){
|
||||
scriptPause(this.group).then(resp => {
|
||||
// this.isSaveStage = false;
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause',true);
|
||||
// this.$message.success('暂停成功');
|
||||
}).catch(error => {
|
||||
this.$messageBox('暂停失败!');
|
||||
});
|
||||
},
|
||||
executePlayScript(){
|
||||
executeScript(this.group).then(resp => {
|
||||
// this.isSaveStage = false;
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause',false);
|
||||
// this.$message.success('暂停成功');
|
||||
}).catch(error => {
|
||||
this.$messageBox('恢复失败!');
|
||||
});
|
||||
},
|
||||
saveScenesStage() {
|
||||
|
||||
saveScriptScenes(this.group).then(resp => {
|
||||
// this.isSaveStage = false;
|
||||
this.$message.success('保存背景成功');
|
||||
@ -125,6 +146,7 @@
|
||||
})
|
||||
},
|
||||
dumpScenesData() {
|
||||
this.clearAutoSave();
|
||||
let group=this.group;
|
||||
this.$confirm('此操作将会清除已保存的编制数据, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@ -133,11 +155,16 @@
|
||||
}).then(() => {
|
||||
dumpScriptData(group).then(resp => {
|
||||
// this.isSaveStage = true;
|
||||
this.$parent.resetBeginTime();
|
||||
this.$refs["getAction"].loadInitData();
|
||||
this.initAutoSaveScript();
|
||||
this.$message.success('清除数据成功');
|
||||
}).catch(error => {
|
||||
this.$messageBox('清除数据失败!');
|
||||
})
|
||||
}).catch(error => { })
|
||||
}).catch(error => {
|
||||
this.initAutoSaveScript();
|
||||
})
|
||||
},
|
||||
saveMaplocation()
|
||||
{
|
||||
@ -205,6 +232,11 @@
|
||||
margin-left: 20px;
|
||||
float:right;
|
||||
}
|
||||
.button-group1{
|
||||
margin-top:15px;
|
||||
margin-left: 20px;
|
||||
float:left;
|
||||
}
|
||||
.actionInfo{
|
||||
margin-top:30px;
|
||||
}
|
||||
|
@ -78,9 +78,9 @@ export default {
|
||||
this.height = this._clientHeight;
|
||||
},
|
||||
initLoadPage() {
|
||||
const data = { id: this.$route.query.trainingId };
|
||||
if (parseInt(data.id)) {
|
||||
getTrainingDetail(data).then(res => {
|
||||
const trainingId = this.$route.query.trainingId;
|
||||
if (parseInt(trainingId)) {
|
||||
getTrainingDetail(trainingId).then(res => {
|
||||
this.courseModel = {
|
||||
id: res.data.id,
|
||||
name: res.data.name,
|
||||
|
@ -116,6 +116,7 @@ export default {
|
||||
EventBus.$off('refresh');
|
||||
EventBus.$off('viewLoading');
|
||||
EventBus.$off('viewProgressAt');
|
||||
this.$store.dispatch('map/mapClear');
|
||||
if (this.$jlmap) {
|
||||
this.$jlmap.dispose();
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ export default {
|
||||
},
|
||||
// 更新列车列表
|
||||
updateTrainList() {
|
||||
const list = this.$store.getters['training/viewTrainList'];
|
||||
const list = this.$store.getters['training/viewTrainList']();
|
||||
if (this.treeData[4].children.length != list.length) {
|
||||
this.treeData[4].children = [];
|
||||
if (list && list.length) {
|
||||
|
@ -89,7 +89,10 @@ export default {
|
||||
]),
|
||||
...mapGetters('config', [
|
||||
'canvasId'
|
||||
])
|
||||
]),
|
||||
skinCode() {
|
||||
return this.$route.query.skinCode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
||||
@ -123,7 +126,9 @@ export default {
|
||||
}
|
||||
},
|
||||
$route() {
|
||||
this.initLoadData();
|
||||
this.$nextTick(() => {
|
||||
this.initLoadData();
|
||||
});
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
@ -268,8 +273,7 @@ export default {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
if (skinCode) {
|
||||
if (this.skinCode) {
|
||||
// 01 现地 02 行调 '' 观众
|
||||
const resp = await this.getUserRole();
|
||||
if (resp && resp.code == 200) {
|
||||
@ -285,7 +289,7 @@ export default {
|
||||
case 'Repair': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Repair'); break;
|
||||
}
|
||||
}
|
||||
await this.getTrainDetail(skinCode);
|
||||
await this.getTrainDetail(this.skinCode);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -318,7 +322,7 @@ export default {
|
||||
hidepanel() {
|
||||
this.panelShow = false;
|
||||
this.drivingShow = true;
|
||||
this.$refs.Jl3dDrive.show(this.$route.query.skinCode);
|
||||
this.$refs.Jl3dDrive.show(this.skinCode);
|
||||
|
||||
},
|
||||
messageInfo(message, type) {
|
||||
|
@ -210,7 +210,7 @@ export default {
|
||||
|
||||
this.operateModel.id = node.data.id;
|
||||
this.operateModel.name = node.data.name;
|
||||
getTrainingDetail({ id: node.data.id }).then(response => {
|
||||
getTrainingDetail(node.data.id).then(response => {
|
||||
this.operateModel.minDuration = response.data.minDuration;
|
||||
this.operateModel.maxDuration = response.data.maxDuration;
|
||||
this.operateModel.operateType = response.data.operateType;
|
||||
|
@ -47,7 +47,6 @@ export default {
|
||||
},
|
||||
$route() {
|
||||
this.resizeHandler();
|
||||
this.$;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -15,7 +15,7 @@
|
||||
import MapSystemDraft from '@/views/mapsystem/index';
|
||||
import StepManage from './stepmanage/index';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getTrainingStepsDetail } from '@/api/jmap/training';
|
||||
import { getTrainingDetail, getTrainingStepsDetail } from '@/api/jmap/training';
|
||||
import { getProductDetail } from '@/api/management/mapprd';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { loadMapData } from '@/utils/loaddata';
|
||||
@ -49,6 +49,16 @@ export default {
|
||||
watch: {
|
||||
$route(newVal) {
|
||||
this.initLoadData();
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function() {
|
||||
if (this.trainingId) {
|
||||
getTrainingStepsDetail(this.trainingId, { group: this.group }).then(response => {
|
||||
this.$store.dispatch('training/setTrainingData', response.data);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.getMapStepsFailed'));
|
||||
this.endViewLoading();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -77,19 +87,19 @@ export default {
|
||||
// 获取实训的详细数据
|
||||
// 加载地图数据
|
||||
// 设置实训数据
|
||||
getTrainingStepsDetail(this.trainingId, { group: this.group }).then(response => {
|
||||
const stepdData = response.data;
|
||||
getProductDetail(stepdData.prdCode).then(res => {
|
||||
loadMapData(stepdData.skinCode).then(() => {
|
||||
this.$store.dispatch('training/setPrdType', res.data.prdType);
|
||||
this.$store.dispatch('training/setTrainingData', stepdData);
|
||||
getTrainingDetail(this.trainingId).then(resp => {
|
||||
const detail = resp.data;
|
||||
getProductDetail(detail.prdCode).then(rest => {
|
||||
const data = rest.data;
|
||||
loadMapData(detail.skinCode).then(() => {
|
||||
this.$store.dispatch('training/setPrdType', data.prdType);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.loadMapDataFailed'));
|
||||
this.endViewLoading();
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.getMapStepsFailed'));
|
||||
this.$messageBox(this.$t('error.getMapDetailFailed'));
|
||||
this.endViewLoading();
|
||||
});
|
||||
} else {
|
||||
|
@ -40,12 +40,12 @@ export default {
|
||||
const form = {
|
||||
labelWidth: '60px',
|
||||
items: [
|
||||
{ prop: 'code', label: '编码', type: 'text', required: true, disabled: !isAdd },
|
||||
{ prop: 'name', label: '名称', type: 'text', required: true },
|
||||
{ prop: 'code', label: this.$t('system.code'), type: 'text', required: true, disabled: !isAdd },
|
||||
{ prop: 'name', label: this.$t('system.name'), type: 'text', required: true },
|
||||
{
|
||||
prop: 'status', label: '状态', type: 'select', required: true, options: this.$ConstSelect.Status
|
||||
prop: 'status', label: this.$t('system.status'), type: 'select', required: true, options: this.$ConstSelect.Status
|
||||
},
|
||||
{ prop: 'remarks', label: '备注', type: 'textarea', required: false }
|
||||
{ prop: 'remarks', label: this.$t('system.remarks'), type: 'textarea', required: false }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -53,21 +53,21 @@ export default {
|
||||
rules() {
|
||||
const crules = {
|
||||
name: [
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
||||
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' },
|
||||
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: '请选择状态', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.pleaseSelectStatus'), trigger: 'change' }
|
||||
],
|
||||
remarks: [
|
||||
{ max: 50, message: '不能超过 50 个字符', trigger: 'blur' }
|
||||
{ max: 50, message: this.$t('rules.strLengthNotExceed50'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
if (this.type === 'ADD') {
|
||||
return Object.assign(crules, {
|
||||
code: [
|
||||
{ required: true, message: '请输入编码', trigger: 'blur' },
|
||||
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.pleaseInputCode'), trigger: 'blur' },
|
||||
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' },
|
||||
{ validator: this.validateCode, trigger: 'blur' }
|
||||
]
|
||||
});
|
||||
@ -77,25 +77,25 @@ export default {
|
||||
},
|
||||
title() {
|
||||
if (this.type === 'ADD') {
|
||||
return '创建明细';
|
||||
return this.$t('system.createDetail');
|
||||
} else {
|
||||
return '编辑明细';
|
||||
return this.$t('system.editDetail');
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validateCode(rule, value, callback) {
|
||||
if (!validateCharCode(value)) {
|
||||
return callback(new Error('格式不正确,只能是字符/数字/_'));
|
||||
return callback(new Error(this.$t('error.formartError')));
|
||||
} else {
|
||||
checkDicDetailCodeExist(this.dicId, value).then(response => {
|
||||
if (response.data) {
|
||||
return callback(new Error('编码已存在'));
|
||||
return callback(new Error(this.$t('error.codeHasExist')));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
}).catch(() => {
|
||||
return callback(new Error('服务异常'));
|
||||
return callback(new Error(this.$t('error.serviceException')));
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -121,21 +121,21 @@ export default {
|
||||
create() {
|
||||
const self = this;
|
||||
create(this.dicId, this.formModel).then(response => {
|
||||
self.$message.success('创建字典目录成功');
|
||||
self.$message.success(this.$t('system.createSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.$message.error('创建字典目录失败:' + error.message);
|
||||
self.$message.error(`${this.$t('error.createDetailFailed')}:${error.message}`);
|
||||
});
|
||||
},
|
||||
update() {
|
||||
const self = this;
|
||||
update(this.dicId, this.formModel).then(response => {
|
||||
self.$message.success('更新字典目录成功');
|
||||
self.$message.success(this.$t('system.updateSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.$message.error('更新字典目录失败:' + error.message);
|
||||
self.$message.error(`${this.$t('error.updateDetailFailed')}:${error.message}`);
|
||||
});
|
||||
},
|
||||
handleClose(done) {
|
||||
|
@ -28,11 +28,11 @@ export default {
|
||||
},
|
||||
userName: {
|
||||
type: 'text',
|
||||
label: this.$t('system.username')
|
||||
label: this.$t('system.userName')
|
||||
},
|
||||
mobile: {
|
||||
type: 'text',
|
||||
label: this.$t('system.phoneNumber')
|
||||
label: this.$t('system.mobile')
|
||||
},
|
||||
skinCode: {
|
||||
type: 'select',
|
||||
@ -64,11 +64,11 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('system.username'),
|
||||
title: this.$t('system.userName'),
|
||||
prop: 'creator.name'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.phoneNumber'),
|
||||
title: this.$t('system.mobile'),
|
||||
prop: 'creator.mobile'
|
||||
},
|
||||
{
|
||||
@ -170,7 +170,7 @@ export default {
|
||||
return sessionId;
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.$confirm(this.$t('global.delUserSimulationIsContinue'), this.$t('global.tips'), {
|
||||
this.$confirm(this.$t('system.delUserSimulationIsContinue'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-dialog :title="'编辑用户权限'" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<el-dialog :title="$t('system.editUserPermission')" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -31,11 +31,11 @@ export default {
|
||||
const form = {
|
||||
labelWidth: '60px',
|
||||
items: [
|
||||
{ prop: 'name', label: '名称', type: 'text', required: true, disabled: true },
|
||||
{ prop: 'name', label: this.$t('system.name'), type: 'text', required: true, disabled: true },
|
||||
// { prop: 'nickname', label: '昵称', type: 'text', required: true },
|
||||
// { prop: 'mobile', label: '电话', type: 'text', required: true },
|
||||
// { prop: 'email', label: '邮箱', type: 'text' },
|
||||
{ prop: 'roles', label: '权限', type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true }
|
||||
{ prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -43,11 +43,11 @@ export default {
|
||||
rules() {
|
||||
const crules = {
|
||||
name: [
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
||||
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' },
|
||||
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: '请选择状态', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.pleaseSelectStatus'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
@ -76,11 +76,11 @@ export default {
|
||||
update() {
|
||||
const self = this;
|
||||
putRoles(this.formModel).then(response => {
|
||||
self.$message.success('修改成功');
|
||||
self.$message.success(this.$t('system.updateSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.$message.error('修改失败:' + error.message);
|
||||
self.$message.error(`${this.$t('error.updateFailed')}: ${error.message}`);
|
||||
});
|
||||
},
|
||||
handleClose(done) {
|
||||
|
@ -29,11 +29,11 @@ export default {
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: '名称'
|
||||
label: this.$t('system.name')
|
||||
},
|
||||
roles: {
|
||||
type: 'select',
|
||||
label: '角色',
|
||||
label: this.$t('system.roles'),
|
||||
config: {
|
||||
data: this.$ConstSelect.roleList
|
||||
}
|
||||
@ -47,23 +47,23 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '名称',
|
||||
title: this.$t('system.name'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '昵称',
|
||||
title: this.$t('system.nickname'),
|
||||
prop: 'nickname'
|
||||
},
|
||||
{
|
||||
title: '电话',
|
||||
title: this.$t('system.mobile'),
|
||||
prop: 'mobile'
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
title: this.$t('system.email'),
|
||||
prop: 'email'
|
||||
},
|
||||
{
|
||||
title: '角色',
|
||||
title: this.$t('system.roles'),
|
||||
prop: 'roles',
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.$convertField(row.roles, this.$ConstSelect.roleList, ['value', 'label'], true); },
|
||||
@ -71,15 +71,15 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: '编辑',
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.handleUserEdit
|
||||
},
|
||||
{
|
||||
name: '订阅地图',
|
||||
name: this.$t('system.subscribeMap'),
|
||||
handleClick: this.handleMapCorrelation,
|
||||
type: 'danger'
|
||||
}
|
||||
@ -100,9 +100,9 @@ export default {
|
||||
|
||||
// 删除
|
||||
handleUserDelete(index, row) {
|
||||
this.$confirm('此操作将删除该类型, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('system.delTypeIsContinue'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// delPublishMap(row.id).then(response => {
|
||||
|
@ -2,8 +2,8 @@
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -34,12 +34,12 @@ export default {
|
||||
computed: {
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '100px',
|
||||
labelWidth: '160px',
|
||||
items: [
|
||||
{ prop: 'userName', label: '用户名称', type: 'text', required: false, disabled: true },
|
||||
{ prop: 'examName', label: '试卷名称', type: 'text', required: true, disabled: true },
|
||||
{ prop: 'score', label: '考试分数', type: 'text', required: true },
|
||||
{ prop: 'result', label: '考试结果', type: 'select', required: true, options: this.$ConstSelect.examResultList }
|
||||
{ prop: 'userName', label: this.$t('system.userName'), type: 'text', required: false, disabled: true },
|
||||
{ prop: 'examName', label: this.$t('system.examName'), type: 'text', required: true, disabled: true },
|
||||
{ prop: 'score', label: this.$t('system.examScore'), type: 'text', required: true },
|
||||
{ prop: 'result', label: this.$t('system.examResult'), type: 'select', required: true, options: this.$ConstSelect.examResultList }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -47,16 +47,16 @@ export default {
|
||||
rules() {
|
||||
const crules = {
|
||||
score: [
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' }
|
||||
],
|
||||
result: [
|
||||
{ required: true, message: '请选择状态', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.pleaseSelectStatus'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
},
|
||||
title() {
|
||||
return '编辑考试详情';
|
||||
return this.$t('system.editExamDetail');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -79,11 +79,11 @@ export default {
|
||||
update() {
|
||||
const self = this;
|
||||
updateExam(this.formModel).then(response => {
|
||||
self.$message.success('修改成功!');
|
||||
self.$message.success(this.$t('system.updateSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.$message.error('修改失败!' + error.message);
|
||||
self.$message.error(`${this.$t('error.updateFailed')}: ${error.message}`);
|
||||
});
|
||||
},
|
||||
handleClose(done) {
|
||||
|
@ -22,20 +22,20 @@ export default {
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
labelWidth: '150px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
examName: {
|
||||
type: 'text',
|
||||
label: '试卷名称'
|
||||
label: this.$t('system.examName')
|
||||
},
|
||||
userName: {
|
||||
type: 'text',
|
||||
label: '考试用户'
|
||||
label: this.$t('system.examUser')
|
||||
},
|
||||
result: {
|
||||
type: 'select',
|
||||
label: '考试结果',
|
||||
label: this.$t('system.examResult'),
|
||||
config: {
|
||||
data: this.$ConstSelect.examResultList
|
||||
}
|
||||
@ -49,11 +49,11 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '试卷名称',
|
||||
title: this.$t('system.examName'),
|
||||
prop: 'examName'
|
||||
},
|
||||
{
|
||||
title: '考试结果',
|
||||
title: this.$t('system.examResult'),
|
||||
prop: 'result',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.result, this.$ConstSelect.examResultList, ['value', 'label']); },
|
||||
@ -67,28 +67,28 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '考试成绩',
|
||||
title: this.$t('system.examScore'),
|
||||
prop: 'score'
|
||||
},
|
||||
{
|
||||
title: '考试用户',
|
||||
title: this.$t('system.examUser'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: '用户手机号',
|
||||
title: this.$t('system.mobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: '编辑',
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.edit
|
||||
},
|
||||
{
|
||||
name: '删除',
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handleDelete,
|
||||
type: 'danger'
|
||||
}
|
||||
@ -115,17 +115,17 @@ export default {
|
||||
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除此考试结果, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('system.delExamResultIsContinue'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delPublishExam(row.id).then(response => {
|
||||
this.$message.success('删除成功');
|
||||
this.$message.success(this.$t('system.deleteSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.reloadTable();
|
||||
this.$messageBox('删除失败');
|
||||
this.$messageBox(this.$t('error.deleteFailed'));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -2,8 +2,8 @@
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -41,12 +41,12 @@ export default {
|
||||
computed: {
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '100px',
|
||||
labelWidth: '120px',
|
||||
items: [
|
||||
{ prop: 'mapId', label: '地图名称', type: 'select', required: true, options: this.LessonList, change: true, onChange: this.mapChange },
|
||||
{ prop: 'mapPrdCode', label: '产品名称', type: 'select', required: true, options: this.mapPrdList, placeholder: '请选择产品' },
|
||||
{ prop: 'userName', label: '用户名称', type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
||||
{ prop: 'duration', label: '实训时长', type: 'text', rightWidth: true, required: true, message: 's' }
|
||||
{ prop: 'mapId', label: this.$t('system.mapName'), type: 'select', required: true, options: this.LessonList, change: true, onChange: this.mapChange, placeholder: this.$t('rules.mapInput') },
|
||||
{ prop: 'mapPrdCode', label: this.$t('system.productName'), type: 'select', required: true, options: this.mapPrdList, placeholder: this.$t('rules.productInput') },
|
||||
{ prop: 'userName', label: this.$t('system.userName'), type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: this.$t('system.pleaseInputNames') },
|
||||
{ prop: 'duration', label: this.$t('system.trainingUseTime'), type: 'text', rightWidth: true, required: true, message: 's' }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -54,22 +54,22 @@ export default {
|
||||
rules() {
|
||||
const crules = {
|
||||
mapId: [
|
||||
{ required: true, message: '请选择地图', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.mapInput'), trigger: 'change' }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: '请选择用户', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.chooseUser'), trigger: 'change' }
|
||||
],
|
||||
mapPrdCode: [
|
||||
{ required: true, message: '请选择产品', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.productInput'), trigger: 'change' }
|
||||
],
|
||||
duration: [
|
||||
{ required: true, message: '请输入时长', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.timeInput'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
},
|
||||
title() {
|
||||
return '创建仿真信息';
|
||||
return this.$t('system.createSimulationTitle');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -113,7 +113,7 @@ export default {
|
||||
});
|
||||
cb(results);
|
||||
} catch (error) {
|
||||
console.error(error, '查询用户list');
|
||||
console.error(error);
|
||||
cb(results);
|
||||
}
|
||||
} else {
|
||||
@ -148,13 +148,6 @@ export default {
|
||||
},
|
||||
show(data) {
|
||||
this.dialogVisible = true;
|
||||
// this.formModel = {
|
||||
// mapId: '',
|
||||
// mapPrdCode: '',
|
||||
// userId: '',
|
||||
// userName: '',
|
||||
// duration: '',
|
||||
// };
|
||||
},
|
||||
doSave() {
|
||||
const self = this;
|
||||
@ -172,14 +165,14 @@ export default {
|
||||
};
|
||||
if (params.userId) {
|
||||
postSimulationStats(params).then(response => {
|
||||
self.$message.success('新增成功!');
|
||||
self.$message.success(this.$t('system.addSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.$message.error('新增失败!' + error.message);
|
||||
self.$message.error(this.$t('error.addFailed') + error.message);
|
||||
});
|
||||
} else {
|
||||
this.$message.error('请选择用户');
|
||||
this.$message.error(this.$t('rules.chooseUser'));
|
||||
}
|
||||
},
|
||||
handleClose(done) {
|
||||
|
@ -29,16 +29,16 @@ export default {
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
trainingName: {
|
||||
type: 'text',
|
||||
label: '实训名称'
|
||||
label: this.$t('system.trainingName')
|
||||
},
|
||||
userName: {
|
||||
type: 'text',
|
||||
label: '用户名'
|
||||
label: this.$t('system.userName')
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,41 +49,41 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '用户名称',
|
||||
title: this.$t('system.userName'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: '用户手机号',
|
||||
title: this.$t('system.mobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
title: '地图名称',
|
||||
title: this.$t('system.mapName'),
|
||||
prop: 'mapName'
|
||||
},
|
||||
{
|
||||
title: '实训用时',
|
||||
title: this.$t('system.trainingUseTime'),
|
||||
prop: 'duration',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.computation(row.duration); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '产品名称',
|
||||
title: this.$t('system.productName'),
|
||||
prop: 'mapPrdName'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
hide: (row) => { return !row.fake; },
|
||||
buttons: [
|
||||
{
|
||||
name: '编辑',
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.edit,
|
||||
showControl: (row) => { return row.fake; }
|
||||
},
|
||||
{
|
||||
name: '删除',
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handleDelete,
|
||||
type: 'danger',
|
||||
showControl: (row) => { return row.fake; }
|
||||
@ -92,7 +92,7 @@ export default {
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '新增', handler: this.createTraining }
|
||||
{ text: this.$t('global.add'), handler: this.createTraining }
|
||||
]
|
||||
},
|
||||
currentModel: {}
|
||||
@ -121,9 +121,9 @@ export default {
|
||||
const f = parseInt(fieldValue / 60);
|
||||
const s = fieldValue % 60;
|
||||
if (f > 0) {
|
||||
return `${f}分${s}秒`;
|
||||
return `${f} ${this.$t('system.minute')} ${s} ${this.$t('system.second')}`;
|
||||
} else {
|
||||
return `${s}秒`;
|
||||
return `${s} ${this.$t('system.second')}`;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -135,17 +135,17 @@ export default {
|
||||
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除此用户仿真数据, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('system.delUserSimulationIsContinue'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteSimulationStats(row.id).then(response => {
|
||||
this.$message.success('删除成功');
|
||||
this.$message.success(this.$t('system.deleteSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.reloadTable();
|
||||
this.$messageBox('删除失败');
|
||||
this.$messageBox(this.$t('error.deleteFailed'));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -3,8 +3,8 @@
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<add-training ref="addTraining" @selectTrain="selectTrain" />
|
||||
@ -48,12 +48,12 @@ export default {
|
||||
form() {
|
||||
this.type === 'ADD';
|
||||
const form = {
|
||||
labelWidth: '100px',
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop: 'lessonId', label: '课程名称', type: 'select', required: true, options: this.LessonList },
|
||||
{ prop: 'trainingName', label: '实训名称', type: 'text', required: true, rightWidth: true, disabled: true, buttontip: '选择实训', buttonClick: this.buttonClick, placeholder: '请选择实训' },
|
||||
{ prop: 'userName', label: '用户名称', type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
||||
{ prop: 'duration', label: '实训时长', type: 'text', required: true, rightWidth: true, message: 's' }
|
||||
{ prop: 'lessonId', label: this.$t('system.lessonName'), type: 'select', required: true, options: this.LessonList },
|
||||
{ prop: 'trainingName', label: this.$t('system.trainingName'), type: 'text', required: true, rightWidth: true, disabled: true, buttontip: this.$t('system.selectTraining'), buttonClick: this.buttonClick, placeholder: this.$t('rules.pleaseSelectTraining') },
|
||||
{ prop: 'userName', label: this.$t('system.userName'), type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: this.$t('system.pleaseInputNames') },
|
||||
{ prop: 'duration', label: this.$t('system.trainingTime'), type: 'text', required: true, rightWidth: true, message: 's' }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -61,22 +61,22 @@ export default {
|
||||
rules() {
|
||||
const crules = {
|
||||
lessonId: [
|
||||
{ required: true, message: '请输入教学名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.pleaseInputLessonName'), trigger: 'change' }
|
||||
],
|
||||
trainingName: [
|
||||
{ required: true, message: '请选择实训', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.pleaseSelectTraining'), trigger: 'change' }
|
||||
],
|
||||
userName: [
|
||||
{ required: true, message: '请输入用户名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.userNameInput'), trigger: 'change' }
|
||||
],
|
||||
duration: [
|
||||
{ required: true, message: '请输入时长', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.timeInput'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
},
|
||||
title() {
|
||||
return '创建用户实训';
|
||||
return this.$t('system.createUserTraining');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -139,14 +139,6 @@ export default {
|
||||
},
|
||||
show(data) {
|
||||
this.dialogVisible = true;
|
||||
// this.formModel = {
|
||||
// lessonId: '',
|
||||
// trainingId: '',
|
||||
// trainingName: '',
|
||||
// userId: '',
|
||||
// userName: '',
|
||||
// duration: '',
|
||||
// };
|
||||
},
|
||||
doSave() {
|
||||
const self = this;
|
||||
@ -158,14 +150,14 @@ export default {
|
||||
const self = this;
|
||||
if (this.formModel.userId) {
|
||||
addUserTraining(this.formModel).then(response => {
|
||||
self.$message.success('创建成功!');
|
||||
self.$message.success(this.$t('system.addSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.$message.error('创建失败!' + error.message);
|
||||
self.$message.error(this.$t('error.addFailed') + error.message);
|
||||
});
|
||||
} else {
|
||||
self.$message.error('请选择用户');
|
||||
self.$message.error(this.$t('rules.chooseUser'));
|
||||
}
|
||||
},
|
||||
handleClose(done) {
|
||||
|
@ -17,8 +17,8 @@
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" :disabled="disabled" @click="doSave">确 定</el-button>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" :disabled="disabled" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -34,7 +34,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisibles: false,
|
||||
title: '选择实训',
|
||||
title: this.$t('system.selectTraining'),
|
||||
treeData: [{
|
||||
children: [],
|
||||
name: ''
|
||||
|
@ -2,8 +2,8 @@
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -37,10 +37,10 @@ export default {
|
||||
const form = {
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'lessonName', label: '教学名称', type: 'text', required: false, disabled: true },
|
||||
{ prop: 'trainingName', label: '实训名称', type: 'text', required: true, disabled: true },
|
||||
{ prop: 'userName', label: '用户名称', type: 'text', required: true, disabled: true },
|
||||
{ prop: 'duration', label: '实训时长', type: 'text', required: true, rightWidth: true, message: 's' }
|
||||
{ prop: 'lessonName', label: this.$t('system.lessonName'), type: 'text', required: false, disabled: true },
|
||||
{ prop: 'trainingName', label: this.$t('system.trainingName'), type: 'text', required: true, disabled: true },
|
||||
{ prop: 'userName', label: this.$t('system.userName'), type: 'text', required: true, disabled: true },
|
||||
{ prop: 'duration', label: this.$t('system.trainingTime'), type: 'text', required: true, rightWidth: true, message: 's' }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -48,13 +48,13 @@ export default {
|
||||
rules() {
|
||||
const crules = {
|
||||
duration: [
|
||||
{ required: true, message: '请输入时长', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.timeInput'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
},
|
||||
title() {
|
||||
return '编辑实训详情';
|
||||
return this.$t('system.editTrainingDetail');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -67,7 +67,6 @@ export default {
|
||||
userName: data.userName,
|
||||
trainingName: data.trainingName,
|
||||
duration: data.duration
|
||||
// trainingCount: data.trainingCount
|
||||
};
|
||||
}
|
||||
},
|
||||
@ -84,11 +83,11 @@ export default {
|
||||
duration: this.formModel.duration
|
||||
};
|
||||
putUserTraining(param).then(response => {
|
||||
self.$message.success('修改成功!');
|
||||
self.$message.success(this.$t('system.updateSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
self.$message.error('修改失败!' + error.message);
|
||||
self.$message.error(`${this.$t('error.updateFailed')}: ${error.message}`);
|
||||
});
|
||||
},
|
||||
handleClose(done) {
|
||||
|
@ -24,16 +24,16 @@ export default {
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
trainingName: {
|
||||
type: 'text',
|
||||
label: '实训名称'
|
||||
label: this.$t('system.trainingName')
|
||||
},
|
||||
userName: {
|
||||
type: 'text',
|
||||
label: '用户名'
|
||||
label: this.$t('system.userName')
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,40 +44,40 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '用户名称',
|
||||
title: this.$t('system.userName'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: '用户手机号',
|
||||
title: this.$t('system.mobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
title: '课程名称',
|
||||
title: this.$t('system.lessonName'),
|
||||
prop: 'lessonName'
|
||||
},
|
||||
{
|
||||
title: '实训用时',
|
||||
title: this.$t('system.trainingUseTime'),
|
||||
prop: 'duration',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.computation(row.duration); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '实训名称',
|
||||
title: this.$t('system.trainingName'),
|
||||
prop: 'trainingName'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: '编辑',
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.edit,
|
||||
showControl: (row) => { return row.fake != '0'; }
|
||||
},
|
||||
{
|
||||
name: '删除',
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handleDelete,
|
||||
type: 'danger',
|
||||
showControl: (row) => { return row.fake != '0'; }
|
||||
@ -86,7 +86,7 @@ export default {
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '新增', handler: this.createTraining }
|
||||
{ text: this.$t('global.add'), handler: this.createTraining }
|
||||
]
|
||||
},
|
||||
currentModel: {}
|
||||
@ -107,9 +107,9 @@ export default {
|
||||
const f = parseInt(fieldValue / 60);
|
||||
const s = fieldValue % 60;
|
||||
if (f > 0) {
|
||||
return `${f}分${s}秒`;
|
||||
return `${f} ${this.$t('system.minute')} ${s} ${this.$t('system.second')}`;
|
||||
} else {
|
||||
return `${s}秒`;
|
||||
return `${s} ${this.$t('system.second')}`;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -121,17 +121,17 @@ export default {
|
||||
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除此考试结果, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('system.delExamResultIsContinue'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteUserTraining(row.id).then(response => {
|
||||
this.$message.success('删除成功');
|
||||
this.$message.success(this.$t('system.deleteSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.reloadTable();
|
||||
this.$messageBox('删除失败');
|
||||
this.$messageBox(this.$t('error.deleteFailed'));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -86,7 +86,9 @@ export default {
|
||||
this.initAutoSaveTask();
|
||||
},
|
||||
$route() {
|
||||
this.loadInitPage();
|
||||
this.$$nextTick(() => {
|
||||
this.loadInitPage();
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -177,8 +177,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -170,8 +170,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -152,8 +152,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -161,8 +161,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -152,8 +152,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -181,8 +181,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -294,8 +294,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -181,8 +181,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -165,8 +165,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -217,8 +217,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -180,8 +180,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -150,8 +150,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
299
src/views/map/mapdraft/mapedit/mapoperate/train.bak.vue
Normal file
299
src/views/map/mapdraft/mapedit/mapoperate/train.bak.vue
Normal file
@ -0,0 +1,299 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="form" :model="editModel" label-width="110px" size="mini" :rules="rules">
|
||||
<el-form-item :label="$t('map.trainCode')" prop="code">
|
||||
<el-select v-model="editModel.code" filterable @change="deviceChange">
|
||||
<el-option
|
||||
v-for="item in trainList"
|
||||
:key="item.code"
|
||||
:label="item.code"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.groupNumber')" prop="groupNumber">
|
||||
<el-input v-model="editModel.groupNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.modelCode')" prop="modelCode">
|
||||
<el-select v-model="editModel.modelCode" filterable>
|
||||
<el-option
|
||||
v-for="item in trainModelList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button-group>
|
||||
<el-button type="primary" size="small" @click="newTrainMode">{{ $t('map.add') }}</el-button>
|
||||
<el-button type="primary" size="small" @click="uptTrainMode(editModel.modelCode)">{{ $t('map.updata') }}
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" @click="delTrainMode(editModel.modelCode)">{{ $t('map.deleteObj') }}
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.pointX')" prop="position.x">
|
||||
<el-input-number v-model="editModel.position.x" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.pointY')" prop="position.y">
|
||||
<el-input-number v-model="editModel.position.y" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||
</el-button-group>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" label-width="100px" :rules="createRules" :model="addModel" size="mini">
|
||||
<el-form-item :label="$t('map.groupNumber')" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.modelCode')" prop="modelCode">
|
||||
<el-select v-model="addModel.modelCode" filterable>
|
||||
<el-option
|
||||
v-for="item in trainModelList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button-group>
|
||||
<el-button type="primary" size="small" @click="newTrainMode">{{ $t('map.add') }}</el-button>
|
||||
<el-button type="primary" size="small" @click="uptTrainMode(addModel.modelCode)">{{ $t('map.updata') }}
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" @click="delTrainMode(addModel.modelCode)">{{ $t('map.deleteObj') }}
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.pointX')" prop="position.x">
|
||||
<el-input-number v-model="addModel.position.x" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.pointY')" prop="position.y">
|
||||
<el-input-number v-model="addModel.position.y" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
|
||||
</el-button-group>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<train-model ref="trainMode" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmap/utils/Uid';
|
||||
import TrainModel from './trainmodel';
|
||||
|
||||
export default {
|
||||
name: 'TrainDraft',
|
||||
components: {
|
||||
TrainModel
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
cardHeight: {
|
||||
type: [String, Number],
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
mapData: null,
|
||||
editModel: {
|
||||
code: '',
|
||||
groupNumber: '',
|
||||
modelCode: '',
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
},
|
||||
addModel: {
|
||||
modelCode: '',
|
||||
groupNumber: '',
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.pleaseReSelectDevice'), trigger: 'change' }
|
||||
],
|
||||
groupNumber: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterGroupNumber'), trigger: 'blur' }
|
||||
],
|
||||
modelCode: [
|
||||
{ required: true, message: this.$t('rules.selectTrainType'), trigger: 'change' }
|
||||
],
|
||||
'position.x': [
|
||||
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
|
||||
],
|
||||
'position.y': [
|
||||
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList',
|
||||
'trainList',
|
||||
'trainModelList',
|
||||
'skinCode'
|
||||
]),
|
||||
createRules: function () {
|
||||
return {
|
||||
modelCode: [
|
||||
{ required: true, message: this.$t('rules.selectTrainType'), trigger: 'change' }
|
||||
],
|
||||
groupNumber: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterTrainNumber'), trigger: 'blur' }
|
||||
],
|
||||
'position.x': [
|
||||
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'change' }
|
||||
],
|
||||
'position.y': [
|
||||
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selected: function (val, oldVal) {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
deviceChange(code) {
|
||||
this.$emit('setCenter', code);
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
this.$refs.form.resetFields();
|
||||
this.$refs.make.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'Train'.toUpperCase()) {
|
||||
this.editModel.code = selected.code;
|
||||
this.editModel.modelCode = selected.modelCode;
|
||||
this.editModel.groupNumber = selected.groupNumber;
|
||||
this.editModel.position = {
|
||||
x: selected.position.x,
|
||||
y: selected.position.y
|
||||
};
|
||||
this.activeName = 'first';
|
||||
} else {
|
||||
this.activeName = 'second';
|
||||
}
|
||||
},
|
||||
create() {
|
||||
this.$refs.make.validate((valid) => {
|
||||
if (valid) {
|
||||
const uid = getUID('Train');
|
||||
const model = {
|
||||
_type: 'Train',
|
||||
code: uid,
|
||||
safeDistance: '100',
|
||||
maxSafeDistance: '100',
|
||||
modelCode: this.addModel.modelCode,
|
||||
groupNumber: this.addModel.groupNumber,
|
||||
position: {
|
||||
x: this.addModel.position.x,
|
||||
y: this.addModel.position.y
|
||||
}
|
||||
};
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改对象
|
||||
edit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$emit('addOrUpdateMapModel', this.buildEditModel());
|
||||
}
|
||||
});
|
||||
},
|
||||
buildEditModel() {
|
||||
const model = {
|
||||
_type: 'Train',
|
||||
code: this.editModel.code,
|
||||
safeDistance: this.editModel.safeDistance,
|
||||
maxSafeDistance: this.editModel.maxSafeDistance,
|
||||
modelCode: this.editModel.modelCode,
|
||||
groupNumber: this.editModel.groupNumber,
|
||||
position: {
|
||||
x: this.editModel.position.x,
|
||||
y: this.editModel.position.y
|
||||
}
|
||||
};
|
||||
return model;
|
||||
},
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Train'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', selected);
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
newTrainMode() {
|
||||
if (Object.keys(this.$store.state.map.map || {}).length) {
|
||||
this.$refs.trainMode.doShow({}, 'ADD');
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.selectMap'));
|
||||
}
|
||||
},
|
||||
uptTrainMode(code) {
|
||||
if (code) {
|
||||
this.trainModelList.forEach(elem => {
|
||||
if (elem.code === code) {
|
||||
this.$refs.trainMode.doShow(elem, 'UPT');
|
||||
return;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.selectTrainType'));
|
||||
}
|
||||
},
|
||||
delTrainMode(code) {
|
||||
if (code) {
|
||||
const model = { code };
|
||||
this.$refs.trainMode.operateTrainModel({ model, type: 'DEL' });
|
||||
this.addModel.modelCode = this.editModel.modelCode = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
@ -163,8 +163,10 @@ export default {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
$route() {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields();
|
||||
this.activeName = 'first';
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -127,16 +127,16 @@ export default {
|
||||
baseRules() {
|
||||
return {
|
||||
code: [
|
||||
{ required: true, message: this.$t('map.productCodeEnter'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.productCodeEnter'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('map.productNameEnter'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.productNameEnter'), trigger: 'change' }
|
||||
],
|
||||
remarks: [
|
||||
{ required: true, message: this.$t('map.productDescriptionEnter'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.productDescriptionEnter'), trigger: 'change' }
|
||||
],
|
||||
trainTypes: [
|
||||
{ required: true, message: this.$t('map.trainingTypeSelect'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.trainingTypeSelect'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ export default {
|
||||
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.$confirm(this.$t('map.deleteTypeHint'), this.$t('tip.hint'), {
|
||||
this.$confirm(this.$t('tip.deleteTypeHint'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div :id="runPlanId" />
|
||||
<div v-if="isShowBack" style="float: right; margin-right: 2%; margin-top: 10px; margin-bottom: 20px">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="back">{{$t('global.return')}}</el-button>
|
||||
<el-button type="primary" @click="back">{{ $t('global.return') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -136,14 +136,6 @@ export default {
|
||||
kmRangeCoordMap: {}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.runPlan.planSizeCount': function () {
|
||||
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||
},
|
||||
$route() {
|
||||
this.loadChartPage(this.$route.query);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('runPlan', [
|
||||
'stations'
|
||||
@ -158,6 +150,16 @@ export default {
|
||||
return this.$route.params.mode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.runPlan.planSizeCount': function () {
|
||||
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||
},
|
||||
$route() {
|
||||
this.$nextTick(() => {
|
||||
this.loadChartPage(this.$route.query);
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadChartPage(this.$route.query);
|
||||
},
|
||||
|
@ -36,7 +36,7 @@
|
||||
rules() {
|
||||
return {
|
||||
timeArea: [
|
||||
{ required: true, message: this.$t('map.selectDataRange'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectDataRange'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -163,29 +163,29 @@ export default {
|
||||
levelRules() {
|
||||
return {
|
||||
level1: [
|
||||
{ required: true, message: this.$t('map.speedLevelEnter1'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.speedLevelEnter1'), trigger: 'change' }
|
||||
],
|
||||
level2: [
|
||||
{ required: true, message: this.$t('map.speedLevelEnter2'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.speedLevelEnter2'), trigger: 'change' }
|
||||
],
|
||||
level3: [
|
||||
{ required: true, message: this.$t('map.speedLevelEnter3'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.speedLevelEnter3'), trigger: 'change' }
|
||||
],
|
||||
level4: [
|
||||
{ required: true, message: this.$t('map.speedLevelEnter4'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.speedLevelEnter4'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
},
|
||||
chartRules() {
|
||||
return {
|
||||
name: [
|
||||
{ required: true, message: this.$t('map.nameEnter'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' }
|
||||
],
|
||||
direct: [
|
||||
{ required: true, message: this.$t('map.drivingDirectionSelect'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.drivingDirectionSelect'), trigger: 'change' }
|
||||
],
|
||||
timeInterval: [
|
||||
{ required: true, message: this.$t('map.timeBetweenDeparturesEnter'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.timeBetweenDeparturesEnter'), trigger: 'blur' }
|
||||
],
|
||||
startTime: [
|
||||
{ required: true, message: this.$t('global.enterStartTime'), trigger: 'blur' }
|
||||
@ -194,13 +194,13 @@ export default {
|
||||
{ required: true, message: this.$t('global.enterEndTime'), trigger: 'blur' }
|
||||
],
|
||||
parkingTime: [
|
||||
{ required: true, message: this.$t('map.stopTimeEnter'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.stopTimeEnter'), trigger: 'blur' }
|
||||
],
|
||||
entrance: [
|
||||
{ required: true, message: this.$t('map.entranceStationSelect'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.entranceStationSelect'), trigger: 'change' }
|
||||
],
|
||||
exit: [
|
||||
{ required: true, message: this.$t('map.exportStationSelect'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.exportStationSelect'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ export default {
|
||||
rules() {
|
||||
return {
|
||||
filename: [
|
||||
{ required: true, message: this.$t('map.selectImportFiles'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectImportFiles'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
@ -57,7 +57,7 @@ export default {
|
||||
if (file) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: this.$t('map.underImport'),
|
||||
text: this.$t('tip.underImport'),
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
@ -129,7 +129,7 @@ export default {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
visible: true,
|
||||
text: this.$t('map.underImport'),
|
||||
text: this.$t('tip.underImport'),
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
@ -71,7 +71,7 @@ export default {
|
||||
{ prop: 'code', label: this.$t('map.skinCoding'), type: 'text', required: false, disabled: this.isDisabled },
|
||||
{ prop: 'name', label: this.$t('map.skinDesignation'), type: 'text', required: false },
|
||||
{ prop: 'origin', label: this.$t('map.coordinatesOrigin'), type: 'point', required: false },
|
||||
{ prop: 'scaling', label: this.$t('map.scaling'), type: 'number', required: false, message: this.$t('map.maxScaling') }
|
||||
{ prop: 'scaling', label: this.$t('map.scaling'), type: 'number', required: false, message: this.$t('rules.maxScaling') }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -80,22 +80,22 @@ export default {
|
||||
rules() {
|
||||
const baseRules = {
|
||||
code: [
|
||||
{ required: true, message: this.$t('map.skinCodingInput'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.skinCodingInput'), trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('map.skinDesignationInput'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.skinDesignationInput'), trigger: 'blur' }
|
||||
],
|
||||
origin: [
|
||||
{ required: true, message: this.$t('map.coordinatesOriginInput'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.coordinatesOriginInput'), trigger: 'blur' }
|
||||
],
|
||||
scaling: [
|
||||
{ required: true, message: this.$t('map.scalingInput'), trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.scalingInput'), trigger: 'blur' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (Number(value) >= 1 && Number(value) <= 8) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error(this.$t('map.scalingInputPrompt')));
|
||||
callback(new Error(this.$t('rules.scalingInputPrompt')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
@ -151,7 +151,7 @@ export default {
|
||||
this.$messageBox(this.$t('tip.creatingFailed'));
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('map.skinCodingExist'));
|
||||
this.$messageBox(this.$t('tip.skinCodingExist'));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -103,7 +103,7 @@ export default {
|
||||
this.$router.push(`${UrlConfig.map.skinCodeDraft}/edit/${row.id}`);
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.$confirm(this.$t('map.skinDeleteConfirmation'), this.$t('tip.hint'), {
|
||||
this.$confirm(this.$t('tip.skinDeleteConfirmation'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
|
@ -74,7 +74,7 @@ export default {
|
||||
{ prop: 'code', label: this.$t('map.skinCoding'), type: 'text', required: false, disabled: this.isDisabled },
|
||||
{ prop: 'name', label: this.$t('map.skinDesignation'), type: 'text', required: false },
|
||||
{ prop: 'origin', label: this.$t('map.coordinatesOrigin'), type: 'point', required: false },
|
||||
{ prop: 'scaling', label: this.$t('map.scaling'), type: 'number', required: false, message: this.$t('map.maxScaling') },
|
||||
{ prop: 'scaling', label: this.$t('map.scaling'), type: 'number', required: false, message: this.$t('rules.maxScaling') },
|
||||
{ prop: 'linkWidth', label: this.$t('map.linkWidth'), type: 'number', required: false, message: this.$t('map.maxLinkWidth') },
|
||||
{ prop: 'zoneWidth', label: this.$t('map.sectionWidth'), type: 'number', required: false, message: this.$t('map.maxSectionWidth') },
|
||||
{ prop: 'watermarkShow', label: this.$t('map.showWatermarkOrNot'), type: 'radio', required: false, options: this.$ConstSelect.Whether }
|
||||
@ -86,55 +86,55 @@ export default {
|
||||
rules() {
|
||||
const baseRules = {
|
||||
code: [
|
||||
{ required: true, message: this.$t('map.skinCodingInput'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.skinCodingInput'), trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('map.skinDesignationInput'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.skinDesignationInput'), trigger: 'blur' }
|
||||
],
|
||||
origin: [
|
||||
{ required: true, message: this.$t('map.coordinatesOriginInput'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.coordinatesOriginInput'), trigger: 'blur' }
|
||||
],
|
||||
scaling: [
|
||||
{ required: true, message: this.$t('map.scalingInput'), trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.scalingInput'), trigger: 'blur' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (Number(value) >= 1 && Number(value) <= 8) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error(this.$t('map.scalingInputPrompt')));
|
||||
callback(new Error(this.$t('rules.scalingInputPrompt')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
linkWidth: [
|
||||
{ required: true, message: this.$t('map.linkWidthInput'), trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.linkWidthInput'), trigger: 'blur' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (Number.isInteger(Number(value)) && Number(value) >= 5 && Number(value) <= 20) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error(this.$t('map.linkWidthInputPrompt')));
|
||||
callback(new Error(this.$t('rules.linkWidthInputPrompt')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
zoneWidth: [
|
||||
{ required: true, message: this.$t('map.sectionWidthInput'), trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.sectionWidthInput'), trigger: 'blur' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (Number.isInteger(Number(value)) && Number(value) >= 5 && Number(value) <= 30) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error(this.$t('map.sectionWidthInputPrompt')));
|
||||
callback(new Error(this.$t('rules.sectionWidthInputPrompt')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
watermarkShow: [
|
||||
{ required: true, message: this.$t('map.selectShowWatermark'), trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectShowWatermark'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
|
||||
@ -189,7 +189,7 @@ export default {
|
||||
this.$messageBox(this.$t('tip.creatingFailed'));
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('map.skinCodingExist'));
|
||||
this.$messageBox(this.$t('tip.skinCodingExist'));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -120,7 +120,7 @@ export default {
|
||||
this.$router.push(`${UrlConfig.map.skinCodeDraft}/edit/${row.id}`);
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.$confirm(this.$t('map.skinDeleteConfirmation'), this.$t('tip.hint'), {
|
||||
this.$confirm(this.$t('tip.skinDeleteConfirmation'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
|
@ -35,7 +35,7 @@ export default {
|
||||
computed: {
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '100px',
|
||||
labelWidth: '130px',
|
||||
items: [
|
||||
{ prop: 'source', label: this.$t('orderAuthor.source'), type: 'text', disabled: true },
|
||||
{ prop: 'name', label: this.$t('orderAuthor.distributionUser'), type: 'text', disabled: true },
|
||||
@ -46,7 +46,7 @@ export default {
|
||||
},
|
||||
formOrder() {
|
||||
const form = {
|
||||
labelWidth: '100px',
|
||||
labelWidth: '130px',
|
||||
items: [
|
||||
{ prop: 'source', label: this.$t('orderAuthor.source'), type: 'text', disabled: true },
|
||||
{ prop: 'order', label: this.$t('orderAuthor.orderNumber'), type: 'text', disabled: true }
|
||||
|
@ -11,8 +11,8 @@
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="create">{{$t('global.create')}}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{$t('global.return')}}</el-button>
|
||||
<el-button type="primary" @click="create">{{ $t('global.create') }}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -63,7 +63,7 @@ export default {
|
||||
},
|
||||
|
||||
rules() {
|
||||
const _this = this;
|
||||
const _this = this;
|
||||
const baseRules = {
|
||||
userId: [
|
||||
{ required: true, message: this.$t('rules.userNameInput'), trigger: 'blur' }
|
||||
|
@ -1,244 +1,241 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
||||
</QueryListPage>
|
||||
<author-detail ref="authorDetail"></author-detail>
|
||||
</div>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<author-detail ref="authorDetail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getLessonPermissonPageList, setLessonPermisson, getDistribute } from '@/api/management/author';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import authorDetail from './detail';
|
||||
import { getLessonPermissonPageList, setLessonPermisson, getDistribute } from '@/api/management/author';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import authorDetail from './detail';
|
||||
|
||||
export default {
|
||||
name: 'author',
|
||||
components: {
|
||||
authorDetail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
param: '',
|
||||
WhetherTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'userMobile': {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.userMobile')
|
||||
},
|
||||
'userName': {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.userName')
|
||||
},
|
||||
'type': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.userName'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userMobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapProductName'),
|
||||
prop: 'mapProductName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'type',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']) },
|
||||
tagType: (row) => { return '' }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether') },
|
||||
tagType: (row) => {
|
||||
switch (row.forever) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||
prop: 'canDistribute',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList') },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.totalPermissions'),
|
||||
prop: 'amount'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.residualPermissionNumber'),
|
||||
prop: 'remains'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
export default {
|
||||
name: 'Author',
|
||||
components: {
|
||||
authorDetail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
param: '',
|
||||
WhetherTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'userMobile': {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.userMobile')
|
||||
},
|
||||
'userName': {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.userName')
|
||||
},
|
||||
'type': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.userName'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userMobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapProductName'),
|
||||
prop: 'mapProductName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'type',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||
tagType: (row) => {
|
||||
switch (row.forever) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||
prop: 'canDistribute',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.totalPermissions'),
|
||||
prop: 'amount'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.residualPermissionNumber'),
|
||||
prop: 'remains'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseAuthorityStatus'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('orderAuthor.setupFailure'),
|
||||
type: 'warning',
|
||||
handleClick: this.handleSetFailure,
|
||||
showControl: (row) => {
|
||||
return row.status === '1';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.setupEffective'),
|
||||
type: 'primary',
|
||||
handleClick: this.handleSetFailure,
|
||||
showControl: (row) => {
|
||||
return row.status === '0';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.renew'),
|
||||
type: "warning",
|
||||
handleClick: this.handleRenewAdd,
|
||||
showControl: (row) => {
|
||||
return row.origin === '01' && (row.forever || (row.endTime && Date.parse(new Date(row.endTime.replace(/\-/g, "\/"))) > Date.parse(new Date())))
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.source'),
|
||||
type: '',
|
||||
handleClick: this.handleSource,
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseAuthorityStatus'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('orderAuthor.setupFailure'),
|
||||
type: 'warning',
|
||||
handleClick: this.handleSetFailure,
|
||||
showControl: (row) => {
|
||||
return row.status === '1';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.setupEffective'),
|
||||
type: 'primary',
|
||||
handleClick: this.handleSetFailure,
|
||||
showControl: (row) => {
|
||||
return row.status === '0';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.renew'),
|
||||
type: 'warning',
|
||||
handleClick: this.handleRenewAdd,
|
||||
showControl: (row) => {
|
||||
return row.origin === '01' && (row.forever || (row.endTime && Date.parse(new Date(row.endTime.replace(/\-/g, '\/'))) > Date.parse(new Date())));
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.source'),
|
||||
type: '',
|
||||
handleClick: this.handleSource
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
},
|
||||
formatterDate(row, porpInfo) {
|
||||
if (row.hasOwnProperty(porpInfo.property)) {
|
||||
}
|
||||
return row[porpInfo.property];
|
||||
},
|
||||
queryFunction(params) {
|
||||
return getLessonPermissonPageList(params);
|
||||
},
|
||||
handleSetFailure(index, row) {
|
||||
this.$confirm(this.$t('tip.updatePrivilegeTip'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
setLessonPermisson({ id: row.id, status: row.status == 1 ? '0' : '1' }).then(res => {
|
||||
this.$message.success(this.$t('tip.setupSuccessfully'));
|
||||
this.reloadTable();
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('tip.setupFailed'));
|
||||
})
|
||||
}).catch(() => { })
|
||||
},
|
||||
handleRenewAdd(index, row) {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.authorDraft}/renew/${row.id}` });
|
||||
},
|
||||
handlePermissionAdd() {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.authorDraft}/add/0` });
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload()
|
||||
}
|
||||
},
|
||||
async handleSource(index, row) {
|
||||
try {
|
||||
let res = await getDistribute(row.distributeId);
|
||||
this.$refs.authorDetail.show(res.data);
|
||||
} catch (error) {
|
||||
this.$messageBox(this.$t('tip.requestFailed'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
},
|
||||
formatterDate(row, porpInfo) {
|
||||
return row[porpInfo.property];
|
||||
},
|
||||
queryFunction(params) {
|
||||
return getLessonPermissonPageList(params);
|
||||
},
|
||||
handleSetFailure(index, row) {
|
||||
this.$confirm(this.$t('tip.updatePrivilegeTip'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
setLessonPermisson({ id: row.id, status: row.status == 1 ? '0' : '1' }).then(res => {
|
||||
this.$message.success(this.$t('tip.setupSuccessfully'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.setupFailed'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleRenewAdd(index, row) {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.authorDraft}/renew/${row.id}` });
|
||||
},
|
||||
handlePermissionAdd() {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.authorDraft}/add/0` });
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
async handleSource(index, row) {
|
||||
try {
|
||||
const res = await getDistribute(row.distributeId);
|
||||
this.$refs.authorDetail.show(res.data);
|
||||
} catch (error) {
|
||||
this.$messageBox(this.$t('tip.requestFailed'));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<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 type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -105,7 +105,7 @@ export default {
|
||||
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '135px',
|
||||
labelWidth: '140px',
|
||||
items: [
|
||||
{ prop: 'name', label: this.$t('orderAuthor.commodityName'), type: 'text', required: false },
|
||||
{ prop: 'productType', label: this.$t('orderAuthor.productType'), type: 'select', required: false, disabled: this.isDisabled, options: this.productTypeList, change: true, onChange: this.typeChange },
|
||||
|
@ -1,221 +1,220 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
||||
</QueryListPage>
|
||||
</div>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCommodityList, delCommodity, setCommodityStatus } from '@/api/management/goods';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { getCommodityList, delCommodity, setCommodityStatus } from '@/api/management/goods';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'Dictionary',
|
||||
data() {
|
||||
return {
|
||||
productTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.name')
|
||||
},
|
||||
productType: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.productType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.map'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
status: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.state'),
|
||||
config: {
|
||||
data: this.$ConstSelect.Status
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: getCommodityList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.commodityName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.productType'),
|
||||
prop: 'productType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']) },
|
||||
tagType: (row) => { return 'success' }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.productName'),
|
||||
prop: 'prdName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.price'),
|
||||
prop: 'price'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.state'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.describtion'),
|
||||
prop: 'remarks'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.creationTime'),
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('global.edit'),
|
||||
type: 'primary',
|
||||
handleClick: this.handleEdit
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.setupFailure'),
|
||||
handleClick: this.handleEfficacy,
|
||||
type: 'warning',
|
||||
showControl: (row) => {
|
||||
return row.status == '1';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.setupEffective'),
|
||||
type: 'primary',
|
||||
handleClick: this.handleEfficacy,
|
||||
showControl: (row) => {
|
||||
return row.status == '0';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
type: 'danger',
|
||||
handleClick: this.handleDelete,
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('global.add'), handler: this.handleAdd },
|
||||
]
|
||||
},
|
||||
export default {
|
||||
name: 'Dictionary',
|
||||
data() {
|
||||
return {
|
||||
productTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '100px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.name')
|
||||
},
|
||||
productType: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.productType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.map'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
status: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.state'),
|
||||
config: {
|
||||
data: this.$ConstSelect.Status
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: getCommodityList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.commodityName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.productType'),
|
||||
prop: 'productType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.productName'),
|
||||
prop: 'prdName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.price'),
|
||||
prop: 'price'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.state'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.describtion'),
|
||||
prop: 'remarks'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.creationTime'),
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: this.$i18n.locale == 'en' ? '300': '250',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('global.edit'),
|
||||
type: 'primary',
|
||||
handleClick: this.handleEdit
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.setupFailure'),
|
||||
handleClick: this.handleEfficacy,
|
||||
type: 'warning',
|
||||
showControl: (row) => {
|
||||
return row.status == '1';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.setupEffective'),
|
||||
type: 'primary',
|
||||
handleClick: this.handleEfficacy,
|
||||
showControl: (row) => {
|
||||
return row.status == '0';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
type: 'danger',
|
||||
handleClick: this.handleDelete
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('global.add'), handler: this.handleAdd }
|
||||
]
|
||||
},
|
||||
|
||||
currentModel: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
async loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
// 产品类型
|
||||
this.$Dictionary.productType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.productTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
try {
|
||||
// 获取地图
|
||||
let res = await listPublishMap();
|
||||
res.data.forEach(elem => {
|
||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error, '获取发布地图');
|
||||
}
|
||||
},
|
||||
handleEdit(index, row) {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.commodityDraft}/edit/${row.id}` });
|
||||
},
|
||||
currentModel: {}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
async loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
// 产品类型
|
||||
this.$Dictionary.productType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.productTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
try {
|
||||
// 获取地图
|
||||
const res = await listPublishMap();
|
||||
res.data.forEach(elem => {
|
||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error, '获取发布地图');
|
||||
}
|
||||
},
|
||||
handleEdit(index, row) {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.commodityDraft}/edit/${row.id}` });
|
||||
},
|
||||
|
||||
handleAdd() {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.commodityDraft}/add/0` });
|
||||
},
|
||||
// 设置失效
|
||||
handleEfficacy(index, row) {
|
||||
this.$confirm(this.$t('tip.updateProductTip'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
setCommodityStatus(row.id).then(res => {
|
||||
this.$message.success(this.$t('tip.operationSuccessfully'));
|
||||
this.reloadTable()
|
||||
}).catch(err => {
|
||||
this.$messageBox(this.$t('tip.operationFailed'));
|
||||
this.reloadTable()
|
||||
})
|
||||
}).catch(() => { })
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.$confirm(this.$t('tip.deleteProductTip'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delCommodity(row.id).then(response => {
|
||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||
this.reloadTable()
|
||||
}).catch(error => {
|
||||
this.reloadTable();
|
||||
this.$messageBox(this.$t('tip.failDelete'))
|
||||
})
|
||||
}).catch(() => { })
|
||||
},
|
||||
handleAdd() {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.commodityDraft}/add/0` });
|
||||
},
|
||||
// 设置失效
|
||||
handleEfficacy(index, row) {
|
||||
this.$confirm(this.$t('tip.updateProductTip'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
setCommodityStatus(row.id).then(res => {
|
||||
this.$message.success(this.$t('tip.operationSuccessfully'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.operationFailed'));
|
||||
this.reloadTable();
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.$confirm(this.$t('tip.deleteProductTip'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delCommodity(row.id).then(response => {
|
||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.reloadTable();
|
||||
this.$messageBox(this.$t('tip.failDelete'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
||||
reloadTable() {
|
||||
this.queryList.reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,189 +1,195 @@
|
||||
<template>
|
||||
<el-dialog :title="this.$t('orderAuthor.trainingList')" :visible.sync="show" top="20px" width="90%" :before-doClose="doClose"
|
||||
:close-on-click-modal="false">
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
||||
</QueryListPage>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:title="this.$t('orderAuthor.trainingList')"
|
||||
:visible.sync="show"
|
||||
top="20px"
|
||||
width="90%"
|
||||
:before-do-close="doClose"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { putMapProductOnLine, putMapProductOffLine } from '@/api/jmap/mapdraft';
|
||||
import { getCommodityList, delCommodity, setCommodityStatus } from '@/api/management/goods';
|
||||
import { getProductList } from '@/api/management/mapprd';
|
||||
import { pageQueryTraining } from '@/api/jmap/training';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin'
|
||||
import localStore from 'storejs';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { getCommodityList } from '@/api/management/goods';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'addGoods',
|
||||
props: {
|
||||
trainings: {
|
||||
type: Array,
|
||||
},
|
||||
detail: {
|
||||
type: Object,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
productTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.name')
|
||||
},
|
||||
productType: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.productType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.map'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
status: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.state'),
|
||||
config: {
|
||||
data: this.$ConstSelect.Status
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: getCommodityList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.commodityName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.productType'),
|
||||
prop: 'productType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']) },
|
||||
tagType: (row) => { return 'success' }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.productName'),
|
||||
prop: 'prdName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.price'),
|
||||
prop: 'price'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.state'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.describtion'),
|
||||
prop: 'remarks'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.creationTime'),
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: '选择',
|
||||
type: 'primary',
|
||||
handleClick: this.handleAdd
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
]
|
||||
},
|
||||
export default {
|
||||
name: 'AddGoods',
|
||||
props: {
|
||||
trainings: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
detail: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
productTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.name')
|
||||
},
|
||||
productType: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.productType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.map'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
status: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.state'),
|
||||
config: {
|
||||
data: this.$ConstSelect.Status
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: getCommodityList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.commodityName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.productType'),
|
||||
prop: 'productType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.productName'),
|
||||
prop: 'prdName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.price'),
|
||||
prop: 'price'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.state'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.describtion'),
|
||||
prop: 'remarks'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.creationTime'),
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('orderAuthor.select'),
|
||||
type: 'primary',
|
||||
handleClick: this.handleAdd
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
]
|
||||
},
|
||||
|
||||
currentModel: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.reloadTable();
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
async loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
// 产品类型
|
||||
this.$Dictionary.productType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.productTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
try {
|
||||
// 获取地图
|
||||
let res = await listPublishMap();
|
||||
res.data.forEach(elem => {
|
||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error, '获取发布地图');
|
||||
}
|
||||
},
|
||||
currentModel: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.reloadTable();
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
async loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
// 产品类型
|
||||
this.$Dictionary.productType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.productTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
try {
|
||||
// 获取地图
|
||||
const res = await listPublishMap();
|
||||
res.data.forEach(elem => {
|
||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error, '获取发布地图');
|
||||
}
|
||||
},
|
||||
|
||||
handleAdd(index, row) {
|
||||
this.$emit('selectGoods', row);
|
||||
this.doClose();
|
||||
},
|
||||
handleAdd(index, row) {
|
||||
this.$emit('selectGoods', row);
|
||||
this.doClose();
|
||||
},
|
||||
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,54 +1,62 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="show" width="360px" :before-close="doClose" :zIndex="2000" :modal="false"
|
||||
:close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="text-align:center">
|
||||
<el-radio-group v-model="formModel.canDistribute">
|
||||
<el-radio :label="true">{{$t('orderAuthor.publicAuthority')}}</el-radio>
|
||||
<el-radio :label="false">{{$t('orderAuthor.privateAuthority')}}</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>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="text-align:center">
|
||||
<el-radio-group v-model="formModel.canDistribute">
|
||||
<el-radio :label="true">{{ $t('orderAuthor.publicAuthority') }}</el-radio>
|
||||
<el-radio :label="false">{{ $t('orderAuthor.privateAuthority') }}</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>
|
||||
<script>
|
||||
export default {
|
||||
name: 'CanTransfer',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
formModel: {
|
||||
canDistribute: true,
|
||||
},
|
||||
data: {},
|
||||
export default {
|
||||
name: 'CanTransfer',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
formModel: {
|
||||
canDistribute: true
|
||||
},
|
||||
data: {}
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() { return this.$t('orderAuthor.optionPrivilegeTransfer'); }
|
||||
},
|
||||
methods: {
|
||||
doShow(data) {
|
||||
this.dialogShow = true;
|
||||
this.formModel.canDistribute = true;
|
||||
this.data = data;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleSure() {
|
||||
this.doClose();
|
||||
Object.assign(this.data, this.formModel);
|
||||
this.$emit('distribute', this.data);
|
||||
},
|
||||
handleClose() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() { return this.$t('orderAuthor.optionPrivilegeTransfer'); }
|
||||
},
|
||||
methods: {
|
||||
doShow(data) {
|
||||
this.dialogShow = true;
|
||||
this.formModel.canDistribute = true;
|
||||
this.data = data;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleSure() {
|
||||
this.doClose();
|
||||
Object.assign(this.data, this.formModel);
|
||||
this.$emit('distribute', this.data);
|
||||
},
|
||||
handleClose() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,312 +1,310 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
||||
</QueryListPage>
|
||||
<can-distribute ref="canDistribute" @distribute="distribute"></can-distribute>
|
||||
<qr-code ref="qrCode"></qr-code>
|
||||
</div>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<can-distribute ref="canDistribute" @distribute="distribute" />
|
||||
<qr-code ref="qrCode" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOrderPageList, giveOrder } from '@/api/management/order';
|
||||
import { getSellerList } from '@/api/management/user';
|
||||
import { getOrganizationList } from '@/api/management/organization';
|
||||
import { giveLessons } from '@/api/management/distribute';
|
||||
import { OperatorModel } from '@/scripts/ConstDic';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import CanDistribute from './canDistribute';
|
||||
import { getOrderPageList } from '@/api/management/order';
|
||||
import { getSellerList } from '@/api/management/user';
|
||||
import { getOrganizationList } from '@/api/management/organization';
|
||||
import { giveLessons } from '@/api/management/distribute';
|
||||
import { OperatorModel } from '@/scripts/ConstDic';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import CanDistribute from './canDistribute';
|
||||
|
||||
export default {
|
||||
name: 'List',
|
||||
components: {
|
||||
QrCode,
|
||||
CanDistribute
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
SellerList: [],
|
||||
BizTypeList: [],
|
||||
OrderTypeList: [],
|
||||
PayTypeList: [],
|
||||
PayStatusList: [],
|
||||
// OrganizationList: [],
|
||||
WhetherTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '180px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'organizationId': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'userName': {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.userName'),
|
||||
},
|
||||
'permissionType': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
prop: 'organizationName',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.organizationName },
|
||||
tagType: (row) => { return '' }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userName'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.commodityName'),
|
||||
prop: 'goodsName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'permissionType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
||||
tagType: (row) => { return '' }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionNumber'),
|
||||
prop: 'amount'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether') },
|
||||
tagType: (row) => {
|
||||
return row.forever ? 'success' : 'danger';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.startDate'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
format: 'yyyy-MM-dd'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.purchaseMonths'),
|
||||
prop: 'monthAmount'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.totalPrice'),
|
||||
prop: 'totalPrice'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.paymentMethod'),
|
||||
prop: 'payWays',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.payWays, this.PayTypeList, ['value', 'label']) },
|
||||
tagType: (row) => { return 'success' }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.creationDate'),
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.orderType'),
|
||||
prop: 'orderType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.orderType, this.OrderTypeList, ['value', 'label']) },
|
||||
tagType: (row) => { return 'success' }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.contractNumber'),
|
||||
prop: 'contractNo'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.businessType'),
|
||||
prop: 'bizType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.bizType, this.BizTypeList, ['value', 'label']) },
|
||||
tagType: (row) => { return 'success' }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.paymentStatus'),
|
||||
prop: 'payStatus',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.payStatus, this.PayStatusList, ['value', 'label']) },
|
||||
tagType: (row) => {
|
||||
switch (row.payStatus) {
|
||||
case '01': return 'danger';
|
||||
case '02': return 'success';
|
||||
case '03': return 'info';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.salesman'),
|
||||
prop: 'sellerName',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.sellerName },
|
||||
tagType: (row) => { return 'success' }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '260',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.handleEdit
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.obtainQrCode'),
|
||||
type: "warning",
|
||||
handleClick: this.handleCanDistribute,
|
||||
showControl: (row) => { return row.bizType !== '02' && row.orderType !== '01' && row.qrCodeGenerated }
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.generatingQRCode'),
|
||||
type: "warning",
|
||||
handleClick: this.handleCanDistribute,
|
||||
showControl: (row) => { return row.bizType !== '02' && row.orderType !== '01' && !row.qrCodeGenerated }
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('global.add'), btnCode: 'employee_insert', handler: this.handleNormalAdd },
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.queryForm.queryObject.organizationId.config.data.length = 0;
|
||||
getOrganizationList().then(response => {
|
||||
// this.OrganizationList = response.data;
|
||||
response.data.forEach(elem => {
|
||||
this.queryForm.queryObject.organizationId.config.data.push({ value: elem.id, label: elem.name });
|
||||
});
|
||||
});
|
||||
export default {
|
||||
name: 'List',
|
||||
components: {
|
||||
QrCode,
|
||||
CanDistribute
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
SellerList: [],
|
||||
BizTypeList: [],
|
||||
OrderTypeList: [],
|
||||
PayTypeList: [],
|
||||
PayStatusList: [],
|
||||
// OrganizationList: [],
|
||||
WhetherTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '180px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'organizationId': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'userName': {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.userName')
|
||||
},
|
||||
'permissionType': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
prop: 'organizationName',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.organizationName; },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userName'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.commodityName'),
|
||||
prop: 'goodsName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'permissionType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionNumber'),
|
||||
prop: 'amount'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||
tagType: (row) => {
|
||||
return row.forever ? 'success' : 'danger';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.startDate'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
format: 'yyyy-MM-dd'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.purchaseMonths'),
|
||||
prop: 'monthAmount'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.totalPrice'),
|
||||
prop: 'totalPrice'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.paymentMethod'),
|
||||
prop: 'payWays',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.payWays, this.PayTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.creationDate'),
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.orderType'),
|
||||
prop: 'orderType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.orderType, this.OrderTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.contractNumber'),
|
||||
prop: 'contractNo'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.businessType'),
|
||||
prop: 'bizType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.bizType, this.BizTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.paymentStatus'),
|
||||
prop: 'payStatus',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.payStatus, this.PayStatusList, ['value', 'label']); },
|
||||
tagType: (row) => {
|
||||
switch (row.payStatus) {
|
||||
case '01': return 'danger';
|
||||
case '02': return 'success';
|
||||
case '03': return 'info';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.salesman'),
|
||||
prop: 'sellerName',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.sellerName; },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '260',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.handleEdit
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.obtainQrCode'),
|
||||
type: 'warning',
|
||||
handleClick: this.handleCanDistribute,
|
||||
showControl: (row) => { return row.bizType !== '02' && row.orderType !== '01' && row.qrCodeGenerated; }
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.generatingQRCode'),
|
||||
type: 'warning',
|
||||
handleClick: this.handleCanDistribute,
|
||||
showControl: (row) => { return row.bizType !== '02' && row.orderType !== '01' && !row.qrCodeGenerated; }
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('global.add'), btnCode: 'employee_insert', handler: this.handleNormalAdd }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.queryForm.queryObject.organizationId.config.data.length = 0;
|
||||
getOrganizationList().then(response => {
|
||||
// this.OrganizationList = response.data;
|
||||
response.data.forEach(elem => {
|
||||
this.queryForm.queryObject.organizationId.config.data.push({ value: elem.id, label: elem.name });
|
||||
});
|
||||
});
|
||||
|
||||
getSellerList().then(response => {
|
||||
this.SellerList = response.data;
|
||||
})
|
||||
getSellerList().then(response => {
|
||||
this.SellerList = response.data;
|
||||
});
|
||||
|
||||
this.$Dictionary.bizType().then(list => {
|
||||
this.$convertList(list, this.BizTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
})
|
||||
this.$Dictionary.bizType().then(list => {
|
||||
this.$convertList(list, this.BizTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
this.$Dictionary.orderType().then(list => {
|
||||
this.$convertList(list, this.OrderTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
this.$Dictionary.orderType().then(list => {
|
||||
this.$convertList(list, this.OrderTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
})
|
||||
this.$Dictionary.payType().then(list => {
|
||||
this.$convertList(list, this.PayTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
this.$Dictionary.payType().then(list => {
|
||||
this.$convertList(list, this.PayTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
})
|
||||
this.$Dictionary.payStatus().then(list => {
|
||||
this.$convertList(list, this.PayStatusList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
this.$Dictionary.payStatus().then(list => {
|
||||
this.$convertList(list, this.PayStatusList, elem => {
|
||||
return true;
|
||||
});
|
||||
})
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
})
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
},
|
||||
queryFunction(params) {
|
||||
return getOrderPageList(params);
|
||||
},
|
||||
handleNormalAdd() {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.orderDraft}/add/0` });
|
||||
},
|
||||
handleEdit(index, data) {
|
||||
this.$alert('功能待开发', this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
handleCanDistribute(index, data) {
|
||||
if (data.qrCodeGenerated) {
|
||||
data.canDistribute = true;
|
||||
this.distribute(data);
|
||||
} else {
|
||||
this.$refs.canDistribute.doShow(data);
|
||||
}
|
||||
},
|
||||
distribute(data) {
|
||||
const model = {
|
||||
amount: data.amount,
|
||||
forever: data.forever,
|
||||
orderCode: data.code,
|
||||
startTime: data.startTime + ' 00:00:00',
|
||||
monthAmount: data.monthAmount,
|
||||
canDistribute: data.canDistribute,
|
||||
operator: OperatorModel.TRANSFER,
|
||||
mapId: data.mapId,
|
||||
lessonId: data.lessonId || '',
|
||||
mapProductCode: data.mapProductCode || '',
|
||||
permissionType: data.permissionType,
|
||||
organizationId: data.organizationId
|
||||
};
|
||||
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
})
|
||||
},
|
||||
queryFunction(params) {
|
||||
return getOrderPageList(params);
|
||||
},
|
||||
handleNormalAdd() {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.orderDraft}/add/0` })
|
||||
},
|
||||
handleEdit(index, data) {
|
||||
this.$alert('功能待开发', this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
handleCanDistribute(index, data) {
|
||||
if (data.qrCodeGenerated) {
|
||||
data.canDistribute = true;
|
||||
this.distribute(data);
|
||||
} else {
|
||||
this.$refs.canDistribute.doShow(data);
|
||||
}
|
||||
},
|
||||
distribute(data) {
|
||||
let model = {
|
||||
amount: data.amount,
|
||||
forever: data.forever,
|
||||
orderCode: data.code,
|
||||
startTime: data.startTime + " 00:00:00",
|
||||
monthAmount: data.monthAmount,
|
||||
canDistribute: data.canDistribute,
|
||||
operator: OperatorModel.TRANSFER,
|
||||
mapId: data.mapId,
|
||||
lessonId: data.lessonId || '',
|
||||
mapProductCode: data.mapProductCode || '',
|
||||
permissionType: data.permissionType,
|
||||
organizationId: data.organizationId
|
||||
}
|
||||
giveLessons(model).then(response => {
|
||||
this.reloadTable();
|
||||
if (data.qrCodeGenerated) {
|
||||
this.$refs.qrCode.doShow({
|
||||
url: response.data,
|
||||
title: this.$t('orderAuthor.transferQRCode')
|
||||
});
|
||||
}
|
||||
|
||||
giveLessons(model).then(response => {
|
||||
this.reloadTable();
|
||||
if (data.qrCodeGenerated) {
|
||||
this.$refs.qrCode.doShow({
|
||||
url: response.data,
|
||||
title: this.$t('orderAuthor.transferQRCode')
|
||||
});
|
||||
}
|
||||
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('error.transferredQRCodeFailed'));
|
||||
});
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.transferredQRCodeFailed'));
|
||||
});
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,174 +1,169 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
||||
</QueryListPage>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="turnback">{{$t('global.return')}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { superAdmin } from '@/router';
|
||||
import { listPackagePermission, restorePackagePermission, getPermissionPackageDetail } from '@/api/management/distribute';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { getPermissionPackageDetail } from '@/api/management/distribute';
|
||||
|
||||
export default {
|
||||
name: 'TrainsferDetail',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
height: 0,
|
||||
WhetherTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'permissionType': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
prop: 'organizationName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userName'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userMobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapProductName'),
|
||||
prop: 'mapProductName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'permissionType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
||||
tagType: (row) => { return '' }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||
prop: 'canDistribute',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList') },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether') },
|
||||
tagType: (row) => {
|
||||
switch (row.forever) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
export default {
|
||||
name: 'TrainsferDetail',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
height: 0,
|
||||
WhetherTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'permissionType': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
prop: 'organizationName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userName'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userMobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapProductName'),
|
||||
prop: 'mapProductName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'permissionType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||
prop: 'canDistribute',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||
tagType: (row) => {
|
||||
switch (row.forever) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseAuthorityStatus'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
},
|
||||
formatterDate(row, porpInfo) {
|
||||
if (row.hasOwnProperty(porpInfo.property)) {
|
||||
}
|
||||
return row[porpInfo.property];
|
||||
},
|
||||
queryFunction(params) {
|
||||
// if (params.permissionType) {
|
||||
return getPermissionPackageDetail(this.$route.params.permissionId, params)
|
||||
// }
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload()
|
||||
}
|
||||
},
|
||||
turnback() {
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseAuthorityStatus'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
},
|
||||
formatterDate(row, porpInfo) {
|
||||
return row[porpInfo.property];
|
||||
},
|
||||
queryFunction(params) {
|
||||
// if (params.permissionType) {
|
||||
return getPermissionPackageDetail(this.$route.params.permissionId, params);
|
||||
// }
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
turnback() {
|
||||
this.$router.go(-1);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.draft {
|
||||
|
@ -1,208 +1,221 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="show" top="20px" width="90%" :before-close="doClose"
|
||||
:close-on-click-modal="false">
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
||||
</QueryListPage>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
top="20px"
|
||||
width="90%"
|
||||
:before-close="doClose"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCanPackagePermission } from '@/api/management/distribute';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { listCanPackagePermission } from '@/api/management/distribute';
|
||||
|
||||
export default {
|
||||
name: 'author',
|
||||
props: {
|
||||
ruleList: {
|
||||
type: Array
|
||||
},
|
||||
EffectiveTypeList: {
|
||||
type: Array,
|
||||
},
|
||||
PermissionTypeList: {
|
||||
type: Array
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
param: '',
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '100px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'permissionType': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'canDistribute': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.publicOrPrivate'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
prop: 'organizationName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userName'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userMobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapProductName'),
|
||||
prop: 'mapProductName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'permissionType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
||||
tagType: (row) => { return '' }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||
prop: 'canDistribute',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList') },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether') },
|
||||
tagType: (row) => {
|
||||
switch (row.forever) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// title: '权限总数',
|
||||
// prop: 'amount'
|
||||
// },
|
||||
// {
|
||||
// title: '剩余权限数量',
|
||||
// prop: 'remains'
|
||||
// },
|
||||
{
|
||||
title: this.$t('orderAuthor.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
export default {
|
||||
name: 'Author',
|
||||
props: {
|
||||
ruleList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
effectiveTypeList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
permissionTypeList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
param: '',
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '100px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'permissionType': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'canDistribute': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.publicOrPrivate'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
prop: 'organizationName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userName'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userMobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapProductName'),
|
||||
prop: 'mapProductName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'permissionType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||
prop: 'canDistribute',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||
tagType: (row) => {
|
||||
switch (row.forever) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// title: '权限总数',
|
||||
// prop: 'amount'
|
||||
// },
|
||||
// {
|
||||
// title: '剩余权限数量',
|
||||
// prop: 'remains'
|
||||
// },
|
||||
{
|
||||
title: this.$t('orderAuthor.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '120',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('global.add'),
|
||||
handleClick: this.handlePut,
|
||||
type: '',
|
||||
showControl: (row) => { return !row.isPut && row.permissionType }
|
||||
},
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handlePop,
|
||||
type: 'warning',
|
||||
showControl: (row) => { return row.isPut && row.permissionType }
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
PermissionTypeList: function (list) {
|
||||
if (list && list.length) {
|
||||
this.queryForm.queryObject.permissionType.config.data = list;
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.$t('orderAuthor.editPermissionRules');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
|
||||
},
|
||||
methods: {
|
||||
formatterDate(row, porpInfo) {
|
||||
return String(row[porpInfo.property] || '').split(' ')[0];
|
||||
},
|
||||
async queryFunction(params) {
|
||||
let resp = await listCanPackagePermission(params);
|
||||
this.ruleList.forEach(elem => {
|
||||
resp.data.list.forEach(item => {
|
||||
if (item.id == elem.id) {
|
||||
item.isPut = true;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '120',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('global.add'),
|
||||
handleClick: this.handlePut,
|
||||
type: '',
|
||||
showControl: (row) => { return !row.isPut && row.permissionType; }
|
||||
},
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handlePop,
|
||||
type: 'warning',
|
||||
showControl: (row) => { return row.isPut && row.permissionType; }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.$t('orderAuthor.editPermissionRules');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
PermissionTypeList: function (list) {
|
||||
if (list && list.length) {
|
||||
this.queryForm.queryObject.permissionType.config.data = list;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
|
||||
},
|
||||
methods: {
|
||||
formatterDate(row, porpInfo) {
|
||||
return String(row[porpInfo.property] || '').split(' ')[0];
|
||||
},
|
||||
async queryFunction(params) {
|
||||
const resp = await listCanPackagePermission(params);
|
||||
this.ruleList.forEach(elem => {
|
||||
resp.data.list.forEach(item => {
|
||||
if (item.id == elem.id) {
|
||||
item.isPut = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return resp;
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload()
|
||||
}
|
||||
},
|
||||
doShow() {
|
||||
this.show = true
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
handlePut(index, row) {
|
||||
this.$emit('addRuleForm', index, row);
|
||||
},
|
||||
handlePop(index, row) {
|
||||
this.$emit('deleteForm', index, row);
|
||||
}
|
||||
}
|
||||
}
|
||||
return resp;
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
doShow() {
|
||||
this.show = true;
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
handlePut(index, row) {
|
||||
this.$emit('addRuleForm', index, row);
|
||||
},
|
||||
handlePop(index, row) {
|
||||
this.$emit('deleteForm', index, row);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<el-step icon="el-icon-setting" />
|
||||
</el-steps>
|
||||
<el-card class="forms pack-rule">
|
||||
<el-button class="addList" size="small" @click="dialogSelect">{{$t('orderAuthor.addRecords')}}</el-button>
|
||||
<el-button class="addList" size="small" @click="dialogSelect">{{ $t('orderAuthor.addRecords') }}</el-button>
|
||||
<el-table
|
||||
:data="ruleList"
|
||||
border
|
||||
@ -28,7 +28,7 @@
|
||||
<el-table-column prop="remains" :label="this.$t('orderAuthor.residualPermissionNumber')" width="80" />
|
||||
<el-table-column :label="this.$t('global.operate')" width="60">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="deleteForm(scope.$index, scope.row)">{{$t('global.delete')}}
|
||||
<el-button type="text" size="small" @click="deleteForm(scope.$index, scope.row)">{{ $t('global.delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -36,9 +36,9 @@
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="!urlInfo.url" type="primary" @click="packForm">{{$t('orderAuthor.packaging')}}</el-button>
|
||||
<el-button v-if="urlInfo.url" type="primary" @click="QrCodeShow">{{$t('orderAuthor.obtainQrCode')}}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{$t('global.return')}}</el-button>
|
||||
<el-button v-if="!urlInfo.url" type="primary" @click="packForm">{{ $t('orderAuthor.packaging') }}</el-button>
|
||||
<el-button v-if="urlInfo.url" type="primary" @click="QrCodeShow">{{ $t('orderAuthor.obtainQrCode') }}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<choose-permission
|
||||
@ -171,7 +171,7 @@ export default {
|
||||
this.$messageBox(this.$t('tip.packagingFailed'));
|
||||
});
|
||||
} else {
|
||||
this.$messageBox(this.$t('orderAuthor.selectPackagingRecord'));
|
||||
this.$messageBox(this.$t('tip.selectPackagingRecord'));
|
||||
}
|
||||
},
|
||||
qrCodeShow() {
|
||||
|
@ -1,264 +1,261 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
||||
</QueryListPage>
|
||||
<qr-code ref="qrCode"></qr-code>
|
||||
</div>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<qr-code ref="qrCode" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { superAdmin } from '@/router';
|
||||
import { listPackagePermission, restorePackagePermission, getPackageQrCode, permissionDistributeUnPackage } from '@/api/management/distribute';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import QrCode from "@/components/QrCode";
|
||||
import { superAdmin } from '@/router';
|
||||
import { listPackagePermission, restorePackagePermission, getPackageQrCode, permissionDistributeUnPackage } from '@/api/management/distribute';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import QrCode from '@/components/QrCode';
|
||||
|
||||
export default {
|
||||
name: 'author',
|
||||
components: {
|
||||
QrCode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
EffectiveTypeList: [],
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'userMobile': {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.founderPhone')
|
||||
},
|
||||
'userName': {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.founder')
|
||||
},
|
||||
'permissionType': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'status': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.authorityStatus'),
|
||||
value: '1',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
prop: 'organizationName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.founder'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.founderPhone'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapProductName'),
|
||||
prop: 'mapProductName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName',
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'permissionType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
||||
tagType: (row) => { return '' }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||
prop: 'canDistribute',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList') },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether') },
|
||||
tagType: (row) => {
|
||||
switch (row.forever) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
export default {
|
||||
name: 'Author',
|
||||
components: {
|
||||
QrCode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
EffectiveTypeList: [],
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'userMobile': {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.founderPhone')
|
||||
},
|
||||
'userName': {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.founder')
|
||||
},
|
||||
'permissionType': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'status': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.authorityStatus'),
|
||||
value: '1',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
prop: 'organizationName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.founder'),
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.founderPhone'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapProductName'),
|
||||
prop: 'mapProductName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'permissionType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||
prop: 'canDistribute',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||
tagType: (row) => {
|
||||
switch (row.forever) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.authorityStatus'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '300',
|
||||
hide: (row) => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('orderAuthor.obtainQrCode'),
|
||||
handleClick: this.handleRtCodeShow,
|
||||
type: '',
|
||||
showControl: (row) => { return true }
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.authorityDetails'),
|
||||
handleClick: this.handlePermissionDetail,
|
||||
type: '',
|
||||
showControl: (row) => { return row.status == '1' && (row.source == '02' || row.source == '04') }
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.recovery'),
|
||||
handleClick: this.handleRestore,
|
||||
type: 'danger',
|
||||
showControl: (row) => { return row.status == '1' && row.source == '04' }
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.unpacking'),
|
||||
handleClick: this.handleUnPackage,
|
||||
type: 'danger',
|
||||
showControl: (row) => { return row.status == '1' && row.source == '02' }
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('orderAuthor.privilegePackaging'), btnCode: 'employee_insert', handler: this.handlePackage },
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.authorityStatus'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: this.$i18n.locale == 'en' ? '400': '300',
|
||||
hide: (row) => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('orderAuthor.obtainQrCode'),
|
||||
handleClick: this.handleRtCodeShow,
|
||||
type: '',
|
||||
showControl: (row) => { return true; }
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.authorityDetails'),
|
||||
handleClick: this.handlePermissionDetail,
|
||||
type: '',
|
||||
showControl: (row) => { return row.status == '1' && (row.source == '02' || row.source == '04'); }
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.recovery'),
|
||||
handleClick: this.handleRestore,
|
||||
type: 'danger',
|
||||
showControl: (row) => { return row.status == '1' && row.source == '04'; }
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.unpacking'),
|
||||
handleClick: this.handleUnPackage,
|
||||
type: 'danger',
|
||||
showControl: (row) => { return row.status == '1' && row.source == '02'; }
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('orderAuthor.privilegePackaging'), btnCode: 'employee_insert', handler: this.handlePackage }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.status.config.data.push({ value: elem.code, label: elem.name });
|
||||
})
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
this.PermissionTypeList.push({ value: undefined, label: this.$t('orderAuthor.permissionPack') });
|
||||
});
|
||||
},
|
||||
formatterDate(row, porpInfo) {
|
||||
if (row.hasOwnProperty(porpInfo.property)) {
|
||||
}
|
||||
return row[porpInfo.property];
|
||||
},
|
||||
queryFunction(params) {
|
||||
return listPackagePermission(params);
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload()
|
||||
}
|
||||
},
|
||||
handlePermissionDetail(index, row) {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.transferDetail}/${row.id}` })
|
||||
},
|
||||
handleRtCodeShow(index, row) {
|
||||
getPackageQrCode({ id: row.id }).then(resp => {
|
||||
this.$refs.qrCode.doShow({
|
||||
url: resp.data,
|
||||
title: this.$t('orderAuthor.privilegeTransferQRCode')
|
||||
});
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('tip.getQRCodeFailure'));
|
||||
})
|
||||
},
|
||||
handleRestore(index, row) {
|
||||
this.$confirm(this.$t('tip.recoveryPrivilegeTip'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
restorePackagePermission(row.id).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('tip.recoveryPrivilegesSuccessful'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('tip.recoveryPrivilegesFailed'));
|
||||
})
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleUnPackage(index, row) {
|
||||
this.$confirm(this.$t('tip.unpackingTip'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
permissionDistributeUnPackage(row.id).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('tip.unpackingSuccessful'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('tip.unpackingFailed'));
|
||||
})
|
||||
}).catch(() => { });
|
||||
},
|
||||
handlePackage() {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.trainferPackage}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.status.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
this.PermissionTypeList.push({ value: undefined, label: this.$t('orderAuthor.permissionPack') });
|
||||
});
|
||||
},
|
||||
formatterDate(row, porpInfo) {
|
||||
return row[porpInfo.property];
|
||||
},
|
||||
queryFunction(params) {
|
||||
return listPackagePermission(params);
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
handlePermissionDetail(index, row) {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.transferDetail}/${row.id}` });
|
||||
},
|
||||
handleRtCodeShow(index, row) {
|
||||
getPackageQrCode({ id: row.id }).then(resp => {
|
||||
this.$refs.qrCode.doShow({
|
||||
url: resp.data,
|
||||
title: this.$t('orderAuthor.privilegeTransferQRCode')
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.getQRCodeFailure'));
|
||||
});
|
||||
},
|
||||
handleRestore(index, row) {
|
||||
this.$confirm(this.$t('tip.recoveryPrivilegeTip'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
restorePackagePermission(row.id).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('tip.recoveryPrivilegesSuccessful'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.recoveryPrivilegesFailed'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleUnPackage(index, row) {
|
||||
this.$confirm(this.$t('tip.unpackingTip'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
permissionDistributeUnPackage(row.id).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('tip.unpackingSuccessful'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.unpackingFailed'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handlePackage() {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.trainferPackage}` });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -248,7 +248,9 @@ export default {
|
||||
this.loadChartPage();
|
||||
},
|
||||
$route() {
|
||||
this.loadChartPage();
|
||||
this.$nextTick(() => {
|
||||
this.loadChartPage();
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -67,9 +67,9 @@ export default {
|
||||
this.height = this._clientHeight - 50;
|
||||
},
|
||||
initLoadPage() {
|
||||
const data = { id: this.$route.params.trainingId };
|
||||
if (parseInt(data.id)) {
|
||||
getTrainingDetail(data)
|
||||
const trainingId = this.$route.params.trainingId;
|
||||
if (parseInt(trainingId)) {
|
||||
getTrainingDetail(trainingId)
|
||||
.then(res => {
|
||||
this.courseModel = {
|
||||
id: res.data.id,
|
||||
|
Loading…
Reference in New Issue
Block a user