Merge branch 'master' of https://git.qcloud.com/joylink/jl-nclient
This commit is contained in:
commit
e7d1f478be
@ -1,5 +1,5 @@
|
||||
# just a flag
|
||||
NODE_ENV = 'test'
|
||||
NODE_ENV = 'production'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'
|
||||
|
@ -5,5 +5,6 @@ export default {
|
||||
getMapStepsFailed: 'Failed to get map step data',
|
||||
resetFailed: 'Reset failure',
|
||||
startTrainingFailed: 'Failure to start training',
|
||||
saveBackgroundFailed: 'Failed to save background'
|
||||
saveBackgroundFailed: 'Failed to save background',
|
||||
deleteFailed: 'Failed to delete'
|
||||
};
|
||||
|
@ -6,5 +6,9 @@ export default {
|
||||
cancel: 'Cancel',
|
||||
reset: 'Reset',
|
||||
coachingModel: 'Coaching model',
|
||||
normalMode: 'Normal mode'
|
||||
normalMode: 'Normal mode',
|
||||
operate: 'Operate',
|
||||
edit: 'Edit',
|
||||
delete: 'Delete',
|
||||
add: 'Add'
|
||||
};
|
||||
|
@ -5,6 +5,7 @@ import router from './router';
|
||||
import lesson from './lesson';
|
||||
import error from './error';
|
||||
import rules from './rules';
|
||||
import scriptRecord from './scriptRecord';
|
||||
import tip from './tip';
|
||||
import system from './system';
|
||||
|
||||
@ -16,6 +17,7 @@ export default {
|
||||
lesson,
|
||||
error,
|
||||
rules,
|
||||
scriptRecord,
|
||||
tip,
|
||||
system
|
||||
};
|
||||
|
22
src/i18n/langs/en/scriptRecord.js
Normal file
22
src/i18n/langs/en/scriptRecord.js
Normal file
@ -0,0 +1,22 @@
|
||||
export default {
|
||||
scriptTitle: "Task Recording",
|
||||
saveMaplocation: "Update Location",
|
||||
saveBackground: "Save Background",
|
||||
saveData: "Save Data",
|
||||
roleManage: "Role Manage",
|
||||
targetCondition: "Task Target",
|
||||
taskScript: "Task Script",
|
||||
roleName: "Role Name",
|
||||
roleType: "Role Type",
|
||||
deviceCode: "Device Code",
|
||||
roleList: "Role List",
|
||||
operation:"Operation",
|
||||
roleAdd: "Add",
|
||||
delete: "Delete",
|
||||
behaviorOperate: "Behavior Operate",
|
||||
conditionTitle: "Target condition",
|
||||
deviceType: "Device Type",
|
||||
deviceCondition: "Device Condition",
|
||||
paramDeviceType: "Param DeviceType",
|
||||
paramDeviceCode: "Param DeviceCode",
|
||||
};
|
@ -5,5 +5,6 @@ export default {
|
||||
getMapStepsFailed: '获取地图步骤数据',
|
||||
resetFailed: '重置失败',
|
||||
startTrainingFailed: '开始实训失败',
|
||||
saveBackgroundFailed: '保存背景失败'
|
||||
saveBackgroundFailed: '保存背景失败',
|
||||
deleteFailed: '删除失败'
|
||||
};
|
||||
|
@ -6,5 +6,9 @@ export default {
|
||||
confirm: '确 定',
|
||||
cancel: '取 消',
|
||||
coachingModel: '教练模式',
|
||||
normalMode: '正常模式'
|
||||
normalMode: '正常模式',
|
||||
operate: '操 作',
|
||||
edit: '编 辑',
|
||||
delete: '删 除',
|
||||
add: '新 增'
|
||||
};
|
||||
|
@ -5,6 +5,7 @@ import router from './router';
|
||||
import lesson from './lesson';
|
||||
import error from './error';
|
||||
import rules from './rules';
|
||||
import scriptRecord from './scriptRecord';
|
||||
import tip from './tip';
|
||||
import system from './system';
|
||||
|
||||
@ -16,6 +17,7 @@ export default {
|
||||
lesson,
|
||||
error,
|
||||
rules,
|
||||
scriptRecord,
|
||||
tip,
|
||||
system
|
||||
};
|
||||
|
22
src/i18n/langs/zh/scriptRecord.js
Normal file
22
src/i18n/langs/zh/scriptRecord.js
Normal file
@ -0,0 +1,22 @@
|
||||
export default {
|
||||
scriptTitle: "任务录制",
|
||||
saveMaplocation: "更新定位",
|
||||
saveBackground: "保存背景",
|
||||
saveData: "保存数据",
|
||||
roleManage:"角色管理",
|
||||
targetCondition:"任务目标",
|
||||
taskScript:"任务剧本",
|
||||
roleName: "角色名称",
|
||||
roleType: "角色类型",
|
||||
deviceCode: "设备编码",
|
||||
roleList: "角色列表",
|
||||
operation: "操作",
|
||||
roleAdd: "添加",
|
||||
delete: "删除",
|
||||
behaviorOperate: "行为操作",
|
||||
conditionTitle: "目标条件",
|
||||
deviceType: "设备类型",
|
||||
deviceCondition: "设备条件",
|
||||
paramDeviceType: "参数设备类型",
|
||||
paramDeviceCode: "参数设备编号",
|
||||
};
|
@ -456,7 +456,12 @@ class SkinStyle extends defaultStyle {
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: true, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
haveTrainBorder: false// 是否需创建trainBorder对象
|
||||
haveTrainBorder: false, // 是否需创建trainBorder对象
|
||||
aspectRatio: 7/5, // 字体宽高比例(用以拼接text是计算位置)
|
||||
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
|
||||
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
|
||||
useSelfFormat: true, // 使用配置项的nameFormat
|
||||
useSelfText: true // 使用配置项的字体大小
|
||||
},
|
||||
trainStatusStyle: {
|
||||
destinationStatus: [
|
||||
|
@ -422,7 +422,12 @@ class SkinStyle extends defaultStyle {
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: true, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
haveTrainBorder: false // 是否需创建trainBorder对象
|
||||
haveTrainBorder: false, // 是否需创建trainBorder对象
|
||||
aspectRatio: 7/5, // 字体宽高比例(用以拼接text是计算位置)
|
||||
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
|
||||
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
|
||||
useSelfFormat: true, // 使用配置项的nameFormat
|
||||
useSelfText: true // 使用配置项的字体大小
|
||||
},
|
||||
trainStatusStyle: {
|
||||
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
|
||||
|
@ -419,7 +419,12 @@ class SkinStyle extends defaultStyle {
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: true, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
haveTrainBorder: false // 是否需创建trainBorder对象
|
||||
haveTrainBorder: false, // 是否需创建trainBorder对象
|
||||
aspectRatio: 7/5, // 字体宽高比例(用以拼接text是计算位置)
|
||||
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
|
||||
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
|
||||
useSelfFormat: true, // 使用配置项的nameFormat
|
||||
useSelfText: true // 使用配置项的字体大小
|
||||
},
|
||||
trainStatusStyle: {
|
||||
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
|
||||
|
@ -370,7 +370,10 @@ class SkinStyle extends defaultStyle {
|
||||
nameFontSize: 15, // 字体大小
|
||||
haveTextHSDA: false, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
haveTrainBorder: false// 是否需创建trainBorder对象
|
||||
haveTrainBorder: false, // 是否需创建trainBorder对象
|
||||
aspectRatio: 8/15, // 字体宽高比例(用以拼接text是计算位置)
|
||||
textOffset: 1, // 字体偏移(用以控制字体据车头的距离)
|
||||
trainWidthMoreText: 2 // 计算列车长度时--列车长比text多出尺寸
|
||||
},
|
||||
trainStatusStyle: {
|
||||
destinationStatus: [
|
||||
|
@ -11,6 +11,7 @@ export default class TrainBody extends Group {
|
||||
super();
|
||||
this.model = model;
|
||||
this.deviceModel = model.model;
|
||||
this.nameFormat = model.nameFormat;
|
||||
this.create();
|
||||
this.createMouse(); // 鼠标事件
|
||||
}
|
||||
@ -158,7 +159,7 @@ export default class TrainBody extends Group {
|
||||
style.Train.trainBody.specialTrainType.some((item) =>{
|
||||
if (model.type === item.type) {
|
||||
serviceNumber = item.serviceNumber;
|
||||
style.Train.trainBody.nameFormat = item.nameFormat;
|
||||
this.nameFormat = item.nameFormat;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -213,20 +214,25 @@ export default class TrainBody extends Group {
|
||||
this.trainBodyBox && this.trainBodyBox.setColor(key, color);
|
||||
}
|
||||
formatChangePosition(model, style) {
|
||||
if (style.Train.trainBody.trainNameFormat) {
|
||||
const arr = style.Train.trainBody.trainNameFormat.split(':');
|
||||
if (this.nameFormat) {
|
||||
const arr = this.nameFormat.split(':');
|
||||
let fontNumber = 0;
|
||||
arr.forEach(ele => {
|
||||
if (ele == 'targetCode') {
|
||||
this.textTrainNumber.setStyle('x', parseInt(model.point.x + style.Train.trainNumber.trainNumberOffset.x));
|
||||
this.textTrainNumber.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset) );
|
||||
fontNumber += (style.Train.trainNumber.targetCodePrefix || '').length;
|
||||
this.add(this.textTrainNumber);
|
||||
} else if (ele == 'serviceNumber') {
|
||||
this.textTrainServer.setStyle('x', parseInt(model.point.x + style.Train.trainServer.trainServerOffset.x));
|
||||
this.textTrainServer.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset));
|
||||
fontNumber += (style.Train.trainServer.serviceNumberPrefix || '').length;
|
||||
this.add(this.textTrainServer);
|
||||
} else if (ele == 'tripNumber') {
|
||||
this.textTrainTarget.setStyle('x', parseInt(model.point.x + style.Train.trainTarget.trainTargetOffset.x));
|
||||
this.textTrainTarget.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset));
|
||||
fontNumber += (style.Train.trainTarget.tripNumberPrefix || '').length;
|
||||
this.add(this.textTrainTarget);
|
||||
} else if (ele == 'groupNumber') {
|
||||
this.textTrainTargetNumber.setStyle('x', parseInt(model.point.x + style.Train.textTrainTargetNumber.trainTargetNumberOffset.x));
|
||||
this.textTrainTargetNumber.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset));
|
||||
fontNumber += (style.Train.trainTargetNumber.groupNumberPrefix || '').length;
|
||||
this.add(this.textTrainTargetNumber);
|
||||
}
|
||||
});
|
||||
|
@ -28,6 +28,6 @@ export default class TrainBodyBox extends Group {
|
||||
this.add(this.trainBodyBox);
|
||||
}
|
||||
setColor(key, color) {
|
||||
this.train.setStyle(key, color);
|
||||
this.trainBodyBox.setStyle(key, color);
|
||||
}
|
||||
}
|
||||
|
@ -16,8 +16,9 @@ export default class Train extends Group {
|
||||
this.z = 40;
|
||||
this.size = 0;
|
||||
this.section = null;
|
||||
this.fontSize = style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
|
||||
this.fontSize = style.Train.common.useSelfText?style.Train.common.nameFontSize || style.Train.common.trainTextFontSize:model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
|
||||
this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
|
||||
this.nameFormat = style.Train.common.useSelfFormat?style.Train.trainBody.trainNameFormat:model.nameFormat || style.Train.trainBody.trainNameFormat;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
@ -68,6 +69,7 @@ export default class Train extends Group {
|
||||
runControlStatus: model.runControlStatus,
|
||||
runStatus: model.runStatus,
|
||||
fontSize: this.fontSize,
|
||||
nameFormat: this.nameFormat,
|
||||
type: model.type,
|
||||
speed: model.speed,
|
||||
maLen: model.maLen,
|
||||
@ -290,24 +292,24 @@ export default class Train extends Group {
|
||||
// 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
isChangeTrainWidth(model, style) {
|
||||
if (!style.Train.trainBody.changeTrainWidth) { return; }
|
||||
if (style.Train.trainBody.trainNameFormat) {
|
||||
const arr = style.Train.trainBody.trainNameFormat.split(':');
|
||||
if (this.nameFormat) {
|
||||
const arr = this.nameFormat.split(':');
|
||||
arr.forEach(ele => {
|
||||
switch (ele) {
|
||||
case 'targetCode': {
|
||||
this.size += style.Train.trainNumber.targetCodePrefix.length || 0;
|
||||
this.size += (style.Train.trainNumber.targetCodePrefix || '').length;
|
||||
break;
|
||||
}
|
||||
case 'serviceNumber': {
|
||||
this.size += style.Train.trainServer.serviceNumberPrefix.length || 0;
|
||||
this.size += (style.Train.trainServer.serviceNumberPrefix || '').length;
|
||||
break;
|
||||
}
|
||||
case 'tripNumber': {
|
||||
this.size += style.Train.trainTarget.tripNumberPrefix.length || 0;
|
||||
this.size += (style.Train.trainTarget.tripNumberPrefix || '').length;
|
||||
break;
|
||||
}
|
||||
case 'groupNumber': {
|
||||
this.size += style.Train.trainTargetNumber.groupNumberPrefix.length || 0;
|
||||
this.size += (style.Train.trainTargetNumber.groupNumberPrefix || '').length;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -315,7 +317,7 @@ export default class Train extends Group {
|
||||
} else {
|
||||
this.size = 9;
|
||||
}
|
||||
this.style.Train.common.trainWidth = this.size * this.fontSize * (2 / 3) -16;
|
||||
this.style.Train.common.trainWidth = this.size * this.fontSize * this.style.Train.common.aspectRatio + this.style.Train.common.trainWidthMoreText;
|
||||
}
|
||||
removeTrainDetail() {
|
||||
this.trainB && this.trainB.removeTrainDetail();
|
||||
|
@ -75,40 +75,39 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.code === station.concentrateStationCode) {
|
||||
let node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
}
|
||||
|
||||
this.stationList.forEach(elem => {
|
||||
if (elem.visible) {
|
||||
let next = elem;
|
||||
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
||||
}
|
||||
|
||||
if (station.code == next.code) {
|
||||
node.children.push({
|
||||
code: elem.code,
|
||||
label: elem.name,
|
||||
handler: this.mapLocation,
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
|
||||
// this.stationList.forEach(station => {
|
||||
// if (station.code === station.concentrateStationCode) {
|
||||
// let node = {
|
||||
// label: station.name,
|
||||
// children: []
|
||||
// }
|
||||
//
|
||||
// this.stationList.forEach(elem => {
|
||||
// if (elem.visible) {
|
||||
// let next = elem;
|
||||
// while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||
// next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
||||
// }
|
||||
//
|
||||
// if (station.code == next.code) {
|
||||
// node.children.push({
|
||||
// code: elem.code,
|
||||
// label: elem.name,
|
||||
// handler: this.mapLocation,
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
//
|
||||
// this.menuNormal.push(node);
|
||||
// }
|
||||
// });
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menuScreen];
|
||||
}
|
||||
else {
|
||||
this.menu = [...this.menuNormal];
|
||||
}
|
||||
// else {
|
||||
// this.menu = [...this.menuNormal];
|
||||
// }
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
|
@ -76,21 +76,21 @@ export default {
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// this.menuNormal = [];
|
||||
this.menuNormal = [];
|
||||
// this.stationList.forEach(station => {
|
||||
// if (station.code === station.concentrateStationCode) {
|
||||
// let node = {
|
||||
// label: station.name,
|
||||
// children: []
|
||||
// }
|
||||
|
||||
//
|
||||
// this.stationList.forEach(elem => {
|
||||
// if (elem.visible) {
|
||||
// let next = elem;
|
||||
// while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||
// next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
||||
// }
|
||||
|
||||
//
|
||||
// if (station.code == next.code) {
|
||||
// node.children.push({
|
||||
// code: elem.code,
|
||||
@ -100,7 +100,7 @@ export default {
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
|
||||
//
|
||||
// this.menuNormal.push(node);
|
||||
// }
|
||||
// });
|
||||
|
@ -64,7 +64,7 @@ export default {
|
||||
}
|
||||
|
||||
/** 设置标志*/
|
||||
[need, flag] = [true, false];
|
||||
[need, flag] = [true, true];
|
||||
} else if (reg2.test(value)) {
|
||||
/** 含有特殊字符的时间格式*/
|
||||
[, begTime, endTime] = reg2.exec(value);
|
||||
|
@ -5,6 +5,95 @@ Vue.use(Router);
|
||||
|
||||
/* Layout */
|
||||
import Layout from '@/layout';
|
||||
import LoginNew from '@/views/login/loginNew';
|
||||
import Login from '@/views/login/index';
|
||||
import LoginNewScreen from '@/views/login/loginNewScreen';
|
||||
import LoginScreen from '@/views/login/loginScreen';
|
||||
import LoginNewPlan from '@/views/login/loginNewPlan';
|
||||
import LoginPlan from '@/views/login/loginPlan';
|
||||
|
||||
import Jlmap3dedit from '@/views/jlmap3d/jlmap3dedit';
|
||||
import Jlmap3d from '@/views/jlmap3d/index';
|
||||
import Display from '@/views/display/index';
|
||||
import TrainRoom from '@/views/trainRoom/index';
|
||||
import JointTraining from '@/views/jointTraining/index';
|
||||
|
||||
import Error401 from '@/views/error-page/401';
|
||||
import Errpr404 from '@/views/error-page/404';
|
||||
import Dashboard from '@/views/dashboard/index';
|
||||
import Dashboard1 from '@/views/dashboard/index.vue';
|
||||
import SkinStyle from '@/views/map/skinStyle/index';
|
||||
import SkinStyleDraft from '@/views/map/skinStyle/draft';
|
||||
import Mapdraft from '@/views/map/mapdraft/index';
|
||||
import Mapedit from '@/views/map/mapdraft/mapedit/index';
|
||||
import Runplan from '@/views/map/runplan/index';
|
||||
import RunplanView from '@/views/map/runplan/chart';
|
||||
import Trainingcategory from '@/views/lesson/trainingcategory/index';
|
||||
import Trainingrecord from '@/views/lesson/trainingrecord/index';
|
||||
import TrainingrecordManage from '@/views/lesson/trainingrecord/manage/index';
|
||||
import Taskmanage from '@/views/lesson/taskmanage/list';
|
||||
import TrainingRuleList from '@/views/lesson/trainingRule/list';
|
||||
import TrainingRuleEdit from '@/views/lesson/trainingRule/detail/index';
|
||||
import Trainingmanage from '@/views/lesson/trainingmanage/index';
|
||||
import Lessoncategory from '@/views/lesson/lessoncategory/index';
|
||||
import Scriptmanage from '@/views/lesson/scriptmanage/list';
|
||||
import Teach from '@/views/teach/index';
|
||||
import TeachHome from '@/views/teach/home';
|
||||
import TeachDetail from '@/views/teach/detail/index';
|
||||
import TeachPractical from '@/views/teach/practical/index';
|
||||
import Pay from '@/views/components/pay/index';
|
||||
import Exam from '@/views/exam/index';
|
||||
import ExamHome from '@/views/exam/home';
|
||||
import ExamDetail from '@/views/exam/detail/examDetail';
|
||||
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
|
||||
import ExamQuestionDetail from '@/views/exam/detail/questionDetail';
|
||||
import ExamResult from '@/views/exam/result';
|
||||
|
||||
import PublishExamRule from '@/views/publish/examRule/index';
|
||||
import PublishExamRuleDraft from '@/views/publish/examRule/draft/index';
|
||||
|
||||
import Demonstration from '@/views/demonstration/index';
|
||||
import DemonstrationHome from '@/views/demonstration/home';
|
||||
import DemonstrationDetail from '@/views/demonstration/detail/index';
|
||||
import ScreenMonitor from '@/views/screenMonitor/index';
|
||||
import ScreenMonitorHome from '@/views/screenMonitor/home';
|
||||
import ScreenMonitorDetail from '@/views/screenMonitor/detail/index';
|
||||
|
||||
import PlanMonitorEditTool from '@/views/planMonitor/editTool/index';
|
||||
import PlanMonitor from '@/views/planMonitor/index';
|
||||
import PlanMonitorHome from '@/views/planMonitor/home';
|
||||
import PlanMonitorDetail from '@/views/planMonitor/detail';
|
||||
|
||||
import Replay from '@/views/replay/index';
|
||||
import Package from '@/views/package/index';
|
||||
import PackageDraft from '@/views/package/draft/ruleForm';
|
||||
|
||||
import PublishMap from '@/views/publish/publishMap/index';
|
||||
import PublishMapDraft from '@/views/publish/publishMap/draft';
|
||||
import RunPlanCommon from '@/views/publish/runPlanCommon/index';
|
||||
import RunPlanCommonDraft from '@/views/publish/runPlanCommon/draft';
|
||||
import RunPlanTemplate from '@/views/publish/runPlanTemplate/index';
|
||||
import RunPlanEveryDay from '@/views/publish/runPlanEveryDay/index';
|
||||
import ProductStatus from '@/views/publish/productStatus/index';
|
||||
import PublishLesson from '@/views/publish/publishLesson/index';
|
||||
// import SimulationScript from '@/views/publish/simulationScript/index';
|
||||
|
||||
import Commodity from '@/views/orderauthor/commodity/index';
|
||||
import CommodityDraft from '@/views/orderauthor/commodity/draft';
|
||||
import OrderList from '@/views/orderauthor/order/list';
|
||||
import OrderDraft from '@/views/orderauthor/order/draft';
|
||||
import Author from '@/views/orderauthor/author/index';
|
||||
import AuthorDraft from '@/views/orderauthor/author/draft';
|
||||
import Permission from '@/views/orderauthor/permission/index';
|
||||
import PermissionDetail from '@/views/orderauthor/permission/detail';
|
||||
import PermissionDraft from '@/views/orderauthor/permission/draft/ruleForm';
|
||||
import Dictionary from '@/views/management/dictionary/index';
|
||||
import DictionaryDetail from '@/views/management/dictionaryDetail/index';
|
||||
import UserControl from '@/views/management/userControl/index';
|
||||
import UserTraining from '@/views/management/userTraining/index';
|
||||
import UserExam from '@/views/management/userExam/index';
|
||||
import UserSimulation from '@/views/management/userSimulation/index';
|
||||
import ExistingSimulation from '@/views/management/existingSimulation/index';
|
||||
|
||||
/**
|
||||
* Note: sub-menu only appear when route children.length >= 1
|
||||
@ -125,53 +214,53 @@ export const UrlConfig = {
|
||||
export const constantRoutes = [
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/login/loginNew'),
|
||||
component: LoginNew,
|
||||
hidden: true
|
||||
},
|
||||
|
||||
{
|
||||
path: '/login1',
|
||||
component: () => import('@/views/login/index'),
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
// 扫码登录
|
||||
{
|
||||
path: '/dp/login',
|
||||
component: resolve => require(['@/views/login/loginNewScreen'], resolve),
|
||||
component: LoginNewScreen,
|
||||
hidden: true
|
||||
},
|
||||
// 密码登录
|
||||
{
|
||||
path: '/dp/login1',
|
||||
component: resolve => require(['@/views/login/loginScreen'], resolve),
|
||||
component: LoginScreen,
|
||||
hidden: true
|
||||
},
|
||||
// 扫码登录
|
||||
{
|
||||
path: '/plan/login',
|
||||
component: resolve => require(['@/views/login/loginNewPlan'], resolve),
|
||||
component: LoginNewPlan,
|
||||
hidden: true
|
||||
},
|
||||
// 密码登录
|
||||
{
|
||||
path: '/plan/login1',
|
||||
component: resolve => require(['@/views/login/loginPlan'], resolve),
|
||||
component: LoginPlan,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d/edit',
|
||||
component: resolve => require(['@/views/jlmap3d/jlmap3dedit'], resolve),
|
||||
component: Jlmap3dedit,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/401',
|
||||
component: () => import('@/views/error-page/401'),
|
||||
component: Error401,
|
||||
hidden: true
|
||||
},
|
||||
|
||||
{
|
||||
path: '/404',
|
||||
component: () => import('@/views/error-page/404'),
|
||||
component: Errpr404,
|
||||
hidden: true
|
||||
},
|
||||
|
||||
@ -181,7 +270,7 @@ export const constantRoutes = [
|
||||
redirect: '/dashboard',
|
||||
children: [{
|
||||
path: 'dashboard',
|
||||
component: () => import('@/views/dashboard/index'),
|
||||
component: Dashboard,
|
||||
meta: {
|
||||
i18n: 'router.homePage',
|
||||
icon: 'dashboard'
|
||||
@ -201,32 +290,32 @@ export const asyncRouter = [
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: resolve => require(['@/views/dashboard/index.vue'], resolve)
|
||||
component: Dashboard1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/display/:mode',
|
||||
component: resolve => require(['@/views/display/index'], resolve),
|
||||
component: Display,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/trainroom',
|
||||
component: resolve => require(['@/views/trainRoom/index'], resolve),
|
||||
component: TrainRoom,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jointTraining',
|
||||
component: resolve => require(['@/views/jointTraining/index'], resolve),
|
||||
component: JointTraining,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d',
|
||||
component: resolve => require(['@/views/jlmap3d/index'], resolve),
|
||||
component: Jlmap3d,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
@ -241,7 +330,7 @@ export const asyncRouter = [
|
||||
children: [
|
||||
{
|
||||
path: 'skinStyle',
|
||||
component: resolve => require(['@/views/map/skinStyle/index'], resolve),
|
||||
component: SkinStyle,
|
||||
meta: {
|
||||
i18n: 'router.skinManage'
|
||||
}
|
||||
@ -249,19 +338,19 @@ export const asyncRouter = [
|
||||
{
|
||||
path: 'skinStyle/draft/:mode/:skinStyleId',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/map/skinStyle/draft'], resolve)
|
||||
component: SkinStyleDraft
|
||||
},
|
||||
{
|
||||
path: 'draw',
|
||||
redirect: '/map/draw/0/draft',
|
||||
component: resolve => require(['@/views/map/mapdraft/index'], resolve),
|
||||
component: Mapdraft,
|
||||
meta: {
|
||||
i18n: 'router.mapDraw'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: ':mapId/:view',
|
||||
component: resolve => require(['@/views/map/mapdraft/mapedit/index'], resolve),
|
||||
component: Mapedit,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
@ -269,19 +358,19 @@ export const asyncRouter = [
|
||||
{
|
||||
path: 'runPlan',
|
||||
redirect: '/map/runPlan/view/draft',
|
||||
component: resolve => require(['@/views/map/runplan/index'], resolve),
|
||||
component: Runplan,
|
||||
meta: {
|
||||
i18n: 'router.runPlanManage'
|
||||
},
|
||||
children: [{
|
||||
path: 'view/:mode',
|
||||
component: resolve => require(['@/views/map/runplan/chart'], resolve),
|
||||
component: RunplanView,
|
||||
hidden: true
|
||||
}]
|
||||
},
|
||||
{
|
||||
path: 'product',
|
||||
component: resolve => require(['@/views/lesson/trainingcategory/index'], resolve),
|
||||
component: Trainingcategory,
|
||||
meta: {
|
||||
i18n: 'router.productEdit'
|
||||
}
|
||||
@ -299,28 +388,28 @@ export const asyncRouter = [
|
||||
{
|
||||
path: 'record',
|
||||
redirect: '/lesson/record/training/0/null',
|
||||
component: resolve => require(['@/views/lesson/trainingrecord/index'], resolve),
|
||||
component: Trainingrecord,
|
||||
meta: {
|
||||
i18n: 'router.trainingRecord'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'training/:trainingId/:trainingName',
|
||||
component: resolve => require(['@/views/lesson/trainingrecord/manage/index'], resolve),
|
||||
component: TrainingrecordManage,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'manage/taskManage',
|
||||
component: resolve => require(['@/views/lesson/taskmanage/list'], resolve),
|
||||
component: Taskmanage,
|
||||
meta: {
|
||||
i18n: 'router.taskManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'manage/trainingRule',
|
||||
component: resolve => require(['@/views/lesson/trainingRule/list'], resolve),
|
||||
component: TrainingRuleList,
|
||||
meta: {
|
||||
i18n: 'router.trainingRule'
|
||||
}
|
||||
@ -328,20 +417,20 @@ export const asyncRouter = [
|
||||
{
|
||||
path: 'manage/trainingRule/detail',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/lesson/trainingRule/detail/index'], resolve),
|
||||
component: TrainingRuleEdit,
|
||||
meta: {
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'manage/training',
|
||||
component: resolve => require(['@/views/lesson/trainingmanage/index'], resolve),
|
||||
component: Trainingmanage,
|
||||
meta: {
|
||||
i18n: 'router.trainingManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'edit',
|
||||
component: resolve => require(['@/views/lesson/lessoncategory/index'], resolve),
|
||||
component: Lessoncategory,
|
||||
meta: {
|
||||
i18n: 'router.lessonEdit'
|
||||
}
|
||||
@ -352,12 +441,12 @@ export const asyncRouter = [
|
||||
path: '/script',
|
||||
component: Layout,
|
||||
meta: {
|
||||
roles: [admin, lessonCreater]
|
||||
roles: [admin, lessonCreater, user]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'scriptManage',
|
||||
component: resolve => require(['@/views/lesson/scriptmanage/list'], resolve),
|
||||
component: Scriptmanage,
|
||||
meta: {
|
||||
i18n: 'router.scriptManage'
|
||||
}
|
||||
@ -367,14 +456,14 @@ export const asyncRouter = [
|
||||
{
|
||||
path: '/teach',
|
||||
redirect: '/teach/home',
|
||||
component: resolve => require(['@/views/teach/index'], resolve),
|
||||
component: Teach,
|
||||
meta: {
|
||||
roles: [admin, userLesson, user]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: resolve => require(['@/views/teach/home'], resolve),
|
||||
component: TeachHome,
|
||||
meta: {
|
||||
i18n: 'router.teachSystem'
|
||||
}
|
||||
@ -382,7 +471,7 @@ export const asyncRouter = [
|
||||
{
|
||||
// 课程详情
|
||||
path: 'detail/:lessonId',
|
||||
component: resolve => require(['@/views/teach/detail/index'], resolve),
|
||||
component: TeachDetail,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
@ -390,14 +479,14 @@ export const asyncRouter = [
|
||||
{
|
||||
// 实训详情
|
||||
path: 'practical/:trainingId/:lessonId',
|
||||
component: resolve => require(['@/views/teach/practical/index'], resolve),
|
||||
component: TeachPractical,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: resolve => require(['@/views/components/pay/index'], resolve),
|
||||
component: Pay,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
@ -407,14 +496,14 @@ export const asyncRouter = [
|
||||
{
|
||||
path: '/exam',
|
||||
redirect: '/exam/home',
|
||||
component: resolve => require(['@/views/exam/index'], resolve),
|
||||
component: Exam,
|
||||
meta: {
|
||||
roles: [admin, userExam, user]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: resolve => require(['@/views/exam/home'], resolve),
|
||||
component: ExamHome,
|
||||
meta: {
|
||||
i18n: 'router.examSystem'
|
||||
}
|
||||
@ -422,40 +511,40 @@ export const asyncRouter = [
|
||||
{
|
||||
// 试卷详情
|
||||
path: 'detail/:examId',
|
||||
component: resolve => require(['@/views/exam/detail/examDetail'], resolve),
|
||||
component: ExamDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'course/:lessonId',
|
||||
component: resolve => require(['@/views/exam/detail/courseDetail'], resolve),
|
||||
component: ExamCourseDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
// 规则管理
|
||||
path: 'examRule/manage',
|
||||
component: resolve => require(['@/views/publish/examRule/index'], resolve),
|
||||
component: PublishExamRule,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/publish/examRule/draft/index'], resolve)
|
||||
component: PublishExamRuleDraft
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: resolve => require(['@/views/components/pay/index'], resolve),
|
||||
component: Pay,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
// 开始考试
|
||||
path: 'questionDetail/:examQuestionId',
|
||||
component: resolve => require(['@/views/exam/detail/questionDetail'], resolve),
|
||||
component: ExamQuestionDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
// 考试结果
|
||||
path: 'result/:userExamId',
|
||||
component: resolve => require(['@/views/exam/result'], resolve),
|
||||
component: ExamResult,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
@ -463,26 +552,26 @@ export const asyncRouter = [
|
||||
{
|
||||
path: '/demonstration',
|
||||
redirect: '/demonstration/home',
|
||||
component: resolve => require(['@/views/demonstration/index'], resolve),
|
||||
component: Demonstration,
|
||||
meta: {
|
||||
roles: [admin, userSimulation, user]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: resolve => require(['@/views/demonstration/home'], resolve),
|
||||
component: DemonstrationHome,
|
||||
meta: {
|
||||
i18n: 'router.demonstrationSystem'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'detail/:mapId',
|
||||
component: resolve => require(['@/views/demonstration/detail/index'], resolve),
|
||||
component: DemonstrationDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: resolve => require(['@/views/components/pay/index'], resolve),
|
||||
component: Pay,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
@ -490,14 +579,14 @@ export const asyncRouter = [
|
||||
{
|
||||
path: '/dp',
|
||||
redirect: '/dp/home',
|
||||
component: resolve => require(['@/views/screenMonitor/index'], resolve),
|
||||
component: ScreenMonitor,
|
||||
meta: {
|
||||
roles: [admin, userScreen, user]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: resolve => require(['@/views/screenMonitor/home'], resolve),
|
||||
component: ScreenMonitorHome,
|
||||
meta: {
|
||||
i18n: 'router.dpSystem'
|
||||
},
|
||||
@ -505,19 +594,19 @@ export const asyncRouter = [
|
||||
},
|
||||
{
|
||||
path: 'detail/:lessonId',
|
||||
component: resolve => require(['@/views/screenMonitor/detail/index'], resolve),
|
||||
component: ScreenMonitorDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: resolve => require(['@/views/components/pay/index'], resolve),
|
||||
component: Pay,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/plan/tool',
|
||||
component: resolve => require(['@/views/planMonitor/editTool/index'], resolve),
|
||||
component: PlanMonitorEditTool,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
@ -525,14 +614,14 @@ export const asyncRouter = [
|
||||
{
|
||||
path: '/plan',
|
||||
redirect: '/plan/home',
|
||||
component: resolve => require(['@/views/planMonitor/index'], resolve),
|
||||
component: PlanMonitor,
|
||||
meta: {
|
||||
roles: [admin, user]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: resolve => require(['@/views/planMonitor/home'], resolve),
|
||||
component: PlanMonitorHome,
|
||||
meta: {
|
||||
i18n: 'router.planSystem'
|
||||
},
|
||||
@ -540,12 +629,12 @@ export const asyncRouter = [
|
||||
},
|
||||
{
|
||||
path: 'detail/:lessonId',
|
||||
component: resolve => require(['@/views/planMonitor/detail'], resolve),
|
||||
component: PlanMonitorDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: resolve => require(['@/views/components/pay/index'], resolve),
|
||||
component: Pay,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
@ -559,7 +648,7 @@ export const asyncRouter = [
|
||||
children: [
|
||||
{
|
||||
path: 'manage',
|
||||
component: resolve => require(['@/views/replay/index'], resolve),
|
||||
component: Replay,
|
||||
meta: {
|
||||
i18n: 'router.replayManage'
|
||||
}
|
||||
@ -575,14 +664,14 @@ export const asyncRouter = [
|
||||
children: [
|
||||
{
|
||||
path: 'manage',
|
||||
component: resolve => require(['@/views/package/index'], resolve),
|
||||
component: Package,
|
||||
meta: {
|
||||
i18n: 'router.permissionManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'draft',
|
||||
component: resolve => require(['@/views/package/draft/ruleForm'], resolve),
|
||||
component: PackageDraft,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
@ -597,78 +686,78 @@ export const asyncRouter = [
|
||||
children: [
|
||||
{
|
||||
path: 'map',
|
||||
component: resolve => require(['@/views/publish/publishMap/index'], resolve),
|
||||
component: PublishMap,
|
||||
meta: {
|
||||
i18n: 'router.publishMapManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'product',
|
||||
component: resolve => require(['@/views/publish/productStatus/index'], resolve),
|
||||
component: ProductStatus,
|
||||
meta: {
|
||||
i18n: 'router.productStateManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'lesson',
|
||||
component: resolve => require(['@/views/publish/publishLesson/index'], resolve),
|
||||
component: PublishLesson,
|
||||
meta: {
|
||||
i18n: 'router.publishLessonManage'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: 'script',
|
||||
// component: resolve => require(['@/views/publish/simulationScript/index'], resolve),
|
||||
// component: SimulationScript,
|
||||
// meta: {
|
||||
// title: '仿真脚本管理',
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: 'runPlan/template',
|
||||
component: resolve => require(['@/views/publish/runPlanTemplate/index'], resolve),
|
||||
component: RunPlanTemplate,
|
||||
meta: {
|
||||
i18n: 'router.runPlanTemplateManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'runPlan/common',
|
||||
component: resolve => require(['@/views/publish/runPlanCommon/index'], resolve),
|
||||
component: RunPlanCommon,
|
||||
meta: {
|
||||
i18n: 'router.runPlanCommonManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'runPlan/everyDay',
|
||||
component: resolve => require(['@/views/publish/runPlanEveryDay/index'], resolve),
|
||||
component: RunPlanEveryDay,
|
||||
meta: {
|
||||
i18n: 'router.runPlanEveryDayManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'examRule/manage',
|
||||
component: resolve => require(['@/views/publish/examRule/index'], resolve),
|
||||
component: PublishExamRule,
|
||||
meta: {
|
||||
i18n: 'router.examRuleManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'map/draft/:mode/:mapId',
|
||||
component: resolve => require(['@/views/publish/publishMap/draft'], resolve),
|
||||
component: PublishMapDraft,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
||||
component: resolve => require(['@/views/publish/examRule/draft/index'], resolve),
|
||||
component: PublishExamRuleDraft,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'runPlan/common/:mode',
|
||||
component: resolve => require(['@/views/publish/runPlanCommon/draft'], resolve),
|
||||
component: RunPlanCommonDraft,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'runPlan/view/:mode',
|
||||
component: resolve => require(['@/views/map/runplan/chart'], resolve),
|
||||
component: RunplanView,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
@ -683,28 +772,28 @@ export const asyncRouter = [
|
||||
children: [
|
||||
{
|
||||
path: 'commodity/manage',
|
||||
component: resolve => require(['@/views/orderauthor/commodity/index'], resolve),
|
||||
component: Commodity,
|
||||
meta: {
|
||||
i18n: 'router.commodityManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'order/manage',
|
||||
component: resolve => require(['@/views/orderauthor/order/list'], resolve),
|
||||
component: OrderList,
|
||||
meta: {
|
||||
i18n: 'router.orderManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'author/manage',
|
||||
component: resolve => require(['@/views/orderauthor/author/index'], resolve),
|
||||
component: Author,
|
||||
meta: {
|
||||
i18n: 'router.authorityManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'transfer/manage',
|
||||
component: resolve => require(['@/views/orderauthor/permission/index'], resolve),
|
||||
component: Permission,
|
||||
meta: {
|
||||
i18n: 'router.authorityTransferManage'
|
||||
}
|
||||
@ -712,7 +801,7 @@ export const asyncRouter = [
|
||||
{
|
||||
path: 'commodity/draft/:mode/:commodityId',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/orderauthor/commodity/draft'], resolve),
|
||||
component: CommodityDraft,
|
||||
meta: {
|
||||
i18n: 'router.addCommodity'
|
||||
}
|
||||
@ -720,7 +809,7 @@ export const asyncRouter = [
|
||||
{
|
||||
path: 'order/draft/:mode/:orderId',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/orderauthor/order/draft'], resolve),
|
||||
component: OrderDraft,
|
||||
meta: {
|
||||
i18n: 'router.addOrder'
|
||||
}
|
||||
@ -728,19 +817,19 @@ export const asyncRouter = [
|
||||
{
|
||||
path: 'author/draft/:mode/:userId',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/orderauthor/author/draft'], resolve),
|
||||
component: AuthorDraft,
|
||||
meta: {
|
||||
i18n: 'router.addCoursePermissions'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'transfer/detail/:permissionId',
|
||||
component: resolve => require(['@/views/orderauthor/permission/detail'], resolve),
|
||||
component: PermissionDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'transfer/package',
|
||||
component: resolve => require(['@/views/orderauthor/permission/draft/ruleForm'], resolve),
|
||||
component: PermissionDraft,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
@ -755,7 +844,7 @@ export const asyncRouter = [
|
||||
children: [
|
||||
{
|
||||
path: 'dictionary',
|
||||
component: resolve => require(['@/views/management/dictionary/index'], resolve),
|
||||
component: Dictionary,
|
||||
meta: {
|
||||
i18n: 'router.dataDictionary'
|
||||
}
|
||||
@ -763,42 +852,42 @@ export const asyncRouter = [
|
||||
{
|
||||
path: 'dictionary/detail',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/management/dictionaryDetail/index'], resolve),
|
||||
component: DictionaryDetail,
|
||||
meta: {
|
||||
i18n: 'router.dataDictionaryDetails'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userManage',
|
||||
component: resolve => require(['@/views/management/userControl/index'], resolve),
|
||||
component: UserControl,
|
||||
meta: {
|
||||
i18n: 'router.userManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userTrainingManage',
|
||||
component: resolve => require(['@/views/management/userTraining/index'], resolve),
|
||||
component: UserTraining,
|
||||
meta: {
|
||||
i18n: 'router.userTrainingManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userExamManage',
|
||||
component: resolve => require(['@/views/management/userExam/index'], resolve),
|
||||
component: UserExam,
|
||||
meta: {
|
||||
i18n: 'router.userExamManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userSimulationManage',
|
||||
component: resolve => require(['@/views/management/userSimulation/index'], resolve),
|
||||
component: UserSimulation,
|
||||
meta: {
|
||||
i18n: 'router.userSimulationManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'existingSimulation',
|
||||
component: resolve => require(['@/views/management/existingSimulation/index'], resolve),
|
||||
component: ExistingSimulation,
|
||||
meta: {
|
||||
i18n: 'router.existingSimulation'
|
||||
}
|
||||
|
@ -11,7 +11,8 @@ const runPlan = {
|
||||
planUpdateCount: 0, // 运行图更新标识
|
||||
selected: {}, // 选择的对象
|
||||
width: 800, // 运行图canvas 容器 宽度
|
||||
height: 600 // 运行图canvas 容器 高度
|
||||
height: 600, // 运行图canvas 容器 高度
|
||||
refreshCount: 0 // 刷新页面重新加载
|
||||
},
|
||||
getters: {
|
||||
stations: (state) => {
|
||||
@ -95,6 +96,9 @@ const runPlan = {
|
||||
state.planData = {};
|
||||
state.editData = {};
|
||||
state.selected = {};
|
||||
},
|
||||
refresh: (state) => {
|
||||
state.refreshCount++;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@ -130,6 +134,10 @@ const runPlan = {
|
||||
/** 清空数据*/
|
||||
clear: ({ commit }) => {
|
||||
commit('clear');
|
||||
},
|
||||
/** 刷新页面*/
|
||||
refresh: ({commit}) => {
|
||||
commit('refresh');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,12 +1,11 @@
|
||||
import { handleToken } from '@/utils/auth';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { getBaseUrl } from '@/utils/baseUrl'
|
||||
import { getBaseUrl } from '@/utils/baseUrl';
|
||||
|
||||
var SockJS = require('sockjs-client');
|
||||
var Stomp = require('stompjs');
|
||||
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isTest = process.env.NODE_ENV === 'test';
|
||||
const websocketUrl = `${getBaseUrl()}/joylink-websocket?token=`;
|
||||
|
||||
var StompClient = function (headers) {
|
||||
@ -29,7 +28,7 @@ StompClient.prototype = {
|
||||
sockStatus: 0,
|
||||
|
||||
headers: {
|
||||
'X-Token': handleToken(),
|
||||
'X-Token': handleToken()
|
||||
},
|
||||
|
||||
count: 0,
|
||||
@ -59,7 +58,7 @@ StompClient.prototype = {
|
||||
this.closeStompDebug();
|
||||
|
||||
// 向服务器发起websocket连接并发送CONNECT帧
|
||||
this.clientIns.connect({ 'X-Token': handleToken(), }, () => {
|
||||
this.clientIns.connect({ 'X-Token': handleToken() }, () => {
|
||||
console.info('连接成功.');
|
||||
this.count = 0;
|
||||
this.status = true;
|
||||
@ -129,7 +128,7 @@ StompClient.prototype = {
|
||||
closeStompDebug() {
|
||||
if (this.clientIns) {
|
||||
this.clientIns.debug = undefined;
|
||||
if (isDev || isTest) {
|
||||
if (isDev) {
|
||||
this.clientIns.debug = function (message) {
|
||||
console.debug(message);
|
||||
};
|
||||
@ -168,11 +167,11 @@ StompClient.prototype = {
|
||||
|
||||
unsubscribe(topic) {
|
||||
if (this.subscribeMap) {
|
||||
let subscription = this.subscribeMap.get(topic);
|
||||
const subscription = this.subscribeMap.get(topic);
|
||||
if (subscription) {
|
||||
subscription.unsubscribe();
|
||||
this.subscribeMap.delete(topic);
|
||||
console.log("取消订阅");
|
||||
console.log('取消订阅');
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -204,7 +203,7 @@ StompClient.prototype = {
|
||||
this.clientIns = null;
|
||||
}
|
||||
this.status = false;
|
||||
console.log("断开连接");
|
||||
console.log('断开连接');
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -265,7 +265,7 @@
|
||||
font-size: 15px;
|
||||
}
|
||||
.actionInfo{
|
||||
margin-top: 30px;
|
||||
margin-top:20px;
|
||||
margin-left: 5px;
|
||||
font-size: 15px;
|
||||
width:98%;
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form label-width="80px">
|
||||
<el-form label-width="140px">
|
||||
<el-form-item :label="title">
|
||||
<el-button type="primary" size="small" @click="addDeviceCondition" :disabled="isdisabled">添加</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="ConditionVOList" border style="margin-top:10px;margin-left:10px;width:901px">
|
||||
<el-table-column label="设备类型" width="150">
|
||||
<el-table-column :label="$t('scriptRecord.deviceType')" width="150">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.isAdded">{{scope.row.deviceType}}</div>
|
||||
<el-select v-else v-model="scope.row.deviceType" placeholder="请选择" @change="changeDeviceType($event,scope.row)">
|
||||
@ -15,7 +15,7 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备编号" width="150">
|
||||
<el-table-column :label="$t('scriptRecord.deviceCode')" width="150">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.isAdded">{{scope.row.code}}</div>
|
||||
<el-select v-else v-model="scope.row.code" placeholder="请选择">
|
||||
@ -23,7 +23,7 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备条件" width="150">
|
||||
<el-table-column :label="$t('scriptRecord.deviceCondition')" width="150">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.isAdded">{{scope.row.condition}}</div>
|
||||
<el-select v-else v-model="scope.row.condition" placeholder="请选择">
|
||||
@ -31,7 +31,7 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参数设备类型" width="150">
|
||||
<el-table-column :label="$t('scriptRecord.paramDeviceType')" width="150">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.isAdded">{{scope.row.paramDeviceType}}</div>
|
||||
<el-select v-else v-model="scope.row.paramDeviceType" placeholder="请选择" @change="changeParamDeviceType">
|
||||
@ -39,7 +39,7 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参数设备编号" width="150">
|
||||
<el-table-column :label="$t('scriptRecord.paramDeviceCode')" width="150">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.isAdded">{{scope.row.paramCode}}</div>
|
||||
<el-select v-else v-model="scope.row.paramCode" placeholder="请选择">
|
||||
@ -47,7 +47,7 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150">
|
||||
<el-table-column :label="$t('scriptRecord.operation')" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-row v-if="scope.row.isAdded">
|
||||
<el-button type="primary" size="mini" @click="deleteOperate(scope.$index)">删除</el-button>
|
||||
|
@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="tab-pane-big">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar">
|
||||
<div>
|
||||
<div class="actionList">
|
||||
<i class="el-icon-back" @click="backToMember"></i>
|
||||
<span class="titleStyle">{{memberName}}角色<span class="titleStyle">/</span><span class="titleStyle">{{behaviorName}}行为</span><span class="titleStyle">/</span><span class="titleStyle">动作信息</span></span>
|
||||
</div>
|
||||
<div class="tab-pane-big">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar">
|
||||
<add-action ref="addBehavior" :group="group" :memberId="memberId" :behaviorId="behaviorId" @create="create" :buttonName="buttonName" :operateType="operateType" @modifyButtonName="modifyButtonName"></add-action>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
@ -26,6 +27,7 @@
|
||||
</el-table>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
@ -120,11 +122,15 @@
|
||||
width:802px;
|
||||
}
|
||||
.actionList{
|
||||
margin-top: 20px;
|
||||
margin-top: 10px;
|
||||
margin-left: 5px;
|
||||
font-size: 15px;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
.titleStyle{
|
||||
margin-left:10px;
|
||||
}
|
||||
.tab-pane-big{
|
||||
height:380px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="tab-pane-big">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elScrollbar">
|
||||
<div>
|
||||
<div class="behaviorList">
|
||||
<i class="el-icon-back" @click="backToMember" style="cursor:pointer;"></i>
|
||||
<span class="titleStyle">{{memberName}}角色<span class="titleStyle">/</span><span class="titleStyle">行为信息</span></span>
|
||||
</div>
|
||||
<div class="tab-pane-big">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elScrollbar">
|
||||
<add-behavior ref="addBehavior" :title="title" :group="group" :memberId="memberId" @create="handleCreate" :operateType="operateType" :buttonName="buttonName" @modifyButtonName="modifyButtonName"></add-behavior>
|
||||
<div class="behaviorList">行为列表</div>
|
||||
<el-table
|
||||
@ -42,6 +43,7 @@
|
||||
</el-table>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
@ -131,7 +133,7 @@
|
||||
width:901px;
|
||||
}
|
||||
.behaviorList{
|
||||
margin-top: 20px;
|
||||
margin-top: 10px;
|
||||
margin-left: 5px;
|
||||
font-size: 15px;
|
||||
margin-bottom:20px;
|
||||
@ -140,6 +142,6 @@
|
||||
margin-left:10px;
|
||||
}
|
||||
.tab-pane-big{
|
||||
height:420px;
|
||||
height:370px;
|
||||
}
|
||||
</style>
|
@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="角色管理" name="first">
|
||||
<el-tab-pane :label="$t('scriptRecord.roleManage')" name="first">
|
||||
<div class="tab-pane">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
||||
<role-section ref="roleSection" :group="group" @getBehaviorList="getBehaviorList"></role-section>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="任务目标" name="second">
|
||||
<el-tab-pane :label="$t('scriptRecord.targetCondition')" name="second">
|
||||
<div class="tab-pane">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
||||
<target-condition ref="targetCondition" :group="group"></target-condition>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="任务剧本" name="third">
|
||||
<el-tab-pane :label="$t('scriptRecord.taskScript')" name="third">
|
||||
<div class="tab-pane">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
||||
<task-script ref="taskScript" :group="group"></task-script>
|
||||
@ -60,7 +60,6 @@
|
||||
this.$store.dispatch('scriptRecord/updateDeviceCondition', deviceConditionList);
|
||||
this.$store.dispatch('scriptRecord/updateMemberList', response.data.memberVOList);
|
||||
this.$store.dispatch('scriptRecord/updateScript', response.data.script);
|
||||
debugger;
|
||||
if(response.data.mapLocation)
|
||||
{
|
||||
let mapLocation={"offsetX":response.data.mapLocation.x,"offsetY":response.data.mapLocation.y,"scaleRate":response.data.mapLocation.scale};
|
||||
|
@ -1,35 +1,34 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="memberVO" ref="memberVO" :rules="rules" label-width="80px" class="roleAction" label-position="left">
|
||||
<el-form-item label="角色名称" class="conditionVO" prop="name">
|
||||
<el-form :model="memberVO" ref="memberVO" :rules="rules" label-width="100px" class="roleAction" label-position="right">
|
||||
<el-form-item :label="$t('scriptRecord.roleName')" class="conditionVO" prop="name">
|
||||
<el-input v-model="memberVO.name" class="inputStyle"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色类型" class="conditionVO" prop="role">
|
||||
<el-form-item :label="$t('scriptRecord.roleType')" class="conditionVO" prop="role">
|
||||
<el-select v-model="memberVO.role" placeholder="请选择角色类型" @change="changeRoleType">
|
||||
<el-option v-for="rolerType in roleTypeList" :key="rolerType.label" :label="rolerType.label" :value="rolerType.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编码" class="conditionVO">
|
||||
<el-form-item :label="$t('scriptRecord.deviceCode')" class="conditionVO">
|
||||
<el-select v-model="memberVO.deviceCode" clearable placeholder="请选择设备编码">
|
||||
<!-- groupNumber -->
|
||||
<el-option v-for="deviceCode in deviceCodeList" :key="deviceCode.code" :label="deviceCode.name" :value="deviceCode.code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="addQuestMember('memberVO')">添加</el-button>
|
||||
<el-button type="primary" @click="addQuestMember('memberVO')">{{$t('scriptRecord.roleAdd')}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="roleList">角色列表</div>
|
||||
<div class="roleList">{{$t('scriptRecord.roleList')}}</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="memberList" border class="memberList">
|
||||
<el-table-column prop="name" label="角色名称" width="350">
|
||||
<el-table-column prop="name" :label="$t('scriptRecord.roleName')" width="350">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="350">
|
||||
<el-table-column :label="$t('scriptRecord.operation')" width="350">
|
||||
<template slot-scope="scope">
|
||||
<el-row>
|
||||
<el-button type="primary" size="mini" @click="getMembers(scope.row)">行为操作</el-button>
|
||||
<el-button type="primary" size="mini" @click="deleteMember(scope.$index,scope.row)">删除</el-button>
|
||||
<el-button type="primary" size="mini" @click="getMembers(scope.row)">{{$t('scriptRecord.behaviorOperate')}}</el-button>
|
||||
<el-button type="primary" size="mini" @click="deleteMember(scope.$index,scope.row)">{{$t('scriptRecord.delete')}}</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -88,7 +87,6 @@
|
||||
let group=this.group;
|
||||
postQuestMember(group,data).then(resp => {
|
||||
this.reloadTable();
|
||||
// this.dialogFormVisible=false;
|
||||
this.memberVO.role="Admin";
|
||||
this.memberVO.deviceCode="";
|
||||
this.memberVO.name="";
|
||||
@ -119,6 +117,7 @@
|
||||
let group=this.group;
|
||||
getQuestRecord(group).then(response=>{
|
||||
this.memberList=response.data.memberVOList;
|
||||
this.$store.dispatch('scriptRecord/updateScript', response.data.script);
|
||||
this.$store.dispatch('scriptRecord/updateMemberList', response.data.memberVOList);
|
||||
});
|
||||
},
|
||||
|
@ -40,7 +40,7 @@
|
||||
data(){
|
||||
return{
|
||||
deviceConditionList:[],
|
||||
conditionTitle:"目标条件",
|
||||
conditionTitle:this.$t("scriptRecord.conditionTitle"),
|
||||
isAdding:false,
|
||||
// fieldS:"",
|
||||
}
|
||||
|
@ -66,6 +66,8 @@
|
||||
},
|
||||
watch: {
|
||||
'$store.state.scriptRecord.memberList': function (val, old){
|
||||
this.taskScript.memberId="";
|
||||
this.taskScript.behavior="";
|
||||
this.taskScriptList=val;
|
||||
},
|
||||
'$store.state.scriptRecord.script': function (val, old){
|
||||
|
@ -20,9 +20,9 @@
|
||||
<get-action ref="getAction" :group="group" :memberId="memberId" :behaviorId="behaviorId" @backToBehavior="backToBehavior"></get-action>
|
||||
</template>
|
||||
<el-button-group class="button-group">
|
||||
<el-button type="primary" @click="saveMaplocation">更新定位</el-button>
|
||||
<el-button type="primary" @click="saveScenesStage">保存背景</el-button>
|
||||
<el-button type="success" @click="saveScenesData">保存数据</el-button>
|
||||
<el-button type="primary" @click="saveMaplocation">{{$t('scriptRecord.saveMaplocation')}}</el-button>
|
||||
<el-button type="primary" @click="saveScenesStage">{{$t('scriptRecord.saveBackground')}}</el-button>
|
||||
<el-button type="success" @click="saveScenesData">{{$t('scriptRecord.saveData')}}</el-button>
|
||||
<!-- <el-button type="danger" @click="dumpScenesData">重置剧本</el-button> -->
|
||||
</el-button-group>
|
||||
</div>
|
||||
@ -55,7 +55,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '任务录制',
|
||||
title: this.$t('scriptRecord.scriptTitle'),
|
||||
isShrink: false,
|
||||
memberId:null,
|
||||
behaviorId:null,
|
||||
|
@ -1,974 +0,0 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import Vue from 'vue';
|
||||
import Router from 'vue-router';
|
||||
|
||||
// in development-env not use lazy-loading, because lazy-loading too many pages will cause webpack hot update too slow. so only in production use lazy-loading;
|
||||
// detail: https://panjiachen.github.io/vue-element-admin-site/#/lazy-loading
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
/* Dashboard */
|
||||
import Dashboard from '@/views/dashboard/index.vue';
|
||||
|
||||
/* Layout */
|
||||
import Layout from '@/views/layout/Layout';
|
||||
import Login from '@/views/login/index';
|
||||
import LoginNew from '@/views/login/loginNew';
|
||||
import Page404 from '@/views/404';
|
||||
|
||||
import LoginScreen from '@/views/login/loginScreen';
|
||||
import LoginNewScreen from '@/views/login/loginNewScreen';
|
||||
|
||||
import LoginPlan from '@/views/login/loginPlan';
|
||||
import LoginNewPlan from '@/views/login/loginNewPlan';
|
||||
|
||||
|
||||
//地图绘制
|
||||
import MapManage from '@/views/map/mapdraft/index';
|
||||
import MapEdit from '@/views/map/mapdraft/mapedit/index';
|
||||
import SkinStyle from '@/views/map/skinStyle/index';
|
||||
import SkinStyleDraft from '@/views/map/skinStyle/draft';
|
||||
|
||||
//列车运行表
|
||||
import ListPlan from '@/views/map/runplan/index';
|
||||
//运行图视图
|
||||
import ViewPlan from '@/views/map/runplan/chart';
|
||||
|
||||
//实训管理和编辑
|
||||
import TrainingManage from '@/views/lesson/trainingrecord/index';
|
||||
import TrainingEdit from '@/views/lesson/trainingrecord/manage/index';
|
||||
//产品管理
|
||||
import TrainingCategory from '@/views/lesson/trainingcategory/index';
|
||||
import ProductList from '@/views/map/product/list';
|
||||
import ProductDraft from '@/views/map/product/draft';
|
||||
|
||||
//课程管理
|
||||
import LessonCategory from '@/views/lesson/lessoncategory/index';
|
||||
//自动生成实训
|
||||
import TrainingGeneration from '@/views/lesson/trainingmanage/index';
|
||||
import TrainingRule from '@/views/lesson/trainingRule/list';
|
||||
import TrainingRuleDetail from '@/views/lesson/trainingRule/detail/index';
|
||||
|
||||
//购买页面
|
||||
import PayPage from '@/views/components/pay/index';
|
||||
|
||||
//教学系统
|
||||
import Teach from '@/views/teach/index';
|
||||
import TeachHome from '@/views/teach/home';
|
||||
import TeachDetail from '@/views/teach/detail/index';
|
||||
import TeachPracticalDetail from '@/views/teach/practical/index';
|
||||
import TaskManageList from '@/views/lesson/taskmanage/list';
|
||||
import ScriptManage from '@/views/lesson/scriptmanage/list';
|
||||
|
||||
//考试系统
|
||||
import Exam from '@/views/exam/index';
|
||||
import ExamHome from '@/views/exam/home';
|
||||
import ExamDetail from '@/views/exam/detail/examDetail';
|
||||
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
|
||||
import ExamQuestionDetail from '@/views/exam/detail/questionDetail';
|
||||
import ExamResult from '@/views/exam/result';
|
||||
|
||||
//考试规则
|
||||
import ExamRuleList from '@/views/publish/examRule/index';
|
||||
import ExamRuleDraft from '@/views/publish/examRule/draft/index';
|
||||
|
||||
//仿真系统
|
||||
import Demonstration from '@/views/demonstration/index';
|
||||
import DemonstrationHome from '@/views/demonstration/home';
|
||||
import DemonstrationDetail from '@/views/demonstration/detail/index';
|
||||
|
||||
//大屏系统
|
||||
import ScreenMonitor from '@/views/screenMonitor/index';
|
||||
import ScreenMonitorHome from '@/views/screenMonitor/home';
|
||||
import ScreenMonitorDetail from '@/views/screenMonitor/detail/index';
|
||||
|
||||
//琏计划系统
|
||||
import PlanMonitor from '@/views/planMonitor/index';
|
||||
import PlanMonitorHome from '@/views/planMonitor/home';
|
||||
import PlanMonitorDetail from '@/views/planMonitor/detail';
|
||||
import PlanEditTool from '@/views/planMonitor/editTool/index';
|
||||
|
||||
//回放管理
|
||||
import replay from '@/views/replay/index';
|
||||
|
||||
//权限管理
|
||||
import PermissionList from '@/views/package/index';
|
||||
import PermissionDraft from '@/views/package/draft/ruleForm';
|
||||
|
||||
// 产品状态管理
|
||||
import ProductStatus from '@/views/publish/productStatus/index';
|
||||
// 发布地图管理
|
||||
import PublishMap from '@/views/publish/publishMap/index';
|
||||
import PublishMapDraft from '@/views/publish/publishMap/draft';
|
||||
// 发布课程管理
|
||||
import PublishLesson from '@/views/publish/publishLesson/index';
|
||||
// 仿真脚本管理
|
||||
import SimulationScript from '@/views/publish/simulationScript/index';
|
||||
// 运行图模板管理
|
||||
import PlanTemplate from '@/views/publish/runPlanTemplate/index';
|
||||
import PlanCommon from '@/views/publish/runPlanCommon/index';
|
||||
import PlanCommonDraft from '@/views/publish/runPlanCommon/draft';
|
||||
// 运行图每日加载管理
|
||||
import PlanEveryDay from '@/views/publish/runPlanEveryDay/index';
|
||||
|
||||
// 系统字典管理
|
||||
import Dictionary from '@/views/management/dictionary/index';
|
||||
import DictionaryDetail from '@/views/management/dictionaryDetail/index';
|
||||
// 用户考试管理
|
||||
import UserExam from '@/views/management/userExam/index';
|
||||
// 用户仿真管理
|
||||
import UserSimulation from '@/views/management/userSimulation/index';
|
||||
// 存在仿真管理
|
||||
import ExistingSimulation from '@/views/management/existingSimulation/index';
|
||||
// 用户实训管理
|
||||
import UserTraining from '@/views/management/userTraining/index';
|
||||
// 用户管理
|
||||
import UserControl from '@/views/management/userControl/index';
|
||||
|
||||
// 商品管理
|
||||
import commodityList from '@/views/orderauthor/commodity/index';
|
||||
import CommodityDraft from '@/views/orderauthor/commodity/draft';
|
||||
|
||||
//课程权限管理
|
||||
import LessonPermission from '@/views/orderauthor/author/index';
|
||||
import LessonPermissionDraft from '@/views/orderauthor/author/draft';
|
||||
|
||||
//订单操作
|
||||
import OrderList from '@/views/orderauthor/order/list';
|
||||
import OrderDraft from '@/views/orderauthor/order/draft';
|
||||
import runPlan from '../store/modules/runplan';
|
||||
|
||||
//打包管理
|
||||
import PackageMange from '@/views/orderauthor/permission/index';
|
||||
import PackageDetail from '@/views/orderauthor/permission/detail';
|
||||
import PackageDraft from '@/views/orderauthor/permission/draft/ruleForm';
|
||||
|
||||
//综合演练
|
||||
import trainRoom from '@/views/trainRoom/index';
|
||||
import JointTrainingDraft from '@/views/jointTraining/index';
|
||||
|
||||
import ThreeTest from '@/views/jlmap3d/index';//test
|
||||
import ThreeDrawTest from '@/views/jlmap3d/jlmap3dedit';//test
|
||||
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||
|
||||
export const UrlConfig = {
|
||||
display: '/display',
|
||||
examRuleDraft: '/examRule/draft',
|
||||
examRuleManage: '/examRule/manage',
|
||||
map: {
|
||||
prefix: '/map',
|
||||
draft: '/map/draw',
|
||||
skinStyle: '/map/skinStyle',
|
||||
skinStyleDraft: '/map/skinStyle/draft',
|
||||
runPlan: '/map/runPlan',
|
||||
runPlanView: '/map/runPlan/view',
|
||||
product: '/map/product',
|
||||
productDraft: '/map/product/draft',
|
||||
},
|
||||
lesson: {
|
||||
prefix: '/lesson',
|
||||
record: '/lesson/record/training',
|
||||
manage: '/lesson/manage/training'
|
||||
},
|
||||
teach: {
|
||||
prefix: '/teach',
|
||||
detail: '/teach/detail',
|
||||
practical: '/teach/practical',
|
||||
pay: '/teach/pay',
|
||||
},
|
||||
exam: {
|
||||
prefix: '/exam',
|
||||
detail: '/exam/detail',
|
||||
course: '/exam/course',
|
||||
examRuleManage: '/exam/examRule/manage',
|
||||
pay: '/exam/pay'
|
||||
},
|
||||
demonstration: {
|
||||
prefix: '/demonstration',
|
||||
detail: '/demonstration/detail',
|
||||
pay: '/demonstration/pay'
|
||||
},
|
||||
dp: {
|
||||
prefix: '/dp',
|
||||
detail: '/dp/detail',
|
||||
pay: '/dp/pay'
|
||||
|
||||
},
|
||||
plan: {
|
||||
prefix: '/plan',
|
||||
tool: '/plan/tool',
|
||||
detail: '/plan/detail',
|
||||
pay: '/plan/pay'
|
||||
},
|
||||
replay: {
|
||||
prefix: '/replay'
|
||||
},
|
||||
permission: {
|
||||
prefix: '/permission',
|
||||
permissionList: '/permission/manage',
|
||||
permissionDraft: '/permission/draft',
|
||||
permission: '/permission/restore'
|
||||
},
|
||||
publish: {
|
||||
prefix: '/publish',
|
||||
map: '/publish/map',
|
||||
mapDraft: '/publish/map/draft',
|
||||
runPlanEveryDay: '/publish/runPlan/everyDay',
|
||||
runPlanTemplate: '/publish/runPlan/template',
|
||||
runPlanCommon: '/publish/runPlan/common',
|
||||
runPlanView: '/publish/runPlan/view',
|
||||
},
|
||||
orderauthor: {
|
||||
prefix: '/orderauthor',
|
||||
commodityManage: '/orderauthor/commodity/manage',
|
||||
commodityDraft: '/orderauthor/commodity/draft',
|
||||
orderManage: '/orderauthor/order/manage',
|
||||
orderDraft: '/orderauthor/order/draft',
|
||||
authorMange: '/orderauthor/author/manage',
|
||||
authorDraft: '/orderauthor/author/draft',
|
||||
transferDetail: '/orderauthor/transfer/detail',
|
||||
trainferPackage: '/orderauthor/transfer/package'
|
||||
}
|
||||
};
|
||||
|
||||
export const constantRouterMap = [
|
||||
{ path: '/dp/login', component: resolve => require(['@/views/login/loginNewScreen'], resolve), hidden: true }, //扫码登录
|
||||
{ path: '/dp/login1', component: resolve => require(['@/views/login/loginScreen'], resolve), hidden: true }, //密码登录
|
||||
|
||||
{ path: '/plan/login', component: resolve => require(['@/views/login/loginNewPlan'], resolve), hidden: true }, //扫码登录
|
||||
{ path: '/plan/login1', component: resolve => require(['@/views/login/loginPlan'], resolve), hidden: true }, //密码登录
|
||||
|
||||
{ path: '/login', component: resolve => require(['@/views/login/loginNew'], resolve), hidden: true }, //扫码登录
|
||||
{ path: '/login1', component: resolve => require(['@/views/login/index'], resolve), hidden: true }, //密码登录
|
||||
{ path: '/jlmap3d/edit', component: resolve => require(['@/views/jlmap3d/jlmap3dedit'], resolve), hidden: true },
|
||||
{ path: '/404', component: resolve => require(['@/views/404'], resolve), hidden: true },
|
||||
{ path: '*', redirect: '/404', hidden: true }
|
||||
];
|
||||
|
||||
export default new Router({
|
||||
mode: 'history', //后端支持可开
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRouterMap
|
||||
});
|
||||
|
||||
export const user = '01'; // 普通用户
|
||||
export const mapCreater = '02'; // 地图创建权限
|
||||
export const lessonCreater = '03'; // 课程创建权限
|
||||
export const admin = '04'; // 管理员
|
||||
export const superAdmin = '05'; // 超级管理员
|
||||
|
||||
export const userExam = '011'; // 考试系统
|
||||
export const userLesson = '012'; // 教学系统
|
||||
export const userSimulation = '013'; // 仿真系统
|
||||
export const userScreen = '014'; // 大屏系统
|
||||
export const userPlan = '015'; // 计划系统
|
||||
|
||||
|
||||
export const asyncRouterMap = [
|
||||
{
|
||||
path: '/',
|
||||
component: resolve => require(['@/views/layout/Layout'], resolve),
|
||||
redirect: '/dashboard',
|
||||
name: 'Dashboard',
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: resolve => require(['@/views/dashboard/index.vue'], resolve)
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/display/:mode',
|
||||
component: resolve => require(['@/views/display/index'], resolve),
|
||||
meta: {
|
||||
title: '实训视图'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/trainroom',
|
||||
component: resolve => require(['@/views/trainRoom/index'], resolve),
|
||||
meta: {
|
||||
title: '综合演练房间'
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/jointTraining',
|
||||
name: '联合演练试图',
|
||||
component: resolve => require(['@/views/jointTraining/index'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d',
|
||||
name: '三维test',
|
||||
component: resolve => require(['@/views/jlmap3d/index'], resolve),
|
||||
meta: {
|
||||
title: '三维test'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/map',
|
||||
name: '地图管理',
|
||||
meta: {
|
||||
title: '地图管理',
|
||||
roles: [admin, mapCreater],
|
||||
},
|
||||
component: resolve => require(['@/views/layout/Layout'], resolve),
|
||||
children: [
|
||||
{
|
||||
path: 'skinStyle',
|
||||
name: '皮肤管理',
|
||||
component: resolve => require(['@/views/map/skinStyle/index'], resolve),
|
||||
meta: {
|
||||
title: '皮肤管理',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'skinStyle/draft/:mode/:skinStyleId',
|
||||
name: '操作权限',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/map/skinStyle/draft'], resolve),
|
||||
meta: {
|
||||
title: '操作权限'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'draw',
|
||||
redirect: '/map/draw/0/draft',
|
||||
component: resolve => require(['@/views/map/mapdraft/index'], resolve),
|
||||
meta: {
|
||||
title: '地图绘制',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: ':mapId/:view',
|
||||
component: resolve => require(['@/views/map/mapdraft/mapedit/index'], resolve),
|
||||
meta: {
|
||||
title: '地图绘制',
|
||||
},
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'runPlan',
|
||||
redirect: '/map/runPlan/view/draft',
|
||||
name: '运行图管理',
|
||||
component: resolve => require(['@/views/map/runplan/index'], resolve),
|
||||
meta: {
|
||||
title: '运行图管理'
|
||||
},
|
||||
children: [{
|
||||
path: 'view/:mode',
|
||||
component: resolve => require(['@/views/map/runplan/chart'], resolve),
|
||||
hidden: true
|
||||
}],
|
||||
},
|
||||
{
|
||||
path: 'product',
|
||||
name: '产品编辑',
|
||||
component: resolve => require(['@/views/lesson/trainingcategory/index'], resolve),
|
||||
meta: {
|
||||
title: '产品编辑',
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/lesson',
|
||||
component: resolve => require(['@/views/layout/Layout'], resolve),
|
||||
name: '课程管理',
|
||||
meta: {
|
||||
title: '课程管理',
|
||||
roles: [admin, lessonCreater],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'record',
|
||||
redirect: '/lesson/record/training/0/null',
|
||||
component: resolve => require(['@/views/lesson/trainingrecord/index'], resolve),
|
||||
meta: {
|
||||
title: '实训录制',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'training/:trainingId/:trainingName',
|
||||
component: resolve => require(['@/views/lesson/trainingrecord/manage/index'], resolve),
|
||||
meta: {
|
||||
title: '实训录制',
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'manage/taskmanage',
|
||||
name: '任务管理',
|
||||
component: resolve => require(['@/views/lesson/taskmanage/list'], resolve),
|
||||
meta: {
|
||||
title: '任务管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'manage/trainingRule',
|
||||
name: '操作定义',
|
||||
component: resolve => require(['@/views/lesson/trainingRule/list'], resolve),
|
||||
meta: {
|
||||
title: '操作定义'
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'manage/trainingRule/detail',
|
||||
name: '操作定义明细',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/lesson/trainingRule/detail/index'], resolve),
|
||||
meta: {
|
||||
title: '操作定义明细'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'manage/training',
|
||||
name: '实训管理',
|
||||
component: resolve => require(['@/views/lesson/trainingmanage/index'], resolve),
|
||||
meta: {
|
||||
title: '实训管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'edit',
|
||||
name: '课程编辑',
|
||||
component: resolve => require(['@/views/lesson/lessoncategory/index'], resolve),
|
||||
meta: {
|
||||
title: '课程编辑',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'manage/scriptmanage',
|
||||
name: '剧本管理',
|
||||
component: resolve => require(['@/views/lesson/scriptmanage/list'], resolve),
|
||||
meta: {
|
||||
title: '剧本管理'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/teach',
|
||||
redirect: '/teach/home',
|
||||
name: '教学系统',
|
||||
component: resolve => require(['@/views/teach/index'], resolve),
|
||||
meta: {
|
||||
roles: [admin, userLesson, user],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: resolve => require(['@/views/teach/home'], resolve),
|
||||
meta: {
|
||||
title: '教学系统'
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'detail/:lessonId',
|
||||
name: '课程详情',
|
||||
component: resolve => require(['@/views/teach/detail/index'], resolve),
|
||||
meta: {
|
||||
title: '课程详情'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'practical/:trainingId/:lessonId',
|
||||
name: '实训详情',
|
||||
component: resolve => require(['@/views/teach/practical/index'], resolve),
|
||||
meta: {
|
||||
title: '实训详情'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: resolve => require(['@/views/components/pay/index'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/exam',
|
||||
redirect: '/exam/home',
|
||||
component: resolve => require(['@/views/exam/index'], resolve),
|
||||
name: '考试系统',
|
||||
meta: {
|
||||
roles: [admin, userExam, user],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: resolve => require(['@/views/exam/home'], resolve),
|
||||
meta: {
|
||||
title: '考试系统'
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'detail/:examId',
|
||||
name: '试卷详情',
|
||||
component: resolve => require(['@/views/exam/detail/examDetail'], resolve),
|
||||
meta: {
|
||||
title: '试卷详情'
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: 'course/:lessonId',
|
||||
component: resolve => require(['@/views/exam/detail/courseDetail'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: 'examRule/manage',
|
||||
name: '试题设置',
|
||||
component: resolve => require(['@/views/publish/examRule/index'], resolve),
|
||||
meta: {
|
||||
title: '试题设置'
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/publish/examRule/draft/index'], resolve),
|
||||
meta: {
|
||||
title: '添加订单'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: resolve => require(['@/views/components/pay/index'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'questionDetail/:examQuestionId',
|
||||
name: '开始考试',
|
||||
component: resolve => require(['@/views/exam/detail/questionDetail'], resolve),
|
||||
meta: {
|
||||
title: '开始考试',
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: 'result/:userExamId',
|
||||
name: '考试结果',
|
||||
component: resolve => require(['@/views/exam/result'], resolve),
|
||||
meta: {
|
||||
title: '考试结果',
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/demonstration',
|
||||
redirect: '/demonstration/home',
|
||||
component: resolve => require(['@/views/demonstration/index'], resolve),
|
||||
name: '仿真系统',
|
||||
meta: {
|
||||
roles: [admin, userSimulation, user],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: resolve => require(['@/views/demonstration/home'], resolve),
|
||||
meta: {
|
||||
title: '仿真系统'
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'detail/:mapId',
|
||||
name: '地图详情',
|
||||
component: resolve => require(['@/views/demonstration/detail/index'], resolve),
|
||||
meta: {
|
||||
title: '地图详情'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: resolve => require(['@/views/components/pay/index'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/dp',
|
||||
redirect: '/dp/home',
|
||||
component: resolve => require(['@/views/screenMonitor/index'], resolve),
|
||||
name: '大屏系统',
|
||||
meta: {
|
||||
roles: [admin, userScreen],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: resolve => require(['@/views/screenMonitor/home'], resolve),
|
||||
meta: {
|
||||
title: '大屏系统'
|
||||
},
|
||||
target: true
|
||||
},
|
||||
{
|
||||
path: 'detail/:lessonId',
|
||||
component: resolve => require(['@/views/screenMonitor/detail/index'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: resolve => require(['@/views/components/pay/index'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/plan/tool',
|
||||
component: resolve => require(['@/views/planMonitor/editTool/index'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/plan',
|
||||
redirect: '/plan/home',
|
||||
component: resolve => require(['@/views/planMonitor/index'], resolve),
|
||||
name: '琏计划',
|
||||
meta: {
|
||||
roles: [admin, user],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: resolve => require(['@/views/planMonitor/home'], resolve),
|
||||
meta: {
|
||||
title: '琏计划'
|
||||
},
|
||||
target: true
|
||||
},
|
||||
{
|
||||
path: 'detail/:lessonId',
|
||||
component: resolve => require(['@/views/planMonitor/detail'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: resolve => require(['@/views/components/pay/index'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/replay',
|
||||
component: resolve => require(['@/views/layout/Layout'], resolve),
|
||||
meta: {
|
||||
roles: [admin],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'manage',
|
||||
component: resolve => require(['@/views/replay/index'], resolve),
|
||||
meta: {
|
||||
title: '回放管理'
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/permission',
|
||||
component: resolve => require(['@/views/layout/Layout'], resolve),
|
||||
meta: {
|
||||
roles: [admin, user],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'manage',
|
||||
component: resolve => require(['@/views/package/index'], resolve),
|
||||
meta: {
|
||||
title: '权限管理'
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'draft',
|
||||
component: resolve => require(['@/views/package/draft/ruleForm'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/publish',
|
||||
name: '发布内容管理',
|
||||
component: resolve => require(['@/views/layout/Layout'], resolve),
|
||||
meta: {
|
||||
title: '发布内容管理',
|
||||
roles: [admin],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'map',
|
||||
name: '发布地图管理',
|
||||
component: resolve => require(['@/views/publish/publishMap/index'], resolve),
|
||||
meta: {
|
||||
title: '发布地图管理',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'product',
|
||||
name: '产品状态管理',
|
||||
component: resolve => require(['@/views/publish/productStatus/index'], resolve),
|
||||
meta: {
|
||||
title: '产品状态管理',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'lesson',
|
||||
name: '发布课程管理',
|
||||
component: resolve => require(['@/views/publish/publishLesson/index'], resolve),
|
||||
meta: {
|
||||
title: '发布课程管理',
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: 'script',
|
||||
// name: '仿真脚本管理',
|
||||
// component: resolve => require(['@/views/publish/simulationScript/index'], resolve),
|
||||
// meta: {
|
||||
// title: '仿真脚本管理',
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: 'runPlan/template',
|
||||
component: resolve => require(['@/views/publish/runPlanTemplate/index'], resolve),
|
||||
meta: {
|
||||
title: '运行图模板管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'runPlan/common',
|
||||
component: resolve => require(['@/views/publish/runPlanCommon/index'], resolve),
|
||||
meta: {
|
||||
title: '运行图通用管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'runPlan/everyDay',
|
||||
component: resolve => require(['@/views/publish/runPlanEveryDay/index'], resolve),
|
||||
meta: {
|
||||
title: '运行图每日管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'examRule/manage',
|
||||
name: '试题管理',
|
||||
component: resolve => require(['@/views/publish/examRule/index'], resolve),
|
||||
meta: {
|
||||
title: '试题管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'map/draft/:mode/:mapId',
|
||||
component: resolve => require(['@/views/publish/publishMap/draft'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/publish/examRule/draft/index'], resolve),
|
||||
meta: {
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'runPlan/common/:mode',
|
||||
component: resolve => require(['@/views/publish/runPlanCommon/draft'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'runPlan/view/:mode',
|
||||
component: resolve => require(['@/views/map/runplan/chart'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/orderauthor',
|
||||
component: resolve => require(['@/views/layout/Layout'], resolve),
|
||||
name: '订单权限管理',
|
||||
meta: {
|
||||
title: '订单权限管理',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'commodity/manage',
|
||||
name: '商品管理',
|
||||
component: resolve => require(['@/views/orderauthor/commodity/index'], resolve),
|
||||
meta: {
|
||||
title: '商品管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'order/manage',
|
||||
name: '订单管理',
|
||||
component: resolve => require(['@/views/orderauthor/order/list'], resolve),
|
||||
meta: {
|
||||
title: '订单管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'author/manage',
|
||||
name: '权限管理',
|
||||
component: resolve => require(['@/views/orderauthor/author/index'], resolve),
|
||||
meta: {
|
||||
title: '权限管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'transfer/manage',
|
||||
name: '权限分发管理',
|
||||
component: resolve => require(['@/views/orderauthor/permission/index'], resolve),
|
||||
meta: {
|
||||
title: '权限分发管理'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'commodity/draft/:mode/:commodityId',
|
||||
name: '添加商品',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/orderauthor/commodity/draft'], resolve),
|
||||
meta: {
|
||||
title: '添加商品'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'order/draft/:mode/:orderId',
|
||||
name: '添加订单',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/orderauthor/order/draft'], resolve),
|
||||
meta: {
|
||||
title: '添加订单'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'author/draft/:mode/:userId',
|
||||
name: '添加课程权限',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/orderauthor/author/draft'], resolve),
|
||||
meta: {
|
||||
title: '添加课程权限'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'transfer/detail/:permissionId',
|
||||
component: resolve => require(['@/views/orderauthor/permission/detail'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'transfer/package',
|
||||
component: resolve => require(['@/views/orderauthor/permission/draft/ruleForm'], resolve),
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system',
|
||||
component: resolve => require(['@/views/layout/Layout'], resolve),
|
||||
meta: {
|
||||
title: '系统管理',
|
||||
roles: [admin],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'dictionary',
|
||||
name: 'Dictionary',
|
||||
component: resolve => require(['@/views/management/dictionary/index'], resolve),
|
||||
meta: {
|
||||
title: '数据字典'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'dictionary/detail',
|
||||
name: '数据字典明细',
|
||||
hidden: true,
|
||||
component: resolve => require(['@/views/management/dictionaryDetail/index'], resolve),
|
||||
meta: {
|
||||
title: '数据字典明细'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userManage',
|
||||
name: '用户管理',
|
||||
component: resolve => require(['@/views/management/userControl/index'], resolve),
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userTrainingManage',
|
||||
name: '用户实训管理',
|
||||
component: resolve => require(['@/views/management/userTraining/index'], resolve),
|
||||
meta: {
|
||||
title: '用户实训管理',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userExamManage',
|
||||
name: '用户考试管理',
|
||||
component: resolve => require(['@/views/management/userExam/index'], resolve),
|
||||
meta: {
|
||||
title: '用户考试管理',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userSimulationManage',
|
||||
name: '用户仿真管理',
|
||||
component: resolve => require(['@/views/management/userSimulation/index'], resolve),
|
||||
meta: {
|
||||
title: '用户仿真管理',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'existingSimulation',
|
||||
name: '存在仿真管理',
|
||||
component: resolve => require(['@/views/management/existingSimulation/index'], resolve),
|
||||
meta: {
|
||||
title: '存在仿真管理',
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
];
|
@ -9,7 +9,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSkinStyleList } from '@/api/management/mapskin'
|
||||
import { listPublishMap } from '@/api/jmap/map'
|
||||
|
||||
import { getQuestById} from '@/api/quest';
|
||||
|
||||
export default {
|
||||
@ -17,12 +18,12 @@
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
skinStyleList: [],
|
||||
mapList: [],
|
||||
taskStatusList: [],
|
||||
disabled:null,
|
||||
formModel: {
|
||||
name: '',
|
||||
skinCode: '01',
|
||||
mapId: '',
|
||||
description:''
|
||||
},
|
||||
isShow: false,
|
||||
@ -38,7 +39,7 @@
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'name', label: '剧本名称', type: 'text', required: true},
|
||||
{ prop: 'skinCode', label: '皮肤类型', type: 'select', required: true, options: this.skinStyleList,disabled:this.disabled},
|
||||
{ prop: 'mapId', label: '地图', type: 'select', required: true, options: this.mapList,disabled:this.disabled},
|
||||
{ prop: 'description', label: '剧本描述', type: 'textarea', required: true},
|
||||
]
|
||||
}
|
||||
@ -49,8 +50,8 @@
|
||||
name: [
|
||||
{ required: true, message: '请输入剧本', trigger: 'blur' },
|
||||
],
|
||||
skinCode: [
|
||||
{ required: true, message: '请选择皮肤类型', trigger: 'change' },
|
||||
mapId: [
|
||||
{ required: true, message: '请选择地图', trigger: 'change' },
|
||||
],
|
||||
description:[
|
||||
{ required: true, message: '请输入剧本描述', trigger: 'blur' },
|
||||
@ -67,16 +68,16 @@
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.skinStyleList = [];
|
||||
getSkinStyleList().then(response => {
|
||||
this.skinStyleList = response.data.map(elem => { return { value: elem.code, label: elem.name } });
|
||||
this.mapList = [];
|
||||
listPublishMap().then(response => {
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
|
||||
})
|
||||
},
|
||||
doShow(questid) {
|
||||
if(questid)
|
||||
{
|
||||
getQuestById(questid).then(resp=>{
|
||||
let data={'name':resp.data.name,'description':resp.data.description,'skinCode':resp.data.skinCode};
|
||||
let data={'name':resp.data.name,'description':resp.data.description,'mapId':resp.data.mapId};
|
||||
this.formModel=data;
|
||||
this.formModel.id=questid;
|
||||
this.disabled="disabled";
|
||||
|
@ -11,8 +11,9 @@
|
||||
|
||||
<script>
|
||||
import { superAdmin } from '@/router';
|
||||
import { listPublishMap } from '@/api/jmap/mapdraft';
|
||||
import { getSkinStyleList } from '@/api/management/mapskin'
|
||||
// import { listPublishMap } from '@/api/jmap/mapdraft';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
// import { getSkinStyleList } from '@/api/management/mapskin'
|
||||
import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay } from '@/api/runplan';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { getQuestPageList,createQuest,deleteQuest,updateQuest} from '@/api/quest';
|
||||
@ -27,7 +28,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
skinCodeList: [],
|
||||
mapList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
@ -36,9 +37,9 @@
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
skinCode: {
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: '皮肤类型',
|
||||
label: '地图',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
@ -55,11 +56,11 @@
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '皮肤类型',
|
||||
prop: 'skinCode',
|
||||
title: '地图',
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => {
|
||||
return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name'])
|
||||
return this.$convertField(row.mapId, this.mapList, ['id', 'name'])
|
||||
},
|
||||
tagType: (row) => { return '' }
|
||||
},
|
||||
@ -71,7 +72,7 @@
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
width: '350',
|
||||
hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
|
||||
// hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
|
||||
buttons: [
|
||||
{
|
||||
name: '录制',
|
||||
@ -104,11 +105,12 @@
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.skinCodeList = [];
|
||||
getSkinStyleList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
this.mapList = [];
|
||||
listPublishMap().then(response => {
|
||||
this.mapList = response.data;
|
||||
// this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
|
||||
response.data.forEach(elem => {
|
||||
this.queryForm.queryObject.skinCode.config.data.push({ value: elem.code, label: elem.name });
|
||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
||||
})
|
||||
})
|
||||
},
|
||||
|
@ -26,15 +26,15 @@ export default {
|
||||
queryObject: {
|
||||
code: {
|
||||
type: 'text',
|
||||
label: '编码'
|
||||
label: this.$t('system.code')
|
||||
},
|
||||
name: {
|
||||
type: 'text',
|
||||
label: '名称'
|
||||
label: this.$t('system.name')
|
||||
},
|
||||
status: {
|
||||
type: 'select',
|
||||
label: '状态',
|
||||
label: this.$t('system.status'),
|
||||
config: {
|
||||
data: this.$ConstSelect.Status
|
||||
}
|
||||
@ -48,27 +48,27 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '编码',
|
||||
title: this.$t('system.code'),
|
||||
prop: 'code'
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
title: this.$t('system.name'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
title: this.$t('system.status'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.status, 'Status'); },
|
||||
tagType: (row) => { if (row.status === '0') { return 'danger'; } else { return 'success'; } }
|
||||
},
|
||||
{
|
||||
title: '说明',
|
||||
title: this.$t('system.remarks'),
|
||||
prop: 'remarks'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
@ -76,11 +76,11 @@ export default {
|
||||
handleClick: this.handleViewDetail
|
||||
},
|
||||
{
|
||||
name: '编辑',
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.handleEdit
|
||||
},
|
||||
{
|
||||
name: '删除',
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handleDelete,
|
||||
type: 'danger'
|
||||
}
|
||||
@ -88,7 +88,7 @@ export default {
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '新增', handler: this.handleAdd }
|
||||
{ text: this.$t('global.add'), handler: this.handleAdd }
|
||||
// { text: '批量删除', btnCode: 'employee_delete', handler: this.handleBatchDelete, type: 'danger' }
|
||||
]
|
||||
},
|
||||
@ -115,8 +115,8 @@ export default {
|
||||
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除该类型, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
del(row.id).then(response => {
|
||||
@ -124,7 +124,7 @@ export default {
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.reloadTable();
|
||||
this.$messageBox('删除失败');
|
||||
this.$messageBox(this.$t('error.deleteFailed'));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -243,10 +243,10 @@ export default {
|
||||
x: em.clientX,
|
||||
y: em.clientY
|
||||
};
|
||||
|
||||
if (!em.deviceType) {
|
||||
var menu = getDeviceMenuByDeviceType('Cancel');
|
||||
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||
}
|
||||
},
|
||||
saveMapEvent() {
|
||||
if (this.$refs.jlmapVisual) {
|
||||
|
@ -16,6 +16,7 @@ import PopMenu from '@/components/PopMenu';
|
||||
import MapEdit from './edit';
|
||||
import MapSaveAs from './saveAs';
|
||||
import MapPublish from './publish';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'MapOperateMenu',
|
||||
@ -42,7 +43,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menuShow: false,
|
||||
menu: [
|
||||
menuMap: [
|
||||
{
|
||||
label: this.$t('map.updateObj'),
|
||||
handler: this.updateObj
|
||||
@ -87,12 +88,23 @@ export default {
|
||||
label: this.$t('map.jlmap3d'),
|
||||
handler: this.jlmap3d
|
||||
}
|
||||
]
|
||||
],
|
||||
menuNormal:[],
|
||||
menu: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Map)) {
|
||||
this.menu = [ ...this.menuMap]
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else if(this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)){
|
||||
this.initCancelMenu();
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
}else {
|
||||
this.doClose();
|
||||
@ -187,7 +199,44 @@ export default {
|
||||
},
|
||||
refresh() {
|
||||
this.$emit('refresh');
|
||||
},
|
||||
initCancelMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.code === station.concentrateStationCode) {
|
||||
let node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
|
||||
this.stationList.forEach(elem => {
|
||||
if (elem.visible) {
|
||||
let next = elem;
|
||||
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
||||
}
|
||||
|
||||
if (station.code == next.code) {
|
||||
node.children.push({
|
||||
code: elem.code,
|
||||
label: elem.name,
|
||||
handler: this.mapLocation,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
this.menu = [ ...this.menuNormal ]
|
||||
},
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -145,7 +145,7 @@ export default {
|
||||
deletePlanService(model).then(resp => {
|
||||
this.$message.success('删除计划成功');
|
||||
this.$store.dispatch('runPlan/setSelected', {});
|
||||
this.$refs.openRunPlan.loadRunPlanData(this.$route.query);
|
||||
this.$refs.openRunPlan.loadRunPlanData(Object.assign({refresh: true}, this.$route.query));
|
||||
}).catch(() => {
|
||||
this.$messageBox('删除计划失败');
|
||||
});
|
||||
|
@ -518,7 +518,8 @@ export default {
|
||||
width: 260,
|
||||
message: `真的要删除列车 ${serviceNumber} 吗?`,
|
||||
operate: 'DeletePlanningTrain',
|
||||
serviceNumber: serviceNumber
|
||||
serviceNumber: serviceNumber,
|
||||
refresh: true
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -1,10 +1,19 @@
|
||||
<template>
|
||||
<el-dialog class="planEdit__tool add-planning-train" :title="title" :visible.sync="dialogShow" width="260px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool add-planning-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="260px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6" :offset="3" style="height: 30px; line-height: 30px;">服务号:</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<el-input v-model="serviceNumber" size="mini"></el-input>
|
||||
<el-input v-model="serviceNumber" size="mini" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center" style="margin-top: 20px">
|
||||
@ -23,12 +32,12 @@
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
serviceNumber: '',
|
||||
}
|
||||
serviceNumber: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '添加计划车'
|
||||
return '添加计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -52,15 +61,15 @@
|
||||
type: 'warning',
|
||||
operate: 'AddPlanningTrain',
|
||||
width: 460,
|
||||
message: '本表号已存在,是否强制设置?(强制设置程序可能会出现异常)',
|
||||
message: '本表号已存在,是否强制设置?(强制设置程序可能会出现异常)'
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
this.doClose();
|
||||
} else {
|
||||
this.handleConfirm();
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('长度应该为两位数');
|
||||
}
|
||||
@ -71,10 +80,10 @@
|
||||
handleConfirm() {
|
||||
this.doClose();
|
||||
this.$store.dispatch('runPlan/addserviceNumber', this.serviceNumber);
|
||||
this.$emit('dispatchDialog', { name: 'editPlanningTrain', params: { serviceNumber: this.serviceNumber } })
|
||||
}
|
||||
this.$emit('dispatchDialog', { name: 'editPlanningTrain', params: { serviceNumber: this.serviceNumber } });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,6 +1,15 @@
|
||||
<template>
|
||||
<el-dialog class="planEdit__tool add-task" :title="title" :visible.sync="dialogShow" width="780px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool add-task"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="780px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="margin: 10px">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
@ -11,17 +20,19 @@
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="addModel.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4" style="margin-left: 20px">
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-time-picker v-model="addModel.startTime" value-format="HH:mm:ss" :clearable="false">
|
||||
</el-time-picker>
|
||||
<el-time-picker v-model="addModel.startTime" value-format="HH:mm:ss" :clearable="false" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 5px">
|
||||
@ -33,9 +44,12 @@
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="addModel.defaultStopTime" placeholder="请选择">
|
||||
<el-option v-for="item in defaultStopTimeList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
<el-option
|
||||
v-for="item in defaultStopTimeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4" style="margin-left: 20px">
|
||||
@ -43,9 +57,12 @@
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="addModel.defaultSpeedLevel" placeholder="请选择">
|
||||
<el-option v-for="item in defaultSpeedLevelList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
<el-option
|
||||
v-for="item in defaultSpeedLevelList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
|
||||
@ -54,8 +71,13 @@
|
||||
交路:
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="addModel.routingList" border highlight-current-row @row-click="handleClick"
|
||||
:height="180">
|
||||
<el-table
|
||||
:data="addModel.routingList"
|
||||
border
|
||||
highlight-current-row
|
||||
:height="180"
|
||||
@row-click="handleClick"
|
||||
>
|
||||
<el-table-column prop="startStationCode" label="起始站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.startStationCode) }}
|
||||
@ -76,8 +98,7 @@
|
||||
{{ formatName(scope.row.endSectionCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remarks" label="描述">
|
||||
</el-table-column>
|
||||
<el-table-column prop="remarks" label="描述" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
@ -95,14 +116,10 @@
|
||||
{{ formatName(scope.row.sectionCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="arriveTime" label="到点">
|
||||
</el-table-column>
|
||||
<el-table-column prop="stopTime" label="停站时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="departureTime" label="发点">
|
||||
</el-table-column>
|
||||
<el-table-column prop="speedLevel" label="运行等级">
|
||||
</el-table-column>
|
||||
<el-table-column prop="arriveTime" label="到点" />
|
||||
<el-table-column prop="stopTime" label="停站时间" />
|
||||
<el-table-column prop="departureTime" label="发点" />
|
||||
<el-table-column prop="speedLevel" label="运行等级" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -111,7 +128,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row addToFront="flex" justify="center" class="button-group">
|
||||
<el-row add-to-front="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">确 定</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
</el-row>
|
||||
@ -155,13 +172,13 @@
|
||||
},
|
||||
tripNumberList: [{ value: '', label: '自动' }],
|
||||
defaultStopTimeList: [{ value: '', label: '默认' }],
|
||||
defaultSpeedLevelList: [{ value: '', label: '默认' }],
|
||||
}
|
||||
defaultSpeedLevelList: [{ value: '', label: '默认' }]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '添加任务'
|
||||
},
|
||||
return '添加任务';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'addModel.routingCode': function () {
|
||||
@ -184,21 +201,21 @@
|
||||
this.addModel.serviceNumber = params.serviceNumber;
|
||||
this.addModel.planId = this.$route.query.planId;
|
||||
|
||||
let planId = this.$route.query.planId;
|
||||
const planId = this.$route.query.planId;
|
||||
if (planId) {
|
||||
getRoutingList(planId).then(resp => {
|
||||
this.addModel.routingList = resp.data;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
let skinStyle = this.$route.query.skinStyle;
|
||||
const skinStyle = this.$route.query.skinStyle;
|
||||
if (skinStyle) {
|
||||
getStationRunning(skinStyle).then(resp => {
|
||||
let list = resp.data;
|
||||
const list = resp.data;
|
||||
list.forEach(elem => {
|
||||
this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(params) {
|
||||
@ -213,14 +230,14 @@
|
||||
return formatName(code);
|
||||
},
|
||||
computedTimeByString(timeStr) {
|
||||
let bTime = +new Date(`2019-01-01 00:00:00`);
|
||||
let eTime = +new Date(`2019-01-01 ${timeStr}`);
|
||||
const bTime = +new Date(`2019-01-01 00:00:00`);
|
||||
const eTime = +new Date(`2019-01-01 ${timeStr}`);
|
||||
return Number(eTime) - Number(bTime);
|
||||
},
|
||||
compuntedRunTime(list, index, runLevel) {
|
||||
let runTime = 0;
|
||||
if (index < list.length - 1) {
|
||||
let stopStationObj = this.stopStationMap[[list[index].sectionCode, list[index + 1].sectionCode].toString()];
|
||||
const stopStationObj = this.stopStationMap[[list[index].sectionCode, list[index + 1].sectionCode].toString()];
|
||||
if (stopStationObj) {
|
||||
if (stopStationObj.runPlanLevelVO) {
|
||||
runTime = parseInt(stopStationObj.runPlanLevelVO[runLevel]);
|
||||
@ -235,10 +252,10 @@
|
||||
computedDetailList() {
|
||||
if (this.addModel.routingCode) {
|
||||
querySectionListByRouting({ planId: this.$route.query.planId, routingCode: this.addModel.routingCode }).then(resp => {
|
||||
let list = resp.data;
|
||||
let waitTime = this.addModel.defaultStopTime || 30; //默认三十秒
|
||||
const list = resp.data;
|
||||
const waitTime = this.addModel.defaultStopTime || 30; // 默认三十秒
|
||||
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000 - 30;
|
||||
let runLevel = this.addModel.defaultSpeedLevel || 'level3'; //默认等级三
|
||||
const runLevel = this.addModel.defaultSpeedLevel || 'level3'; // 默认等级三
|
||||
list.forEach((elem, index) => {
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + waitTime);
|
||||
@ -259,7 +276,7 @@
|
||||
|
||||
this.addModel.arriveConfigList = list;
|
||||
this.addModel.endTime = formatTime(tempTime - waitTime);
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
handleClick(row, column, event) {
|
||||
@ -272,23 +289,23 @@
|
||||
handleCommit() {
|
||||
if (this.isPlan) {
|
||||
// 计划添加任务
|
||||
this.$emit('dispatchOperate', { dialogName: 'editPlanningTrain', operate: 'handleConfirmAddTask', params: Object.assign({}, this.addModel) })
|
||||
this.$emit('dispatchOperate', { dialogName: 'editPlanningTrain', operate: 'handleConfirmAddTask', params: Object.assign({}, this.addModel) });
|
||||
} else {
|
||||
// 直接添加任务
|
||||
addPlanTrip(this.addModel).then(resp => {
|
||||
this.$emit('dispatchOperate', {
|
||||
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: this.$route.query
|
||||
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
|
||||
});
|
||||
this.$message.success('添加任务成功!');
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox('添加任务失败');
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,10 +1,19 @@
|
||||
<template>
|
||||
<el-dialog class="planEdit__tool create-empty-plan" :title="title" :visible.sync="dialogShow" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool create-empty-plan"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-form ref="form" :model="addModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent>
|
||||
<el-form-item label="运行图名称:" prop="name">
|
||||
<el-input autofocus v-model="addModel.name"></el-input>
|
||||
<el-input v-model="addModel.name" autofocus />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
@ -28,20 +37,20 @@
|
||||
loading: false,
|
||||
addModel: {
|
||||
name: '',
|
||||
skinStyle: this.$route.query.skinStyle,
|
||||
}
|
||||
skinStyle: this.$route.query.skinStyle
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '创建空运行图数据'
|
||||
return '创建空运行图数据';
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
name: [
|
||||
{ required: true, message: '请输入运行图名称', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -56,24 +65,24 @@
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
createEmptyPlan(this.addModel).then(resp => {
|
||||
let params = {
|
||||
const params = {
|
||||
dialogName: 'openRunPlan',
|
||||
operate: 'loadRunPlanData',
|
||||
params: { planId: resp.data, skinStyle: this.$route.query.skinStyle, planName: this.addModel.name }
|
||||
}
|
||||
params: { planId: resp.data, skinStyle: this.$route.query.skinStyle, planName: this.addModel.name, refresh: true }
|
||||
};
|
||||
|
||||
this.$emit('dispatchOperate', params)
|
||||
this.$emit('dispatchOperate', params);
|
||||
this.$message.success('创建空运行图成功!');
|
||||
this.doClose();
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox('创建空运行图失败');
|
||||
this.doClose();
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,6 +1,15 @@
|
||||
<template>
|
||||
<el-dialog class="planEdit__tool delete-task" :title="title" :visible.sync="dialogShow" width="400px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool delete-task"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-radio v-model="model.deleteBefore" :label="true">删除以前所有任务(包含本任务)</el-radio>
|
||||
</el-row>
|
||||
@ -30,13 +39,13 @@
|
||||
taskIndex: '',
|
||||
deleteBefore: false,
|
||||
tripNumber: '',
|
||||
serviceNumber: '',
|
||||
},
|
||||
serviceNumber: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '删除任务'
|
||||
return '删除任务';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -56,29 +65,29 @@
|
||||
handleCommit() {
|
||||
if (this.isPlan) {
|
||||
// 计划删除任务
|
||||
this.$emit('dispatchOperate', { dialogName: 'editPlanningTrain', operate: 'handleConfirmDeleteTask', params: this.model })
|
||||
this.$emit('dispatchOperate', { dialogName: 'editPlanningTrain', operate: 'handleConfirmDeleteTask', params: this.model });
|
||||
} else {
|
||||
// 直接删除任务
|
||||
let model = {
|
||||
const model = {
|
||||
planId: this.$route.query.planId,
|
||||
SDTNumber: `${this.model.serviceNumber}${this.model.tripNumber}`,
|
||||
deleteBefore: this.model.deleteBefore
|
||||
}
|
||||
};
|
||||
|
||||
deletePlanTrip(model).then(resp => {
|
||||
this.$store.dispatch('runPlan/setSelected', {});
|
||||
this.$emit('dispatchOperate', {
|
||||
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: this.$route.query
|
||||
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
|
||||
});
|
||||
this.$message.success('删除任务成功!');
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox('删除任务失败');
|
||||
})
|
||||
});
|
||||
}
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,6 +1,15 @@
|
||||
<template>
|
||||
<el-dialog class="planEdit__tool duplicate-train" :title="title" :visible.sync="dialogShow" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool duplicate-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row type="flex" justify="center">
|
||||
<el-radio-group v-model="model.forward">
|
||||
<el-radio :label="true">向前</el-radio>
|
||||
@ -10,13 +19,13 @@
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :span="5" :offset="4">次数:</el-col>
|
||||
<el-col :span="10">
|
||||
<el-input-number v-model="model.times" size="mini" controls-position="right"></el-input-number>
|
||||
<el-input-number v-model="model.times" size="mini" controls-position="right" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin: 10px 0px">
|
||||
<el-col :span="5" :offset="4">间隔时间:</el-col>
|
||||
<el-col :span="10">
|
||||
<el-input-number v-model="model.intervals" size="mini" controls-position="right"></el-input-number>
|
||||
<el-input-number v-model="model.intervals" size="mini" controls-position="right" />
|
||||
<span>秒</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -42,13 +51,13 @@
|
||||
serviceNumber: '',
|
||||
forward: false,
|
||||
times: 0,
|
||||
intervals: 0,
|
||||
}
|
||||
intervals: 0
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '复制列车'
|
||||
return '复制列车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -68,15 +77,15 @@
|
||||
this.doClose();
|
||||
duplicateService(this.model).then(resp => {
|
||||
this.$emit('dispatchOperate', {
|
||||
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: this.$route.query
|
||||
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
|
||||
});
|
||||
this.$message.success('复制计划成功!');
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox('复制计划失败');
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,10 +1,19 @@
|
||||
<template>
|
||||
<el-dialog class="planEdit__tool edit-planning-train" :title="title" :visible.sync="dialogShow" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool edit-planning-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="3"> 表号: </el-col>
|
||||
<el-col :span="4">
|
||||
<el-input v-model="model.serviceNumber" disabled size="mini"></el-input>
|
||||
<el-input v-model="model.serviceNumber" disabled size="mini" />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-checkbox v-model="model.debugTrain">调试车</el-checkbox>
|
||||
@ -15,8 +24,13 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div style=" float: left; width: 78%">
|
||||
<el-table :data="model.tripConfigList" highlight-current-row @current-change="handleCurrentChange"
|
||||
border :height="380">
|
||||
<el-table
|
||||
:data="model.tripConfigList"
|
||||
highlight-current-row
|
||||
border
|
||||
:height="380"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column prop="beginStationCode" label="起始站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.startStationCode) }}
|
||||
@ -37,8 +51,7 @@
|
||||
{{ scope.row.endTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="20">
|
||||
</el-table-column>
|
||||
<el-table-column width="20" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="float: right; width: 22%">
|
||||
@ -68,13 +81,13 @@
|
||||
model: {
|
||||
serviceNumber: '',
|
||||
debugTrain: false,
|
||||
tripConfigList: [],
|
||||
}
|
||||
tripConfigList: []
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '编辑计划车'
|
||||
return '编辑计划车';
|
||||
},
|
||||
disabled() {
|
||||
return !this.model.serviceNumber;
|
||||
@ -91,13 +104,13 @@
|
||||
this.model.planId = this.$route.query.planId;
|
||||
this.model.serviceNumber = params.serviceNumber;
|
||||
this.model.tripConfigList = [];
|
||||
let editData = this.$store.state.runPlan.editData[params.serviceNumber]
|
||||
const editData = this.$store.state.runPlan.editData[params.serviceNumber];
|
||||
if (editData) {
|
||||
let tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex });
|
||||
const tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex; });
|
||||
tripNumberList.forEach(tripNumber => {
|
||||
let trainInfo = editData.trainMap[tripNumber];
|
||||
let lastIndex = trainInfo.stationTimeList.length - 1;
|
||||
let taskObj = {
|
||||
const trainInfo = editData.trainMap[tripNumber];
|
||||
const lastIndex = trainInfo.stationTimeList.length - 1;
|
||||
const taskObj = {
|
||||
taskIndex: getUID('task_'),
|
||||
tripNumber: tripNumber,
|
||||
startStationCode: trainInfo.stationTimeList[0].stationCode,
|
||||
@ -105,10 +118,10 @@
|
||||
endStationCode: trainInfo.stationTimeList[lastIndex].stationCode,
|
||||
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime),
|
||||
arriveConfigList: []
|
||||
}
|
||||
};
|
||||
// console.log(editData.trainMap[tripNumber]);
|
||||
this.model.tripConfigList.push(taskObj);
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(params) {
|
||||
@ -130,7 +143,7 @@
|
||||
serviceNumber: this.model.serviceNumber,
|
||||
tripNumber: this.currentRow.tripNumber
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
handleEditTask() {
|
||||
if (this.currentRow.taskIndex) {
|
||||
@ -140,7 +153,7 @@
|
||||
serviceNumber: this.model.serviceNumber,
|
||||
tripNumber: this.currentRow.tripNumber
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
@ -154,7 +167,7 @@
|
||||
serviceNumber: this.model.serviceNumber,
|
||||
tripNumber: this.currentRow.tripNumber
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
@ -181,8 +194,8 @@
|
||||
}
|
||||
},
|
||||
handleConfirmDeleteTask(model) {
|
||||
let index = this.model.tripConfigList.findIndex(
|
||||
elem => { return elem.taskIndex == this.currentRow.taskIndex }
|
||||
const index = this.model.tripConfigList.findIndex(
|
||||
elem => { return elem.taskIndex == this.currentRow.taskIndex; }
|
||||
);
|
||||
|
||||
if (index >= 0) {
|
||||
@ -197,15 +210,15 @@
|
||||
this.doClose();
|
||||
addPlanService(this.model).then(() => {
|
||||
this.$emit('dispatchOperate', {
|
||||
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: this.$route.query
|
||||
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
|
||||
});
|
||||
this.$message.success('创建计划成功');
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox('创建计划失败');
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,6 +1,15 @@
|
||||
<template>
|
||||
<el-dialog class="planEdit__tool add-task" :title="title" :visible.sync="dialogShow" width="1000px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool add-task"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="1000px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="margin: 10px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
@ -9,10 +18,13 @@
|
||||
<span>车次号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select style="display: inline-black" v-model="editModel.tripNumber" placeholder="请选择">
|
||||
<el-option v-for="item in tripNumberList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
<el-select v-model="editModel.tripNumber" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in tripNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -30,11 +42,17 @@
|
||||
<span>缺省停站时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select style="display: inline-black" v-model="editModel.defaultStopTime"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in defaultStopTimeList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
<el-select
|
||||
v-model="editModel.defaultStopTime"
|
||||
style="display: inline-black"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in defaultStopTimeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -45,7 +63,7 @@
|
||||
<span>表号:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-input v-model="editModel.serviceNumber"></el-input>
|
||||
<el-input v-model="editModel.serviceNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@ -74,10 +92,13 @@
|
||||
<span>序列号:</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-select style="display: inline-black" v-model="editModel.serialNumber" placeholder="请选择">
|
||||
<el-option v-for="item in serialNumberList" :key="item.value" :label="item.label"
|
||||
:value="editModel.value">
|
||||
</el-option>
|
||||
<el-select v-model="editModel.serialNumber" style="display: inline-black" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in serialNumberList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="editModel.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -95,11 +116,17 @@
|
||||
<span>缺省运行等级:</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select style="display: inline-black" v-model="editModel.defaultSpeedLevel"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in defaultSpeedLevelList" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
<el-select
|
||||
v-model="editModel.defaultSpeedLevel"
|
||||
style="display: inline-black"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in defaultSpeedLevelList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -110,9 +137,12 @@
|
||||
<span>开始时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-time-picker v-model="editModel.startTime" placeholder="选择时间" value-format="HH:mm:ss"
|
||||
:clearable="false">
|
||||
</el-time-picker>
|
||||
<el-time-picker
|
||||
v-model="editModel.startTime"
|
||||
placeholder="选择时间"
|
||||
value-format="HH:mm:ss"
|
||||
:clearable="false"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@ -144,19 +174,15 @@
|
||||
{{ formatName(scope.row.startStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startSectionCode" label="起始区段">
|
||||
</el-table-column>
|
||||
<el-table-column prop="startSectionCode" label="起始区段" />
|
||||
<el-table-column prop="endStationCode" label="终到站">
|
||||
<template slot-scope="scope">
|
||||
{{ formatName(scope.row.endStationCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endSectionCode" label="终到区段">
|
||||
</el-table-column>
|
||||
<el-table-column prop="remarks" label="描述" :width="280">
|
||||
</el-table-column>
|
||||
<el-table-column :width="40">
|
||||
</el-table-column>
|
||||
<el-table-column prop="endSectionCode" label="终到区段" />
|
||||
<el-table-column prop="remarks" label="描述" :width="280" />
|
||||
<el-table-column :width="40" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
|
||||
@ -174,14 +200,10 @@
|
||||
{{ formatName(scope.row.sectionCode) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="arriveTime" label="到点">
|
||||
</el-table-column>
|
||||
<el-table-column prop="stopTime" label="停站时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="departureTime" label="发点">
|
||||
</el-table-column>
|
||||
<el-table-column prop="speedLevel" label="运行等级">
|
||||
</el-table-column>
|
||||
<el-table-column prop="arriveTime" label="到点" />
|
||||
<el-table-column prop="stopTime" label="停站时间" />
|
||||
<el-table-column prop="departureTime" label="发点" />
|
||||
<el-table-column prop="speedLevel" label="运行等级" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -198,7 +220,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRoutingBySDTNumber, querySectionListByRouting, getRoutingList, getStationRunning, updatePlanTrip } from '@/api/runplan';
|
||||
import { getRoutingBySDTNumber, querySectionListByRouting, getStationRunning, updatePlanTrip } from '@/api/runplan';
|
||||
import { formatTime, formatName } from '@/utils/runPlan';
|
||||
|
||||
export default {
|
||||
@ -232,17 +254,17 @@
|
||||
firstTrain: false,
|
||||
lastTrain: false,
|
||||
inStock: false,
|
||||
outStock: false,
|
||||
outStock: false
|
||||
},
|
||||
tripNumberList: [{ value: '', label: '自动' }],
|
||||
defaultStopTimeList: [{ value: '', label: '默认' }],
|
||||
defaultSpeedLevelList: [{ value: '', label: '默认' }],
|
||||
serialNumberList: [],
|
||||
}
|
||||
serialNumberList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改任务'
|
||||
return '修改任务';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -264,14 +286,14 @@
|
||||
return formatName(code);
|
||||
},
|
||||
computedTimeByString(timeStr) {
|
||||
let bTime = +new Date(`2019-01-01 00:00:00`);
|
||||
let eTime = +new Date(`2019-01-01 ${timeStr}`);
|
||||
const bTime = +new Date(`2019-01-01 00:00:00`);
|
||||
const eTime = +new Date(`2019-01-01 ${timeStr}`);
|
||||
return Number(eTime) - Number(bTime);
|
||||
},
|
||||
compuntedRunTime(list, index, runLevel) {
|
||||
let runTime = 0;
|
||||
if (index < list.length - 1) {
|
||||
let stopStationObj = this.stopStationMap[[list[index].sectionCode, list[index + 1].sectionCode].toString()];
|
||||
const stopStationObj = this.stopStationMap[[list[index].sectionCode, list[index + 1].sectionCode].toString()];
|
||||
if (stopStationObj) {
|
||||
if (stopStationObj.runPlanLevelVO) {
|
||||
runTime = parseInt(stopStationObj.runPlanLevelVO[runLevel]);
|
||||
@ -287,10 +309,10 @@
|
||||
this.editModel.arriveConfigList = [];
|
||||
if (this.editModel.routingCode) {
|
||||
querySectionListByRouting({ planId: this.$route.query.planId, routingCode: this.editModel.routingCode }).then(rest => {
|
||||
let list = rest.data;
|
||||
let waitTime = this.editModel.defaultStopTime || 30; //默认三十秒
|
||||
const list = rest.data;
|
||||
const waitTime = this.editModel.defaultStopTime || 30; // 默认三十秒
|
||||
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000 - 30;
|
||||
let runLevel = this.editModel.defaultSpeedLevel || 'level3'; //默认等级三
|
||||
const runLevel = this.editModel.defaultSpeedLevel || 'level3'; // 默认等级三
|
||||
list.forEach((elem, index) => {
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + waitTime);
|
||||
@ -300,13 +322,13 @@
|
||||
});
|
||||
|
||||
if (this.editModel.routingList && this.editModel.routingList.length > 0) {
|
||||
let row = this.editModel.routingList[0];
|
||||
let startSection = this.$store.getters['map/getDeviceByCode'](row.startSectionCode);
|
||||
const row = this.editModel.routingList[0];
|
||||
const startSection = this.$store.getters['map/getDeviceByCode'](row.startSectionCode);
|
||||
if (startSection && startSection.isReentryTrack) {
|
||||
list.shift();
|
||||
}
|
||||
|
||||
let endSection = this.$store.getters['map/getDeviceByCode'](row.endSectionCode);
|
||||
const endSection = this.$store.getters['map/getDeviceByCode'](row.endSectionCode);
|
||||
if (endSection && endSection.isReentryTrack) {
|
||||
list.pop();
|
||||
}
|
||||
@ -314,41 +336,41 @@
|
||||
|
||||
this.editModel.arriveConfigList = list;
|
||||
this.editModel.endTime = formatTime(tempTime - waitTime);
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
loadInitData(params) {
|
||||
let skinStyle = this.$route.query.skinStyle;
|
||||
const skinStyle = this.$route.query.skinStyle;
|
||||
this.isPlan = params.isPlan;
|
||||
this.editModel.taskIndex = params.taskIndex;
|
||||
this.editModel.serviceNumber = params.serviceNumber;
|
||||
this.editModel.tripNumber = params.tripNumber;
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(skinStyle);
|
||||
|
||||
let editData = this.$store.state.runPlan.editData[this.editModel.serviceNumber]
|
||||
const editData = this.$store.state.runPlan.editData[this.editModel.serviceNumber];
|
||||
if (editData) {
|
||||
let tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex });
|
||||
let trainInfo = editData.trainMap[tripNumberList[0]];
|
||||
const tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex; });
|
||||
const trainInfo = editData.trainMap[tripNumberList[0]];
|
||||
this.editModel.startTime = formatTime(trainInfo.stationTimeList[0].secondTime + this.PlanConvert.TranslationTime);
|
||||
}
|
||||
|
||||
if (skinStyle) {
|
||||
getStationRunning(skinStyle).then(resp => {
|
||||
let list = resp.data;
|
||||
const list = resp.data;
|
||||
list.forEach(elem => {
|
||||
this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
let model = {
|
||||
const model = {
|
||||
planId: this.$route.query.planId,
|
||||
SDTNumber: `${this.editModel.serviceNumber}${this.editModel.tripNumber}`
|
||||
}
|
||||
};
|
||||
|
||||
this.editModel.routingList = [];
|
||||
getRoutingBySDTNumber(model).then(resp => {
|
||||
let routingObj = resp.data;
|
||||
const routingObj = resp.data;
|
||||
this.editModel.routingCode = routingObj.code;
|
||||
this.editModel.routingList.push(routingObj);
|
||||
this.computedDetailList();
|
||||
@ -371,7 +393,7 @@
|
||||
endTime: this.editModel.endTime,
|
||||
arriveConfigList: this.editModel.arriveConfigList,
|
||||
SDTNumber: `${this.editModel.serviceNumber}${this.editModel.tripNumber}`
|
||||
}
|
||||
};
|
||||
},
|
||||
handleCommit() {
|
||||
if (this.isPlan) {
|
||||
@ -380,17 +402,17 @@
|
||||
// 直接修改
|
||||
updatePlanTrip(this.buildModel()).then(resp => {
|
||||
this.$emit('dispatchOperate', {
|
||||
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: this.$route.query
|
||||
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
|
||||
});
|
||||
this.$message.success('修改任务成功!');
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox('修改任务失败');
|
||||
});
|
||||
}
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,9 +1,19 @@
|
||||
<template>
|
||||
<el-dialog class="planEdit__tool add-planning-train" :title="title" :visible.sync="dialogShow" :width="width + 'px'"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool add-planning-train"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
:width="width + 'px'"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24" :offset="1">
|
||||
<i class="el-icon-warning"></i>
|
||||
<i class="el-icon-warning" />
|
||||
{{ params.message }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -24,12 +34,12 @@
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
params: {},
|
||||
}
|
||||
params: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return 'offline'
|
||||
return 'offline';
|
||||
},
|
||||
width() {
|
||||
if (this.params.width) {
|
||||
@ -55,7 +65,7 @@
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,9 +1,24 @@
|
||||
<template>
|
||||
<el-dialog class="planEdit__tool open-runplan" :title="title" :visible.sync="show" width="640px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height: height+'px'}">
|
||||
<el-tree ref="tree" class="filter-tree" :data="runPlanList" :props="defaultProps" default-expand-all
|
||||
:style="{height: height-20+'px'}">
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="planEdit__tool open-runplan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: height+'px'}">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
class="filter-tree"
|
||||
:data="runPlanList"
|
||||
:props="defaultProps"
|
||||
default-expand-all
|
||||
:style="{height: height-20+'px'}"
|
||||
>
|
||||
<span slot-scope="{ node, data }">
|
||||
<el-radio v-model="planId" :label="data.id"><span>{{ data.name }}</span></el-radio>
|
||||
</span>
|
||||
@ -17,10 +32,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getjointTraining, putJointTrainingSimulationEntrance } from '@/api/chat';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { getStationListBySkinStyle, queryRunPlan, getRpListByMapId } from '@/api/runplan';
|
||||
import { getRpListByMapId } from '@/api/runplan';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
|
||||
export default {
|
||||
@ -40,9 +52,9 @@
|
||||
runPlanList: [],
|
||||
runPlanDict: {},
|
||||
defaultProps: {
|
||||
label: 'name',
|
||||
}
|
||||
label: 'name'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -50,7 +62,7 @@
|
||||
},
|
||||
title() {
|
||||
return '运行图列表';
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadRunPlanData({
|
||||
@ -60,9 +72,13 @@
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadRunPlanData({ planId, skinStyle, planName }) {
|
||||
let query = { skinStyle: skinStyle, mapId: this.$route.query.mapId, planId: planId, planName, try: this.$route.query.try, goodsId: this.$route.query.goodsId }
|
||||
loadRunPlanData({ refresh, planId, skinStyle, planName }) {
|
||||
if (refresh) {
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
} else {
|
||||
const query = { skinStyle: skinStyle, mapId: this.$route.query.mapId, planId: planId, planName, try: this.$route.query.try, goodsId: this.$route.query.goodsId };
|
||||
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
||||
}
|
||||
},
|
||||
doShow() {
|
||||
getRpListByMapId(this.$route.query.mapId).then((resp) => {
|
||||
@ -71,9 +87,9 @@
|
||||
this.runPlanDict[elem.id] = elem.name;
|
||||
});
|
||||
this.dialogShow = true;
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取运行图列表失败');
|
||||
})
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
@ -87,7 +103,7 @@
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -235,6 +235,9 @@ export default {
|
||||
});
|
||||
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
|
||||
},
|
||||
'$store.state.runPlan.refreshCount': function() {
|
||||
this.loadChartPage();
|
||||
},
|
||||
$route() {
|
||||
this.loadChartPage();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user