This commit is contained in:
fan 2019-10-30 18:18:32 +08:00
commit 0311e5ee4f
9 changed files with 593 additions and 590 deletions

View File

@ -5,131 +5,131 @@ import request from '@/utils/request';
* 获取实训规则列表
*/
export function getTrainingRulesList(params) {
return request({
url: `/api/operate`,
method: 'get',
params: params
});
return request({
url: `/api/operate`,
method: 'get',
params: params
});
}
/**
* 生成考试定义规则
*/
export function postTrainingRulesData(data) {
return request({
url: `/api/operate`,
method: 'post',
data: data
});
return request({
url: `/api/operate`,
method: 'post',
data: data
});
}
/**
* 修改考试定义规则
*/
export function putTrainingRulesData(data) {
return request({
url: `/api/operate/${data.id}`,
method: 'put',
data: data
});
return request({
url: `/api/operate/${data.id}`,
method: 'put',
data: data
});
}
/**
* 删除考试定义规则
*/
export function deleteTrainingRulesData(id) {
return request({
url: `/api/operate/${id}`,
method: 'DELETE'
});
return request({
url: `/api/operate/${id}`,
method: 'DELETE'
});
}
/**
* 获取实训规则步骤详情列表
*/
export function getOperateStepDataList(id, params) {
return request({
url: `/api/operate/${id}/step`,
method: 'get',
params: params
});
return request({
url: `/api/operate/${id}/step`,
method: 'get',
params: params
});
}
/**
* 创建操作步骤
*/
export function postOperateStepData(params) {
return request({
url: `/api/operate/${params.definitionId}/step`,
method: 'post',
data: params
});
return request({
url: `/api/operate/${params.definitionId}/step`,
method: 'post',
data: params
});
}
/**
* 修改操作步骤
*/
export function putOperateStepData(params) {
return request({
url: `/api/operate/step/${params.id}`,
method: 'put',
data: params
});
return request({
url: `/api/operate/step/${params.id}`,
method: 'put',
data: params
});
}
/**
* 修改操作步骤
*/
export function deleteOperateStepData(id) {
return request({
url: `/api/operate/step/${id}`,
method: 'delete'
});
return request({
url: `/api/operate/step/${id}`,
method: 'delete'
});
}
/**
* 批量生成操作列表
*/
export function addTrainingRulesList(skinCode, data) {
return request({
url: `/api/operate/${skinCode}/generate`,
method: 'post',
data: data
});
return request({
url: `/api/operate/${skinCode}/generate`,
method: 'post',
data: data
});
}
/**
* 获取操作占位列表
*/
export function getPlaceholderList(data) {
return request({
url: `/api/operate/placeholder`,
method: 'get',
params: {
trainingType: data.trainingType,
skinCode: data.skinCode
}
});
return request({
url: `/api/operate/placeholder`,
method: 'get',
params: {
trainingType: data.trainingType,
skinCode: data.skinCode
}
});
}
/**
* 获取产品下实训操作列表
*/
export function getOperateTrainingList(data) {
return request({
url: `/api/operate/type`,
method: 'get',
params: {
productType: data.productType,
skinCode: data.skinCode
}
});
return request({
url: `/api/operate/type`,
method: 'get',
params: {
productType: data.productType,
mapId: data.mapId
}
});
}
// 另存为 操作定义
export function postOperateSaveAs(skinCode, other) {
return request({
url: `/api/operate/${skinCode}/saveAs/${other}`,
method: 'post'
});
export function postOperateSaveAs(mapId, other) {
return request({
url: `/api/operate/${mapId}/saveAs/${other}`,
method: 'post'
});
}

View File

@ -1,123 +1,124 @@
export default {
trainingList: 'Training list',
filterPlaceholder: 'Input key for filtering',
addTraining: 'Add training',
editTraining: 'Edit training',
demonstration: 'Demonstration',
hasCalcelDelete: 'Canceled deletion',
isConfirmDelete: 'Whether to confirm deletion?',
trainingName: 'Training Name',
trainingType: 'Training Type',
stationList: 'Station List',
stepInfo: 'Step Information',
selectMap: 'Please select the map',
selectTraining: 'Please select the training',
findStationPlaceholder: 'Input keywords to inquire station',
stepNo: 'Step No',
deviceNumber: 'Device Number',
deviceType: 'Device Type',
operationType: 'Operation Type',
returnValue: 'Return Value',
tips: 'Tips',
startRecording: 'Start Recording',
endRecording: 'End Recording',
nextStep: 'Next Step',
selectMode: 'Mode',
deleteSuccess: 'Delete successfully',
wellDelTrainingRule: 'This action will delete the training rule. Do you want to continue?',
stepDetail: 'Detail',
generation: 'Generation',
skinType: 'Skin Type',
saveAs: 'Save As',
skinTypeFrom: 'from',
skinTypeTo: 'to',
copyLesson: 'Duplicate course definition',
minDuration: 'The Best Available',
maxDuration: 'The Largest Available',
trainingRemark: 'Explain',
createOperateRule: 'Create Action Rules',
editOperateRule: 'Edit Action Rules',
tipNamePlaceholderInfo: "Select the placeholder '{}' not to be deleted, otherwise the name will display incorrectly!",
tipExplainPlaceholderInfo: "Select placeholder '{}' not to be deleted, otherwise the display will be problematic!",
generationOperation: 'Automatic Generation Operation',
wellClearOperate: 'This operation clears all operation definitions under the skin. Do you want to continue?',
batchCreateSuccess: 'Batch build operation definition successful',
createOperateSuccess: 'The operation definition was created successfully',
updateOperateSuccess: 'The update steps were successful',
wellDelOperate: 'This action will delete the training step. Do you want to continue?',
operateCode: 'Opcode',
stepReturn: 'Return Value',
stepTips: 'Tips',
createStepInfo: 'Create Step Information',
eidtStepInfo: 'Edit Step Information',
product: 'Product',
remarks: 'Remarks',
operateSuccess: 'Operation successfully',
createChapter: 'Create chapter',
contentSorting: 'Content sorting',
courseList: 'Course list',
countSkinCode: 'Duplicate skin cannot be the same type as the copied skin',
createNewCoursesFromRelease: 'Create new courses from release',
courseName: 'Course name',
parentChapter: 'Parent chapter',
chapterName: 'Chapter name',
chapterInstructions: 'Chapter instructions',
associatedTraining: 'Associated training',
updateChapter: 'Update chapter',
automaticOrManual: 'Auto/Manual',
automatic: 'Automatic',
manual: 'Manual',
publishCourseName: 'Publish course name',
draftCourseName: 'Draft course name',
associatedSkin: 'Associated skin',
associatedProducts: 'Associated products',
courseDescription: 'Course description',
editCourse: 'Edit course',
createCourse: 'Create course',
courseRelease: 'Course release',
releaseAssociatedCity: 'Release associated city',
releaseAssociatedMap: 'Release associated map',
trainingSequence: 'Training sequence',
creationTime: 'Creation time',
finishTime: 'Finish time',
createResults: 'Create results',
start: 'start',
toPerform: 'To perform',
productType: 'Product type:',
minTime: 'Minimum time:',
maxTime: 'Largest time:',
trainingDescription: 'Training description:',
generateTraining: 'Generate training',
updateTraining: 'Update training',
deleteTraining: 'Delete training',
automaticGenerationOfTraining: 'Automatic generation of training',
modifyTrainingByCategory: 'Modify training by category',
deleteAutoGeneratedTraining: 'Delete auto-generated training',
menu: 'Menu',
turnout: 'Turnout',
section: 'Section',
signaler: 'Signaler',
controlMode: 'Control mode',
platform: 'Platform',
train: 'Train',
station: 'Station',
trainWindow: 'Train window',
editStepInfo: 'Edit step information',
trainingRecord: 'Training recording',
lesson: 'Lesson',
taskManage: 'Task manage',
trainingRule: 'Training rule',
trainingManage: 'Training manage',
newConstruction: 'New',
applicationForRelease: 'Application for release',
rejectReason: 'Reason for rejection',
withdraw: 'Withdraw',
notRelease: 'Not release',
pendingReview: 'Pending review',
published: 'Published',
rejected: 'Rejected',
review: 'Review',
explanation: 'Explanation',
courseDetails: 'Course details',
courseTree: 'Course tree:'
trainingList: 'Training list',
filterPlaceholder: 'Input key for filtering',
addTraining: 'Add training',
editTraining: 'Edit training',
demonstration: 'Demonstration',
hasCalcelDelete: 'Canceled deletion',
isConfirmDelete: 'Whether to confirm deletion?',
trainingName: 'Training Name',
trainingType: 'Training Type',
stationList: 'Station List',
stepInfo: 'Step Information',
selectMap: 'Please select the map',
selectTraining: 'Please select the training',
findStationPlaceholder: 'Input keywords to inquire station',
stepNo: 'Step No',
deviceNumber: 'Device Number',
deviceType: 'Device Type',
operationType: 'Operation Type',
returnValue: 'Return Value',
tips: 'Tips',
startRecording: 'Start Recording',
endRecording: 'End Recording',
nextStep: 'Next Step',
selectMode: 'Mode',
deleteSuccess: 'Delete successfully',
wellDelTrainingRule: 'This action will delete the training rule. Do you want to continue?',
stepDetail: 'Detail',
generation: 'Generation',
skinType: 'Skin Type',
saveAs: 'Save As',
skinTypeFrom: 'from',
skinTypeTo: 'to',
copyLesson: 'Duplicate course definition',
minDuration: 'The Best Available',
maxDuration: 'The Largest Available',
trainingRemark: 'Explain',
createOperateRule: 'Create Action Rules',
editOperateRule: 'Edit Action Rules',
tipNamePlaceholderInfo: "Select the placeholder '{}' not to be deleted, otherwise the name will display incorrectly!",
tipExplainPlaceholderInfo: "Select placeholder '{}' not to be deleted, otherwise the display will be problematic!",
generationOperation: 'Automatic Generation Operation',
wellClearOperate: 'This operation clears all operation definitions under the skin. Do you want to continue?',
batchCreateSuccess: 'Batch build operation definition successful',
createOperateSuccess: 'The operation definition was created successfully',
updateOperateSuccess: 'The update steps were successful',
wellDelOperate: 'This action will delete the training step. Do you want to continue?',
operateCode: 'Opcode',
stepReturn: 'Return Value',
stepTips: 'Tips',
createStepInfo: 'Create Step Information',
eidtStepInfo: 'Edit Step Information',
product: 'Product',
remarks: 'Remarks',
operateSuccess: 'Operation successfully',
createChapter: 'Create chapter',
contentSorting: 'Content sorting',
courseList: 'Course list',
countSkinCode: 'Duplicate skin cannot be the same type as the copied skin',
createNewCoursesFromRelease: 'Create new courses from release',
courseName: 'Course name',
parentChapter: 'Parent chapter',
chapterName: 'Chapter name',
chapterInstructions: 'Chapter instructions',
associatedTraining: 'Associated training',
updateChapter: 'Update chapter',
automaticOrManual: 'Auto/Manual',
automatic: 'Automatic',
manual: 'Manual',
publishCourseName: 'Publish course name',
draftCourseName: 'Draft course name',
associatedSkin: 'Associated skin',
associatedProducts: 'Associated products',
courseDescription: 'Course description',
editCourse: 'Edit course',
createCourse: 'Create course',
courseRelease: 'Course release',
releaseAssociatedCity: 'Release associated city',
releaseAssociatedMap: 'Release associated map',
trainingSequence: 'Training sequence',
creationTime: 'Creation time',
finishTime: 'Finish time',
createResults: 'Create results',
start: 'start',
toPerform: 'To perform',
productType: 'Product type:',
minTime: 'Minimum time:',
maxTime: 'Largest time:',
trainingDescription: 'Training description:',
generateTraining: 'Generate training',
updateTraining: 'Update training',
deleteTraining: 'Delete training',
automaticGenerationOfTraining: 'Automatic generation of training',
modifyTrainingByCategory: 'Modify training by category',
deleteAutoGeneratedTraining: 'Delete auto-generated training',
menu: 'Menu',
turnout: 'Turnout',
section: 'Section',
signaler: 'Signaler',
controlMode: 'Control mode',
platform: 'Platform',
train: 'Train',
station: 'Station',
trainWindow: 'Train window',
editStepInfo: 'Edit step information',
trainingRecord: 'Training recording',
lesson: 'Lesson',
taskManage: 'Task manage',
trainingRule: 'Training rule',
trainingManage: 'Training manage',
newConstruction: 'New',
applicationForRelease: 'Application for release',
rejectReason: 'Reason for rejection',
withdraw: 'Withdraw',
notRelease: 'Not release',
pendingReview: 'Pending review',
published: 'Published',
rejected: 'Rejected',
review: 'Review',
explanation: 'Explanation',
courseDetails: 'Course details',
courseTree: 'Course tree:',
mapName:'Map Name'
};

View File

@ -1,123 +1,124 @@
export default {
trainingList: '实训列表',
filterPlaceholder: '输入关键字进行过滤',
addTraining: '添加实训',
editTraining: '修改实训',
demonstration: '演示',
hasCalcelDelete: '已取消删除',
isConfirmDelete: '是否确认删除?',
trainingName: '实训名称',
trainingType: '实训类型',
stationList: '车站列表',
stepInfo: '步骤信息',
selectMap: '请选择地图',
selectTraining: '请选择实训',
findStationPlaceholder: '输入关键字查询车站',
stepNo: '步骤序号',
deviceNumber: '设备编号',
deviceType: '设备类型',
operationType: '操作类型',
returnValue: '返回值',
tips: '提示语',
startRecording: '开始录制',
endRecording: '结束录制',
nextStep: '下一步',
selectMode: '模式选择',
deleteSuccess: '删除成功',
wellDelTrainingRule: '此操作将删除此实训规则, 是否继续?',
stepDetail: '步骤明细',
generation: '自动生成',
saveAs: '另存为',
skinTypeFrom: '从',
skinTypeTo: '到',
copyLesson: '复制课程定义',
skinType: '皮肤类型',
minDuration: '最佳用时',
maxDuration: '最大用时',
trainingRemark: '实训说明',
createOperateRule: '创建操作规则',
editOperateRule: '编辑操作规则',
tipNamePlaceholderInfo: '选择占位符 {} 不可删除,否则名称显示会有问题!',
tipExplainPlaceholderInfo: '选择占位符 {} 不可删除,否则说明显示会有问题!',
generationOperation: '自动生成操作',
wellClearOperate: '此操作将清空改皮肤下所有操作定义, 是否继续?',
batchCreateSuccess: '批量生成操作定义成功',
createOperateSuccess: '创建操作定义成功',
updateOperateSuccess: '更新操作步骤成功',
wellDelOperate: '此操作将删除此实训步骤, 是否继续?',
operateCode: '操作码',
stepReturn: '步骤返回值',
stepTips: '步骤提示信息',
createStepInfo: '创建步骤信息',
editStepInfo: '编辑步骤信息',
product: '产品',
remarks: '描述',
operateSuccess: '操作成功',
createChapter: '创建章节',
contentSorting: '内容排序',
courseList: '课程列表',
createNewCoursesFromRelease: '从发布课程新建',
courseName: '课程名称',
parentChapter: '父级章节:',
chapterName: '章节名称:',
chapterInstructions: '章节说明:',
associatedTraining: '关联实训:',
updateChapter: '更新章节',
automaticOrManual: '自动/人工',
automatic: '自动',
manual: '人工',
publishCourseName: '发布课程名称:',
draftCourseName: '草稿课程名称:',
associatedSkin: '关联皮肤:',
associatedProducts: '关联产品:',
courseDescription: '课程说明',
editCourse: '编辑课程',
createCourse: '创建课程',
courseRelease: '课程发布',
releaseAssociatedCity: '发布关联城市:',
releaseAssociatedMap: '发布关联地图:',
trainingSequence: '实训排序',
creationTime: '创建时间',
finishTime: '完成时间',
createResults: '创建结果',
start: '开始',
toPerform: '重新执行',
productType: '产品类型:',
minTime: '最小用时:',
maxTime: '最大用时:',
trainingDescription: '实训描述:',
generateTraining: '生成实训',
updateTraining: '修改实训',
deleteTraining: '删除实训',
automaticGenerationOfTraining: '自动生成实训',
modifyTrainingByCategory: '按类别修改实训',
deleteAutoGeneratedTraining: '删除自动生成实训',
menu: '菜单',
turnout: '道岔',
section: '区段',
signaler: '信号机',
controlMode: '控制模式',
platform: '站台',
train: '列车',
station: '车站',
trainWindow: '车次窗',
countSkinCode: '复制皮肤与被复制皮肤类型不能一样',
trainingRecord: '实训录制',
lesson: '课程',
taskManage: '任务管理',
trainingRule: '操作定义',
trainingManage: '实训管理',
newConstruction: '新建',
applicationForRelease: '申请发布',
rejectReason: '驳回原因',
withdraw: '撤销',
notRelease: '未发布',
pendingReview: '待审核',
published: '已发布',
rejected: '已驳回',
review: '查看',
explanation: '驳回说明',
courseDetails: '课程详情',
courseTree: '课程树:'
trainingList: '实训列表',
filterPlaceholder: '输入关键字进行过滤',
addTraining: '添加实训',
editTraining: '修改实训',
demonstration: '演示',
hasCalcelDelete: '已取消删除',
isConfirmDelete: '是否确认删除?',
trainingName: '实训名称',
trainingType: '实训类型',
stationList: '车站列表',
stepInfo: '步骤信息',
selectMap: '请选择地图',
selectTraining: '请选择实训',
findStationPlaceholder: '输入关键字查询车站',
stepNo: '步骤序号',
deviceNumber: '设备编号',
deviceType: '设备类型',
operationType: '操作类型',
returnValue: '返回值',
tips: '提示语',
startRecording: '开始录制',
endRecording: '结束录制',
nextStep: '下一步',
selectMode: '模式选择',
deleteSuccess: '删除成功',
wellDelTrainingRule: '此操作将删除此实训规则, 是否继续?',
stepDetail: '步骤明细',
generation: '自动生成',
saveAs: '另存为',
skinTypeFrom: '从',
skinTypeTo: '到',
copyLesson: '复制课程定义',
skinType: '皮肤类型',
minDuration: '最佳用时',
maxDuration: '最大用时',
trainingRemark: '实训说明',
createOperateRule: '创建操作规则',
editOperateRule: '编辑操作规则',
tipNamePlaceholderInfo: '选择占位符 {} 不可删除,否则名称显示会有问题!',
tipExplainPlaceholderInfo: '选择占位符 {} 不可删除,否则说明显示会有问题!',
generationOperation: '自动生成操作',
wellClearOperate: '此操作将清空改皮肤下所有操作定义, 是否继续?',
batchCreateSuccess: '批量生成操作定义成功',
createOperateSuccess: '创建操作定义成功',
updateOperateSuccess: '更新操作步骤成功',
wellDelOperate: '此操作将删除此实训步骤, 是否继续?',
operateCode: '操作码',
stepReturn: '步骤返回值',
stepTips: '步骤提示信息',
createStepInfo: '创建步骤信息',
editStepInfo: '编辑步骤信息',
product: '产品',
remarks: '描述',
operateSuccess: '操作成功',
createChapter: '创建章节',
contentSorting: '内容排序',
courseList: '课程列表',
createNewCoursesFromRelease: '从发布课程新建',
courseName: '课程名称',
parentChapter: '父级章节:',
chapterName: '章节名称:',
chapterInstructions: '章节说明:',
associatedTraining: '关联实训:',
updateChapter: '更新章节',
automaticOrManual: '自动/人工',
automatic: '自动',
manual: '人工',
publishCourseName: '发布课程名称:',
draftCourseName: '草稿课程名称:',
associatedSkin: '关联皮肤:',
associatedProducts: '关联产品:',
courseDescription: '课程说明',
editCourse: '编辑课程',
createCourse: '创建课程',
courseRelease: '课程发布',
releaseAssociatedCity: '发布关联城市:',
releaseAssociatedMap: '发布关联地图:',
trainingSequence: '实训排序',
creationTime: '创建时间',
finishTime: '完成时间',
createResults: '创建结果',
start: '开始',
toPerform: '重新执行',
productType: '产品类型:',
minTime: '最小用时:',
maxTime: '最大用时:',
trainingDescription: '实训描述:',
generateTraining: '生成实训',
updateTraining: '修改实训',
deleteTraining: '删除实训',
automaticGenerationOfTraining: '自动生成实训',
modifyTrainingByCategory: '按类别修改实训',
deleteAutoGeneratedTraining: '删除自动生成实训',
menu: '菜单',
turnout: '道岔',
section: '区段',
signaler: '信号机',
controlMode: '控制模式',
platform: '站台',
train: '列车',
station: '车站',
trainWindow: '车次窗',
countSkinCode: '复制皮肤与被复制皮肤类型不能一样',
trainingRecord: '实训录制',
lesson: '课程',
taskManage: '任务管理',
trainingRule: '操作定义',
trainingManage: '实训管理',
newConstruction: '新建',
applicationForRelease: '申请发布',
rejectReason: '驳回原因',
withdraw: '撤销',
notRelease: '未发布',
pendingReview: '待审核',
published: '已发布',
rejected: '已驳回',
review: '查看',
explanation: '驳回说明',
courseDetails: '课程详情',
courseTree: '课程树:',
mapName:'地图名称'
};

View File

@ -1,181 +1,178 @@
<template>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<run-plan-operate ref='applyPassed' @reloadTable="reloadTable" @create="handleConfirmPass" :title="$t('approval.passedRunPlan')" type="applyPassed">
</run-plan-operate>
<run-plan-operate ref='applyReject' @reloadTable="reloadTable" @create="handleConfirmReject" :title="$t('approval.rejectRunPlan')" type="applyReject">
</run-plan-operate>
</div>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<run-plan-operate ref="applyPassed" :title="$t('approval.passedRunPlan')" @reloadTable="reloadTable" type="applyPassed" @create="handleConfirmPass" />
<run-plan-operate ref="applyReject" :title="$t('approval.rejectRunPlan')" @reloadTable="reloadTable" type="applyReject" @create="handleConfirmReject" />
</div>
</template>
<script>
import RunPlanOperate from './operate';
import { reviewRunPlanList,publishRunPlan,rejectRunPlan,previewRunPlan } from '@/api/designPlatform';
import { listPublishMap } from '@/api/jmap/map';
// import { getSkinCodeList } from '@/api/management/mapskin';
import { launchFullscreen } from '@/utils/screen';
import { UrlConfig } from '@/router/index';
export default {
name: 'ScriptApproval',
components: {
RunPlanOperate
},
data() {
return{
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
mapList:[],
queryForm: {
labelWidth: '150px',
reset: true,
queryObject: {
mapId: {
type: 'select',
label: this.$t('approval.map'),
config: {
data: []
}
},
'name':{
type: 'text',
label: this.$t('approval.runPlanName')
},
'creatorName': {
type: 'text',
label: this.$t('approval.applicant')
}
import RunPlanOperate from './operate';
import { reviewRunPlanList, publishRunPlan, rejectRunPlan, previewRunPlan } from '@/api/designPlatform';
import { listPublishMap } from '@/api/jmap/map';
// import { getSkinCodeList } from '@/api/management/mapskin';
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('approval.runPlanName'),
width:250,
prop: 'name'
},
{
title: this.$t('approval.map'),
prop: 'mapId ',
width:250,
type: 'tag',
columnValue: (row) => {return this.$convertField(row.mapId , this.mapList, ['value', 'label']); },
tagType: (row) => { return ''; }
},
{
title: this.$t('approval.applicant'),
prop: 'creatorName'
},
{
title: this.$t('approval.applyTime'),
prop: 'uploadTime',
type: 'tag',
columnValue: (row) => { return row.uploadTime.replace("T"," ")},
tagType: (row) => { return ''; }
},
{
type: 'button',
title: this.$t('global.operate'),
width: '450',
buttons: [
{
name: this.$t('approval.applyPassed'),
handleClick: this.applyPassed,
type: ''
},
{
name: this.$t('approval.applyReject'),
handleClick: this.applyReject,
type: ''
},
{
name: this.$t('approval.runPlanPreview'),
handleClick: this.runPlanPreview,
type: ''
}
]
import { launchFullscreen } from '@/utils/screen';
import { UrlConfig } from '@/router/index';
export default {
name: 'ScriptApproval',
components: {
RunPlanOperate
},
data() {
return {
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
mapList:[],
queryForm: {
labelWidth: '150px',
reset: true,
queryObject: {
mapId: {
type: 'select',
label: this.$t('approval.map'),
config: {
data: []
}
]
},
'name':{
type: 'text',
label: this.$t('approval.runPlanName')
},
'creatorName': {
type: 'text',
label: this.$t('approval.applicant')
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('approval.runPlanName'),
width:250,
prop: 'name'
},
{
title: this.$t('approval.map'),
prop: 'mapId ',
width:250,
type: 'tag',
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
tagType: (row) => { return ''; }
},
{
title: this.$t('approval.applicant'),
prop: 'creatorName'
},
{
title: this.$t('approval.applyTime'),
prop: 'uploadTime',
type: 'tag',
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
tagType: (row) => { return ''; }
},
{
type: 'button',
title: this.$t('global.operate'),
width: '450',
buttons: [
{
name: this.$t('approval.applyPassed'),
handleClick: this.applyPassed,
type: ''
},
{
name: this.$t('approval.applyReject'),
handleClick: this.applyReject,
type: ''
},
{
name: this.$t('approval.runPlanPreview'),
handleClick: this.runPlanPreview,
type: ''
}
]
}
]
}
};
},
watch: {
},
created() {
},
mounted() {
this.loadInitData();
},
beforeDestroy() {
},
methods: {
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
}
},
created(){
goDetail() {
this.$router.push({path:``});
},
mounted(){
this.loadInitData();
async loadInitData() {
try {
//
this.mapList = [];
const res = await listPublishMap();
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name }; });
this.queryForm.queryObject.mapId.config.data = this.mapList;
} catch (error) {
console.error(error, '获取发布地图');
}
},
beforeDestroy(){
queryFunction(params) {
return reviewRunPlanList(params);
},
watch: {
applyPassed(index, row) {
this.$refs.applyPassed.doShow(row);
},
methods: {
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
applyReject(index, row) {
this.$refs.applyReject.doShow(row);
},
runPlanPreview(index, row) {
previewRunPlan(row.id).then(resp => {
const query = {
skinCode: row.skinCode, prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id, from:''
};
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
launchFullscreen();
}).catch(error => {
this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message);
});
},
handleConfirmPass(data) {
publishRunPlan(data.id, data).then(resp => {
if (resp.data.length <= 0) {
this.$message.success(this.$t('approval.passedRunPlanSuccess'));
} else {
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${resp.data[0]}`);
}
},
goDetail() {
this.$router.push({path:``});
},
async loadInitData() {
try {
//
this.mapList = [];
const res = await listPublishMap();
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name } });
this.queryForm.queryObject.mapId.config.data=this.mapList;
} catch (error) {
console.error(error, '获取发布地图');
}
},
queryFunction(params) {
return reviewRunPlanList(params);
},
applyPassed(index,row){
this.$refs.applyPassed.doShow(row);
},
applyReject(index,row){
this.$refs.applyReject.doShow(row);
},
runPlanPreview(index,row){
previewRunPlan(row.id).then(resp => {
const query = {
skinCode: row.skinCode, prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id,from:''
};
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
launchFullscreen();
}).catch(error => {
this.$messageBox(this.$t('tip.createSimulationFaild')+this.$t('global.colon')+error.message);
});
},
handleConfirmPass(data){
publishRunPlan(data.id,data).then(resp => {
if(resp.data.length<=0){
this.$message.success(this.$t('approval.passedRunPlanSuccess'));
}
else{
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${resp.data[0]}`);
}
this.reloadTable();
}).catch(error => {
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${error.message}`);
})
},
handleConfirmReject(data){
rejectRunPlan(data.id,data).then(resp => {
this.reloadTable();
this.$message.success(this.$t('approval.rejectRunPlanSuccess'));
}).catch(error => {
this.$messageBox(`${this.$t('approval.rejectRunPlanFailed')}: ${error.message}`);
})
},
this.reloadTable();
}).catch(error => {
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${error.message}`);
});
},
handleConfirmReject(data) {
rejectRunPlan(data.id, data).then(resp => {
this.reloadTable();
this.$message.success(this.$t('approval.rejectRunPlanSuccess'));
}).catch(error => {
this.$messageBox(`${this.$t('approval.rejectRunPlanFailed')}: ${error.message}`);
});
}
}
};
</script>

View File

@ -19,7 +19,7 @@ import {
deleteTrainingRulesData,
getPlaceholderList
} from '@/api/management/operation';
import { getSkinCodeList } from '@/api/management/mapskin';
import { listPublishMap } from '@/api/jmap/map';
import TrainingEdit from './addEdit';
import AddBatch from './addBatch';
import SaveAs from './saveAs.vue';
@ -37,7 +37,7 @@ export default {
placeholderMap: {},
trainingOperateTypeMap: {},
trainingTypeList: [],
skinCodeList: [],
mapIdList: [],
totals: '',
pagerConfig: {
pageSize: 'pageSize',
@ -77,12 +77,12 @@ export default {
}
},
{
title: this.$t('lesson.skinType'),
prop: 'skinCode',
title: this.$t('lesson.mapName'),
prop: 'mapId',
type: 'tag',
columnValue: row => {
return this.$convertField(row.skinCode, this.skinCodeList, [
'code',
return this.$convertField(row.id, this.mapIdList, [
'id',
'name'
]);
},
@ -210,10 +210,10 @@ export default {
});
});
//
this.skinCodeList = [];
getSkinCodeList().then(response => {
this.skinCodeList = response.data;
//
this.mapIdList = [];
listPublishMap().then(response => {
this.mapIdList = response.data;
});
//

View File

@ -17,7 +17,7 @@
<script>
import { postOperateSaveAs } from '@/api/management/operation';
import { getSkinCodeList } from '@/api/management/mapskin';
import { listPublishMap } from '@/api/jmap/map';
export default {
name: 'AddBatch',
@ -29,7 +29,7 @@ export default {
skinCodeFrom: '',
skinCodeTo: ''
},
skinCodeList: []
mapIdList: []
};
},
computed: {
@ -43,14 +43,14 @@ export default {
label: this.$t('lesson.skinTypeFrom'),
type: 'select',
required: true,
options: this.skinCodeList
options: this.mapIdList
},
{
prop: 'skinCodeTo',
label: this.$t('lesson.skinTypeTo'),
type: 'select',
required: true,
options: this.skinCodeList
options: this.mapIdList
}
]
};
@ -84,13 +84,13 @@ export default {
},
methods: {
init() {
//
this.skinCodeList = [];
getSkinCodeList().then(response => {
this.skinCodeList = response.data.map(item => {
//
this.mapIdList = [];
listPublishMap().then(response => {
this.mapIdList = response.data.map(item => {
const params = {};
params.label = item.name;
params.value = item.code;
params.value = item.id;
return params;
});
});

View File

@ -4,10 +4,10 @@
<el-form-item v-if="isAdd" :label="this.$t('lesson.trainingName')+':'" prop="name">
<el-input v-model="operateModel.name" style="width: 300px" />
</el-form-item>
<el-form-item :label="this.$t('lesson.skinType') + ':'" prop="skinCode">
<el-form-item :label="this.$t('lesson.mapName') + ':'" prop="mapId">
<el-select v-model="operateModel.skinCode" style="width: 300px" :disabled="this.disable" @change="skinCodeChoose">
<el-option
v-for="option in skinCodeList"
v-for="option in mapIdList"
:key="option.code"
:label="option.name"
:value="option.code"
@ -70,7 +70,7 @@ import { getCommodityMapProduct } from '@/api/management/mapprd';
export default {
name: 'TrainingAdd',
props: {
skinCodeList: {
mapIdList: {
type: Array,
required: true
},
@ -225,9 +225,10 @@ export default {
this.trainingTypeMap = {};
this.operateModel.operateType = [];
const skinCodeObj = this.skinCodeList.find(elem => { return elem.code === this.operateModel.skinCode; }) || {};
debugger;
const skinCodeObj = this.mapIdList.find(elem => { return elem.code === this.operateModel.skinCode; }) || {};
const prdTypeObj = this.productList.find(elem => { return elem.code === prdCode; }) || {};
const res = await getOperateTrainingList({ skinCode: skinCodeObj.code, productType: prdTypeObj.prdType });
const res = await getOperateTrainingList({ skinCode: skinCodeObj.mapId, productType: prdTypeObj.prdType });
if (res && res.code == 200) {
this.trainingTypeLists = res.data;
this.trainingTypeList.forEach(elem => {

View File

@ -3,7 +3,7 @@
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<training-draft
ref="draftTrain"
:skin-code-list="skinCodeList"
:map-id-list="mapIdList"
:training-type-list="trainingTypeList"
:training-operate-type-map="trainingOperateTypeMap"
@refresh="reloadTable"
@ -21,7 +21,7 @@ import { pageQueryTraining } from '@/api/jmap/training';
import { trainingNotify } from '@/api/simulation';
import { getCommodityMapProduct, getProductList } from '@/api/management/mapprd';
import { launchFullscreen } from '@/utils/screen';
import { getSkinCodeList } from '@/api/management/mapskin';
import { listPublishMap } from '@/api/jmap/map';
import { UrlConfig } from '@/router/index';
import TrainingDraft from './draft';
import localStore from 'storejs';
@ -33,7 +33,7 @@ export default {
},
data() {
return {
skinCodeList: [],
mapIdList: [],
trainingTypeList: [],
prdTypeList: [],
trainingOperateTypeMap: {},
@ -93,7 +93,7 @@ export default {
title: this.$t('lesson.skinType'),
prop: 'skinCode',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
columnValue: (row) => { return this.$convertField(row.mapId, this.mapIdList, ['id', 'name']); },
tagType: (row) => { return ''; }
},
{
@ -167,10 +167,10 @@ export default {
},
methods: {
async loadInitData() {
this.skinCodeList = [];
this.mapIdList = [];
this.queryForm.queryObject.prdCode.config.data = [];
getSkinCodeList().then(response => {
this.skinCodeList = response.data;
listPublishMap().then(response => {
this.mapIdList = response.data;
});
getCommodityMapProduct(this.$route.query.mapId).then((response) => {
const productList = response.data;

View File

@ -12,94 +12,97 @@
import { putRoles } from '@/api/management/user';
export default {
name: 'DictionaryEdit',
data() {
return {
dialogVisible: false,
formModel: {
id: '',
name: '',
// nickname: '',
// mobile: '',
// email: '',
roles: []
}
};
},
computed: {
form() {
const form = {
labelWidth: '60px',
items: [
{ prop: 'name', label: this.$t('system.name'), type: 'text', disabled: true },
// { prop: 'nickname', label: '', type: 'text' },
// { prop: 'mobile', label: '', type: 'number' },
// { prop: 'email', label: '', type: 'text' },
{ prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true }
]
};
return form;
},
rules() {
const crules = {
name: [
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' },
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
]
// nickname: [
// { required: true, message: this.$t('rules.pleaseInputNickName'), trigger: 'blur' },
// { min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
// ],
// mobile: [
// { required: true, message: this.$t('rules.pleaseSelectStatus'), trigger: 'blur' }
// ]
};
return crules;
}
},
methods: {
doShow(data) {
this.dialogVisible = true;
if (data) {
this.formModel = {
id: data.id,
name: data.name,
// nickname: data.nickname,
// mobile: data.mobile,
// email: data.email,
roles: data.roles
};
}
},
doSave() {
const self = this;
this.$refs.dataform.validateForm(() => {
self.update();
});
},
update() {
const self = this;
putRoles(this.formModel).then(response => {
self.$message.success(this.$t('system.updateSuccess'));
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.$message.error(`${this.$t('error.updateFailed')}: ${error.message}`);
});
},
handleClose(done) {
this.formModel = {
id: '',
name: '',
roles: []
};
this.$refs.dataform.resetForm();
if (done) {
done();
} else {
this.dialogVisible = false;
}
}
}
name: 'DictionaryEdit',
data() {
return {
dialogVisible: false,
formModel: {
id: '',
name: '',
// nickname: '',
// mobile: '',
// email: '',
roles: []
}
};
},
computed: {
form() {
const form = {
labelWidth: '100px',
items: [
{ prop: 'name', label: this.$t('system.name'), type: 'text', disabled: true },
// { prop: 'nickname', label: '', type: 'text' },
// { prop: 'mobile', label: '', type: 'number' },
// { prop: 'email', label: '', type: 'text' },
{ prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true }
]
};
return form;
},
rules() {
const crules = {
name: [
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' },
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
],
roles: [
{ required: true, message: this.$t('rules.pleaseSelectPermission'), trigger: 'change' }
]
// nickname: [
// { required: true, message: this.$t('rules.pleaseInputNickName'), trigger: 'blur' },
// { min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
// ],
// mobile: [
// { required: true, message: this.$t('rules.pleaseSelectStatus'), trigger: 'blur' }
// ]
};
return crules;
}
},
methods: {
doShow(data) {
this.dialogVisible = true;
if (data) {
this.formModel = {
id: data.id,
name: data.name,
// nickname: data.nickname,
// mobile: data.mobile,
// email: data.email,
roles: data.roles
};
}
},
doSave() {
const self = this;
this.$refs.dataform.validateForm(() => {
self.update();
});
},
update() {
const self = this;
putRoles(this.formModel).then(response => {
self.$message.success(this.$t('system.updateSuccess'));
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.$message.error(`${this.$t('error.updateFailed')}: ${error.message}`);
});
},
handleClose(done) {
this.formModel = {
id: '',
name: '',
roles: []
};
this.$refs.dataform.resetForm();
if (done) {
done();
} else {
this.dialogVisible = false;
}
}
}
};
</script>