Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
af6eb5917f
@ -53,6 +53,7 @@
|
||||
"compression-webpack-plugin": "^3.0.0",
|
||||
"connect": "3.6.6",
|
||||
"copy-webpack-plugin": "^4.5.2",
|
||||
|
||||
"eslint": "5.15.3",
|
||||
"eslint-plugin-vue": "5.2.2",
|
||||
"file-loader": "^3.0.1",
|
||||
|
@ -178,3 +178,11 @@ export function getOnlineNmuber() {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
// 生成线下环境用户
|
||||
export function generateOfflineUser(data) {
|
||||
return request({
|
||||
url: `/api/user/generate/offline`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
import StompClient from '@/utils/sock';
|
||||
import { displayTopic } from '@/utils/stomp';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import router from '@/router';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
|
||||
// 定于仿真socket接口
|
||||
export function Jlmap3dSubscribe(worker,routegroup) {
|
||||
|
@ -311,7 +311,7 @@ import { OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { now } from '@/utils/date';
|
||||
import ConfirmTip from './childDialog/confirmTip';
|
||||
import { sendCommand } from '@/api/jmap/training';
|
||||
import router from '@/router';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
|
||||
export default {
|
||||
name: 'SectionCmdSpeed',
|
||||
|
@ -311,7 +311,7 @@ import { OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { now } from '@/utils/date';
|
||||
import ConfirmTip from './childDialog/confirmTip';
|
||||
import { sendCommand } from '@/api/jmap/training';
|
||||
import router from '@/router';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
|
||||
export default {
|
||||
name: 'SectionCmdSpeed',
|
||||
|
@ -289,6 +289,8 @@ class SkinCode extends defaultStyle {
|
||||
textColor: '#FFFFFF', // 停站时间字体颜色
|
||||
textFontSize: 8
|
||||
},
|
||||
trainStop: {}, // 停车标志
|
||||
trainDepart: {}, // 停车计时
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: { x: -8, y: 10 }, // 运行等级偏移量
|
||||
|
@ -248,6 +248,8 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'normal', // 文字居中
|
||||
textFontSize: 11 // 圆半径大小
|
||||
},
|
||||
trainStop: {}, // 停车标志
|
||||
trainDepart: {}, // 停车计时
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 30}, // 运行等级偏移量
|
||||
|
@ -254,6 +254,8 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'normal',
|
||||
textFontSize: 11
|
||||
},
|
||||
trainStop: {}, // 停车标志
|
||||
trainDepart: {}, // 停车计时
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 15}, // 运行等级偏移量
|
||||
|
@ -243,6 +243,8 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'normal', // 文字居中
|
||||
textFontSize: 11
|
||||
},
|
||||
trainStop: {}, // 停车标志
|
||||
trainDepart: {}, // 停车计时
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: -6}, // 运行等级偏移量
|
||||
|
@ -243,6 +243,19 @@ class SkinCode extends defaultStyle {
|
||||
fontSize: 18
|
||||
},
|
||||
stopTime: {}, // 停站时间
|
||||
trainStop: { // 停车标志
|
||||
fillColor: '#FF0000',
|
||||
insideOffset:{ x: 6, y: -22}, // 内站台停车标志偏移量
|
||||
outsideOffset: { x: -6, y: 22}, // 外站台停车标志偏移量
|
||||
radiusR: 4 // 标志半径
|
||||
},
|
||||
trainDepart:{ // 停车计时
|
||||
insideOffset:{ x: 25, y: -21}, // 内站台停车计时偏移量
|
||||
outsideOffset: { x: -25, y: 21}, // 外站台停车计时偏移量
|
||||
textFill: '#00FF00', // 文字颜色
|
||||
textBorderColor: '#00FF00', // 文字边框颜色
|
||||
fontSize: 10 // 字体大小
|
||||
},
|
||||
level: { // 运行等级
|
||||
position: 1, // 运行等级方向
|
||||
offset: { x: -8, y: 6 }, // 运行等级偏移量
|
||||
|
@ -343,6 +343,8 @@ class SkinCode extends defaultStyle {
|
||||
textFontSize: 10 // 停站时间字体大小
|
||||
},
|
||||
jump: {},
|
||||
trainStop: {}, // 停车标志
|
||||
trainDepart: {}, // 停车计时
|
||||
level: { // 运行等级
|
||||
position: -1, // 运行等级方向
|
||||
offset: { x: -8, y: 4 }, // 运行等级偏移量
|
||||
|
@ -14,40 +14,21 @@ class ETrainDepart extends Group {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const gag = 22;
|
||||
this.isNew = true;
|
||||
let cy = model.inside ? model.y + gag : model.y - gag;
|
||||
let cx = model.inside ? model.x - model.width / 4 - model.width / 8 : model.x + model.width / 4 + model.width / 8;
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 4 + model.width / 8;
|
||||
} else {
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 4 - model.width / 8;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 4 - model.width / 8;
|
||||
} else {
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 4 + model.width / 8;
|
||||
}
|
||||
}
|
||||
this.trainDepart = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: cx,
|
||||
y: cy,
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
text: text,
|
||||
textAlign: 'middle',
|
||||
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`,
|
||||
textFill: 'green',
|
||||
textVerticalAlign: 'middle',
|
||||
textBorderColor: 'green',
|
||||
textAlign: style.textStyle.textAlign,
|
||||
fontSize: style.StationStand.trainDepart.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
textFill: style.StationStand.trainDepart.textFill,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign,
|
||||
textBorderColor: style.StationStand.trainDepart.textBorderColor,
|
||||
textPadding: 2,
|
||||
textBorderWidth: 1
|
||||
}
|
||||
@ -61,13 +42,12 @@ class ETrainDepart extends Group {
|
||||
this.trainDepart.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.trainDepart.hide();
|
||||
hideMode() {
|
||||
this.trainDepart && this.trainDepart.hide();
|
||||
this.time && clearInterval(this.time);
|
||||
}
|
||||
|
||||
show() {
|
||||
showMode() {
|
||||
this.timeStart = 30;
|
||||
this.create(`0${this.timeStart}`);
|
||||
this.trainDepart.show();
|
||||
|
@ -11,38 +11,19 @@ class ETrainStop extends Group {
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
const gag = 22;
|
||||
const style = this.model.style;
|
||||
this.isNew = true;
|
||||
let cy = model.inside ? model.y + gag : model.y - gag;
|
||||
let cx = model.inside ? model.x - model.width / 8 : model.x + model.width / 8;
|
||||
if (model.right) {
|
||||
if (model.inside) {
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 8;
|
||||
} else {
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 8;
|
||||
}
|
||||
} else {
|
||||
if (model.inside) {
|
||||
cy = model.y + gag;
|
||||
cx = model.x - model.width / 8;
|
||||
} else {
|
||||
cy = model.y - gag;
|
||||
cx = model.x + model.width / 8;
|
||||
}
|
||||
}
|
||||
this.trainStop = new Arc({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
cx: cx,
|
||||
cy: cy,
|
||||
r: model.r
|
||||
cx: model.x,
|
||||
cy: model.y,
|
||||
r: style.StationStand.trainStop.radiusR
|
||||
},
|
||||
style: {
|
||||
fill: 'red',
|
||||
stroke: 'red'
|
||||
fill: style.StationStand.trainStop.fillColor,
|
||||
stroke: style.StationStand.trainStop.fillColor
|
||||
}
|
||||
});
|
||||
this.add(this.trainStop);
|
||||
@ -54,12 +35,11 @@ class ETrainStop extends Group {
|
||||
this.trainStop.setStyle('textFill', color);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.trainStop.hide();
|
||||
hideMode() {
|
||||
this.trainStop && this.trainStop.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
showMode() {
|
||||
this.create();
|
||||
this.trainStop.show();
|
||||
}
|
||||
|
@ -79,36 +79,39 @@ class StationStand extends Group {
|
||||
this.add(this.emergent);
|
||||
|
||||
// 列车停站
|
||||
const stopX = model.position.x;
|
||||
const stopY = model.position.y;
|
||||
this.trainStop = new ETrainStop({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
inside: model.inside,
|
||||
right: model.right,
|
||||
width: model.width,
|
||||
x: stopX,
|
||||
y: stopY,
|
||||
r: style.StationStand.standEmergent.mergentR,
|
||||
n: 4
|
||||
});
|
||||
this.add(this.trainStop);
|
||||
if (style.StationStand.trainStop.insideOffset) {
|
||||
const stopTrainOffset = model.inside ? style.StationStand.trainStop.insideOffset : style.StationStand.trainStop.outsideOffset;
|
||||
const stopTrainH = model.right ? 1 : -1;
|
||||
const stopX = model.position.x + stopTrainH * stopTrainOffset.x;
|
||||
const stopY = model.position.y + stopTrainH * stopTrainOffset.y;
|
||||
if (style.StationStand.trainStop.insideOffset) {
|
||||
this.trainStop = new ETrainStop({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: stopX,
|
||||
y: stopY
|
||||
});
|
||||
this.add(this.trainStop);
|
||||
}
|
||||
}
|
||||
|
||||
// 列车出发
|
||||
const departX = model.position.x;
|
||||
const departY = model.position.y;
|
||||
this.trainDepart = new ETrainDepart({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
inside: model.inside,
|
||||
right: model.right,
|
||||
width: model.width,
|
||||
x: departX,
|
||||
y: departY
|
||||
});
|
||||
this.add(this.trainDepart);
|
||||
if (style.StationStand.trainDepart.insideOffset) {
|
||||
const trainDepartOffset = model.inside ? style.StationStand.trainDepart.insideOffset : style.StationStand.trainDepart.outsideOffset;
|
||||
const trainDepartH = model.right ? 1 : -1;
|
||||
const departX = model.position.x + trainDepartH * trainDepartOffset.x;
|
||||
const departY = model.position.y + trainDepartH * trainDepartOffset.y;
|
||||
this.trainDepart = new ETrainDepart({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
width: model.width,
|
||||
x: departX,
|
||||
y: departY
|
||||
});
|
||||
this.add(this.trainDepart);
|
||||
}
|
||||
|
||||
/** 站台折返策略*/
|
||||
if (style.StationStand.reentry.offset) {
|
||||
@ -343,8 +346,8 @@ class StationStand extends Group {
|
||||
this.level && this.level.hideMode();
|
||||
this.detain && this.detain.hideMode();
|
||||
this.emergent && this.emergent.hideMode();
|
||||
this.trainStop && this.trainStop.hide(); // 列车停站
|
||||
this.trainDepart && this.trainDepart.hide();
|
||||
this.trainStop && this.trainStop.hideMode(); // 列车停站
|
||||
this.trainDepart && this.trainDepart.hideMode();
|
||||
this.reentry && this.reentry.hideMode();
|
||||
this.jump && this.jump.hideMode();
|
||||
}
|
||||
@ -361,8 +364,8 @@ class StationStand extends Group {
|
||||
if (!this.style.StationStand.common.special) {
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.stopColor);
|
||||
} else {
|
||||
this.trainStop && this.trainStop.show();
|
||||
this.trainDepart && this.trainDepart.show();
|
||||
this.trainStop && this.trainStop.showMode();
|
||||
this.trainDepart && this.trainDepart.showMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,8 +127,11 @@ export default {
|
||||
// 取消列车进路
|
||||
cancelTrainRoute() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
@ -138,9 +141,12 @@ export default {
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.confirmControl.doShow(data.operate);
|
||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
@ -149,8 +155,11 @@ export default {
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -279,8 +279,11 @@ export default {
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
@ -290,8 +293,11 @@ export default {
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -225,8 +225,11 @@ export default {
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -188,8 +188,11 @@ export default {
|
||||
},
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -189,8 +189,11 @@ export default {
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standReentryStrategy: this.strategy}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standReentryStrategy: this.strategy}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -266,8 +266,11 @@ export default {
|
||||
},
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
@ -278,7 +281,6 @@ export default {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
@ -245,8 +245,11 @@ export default {
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
@ -257,8 +260,11 @@ export default {
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -186,8 +186,11 @@ export default {
|
||||
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -199,23 +199,29 @@ export default {
|
||||
},
|
||||
// 请求遥控
|
||||
conterCommit() {
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由站控转为中控:\n' + this.stationName);
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由站控转为中控:\n' + this.stationName);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 请求站控
|
||||
requestCommit() {
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 紧急站控
|
||||
emergencyCommit() {
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -173,8 +173,10 @@ export default {
|
||||
// },
|
||||
// 故障解锁
|
||||
faultUnlock(selectType) {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, data.selected);
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, selectType);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
@ -187,25 +189,33 @@ export default {
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
alxeEffective() {
|
||||
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.alxeEffective.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
axlePreReset(selectType) {
|
||||
commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, selectType);
|
||||
commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, selectType);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
@ -216,8 +226,10 @@ export default {
|
||||
// },
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.speedLimitControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -332,94 +332,109 @@ export default {
|
||||
},
|
||||
// 设置进路
|
||||
arrangementRoute() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地设置进路
|
||||
setRoute(route) {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, [], 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, [], 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地取消进路
|
||||
cancelTrainRouteByLow(selectType) {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 现地总人解
|
||||
humanTrainRoute(selectType) {
|
||||
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then((data)=>{
|
||||
data.operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
this.$refs.password.doShow(data.operate);
|
||||
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地信号重开操作
|
||||
reopenSignalByRoute(selectType) {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地信号关灯
|
||||
signalCloseByLow(selectType) {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置通过模式
|
||||
singalPassModel(selectType) {
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 取消通过模式
|
||||
singalCancelPassModel(selectType) {
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
|
@ -243,28 +243,32 @@ export default {
|
||||
},
|
||||
// 现地设置扣车
|
||||
setDetainTrainByLow(selectType) {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
/** 取消扣车 */
|
||||
cancleDetainTrainByLow(selectType) {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 强制取消扣车
|
||||
@ -293,14 +297,18 @@ export default {
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 停站时间控制
|
||||
setStopTime() {
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standStopTime.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standStopTime.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 运行时间控制
|
||||
@ -313,20 +321,26 @@ export default {
|
||||
},
|
||||
// 设置提前发车
|
||||
earlyDeparture() {
|
||||
commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standBackStrategy.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standBackStrategy.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standDetail.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standDetail.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -238,63 +238,76 @@ export default {
|
||||
},
|
||||
// 道岔单锁
|
||||
lock(selectType) {
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock(selectType) {
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, selectType);
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, selectType);
|
||||
}
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 现地道岔强扳
|
||||
switchTurnoutForce(selectType) {
|
||||
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, selectType);
|
||||
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, selectType);
|
||||
}
|
||||
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 单操到定位
|
||||
locate(selectType) {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 单操到反位
|
||||
reverse(selectType) {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置临时限速
|
||||
setSpeed() {
|
||||
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.speedLimitControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.alxeEffective.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
|
@ -142,7 +142,7 @@ export default {
|
||||
val: `${upDown}`
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
@ -157,7 +157,7 @@ export default {
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -174,11 +174,11 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
|
@ -133,33 +133,41 @@ export default {
|
||||
},
|
||||
// 设置计轴失效
|
||||
alxeFailure() {
|
||||
commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
fault() {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionUnLock.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
// // 设置速度
|
||||
// setSpeed() {
|
||||
// commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
// this.$refs.speedLimitControl.doShow(data.operate, this.selected);
|
||||
// commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
// if (valid) {
|
||||
// this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
@ -283,19 +283,23 @@ export default {
|
||||
},
|
||||
// 排列进路
|
||||
arrangementRoute() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号封锁
|
||||
lock(selectType) {
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.routeLock.doShow(data.operation, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
@ -303,7 +307,7 @@ export default {
|
||||
},
|
||||
// 信号解封
|
||||
unlock(selectType) {
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.routeUnLock.doShow(data.operation, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
@ -311,31 +315,39 @@ export default {
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置通过模式
|
||||
singalPassModel(selectType) {
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.routeControl.doShow(data.operation, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
@ -343,7 +355,7 @@ export default {
|
||||
},
|
||||
// 取消通过模式
|
||||
singalCancelPassModel(selectType) {
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.routeControl.doShow(data.operation, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
@ -351,20 +363,26 @@ export default {
|
||||
},
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
humanTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routerCommand.doShow(data.operate, this.selected, '是否执行人解列车进路命令?');
|
||||
commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行人解列车进路命令?');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路引导
|
||||
guide() {
|
||||
commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routerCommand.doShow(data.operate, this.selected, '是否执行引导命令');
|
||||
commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行引导命令');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
|
@ -237,56 +237,74 @@ export default {
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置停站时间
|
||||
setStopTime() {
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standStopTime.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standStopTime.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standRunLevel.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standRunLevel.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置提前发车
|
||||
earlyDeparture() {
|
||||
commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 全线取消扣车
|
||||
cancelDetainTrainAll() {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrainAll, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standDetainTrainAll.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrainAll, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standDetainTrainAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standDetail.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standDetail.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ export default {
|
||||
},
|
||||
// 单操到定位
|
||||
locate(selectType) {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
@ -221,7 +221,7 @@ export default {
|
||||
},
|
||||
// 单操到反位
|
||||
reverse(selectType) {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
@ -229,7 +229,7 @@ export default {
|
||||
},
|
||||
// 道岔单锁
|
||||
lock(selectType) {
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
@ -237,7 +237,7 @@ export default {
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock(selectType) {
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchUnLock.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
@ -245,7 +245,7 @@ export default {
|
||||
},
|
||||
// 道岔封锁
|
||||
block(selectType) {
|
||||
commitOperate(menuOperate.Switch.block, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.block, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
@ -253,7 +253,7 @@ export default {
|
||||
},
|
||||
// 道岔解封
|
||||
unblock(selectType) {
|
||||
commitOperate(menuOperate.Switch.unblock, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.unblock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
// this.$refs.switchUnLock.doShow(data.operate, this.selected);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
@ -261,7 +261,7 @@ export default {
|
||||
},
|
||||
// 道岔强扳
|
||||
switchTurnoutForce(selectType) {
|
||||
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
|
@ -130,9 +130,11 @@ export default {
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -177,9 +177,11 @@ export default {
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -293,9 +293,11 @@ export default {
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {routeCodeList:this.selection}, 2).then((data)=>{
|
||||
commitOperate(operate, {routeCodeList:this.selection}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -180,8 +180,11 @@ export default {
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -107,9 +107,11 @@ export default {
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -160,9 +160,11 @@ export default {
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -328,9 +328,11 @@ export default {
|
||||
},
|
||||
sendCommand(operate, param) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, param, 2).then((data)=>{
|
||||
commitOperate(operate, param, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -238,9 +238,11 @@ export default {
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
@ -250,9 +252,11 @@ export default {
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -294,9 +294,11 @@ export default {
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: this.time, runLevelTimeForever: !!this.tempData[0].check}, 2).then((data)=>{
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: this.time, runLevelTimeForever: !!this.tempData[0].check}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -201,9 +201,11 @@ export default {
|
||||
// },
|
||||
commit() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then((data)=>{
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
|
@ -69,7 +69,7 @@ import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchControl',
|
||||
@ -191,67 +191,32 @@ export default {
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Switch.lock);
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Switch.block);
|
||||
},
|
||||
// 道岔定位
|
||||
locate() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Switch.npChain);
|
||||
},
|
||||
// 道岔反位
|
||||
reverse() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Switch.rpChain);
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Switch.split);
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Switch.active);
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -263,7 +228,7 @@ export default {
|
||||
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -271,7 +236,7 @@ export default {
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -151,51 +151,65 @@ export default {
|
||||
// 设置计轴失效
|
||||
alxeFailure() {
|
||||
this.mouseCancelState(this.selected);
|
||||
commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then((data)=>{
|
||||
commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
}).catch((error)=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
fault() {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionUnLock.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.alxeEffective.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段封锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Section.lock, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.lock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段解锁
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Section.unlock, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionUnLock.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.unlock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.speedLimitControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -291,80 +291,106 @@ export default {
|
||||
},
|
||||
// 排列进路
|
||||
arrangementRoute() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号封锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeLock.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号解封
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeUnLock.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置通过模式
|
||||
singalPassModel() {
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消通过模式
|
||||
singalCancelPassModel() {
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
}
|
||||
});
|
||||
},
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
humanTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routerCommand.doShow(data.operate, this.selected, '是否执行人解列车进路命令?');
|
||||
commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行人解列车进路命令?');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路引导
|
||||
guide() {
|
||||
commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routerCommand.doShow(data.operate, this.selected, '是否执行引导命令?');
|
||||
commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行引导命令?');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -112,14 +112,18 @@ export default {
|
||||
},
|
||||
setCenterControl() {
|
||||
// 请求中控(遥控)
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {}, 0).then((data)=>{
|
||||
this.$refs.stationControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.stationControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
setStationControl() {
|
||||
// 请求站控
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {}, 0).then((data)=>{
|
||||
this.$refs.stationControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.stationControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -243,74 +243,98 @@ export default {
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区间列车数量限制
|
||||
setDetainTrainAll() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrainAuto, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.setDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消区间列车数量限制
|
||||
cancelDetainTrainAll() {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrainAuto, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 批量扣车
|
||||
setBulkBuckleTrain() {
|
||||
commitOperate(menuOperate.StationStand.setBulkBuckleTrain, {}, 0).then((data)=>{
|
||||
this.$refs.standBulkBuckleTrain.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.setBulkBuckleTrain, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standBulkBuckleTrain.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 批量取消扣车
|
||||
cancelBulkBuckleTrain() {
|
||||
commitOperate(menuOperate.StationStand.cancelBulkBuckleTrain, {}, 0).then((data)=>{
|
||||
this.$refs.standBulkBuckleTrain.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.cancelBulkBuckleTrain, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standBulkBuckleTrain.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置停站时间
|
||||
setStopTime() {
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standStopTime.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standStopTime.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standRunLevel.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standRunLevel.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置提前发车
|
||||
earlyDeparture() {
|
||||
commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standDetail.doShow(data.operate, this.selected, []);
|
||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standDetail.doShow(operate, this.selected, []);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -228,64 +228,84 @@ export default {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 单操到定位
|
||||
// 定操定位
|
||||
locate() {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.npChain, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 单操到反位
|
||||
// 定操反位
|
||||
reverse() {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.rpChain, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchUnLock.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchUnLock.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置临时限速
|
||||
setSpeed() {
|
||||
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.speedLimitControl.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.alxeEffective.doShow(data.operate, this.selected);
|
||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
|
@ -144,15 +144,15 @@ export const menuOperate = {
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
locate:{
|
||||
// 单操到定位
|
||||
npChain:{
|
||||
// 道岔定操(联动)
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
|
||||
},
|
||||
reverse:{
|
||||
// 单操到反位
|
||||
rpChain:{
|
||||
// 道岔反操(联动)
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<script>
|
||||
import userInfo from './userInfo';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'Logout',
|
||||
|
@ -10,7 +10,7 @@ import App from './App';
|
||||
import VueI18n from 'vue-i18n';
|
||||
|
||||
import store from './store';
|
||||
import router from './router';
|
||||
import router from './router/index_APP_TARGET';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState.js';
|
||||
|
||||
Vue.mixin(CancelMouseState);
|
||||
|
@ -1,8 +1,8 @@
|
||||
import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
import router from './router';
|
||||
import router from './router/index_APP_TARGET';
|
||||
import NProgress from 'nprogress';
|
||||
import { admin} from './router';
|
||||
import { admin} from './router/index_APP_TARGET';
|
||||
import { getToken, removeToken} from '@/utils/auth';
|
||||
import { LoginParams } from '@/utils/login';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
@ -151,102 +151,6 @@ export const userPlan = '015'; // 计划系统
|
||||
export const userTrainingPlatform = '016'; // 实训平台
|
||||
// const isDev = process.env.NODE_ENV === 'development';
|
||||
|
||||
export const UrlConfig = {
|
||||
display: '/display',
|
||||
displayNew: '/displayNew',
|
||||
scriptDisplay: '/scriptDisplay',
|
||||
scriptDisplayNew:'/scriptDisplayNew',
|
||||
examRuleDraft: '/examRule/draft',
|
||||
examRuleManage: '/examRule/manage',
|
||||
lesson: {
|
||||
prefix: '/lesson',
|
||||
record: '/system/record/training',
|
||||
manage: '/lesson/manage/training'
|
||||
},
|
||||
design: {
|
||||
prefix: '/design/home',
|
||||
mapDraw: '/design/map/draw',
|
||||
lessonEdit: '/design/lesson/edit',
|
||||
lessonHome: '/design/lesson/home',
|
||||
lessonManage: '/design/lesson/manage',
|
||||
taskManage: '/design/lesson/taskManage',
|
||||
trainingRule: '/design/lesson/trainingRule',
|
||||
trainingRuleDetail: '/design/lesson/trainingRule/detail',
|
||||
trainingManage: '/design/lesson/trainingManage',
|
||||
lessonTraining: '/design/lesson/training',
|
||||
trainingRecord: '/design/lesson/training',
|
||||
runPlan: '/design/runPlan/detail',
|
||||
scriptHome: '/design/script/home',
|
||||
display: '/design/display',
|
||||
mapPreview: '/design/mapPreview',
|
||||
mapPreviewNew: '/design/mapPreviewNew',
|
||||
ibpHome: '/design/ibp/home'
|
||||
},
|
||||
designUser: {
|
||||
prefix: '/design/userlist/home',
|
||||
scriptHome: '/design/userlist/script/home',
|
||||
mapDraw: '/design/userlist/map/draw',
|
||||
lessonHome: '/design/userlist/lesson/home',
|
||||
runPlan: '/design/userlist/runPlan/detail'
|
||||
},
|
||||
newDesignuser: {
|
||||
prefix: '/design/usermap/home',
|
||||
scriptHome: '/design/usermap/script/home',
|
||||
mapDraw: '/design/usermap/map/draw',
|
||||
lessonHome: '/design/usermap/lesson/home',
|
||||
runPlan: '/design/usermap/runPlan/detail'
|
||||
},
|
||||
replay: {
|
||||
prefix: '/replay'
|
||||
},
|
||||
publish: {
|
||||
prefix: '/publish',
|
||||
map: '/publish/map',
|
||||
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',
|
||||
authorDetail: '/orderauthor/author/detail',
|
||||
transferDetail: '/orderauthor/transfer/detail',
|
||||
createPackage: '/orderauthor/transfer/create'
|
||||
},
|
||||
script: {
|
||||
prefix: '/script',
|
||||
detail: '/script/detail',
|
||||
display: '/script/display'
|
||||
},
|
||||
ibp: {
|
||||
prefix: 'ibp',
|
||||
draft: '/ibp/draft',
|
||||
edit: 'ibp/edit'
|
||||
},
|
||||
trainingPlatform: {
|
||||
trainingPlatform: '/trainingPlatform',
|
||||
prodDetail: '/trainingPlatform/detail',
|
||||
teachDetail: '/trainingPlatform/teach',
|
||||
teachHome: '/trainingPlatform/teachHome',
|
||||
examDetail: '/trainingPlatform/exam',
|
||||
examHome: '/trainingPlatform/examHome',
|
||||
examRuleManage: '/trainingPlatform/examRule/manage',
|
||||
examRuleDraft: '/trainingPlatform/examRule/Draft',
|
||||
course: '/trainingPlatform/course',
|
||||
practical: '/trainingPlatform/practical',
|
||||
permission: '/trainingPlatform/permission',
|
||||
permissionDetails: '/trainingPlatform/permission/detail',
|
||||
draft: '/trainingPlatform/draft',
|
||||
pay: '/trainingPlatform/pay',
|
||||
runPlan: '/trainingPlatform/runPlan/manage'
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* constantRoutes
|
||||
* a base page that does not have permission requirements
|
890
src/router/index_HYD.js
Normal file
890
src/router/index_HYD.js
Normal file
@ -0,0 +1,890 @@
|
||||
// import Vue from 'vue';
|
||||
import Router from 'vue-router';
|
||||
// import VueRouter from 'vue-router';
|
||||
|
||||
// Vue.use(Router);
|
||||
|
||||
/* Layout */
|
||||
const Layout = () => import('@/layout');
|
||||
const Login = () => import('@/views/login/hydLogin');
|
||||
|
||||
const Jlmap3dedit = () => import('@/views/jlmap3d/edit/jlmap3dedit');
|
||||
const Jlmap3d = () => import('@/views/jlmap3d/drive/jl3ddrive');
|
||||
const Jlmap3dSandbox = () => import('@/views/jlmap3d/simulation/jl3dsimulation');
|
||||
const Jlmap3dModel = () => import('@/views/jlmap3d/device/jl3ddevice');
|
||||
const Jlmap3dTrain = () => import('@/views/jlmap3d/devicetrain/jl3ddevicetrain');
|
||||
const Display = () => import('@/views/display/index');
|
||||
const DisplayNew = () => import('@/views/newMap/displayNew/index');
|
||||
const DesignDisplay = () => import('@/views/display/designIndex');
|
||||
|
||||
const TrainRoom = () => import('@/views/trainRoom/index');
|
||||
const JointTraining = () => import('@/views/jointTraining/index');
|
||||
const JointTrainingNew = () => import('@/views/newMap/jointTrainingNew/index');
|
||||
|
||||
const Error401 = () => import('@/views/error-page/401');
|
||||
const Errpr404 = () => import('@/views/error-page/404');
|
||||
|
||||
const Dictionary = () => import('@/views/system/dictionary/index');
|
||||
const DictionaryDetail = () => import('@/views/system/dictionaryDetail/index');
|
||||
const UserControl = () => import('@/views/system/userControl/index');
|
||||
const UserTraining = () => import('@/views/system/userTraining/index');
|
||||
const UserExam = () => import('@/views/system/userExam/index');
|
||||
const UserSimulation = () => import('@/views/system/userSimulation/index');
|
||||
const ExistingSimulation = () => import('@/views/system/existingSimulation/index');
|
||||
const CacheControl = () => import('@/views/system/cacheControl/index');
|
||||
const SystemGenerate = () => import('@/views/system/systemGenerate/index');
|
||||
const News = () => import('@/views/system/news/index');
|
||||
const CommandDictionary = () => import('@/views/system/commandDictionary/index');
|
||||
const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit');
|
||||
const configLine = () => import('@/views/system/configLine/index');
|
||||
const Mapedit = () => import('@/views/mapdraft/index');
|
||||
|
||||
const IscsSystem = () => import('@/views/iscs/iscsSystem/index');
|
||||
const IscsDraw = () => import('@/views/iscs/iscsDraw/index');
|
||||
const IscsDesign = () => import('@/views/iscs/iscsDesign/index');
|
||||
const IscsConfig = () => import('@/views/iscs/iscsSystem/config/index');
|
||||
|
||||
const NewMapDraft = () => import('@/views/newMap/newMapdraft/index');
|
||||
const NewDesignPlatformUser = () => import('@/views/newMap/newDesignUser/index');
|
||||
|
||||
const Taskmanage = () => import('@/views/lesson/taskmanage/list');
|
||||
const TrainingRuleList = () => import('@/views/lesson/trainingRule/list');
|
||||
const TrainingRuleEdit = () => import('@/views/lesson/trainingRule/detail/index');
|
||||
const Trainingmanage = () => import('@/views/lesson/trainingmanage/index');
|
||||
const LessonEdit = () => import('@/views/lesson/lessoncategory/index');
|
||||
const LessonHome = () => import('@/views/lesson/home');
|
||||
const LessonDetail = () => import('@/views/lesson/details');
|
||||
|
||||
const ScriptmanageHome = () => import('@/views/scriptManage/home');
|
||||
const ScriptDisplay = () => import('@/views/scriptManage/display/index');
|
||||
const ScriptDisplayNew = () => import('@/views/scriptManage/display/indexNew');
|
||||
|
||||
const IbpHome = () => import('@/views/ibp/home');
|
||||
const IbpDraw = () => import('@/views/ibp/ibpDraw/index');
|
||||
|
||||
const TeachDetail = () => import('@/views/teach/detail/index');
|
||||
const TeachHome = () => import('@/views/teach/index');
|
||||
const Pay = () => import('@/views/components/pay/index');
|
||||
|
||||
const ExamHome = () => import('@/views/exam/index');
|
||||
const ExamResult = () => import('@/views/exam/result');
|
||||
const ExamDetail = () => import('@/views/exam/detail/examDetail');
|
||||
const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
|
||||
|
||||
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
|
||||
|
||||
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
|
||||
const PlanMonitorEditUserTool = () => import('@/views/planMonitor/editTool/userindex');
|
||||
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
|
||||
|
||||
const DesignPlatformHome = () => import('@/views/designPlatform/home');
|
||||
const DesignPlatform = () => import('@/views/designPlatform/index');
|
||||
const MapPreview = () => import('@/views/designPlatform/mapPreview');
|
||||
const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew');
|
||||
|
||||
const DesignPlatformUser = () => import('@/views/designUser/index');
|
||||
|
||||
const Package = () => import('@/views/package/index');
|
||||
|
||||
const PublishMap = () => import('@/views/publish/publishMap/index');
|
||||
const PublishMapDetail = () => import('@/views/publish/publishMap/list'); // 发布历史
|
||||
const PublishLesson = () => import('@/views/publish/publishLesson/index');
|
||||
const RunPlanTemplate = () => import('@/views/publish/runPlanTemplate/index');
|
||||
const RunPlanCommon = () => import('@/views/publish/runPlanCommon/index');
|
||||
const RunPlanCommonDraft = () => import('@/views/publish/runPlanCommon/draft');
|
||||
const RunPlanEveryDay = () => import('@/views/publish/runPlanEveryDay/index');
|
||||
const RunplanView = () => import('@/views/publish/runPlanEveryDay/runPlanView');
|
||||
const PublishExamRule = () => import('@/views/publish/examRule/index');
|
||||
const PublishExamRuleDraft = () => import('@/views/publish/examRule/draft/index');
|
||||
|
||||
const TrainingPlatform = () => import('@/views/trainingPlatform/index');
|
||||
|
||||
const Commodity = () => import('@/views/orderauthor/commodity/index');
|
||||
const OrderList = () => import('@/views/orderauthor/order/list');
|
||||
const OrderDraft = () => import('@/views/orderauthor/order/draft');
|
||||
const Author = () => import('@/views/orderauthor/author/index');
|
||||
const Permission = () => import('@/views/orderauthor/permission/index');
|
||||
const PermissionDetail = () => import('@/views/orderauthor/permission/detail');
|
||||
const PermissionCreate = () => import('@/views/orderauthor/permission/create/index');
|
||||
const UserRules = () => import('@/views/orderauthor/rules/index');
|
||||
const UserRulesDetail = () => import('@/views/orderauthor/rules/detail');
|
||||
|
||||
const LessonApproval = () => import('@/views/approval/lesson/index');
|
||||
const ScriptApproval = () => import('@/views/approval/script/index');
|
||||
const RunPlanApproval = () => import('@/views/approval/runPlan/index');
|
||||
const DeviceManage = () => import('@/views/system/deviceManage/index');
|
||||
const MapSort = () => import('@/views/publish/publishMap/mapSort');
|
||||
|
||||
import { loginInfo } from '@/scripts/ConstDic';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
/**
|
||||
* Note: sub-menu only appear when route children.length >= 1
|
||||
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
||||
*
|
||||
* hidden: true if set true, item will not show in the sidebar(default is false)
|
||||
* alwaysShow: true if set true, will always show the root menu
|
||||
* if not set alwaysShow, when item has more than one children route,
|
||||
* it will becomes nested mode, otherwise not show the root menu
|
||||
* redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
|
||||
* name:'router-name' the name is used by <keep-alive> (must set!!!)
|
||||
* meta : {
|
||||
roles: ['admin','editor'] control the page roles (you can set multiple roles)
|
||||
title: 'title' the name show in sidebar and breadcrumb (recommend set)
|
||||
icon: 'svg-name' the icon show in the sidebar
|
||||
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
|
||||
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
|
||||
}
|
||||
*/
|
||||
|
||||
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 userTrainingPlatform = '016'; // 实训平台
|
||||
// const isDev = process.env.NODE_ENV === 'development';
|
||||
|
||||
/**
|
||||
* constantRoutes
|
||||
* a base page that does not have permission requirements
|
||||
* all roles can be accessed
|
||||
*/
|
||||
export const constantRoutes = [
|
||||
// 实训平台登录
|
||||
{
|
||||
path: '/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
// 设计平台登录
|
||||
{
|
||||
path: '/design/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/design/jlmap3d/edit',
|
||||
component: Jlmap3dedit,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d/sandbox',
|
||||
component: Jlmap3dSandbox,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d/devicemodel',
|
||||
component: Jlmap3dModel,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d/devicetrain',
|
||||
component: Jlmap3dTrain,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/401',
|
||||
component: Error401,
|
||||
hidden: true
|
||||
},
|
||||
|
||||
{
|
||||
path: '/404',
|
||||
component: Errpr404,
|
||||
hidden: true
|
||||
},
|
||||
{ path: '*', redirect: '/404', hidden: true }
|
||||
];
|
||||
|
||||
export const asyncRouter = [
|
||||
{ // 公共地图
|
||||
path: '/design',
|
||||
component: Layout,
|
||||
redirect: '/design/home',
|
||||
meta: {
|
||||
roles: [admin, user]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirect: '/design/home',
|
||||
component: DesignPlatform,
|
||||
meta: {
|
||||
i18n: 'router.designhomePage',
|
||||
icon: 'design'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: DesignPlatformHome,
|
||||
meta: {
|
||||
}
|
||||
},
|
||||
{ // 运行图设计
|
||||
path: 'runPlan/detail/:mapId',
|
||||
component: PlanMonitorDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 剧本
|
||||
path: 'script/home/:mapId',
|
||||
component: ScriptmanageHome,
|
||||
meta: {
|
||||
i18n: 'router.scriptManage'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{ // 课程列表
|
||||
path: 'lesson/home/:mapId',
|
||||
component: LessonHome,
|
||||
hidden: true
|
||||
},
|
||||
{ // 操作定义
|
||||
path: 'lesson/trainingRule',
|
||||
component: TrainingRuleList,
|
||||
hidden: true
|
||||
},
|
||||
{ // 操作定义步骤
|
||||
path: 'lesson/trainingRule/detail',
|
||||
hidden: true,
|
||||
component: TrainingRuleEdit
|
||||
},
|
||||
{ // 任务管理
|
||||
path: 'lesson/taskManage',
|
||||
component: Taskmanage,
|
||||
hidden: true
|
||||
},
|
||||
{ // 实训管理
|
||||
path: 'lesson/trainingManage',
|
||||
component: Trainingmanage,
|
||||
hidden: true
|
||||
},
|
||||
{ // 创建课程
|
||||
path: 'lesson/edit/:type',
|
||||
component: LessonEdit,
|
||||
hidden: true
|
||||
},
|
||||
{ // 课程详情
|
||||
path: 'lesson/details',
|
||||
component: LessonDetail,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'edit/:type',
|
||||
component: LessonEdit,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 地图预览
|
||||
path: 'mapPreview/:mapId',
|
||||
component: MapPreview,
|
||||
hidden: true
|
||||
|
||||
},
|
||||
{ // 新版地图预览
|
||||
path: 'mapPreviewNew/:mapId',
|
||||
component: MapPreviewNew,
|
||||
hidden: true
|
||||
},
|
||||
{ // ibp列表
|
||||
path: 'ibp/home/:mapId',
|
||||
component: IbpHome,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'ibp/edit',
|
||||
component: IbpDraw,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 个人地图
|
||||
path: '/design/userlist',
|
||||
redirect: '/design/userlist/home',
|
||||
component: Layout,
|
||||
meta: {
|
||||
roles: [admin, user]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirect: '/design/userlist/home',
|
||||
component: DesignPlatformUser,
|
||||
meta: {
|
||||
i18n: 'router.designUserPage',
|
||||
icon: 'design'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: DesignPlatformHome,
|
||||
meta: {
|
||||
}
|
||||
},
|
||||
{ // 地图绘制
|
||||
path: 'map/draw/:mapId/:view',
|
||||
component: Mapedit,
|
||||
hidden: true
|
||||
},
|
||||
{ // 运行图设计
|
||||
path: 'runPlan/detail/:mapId',
|
||||
component: PlanMonitorDetail,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 全屏战场图
|
||||
path: '/display/:mode',
|
||||
component: Display,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/displayNew/:mode',
|
||||
component: DisplayNew,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/design/display/:mode',
|
||||
component: DesignDisplay,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{ // 剧本编辑 战场图
|
||||
path: '/scriptDisplay/:mode',
|
||||
component: ScriptDisplay,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{ // 剧本编辑 战场图
|
||||
path: '/scriptDisplayNew/:mode',
|
||||
component: ScriptDisplayNew,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/displayIscs/system',
|
||||
component: IscsSystem,
|
||||
meta: {
|
||||
},
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'config/:mode',
|
||||
component: IscsConfig,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 综合演练室
|
||||
path: '/trainroom',
|
||||
component: TrainRoom,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jointTraining',
|
||||
component: JointTraining,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jointTrainingNew',
|
||||
component: JointTrainingNew,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d',
|
||||
component: Jlmap3d,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{ // 实训平台
|
||||
path: '/trainingPlatform',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
meta: {
|
||||
roles: [admin, userSimulation, user, userTrainingPlatform]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: TrainingPlatform,
|
||||
meta: {
|
||||
},
|
||||
children: [
|
||||
{ // 仿真详情
|
||||
path: 'detail/:subSystem',
|
||||
component: DemonstrationDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 教学系统 课程列表
|
||||
path: 'teachHome/:subSystem',
|
||||
component: TeachHome,
|
||||
hidden: true
|
||||
},
|
||||
{ // 课程详情
|
||||
path: 'teach/:subSystem',
|
||||
component: TeachDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 试卷列表
|
||||
path: 'course/:subSystem',
|
||||
component: ExamCourseDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 考试系统 课程列表
|
||||
path: 'examHome/:subSystem',
|
||||
component: ExamHome,
|
||||
hidden: true
|
||||
},
|
||||
{ // 试卷详情
|
||||
path: 'exam/:examId',
|
||||
component: ExamDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 试卷列表
|
||||
path: 'examRule/manage',
|
||||
component: PublishExamRule,
|
||||
hidden: true
|
||||
},
|
||||
{ // 创建试卷
|
||||
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
||||
component: PublishExamRuleDraft,
|
||||
hidden: true
|
||||
},
|
||||
{ // 购买
|
||||
path: 'pay/:lessonId',
|
||||
component: Pay,
|
||||
hidden: true
|
||||
},
|
||||
{ // 考试结果
|
||||
path: 'result/:userExamId',
|
||||
component: ExamResult,
|
||||
hidden: true
|
||||
},
|
||||
{ // 线路权限列表
|
||||
path: 'permission/:mapId',
|
||||
component: Package,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 运行图编辑
|
||||
path: '/plan/usertool',
|
||||
component: PlanMonitorEditUserTool,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{ // 运行图编辑
|
||||
path: '/plan/tool',
|
||||
component: PlanMonitorEditTool,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{ // 发布内容管理
|
||||
path: '/publish',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.pulishManage',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{ // 发布地图
|
||||
path: 'map',
|
||||
component: PublishMap,
|
||||
meta: {
|
||||
i18n: 'router.publishMapManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/publish/mapSort',
|
||||
component: MapSort,
|
||||
hidden: true
|
||||
},
|
||||
{ // 发布历史
|
||||
path: 'map/detail',
|
||||
hidden: true,
|
||||
component: PublishMapDetail
|
||||
},
|
||||
{ // 发布课程
|
||||
path: 'lesson',
|
||||
component: PublishLesson,
|
||||
meta: {
|
||||
i18n: 'router.publishLessonManage'
|
||||
}
|
||||
},
|
||||
{ // 模板运行图
|
||||
path: 'runPlan/template',
|
||||
component: RunPlanTemplate,
|
||||
meta: {
|
||||
i18n: 'router.runPlanTemplateManage'
|
||||
}
|
||||
},
|
||||
{ // 加载运行图管理
|
||||
path: 'runPlan/common',
|
||||
component: RunPlanCommon,
|
||||
meta: {
|
||||
i18n: 'router.runPlanCommonManage'
|
||||
}
|
||||
},
|
||||
{ // 新增加载运行图
|
||||
path: 'runPlan/common/:mode',
|
||||
component: RunPlanCommonDraft,
|
||||
hidden: true
|
||||
},
|
||||
{ // 运行图预览
|
||||
path: 'runPlan/view/:mode',
|
||||
component: RunplanView,
|
||||
hidden: true
|
||||
},
|
||||
{ // 每日运行图
|
||||
path: 'runPlan/everyDay',
|
||||
component: RunPlanEveryDay,
|
||||
meta: {
|
||||
i18n: 'router.runPlanEveryDayManage'
|
||||
}
|
||||
},
|
||||
{ // 考试规则列表
|
||||
path: 'examRule/manage',
|
||||
component: PublishExamRule,
|
||||
meta: {
|
||||
i18n: 'router.examRuleManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
||||
component: PublishExamRuleDraft,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 订单权限管理
|
||||
path: '/orderauthor',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.orderAuthorityManage',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'author/manage',
|
||||
component: Author,
|
||||
meta: {
|
||||
i18n: 'router.authorityManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'commodity/manage',
|
||||
component: Commodity,
|
||||
meta: {
|
||||
i18n: 'router.commodityManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'order/manage',
|
||||
component: OrderList,
|
||||
meta: {
|
||||
i18n: 'router.orderManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'transfer/manage',
|
||||
component: Permission,
|
||||
meta: {
|
||||
i18n: 'router.authorityTransferManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'rules/manage',
|
||||
component: UserRules,
|
||||
meta: {
|
||||
i18n: 'router.userRulesManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'rules/manage/detail/:id',
|
||||
hidden: true,
|
||||
component: UserRulesDetail,
|
||||
meta: {
|
||||
i18n: 'router.userRulesManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'order/draft/:mode/:orderId',
|
||||
hidden: true,
|
||||
component: OrderDraft,
|
||||
meta: {
|
||||
i18n: 'router.addOrder'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'transfer/detail/:permissionId',
|
||||
component: PermissionDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'transfer/create',
|
||||
component: PermissionCreate,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 系统管理
|
||||
path: '/system',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.systemManage',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'dictionary',
|
||||
component: Dictionary,
|
||||
meta: {
|
||||
i18n: 'router.dataDictionary'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'dictionary/detail',
|
||||
hidden: true,
|
||||
component: DictionaryDetail,
|
||||
meta: {
|
||||
i18n: 'router.dataDictionaryDetails'
|
||||
}
|
||||
},
|
||||
{
|
||||
// 用户管理
|
||||
path: 'userManage',
|
||||
component: UserControl,
|
||||
meta: {
|
||||
i18n: 'router.userManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
// 缓存管理
|
||||
path: 'cache',
|
||||
component: CacheControl,
|
||||
meta: {
|
||||
i18n: 'router.cacheManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userTrainingManage',
|
||||
component: UserTraining,
|
||||
meta: {
|
||||
i18n: 'router.userTrainingManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userExamManage',
|
||||
component: UserExam,
|
||||
meta: {
|
||||
i18n: 'router.userExamManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userSimulationManage',
|
||||
component: UserSimulation,
|
||||
meta: {
|
||||
i18n: 'router.userSimulationManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'existingSimulation',
|
||||
component: ExistingSimulation,
|
||||
meta: {
|
||||
i18n: 'router.existingSimulation'
|
||||
}
|
||||
},
|
||||
{
|
||||
// 子系统生成
|
||||
path: 'systemGenerate',
|
||||
component: SystemGenerate,
|
||||
meta: {
|
||||
i18n: 'router.subsystemGeneration'
|
||||
}
|
||||
},
|
||||
{ // 消息公告
|
||||
path: 'news',
|
||||
component: News,
|
||||
meta: {
|
||||
i18n: 'router.newsBulletin'
|
||||
}
|
||||
},
|
||||
{ // 命令管理
|
||||
path: 'commands',
|
||||
component: CommandDictionary,
|
||||
meta: {
|
||||
i18n: 'router.commandDictionary'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'commands/Detail',
|
||||
hidden: true,
|
||||
component: CommandDictionaryDetail
|
||||
},
|
||||
{ // 线路管理
|
||||
path: 'configLine',
|
||||
component: configLine,
|
||||
meta: {
|
||||
i18n: 'router.configLine'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'deviceManage',
|
||||
component: DeviceManage,
|
||||
meta: {
|
||||
i18n: 'router.deviceManage'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 发布申请
|
||||
path: '/apply',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.releaseApplication',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'lesson',
|
||||
component: LessonApproval,
|
||||
meta: {
|
||||
i18n: 'router.courseApplication'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'script',
|
||||
component: ScriptApproval,
|
||||
meta: {
|
||||
i18n: 'router.scriptReleaseApplication'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'runGraph',
|
||||
component: RunPlanApproval,
|
||||
meta: {
|
||||
i18n: 'router.runGraphReleaseApplication'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 新个人地图
|
||||
path: '/design/usermap',
|
||||
redirect: '/design/usermap/home',
|
||||
component: Layout,
|
||||
meta: {
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirect: '/design/usermap/home',
|
||||
component: NewDesignPlatformUser,
|
||||
meta: {
|
||||
i18n: 'router.newDesignUserPage',
|
||||
icon: 'design'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: DesignPlatformHome,
|
||||
meta: {
|
||||
}
|
||||
},
|
||||
{ // 地图绘制
|
||||
path: 'map/draw/:mapId/:view',
|
||||
component: NewMapDraft,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // iscs系统
|
||||
path: '/iscs',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.iscsSystem',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path:'design',
|
||||
component: IscsDesign,
|
||||
meta: {
|
||||
i18n: 'router.iscsDraw',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'edit/:id/:mode',
|
||||
component: IscsDraw,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'system',
|
||||
component: IscsSystem,
|
||||
meta: {
|
||||
i18n: 'router.iscsSystem',
|
||||
roles: [admin, user]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'config/:mode',
|
||||
component: IscsConfig,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
const createRouter = () => new Router({
|
||||
mode: 'history', // require service support
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes
|
||||
});
|
||||
|
||||
const router = createRouter();
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
const project = getSessionStorage('project');
|
||||
document.title = loginInfo[project || 'login'].title;
|
||||
next();
|
||||
});
|
||||
|
||||
// 兼容 vue-router在3.1.0版本以上的路由跳转使用的是 promise 的方式
|
||||
const originalPush = Router.prototype.push;
|
||||
Router.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err);
|
||||
};
|
||||
|
||||
export default router;
|
@ -2265,3 +2265,98 @@ export const ProjectCode = {
|
||||
designgzb: 'GZB',
|
||||
hyd: 'HYD'
|
||||
};
|
||||
export const UrlConfig = {
|
||||
display: '/display',
|
||||
displayNew: '/displayNew',
|
||||
scriptDisplay: '/scriptDisplay',
|
||||
scriptDisplayNew:'/scriptDisplayNew',
|
||||
examRuleDraft: '/examRule/draft',
|
||||
examRuleManage: '/examRule/manage',
|
||||
lesson: {
|
||||
prefix: '/lesson',
|
||||
record: '/system/record/training',
|
||||
manage: '/lesson/manage/training'
|
||||
},
|
||||
design: {
|
||||
prefix: '/design/home',
|
||||
mapDraw: '/design/map/draw',
|
||||
lessonEdit: '/design/lesson/edit',
|
||||
lessonHome: '/design/lesson/home',
|
||||
lessonManage: '/design/lesson/manage',
|
||||
taskManage: '/design/lesson/taskManage',
|
||||
trainingRule: '/design/lesson/trainingRule',
|
||||
trainingRuleDetail: '/design/lesson/trainingRule/detail',
|
||||
trainingManage: '/design/lesson/trainingManage',
|
||||
lessonTraining: '/design/lesson/training',
|
||||
trainingRecord: '/design/lesson/training',
|
||||
runPlan: '/design/runPlan/detail',
|
||||
scriptHome: '/design/script/home',
|
||||
display: '/design/display',
|
||||
mapPreview: '/design/mapPreview',
|
||||
mapPreviewNew: '/design/mapPreviewNew',
|
||||
ibpHome: '/design/ibp/home'
|
||||
},
|
||||
designUser: {
|
||||
prefix: '/design/userlist/home',
|
||||
scriptHome: '/design/userlist/script/home',
|
||||
mapDraw: '/design/userlist/map/draw',
|
||||
lessonHome: '/design/userlist/lesson/home',
|
||||
runPlan: '/design/userlist/runPlan/detail'
|
||||
},
|
||||
newDesignuser: {
|
||||
prefix: '/design/usermap/home',
|
||||
scriptHome: '/design/usermap/script/home',
|
||||
mapDraw: '/design/usermap/map/draw',
|
||||
lessonHome: '/design/usermap/lesson/home',
|
||||
runPlan: '/design/usermap/runPlan/detail'
|
||||
},
|
||||
replay: {
|
||||
prefix: '/replay'
|
||||
},
|
||||
publish: {
|
||||
prefix: '/publish',
|
||||
map: '/publish/map',
|
||||
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',
|
||||
authorDetail: '/orderauthor/author/detail',
|
||||
transferDetail: '/orderauthor/transfer/detail',
|
||||
createPackage: '/orderauthor/transfer/create'
|
||||
},
|
||||
script: {
|
||||
prefix: '/script',
|
||||
detail: '/script/detail',
|
||||
display: '/script/display'
|
||||
},
|
||||
ibp: {
|
||||
prefix: 'ibp',
|
||||
draft: '/ibp/draft',
|
||||
edit: 'ibp/edit'
|
||||
},
|
||||
trainingPlatform: {
|
||||
trainingPlatform: '/trainingPlatform',
|
||||
prodDetail: '/trainingPlatform/detail',
|
||||
teachDetail: '/trainingPlatform/teach',
|
||||
teachHome: '/trainingPlatform/teachHome',
|
||||
examDetail: '/trainingPlatform/exam',
|
||||
examHome: '/trainingPlatform/examHome',
|
||||
examRuleManage: '/trainingPlatform/examRule/manage',
|
||||
examRuleDraft: '/trainingPlatform/examRule/Draft',
|
||||
course: '/trainingPlatform/course',
|
||||
practical: '/trainingPlatform/practical',
|
||||
permission: '/trainingPlatform/permission',
|
||||
permissionDetails: '/trainingPlatform/permission/detail',
|
||||
draft: '/trainingPlatform/draft',
|
||||
pay: '/trainingPlatform/pay',
|
||||
runPlan: '/trainingPlatform/runPlan/manage'
|
||||
}
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
import router from '@/router';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
import Command from './Command';
|
||||
import Handler from './Handler';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import store from '@/store';
|
||||
import router from '@/router';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
import CommandHandler from './CommandHandler.js';
|
||||
import ValidateHandler from './ValidateHandler.js';
|
||||
import { State2SimulationMap } from './Config.js';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import store from '@/store';
|
||||
import router from '@/router';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
import OperateHandler from '@/scripts/plugin/OperateHandler';
|
||||
import { sendCommand } from '@/api/jmap/training';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import store from '@/store';
|
||||
import router from '@/router';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
import OperateConverter from '@/scripts/plugin/OperateConvert2Command';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { getConverter } from '@/scripts/plugin/Converter/manager';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { asyncRouter, constantRoutes, user, userLesson, userExam, userSimulation, userScreen, userPlan, superAdmin, admin, userTrainingPlatform } from '@/router';
|
||||
import { asyncRouter, constantRoutes, user, userLesson, userExam, userSimulation, userScreen, userPlan, superAdmin, admin, userTrainingPlatform } from '@/router/index_APP_TARGET';
|
||||
import { PermissionType } from '@/utils/PermissionType';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
function setHonePagePath(route, roles) {
|
||||
|
@ -3,11 +3,12 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -11,7 +11,7 @@ import { reviewRunPlanList, publishRunPlan, rejectRunPlan, previewRunPlan } from
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'RunPlanApproval',
|
||||
components: {
|
||||
|
@ -6,7 +6,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { scriptDraftRecordNotify } from '@/api/simulation';
|
||||
import ScriptOperate from './operate';
|
||||
import { reviewScriptList, publishScript, rejectScript } from '@/api/designPlatform';
|
||||
|
@ -40,7 +40,7 @@
|
||||
<script>
|
||||
import { getCommodityDetailByParams } from '@/api/management/goods';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import CommitDraft from './commit';
|
||||
import ConfirmDraft from './confirm';
|
||||
import FinishDraft from './finish';
|
||||
|
@ -26,11 +26,11 @@
|
||||
<script>
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { PermissionType, UrlConfig } from '@/scripts/ConstDic';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { postCreateRoom, getjointTraining } from '@/api/chat';
|
||||
import { postCreateRoomNew, getjointTrainingNew, checkRoomExistNew } from '@/api/jointTraining';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { } from '@/scripts/ConstDic';
|
||||
import { simulationNotify, schedulingNotify, createSimulationNew } from '@/api/simulation';
|
||||
import LimitList from '@/views/components/limits/index';
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
|
@ -19,8 +19,8 @@
|
||||
</template>
|
||||
<script>
|
||||
import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { superAdmin, admin } from '@/router';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { superAdmin, admin } from '@/router/index_APP_TARGET';
|
||||
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
||||
import FilterCity from '@/views/components/filterCity';
|
||||
import localStore from 'storejs';
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
||||
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -60,17 +60,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async initLoadData() { // 加载地图数据
|
||||
if (this.group) {
|
||||
await this.loadNewMapDataByGroup(this.group);
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
// 通过id加载地图数据
|
||||
async loadNewMapDataByGroup(group) {
|
||||
async loadMapDataById(mapId) {
|
||||
try {
|
||||
await this.$store.dispatch('training/changeMode', { mode: null });
|
||||
loadNewMapDataByGroup(group).then(()=>{
|
||||
loadMapDataById(mapId).then(()=>{
|
||||
this.$store.dispatch('training/over');
|
||||
this.$store.dispatch('training/setMapDefaultState');
|
||||
this.$store.dispatch('map/clearJlmapTrainView');
|
||||
|
@ -34,7 +34,7 @@
|
||||
<script>
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { postBuildMapImport, listMap } from '@/api/jmap/mapdraft';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { removeSessionStorage } from '@/utils/auth';
|
||||
import MapOperateMenu from './mapmanage/operateMenu';
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
<script>
|
||||
import { deleteMap } from '@/api/jmap/mapdraft';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import MapEdit from './edit';
|
||||
import MapSaveAs from './saveAs';
|
||||
|
@ -30,7 +30,7 @@ import { startTraining, endTraining } from '@/api/jmap/training';
|
||||
import { trainingNotify } from '@/api/simulation';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'MenuLesson',
|
||||
|
@ -53,7 +53,7 @@
|
||||
<script>
|
||||
import { getCourseLessonDetail } from '@/api/management/exam';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import LimitList from '@/views/components/limits/index';
|
||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
import localStore from 'storejs';
|
||||
|
@ -57,7 +57,7 @@ import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { getDetailList } from '@/api/management/dictionary';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
<script>
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
|
@ -32,7 +32,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { submitExam } from '@/api/management/userexam';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'ExamResult',
|
||||
|
@ -45,7 +45,7 @@ import { simulationNotify, setTrainingCbtcInitTime } from '@/api/simulation';
|
||||
|
||||
import { getPublishMapDetail, getPublish3dMapDetail } from '@/api/jlmap3d/load3ddata';
|
||||
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
import { JLmapDriving } from '@/jlmap3d/jl3ddrive/jl3ddrive';
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
import SetTime from '@/views/display/demon/setTime';
|
||||
import { getTrainingCbtcDemon, setTrainingCbtcInitTime } from '@/api/simulation';
|
||||
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
|
||||
import { JLmap3dEdit } from '@/jlmap3d/edit/jlmap3dedit';
|
||||
|
@ -41,7 +41,7 @@ import { mapGetters } from 'vuex';
|
||||
|
||||
import { simulationNotify, setTrainingCbtcInitTime } from '@/api/simulation';
|
||||
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
import { JLmap3d } from '@/jlmap3d/jl3dsimulation/jlmap3d.js';
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
<script>
|
||||
import { releaseOrCancel } from '@/api/designPlatform';
|
||||
import { getLessonDrftList } from '@/api/jmap/lessondraft';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import PublishCreate from './lessoncategory/edit/create';
|
||||
import PublishLesson from './lessoncategory/edit/lesson/publish';
|
||||
import { delLesson } from '@/api/jmap/lessondraft';
|
||||
|
@ -72,7 +72,7 @@
|
||||
|
||||
<script>
|
||||
import { createLessonChapter, updateLessonChapter, getLessonDetail, getLessonChapterDetail } from '@/api/jmap/lessondraft';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import TrainList from './list';
|
||||
|
||||
export default {
|
||||
|
@ -59,7 +59,7 @@
|
||||
<script>
|
||||
import { createLesson, updateLesson, getLessonDetail } from '@/api/jmap/lessondraft';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import Cookies from 'js-cookie';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
|
||||
|
@ -22,7 +22,7 @@ import {
|
||||
import TrainingEdit from './addEdit';
|
||||
import AddBatch from './addBatch';
|
||||
import SaveAs from './saveAs.vue';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainingRule',
|
||||
|
@ -23,7 +23,7 @@ import { pageQueryTraining, pageQueryTrainingNew } from '@/api/jmap/training';
|
||||
import { trainingNotify, trainingNotifyNew } from '@/api/simulation';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import TrainingDraft from './draft';
|
||||
import localStore from 'storejs';
|
||||
|
||||
|
437
src/views/login/hydLogin.vue
Normal file
437
src/views/login/hydLogin.vue
Normal file
@ -0,0 +1,437 @@
|
||||
<template>
|
||||
<div class="login-container" :style="{'background-image': 'url('+bgImg+')'}">
|
||||
<div class="text-box">
|
||||
<img class="logo" :src="logoImg" style="width: 140px">
|
||||
<span>{{ title }}</span>
|
||||
</div>
|
||||
<div class="language_box">
|
||||
<el-tooltip effect="dark" :content="this.$t('login.clickSwitchLanguage')" placement="bottom-end">
|
||||
<el-button class="language_btn" type="text" @click="handleLanguage">{{ language }}</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="content-box">
|
||||
<el-form ref="loginForm" class="login-form" :model="loginForm" :rules="loginRules" label-position="left">
|
||||
<el-form-item prop="username" class="item_form_box">
|
||||
<span class="svg-container svg-container_login">
|
||||
<svg-icon icon-class="user" />
|
||||
</span>
|
||||
<el-input v-model="loginForm.username" name="username" type="text" :placeholder="this.$t('login.mobilePhoneNumberOrEmail')" @keyup.enter.native="goToNext" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password" class="item_form_box item_form_password">
|
||||
<span class="svg-container">
|
||||
<svg-icon icon-class="password" />
|
||||
</span>
|
||||
<el-input
|
||||
ref="password"
|
||||
v-model="loginForm.password"
|
||||
name="password"
|
||||
:type="pwdType"
|
||||
:placeholder="this.$t('login.password')"
|
||||
@keyup.enter.native="handleLogin"
|
||||
/>
|
||||
<span class="show-pwd" @click="showPwd">
|
||||
<svg-icon v-if="pwdDisplay" icon-class="eye" />
|
||||
<svg-icon v-else icon-class="eye-open" />
|
||||
</span>
|
||||
</el-form-item>
|
||||
<div class="tip-message">{{ tipsMsg }}</div>
|
||||
<div style="display: inline-block;width: 100%;margin-bottom: 10px;">
|
||||
<div style="display:inline-block">
|
||||
<el-checkbox v-model="isAutoLogin">{{ $t('login.autoLogin') }}</el-checkbox>
|
||||
</div>
|
||||
<el-popover
|
||||
placement="right"
|
||||
title=""
|
||||
width="200"
|
||||
trigger="hover"
|
||||
class="popover_box"
|
||||
>
|
||||
<div>
|
||||
<img :src="QCode" alt="" style="width: 100px; height: 100px; display: block; margin:0 auto;">
|
||||
<div style="margin-top: 10px; word-break: break-word;text-align: center;">{{ $t('login.perfectInformation') }}</div>
|
||||
</div>
|
||||
<div slot="reference">{{ $t('login.unableToLogin') }}</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<el-form-item>
|
||||
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
|
||||
{{ $t('login.login') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import QCode from '@/assets/erCode.jpg';
|
||||
import { setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
||||
import Cookies from 'js-cookie';
|
||||
import md5 from 'js-md5';
|
||||
import QrcodeVue from 'qrcode.vue';
|
||||
import { checkLoginStatus } from '@/api/login';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { removeToken } from '@/utils/auth';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import logoImgHyd from '@/assets/logo_hyd.png';
|
||||
export default {
|
||||
name: 'Login',
|
||||
components: { QrcodeVue},
|
||||
data() {
|
||||
const validateUsername = (rule, value, callback) => {
|
||||
if (value.length < 5) {
|
||||
callback(new Error(this.$t('login.enterTheCorrectUserName')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
const validatePass = (rule, value, callback) => {
|
||||
if (value.length < 5) {
|
||||
callback(new Error(this.$t('login.passwordHint')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
bgImg: '',
|
||||
QCode: QCode,
|
||||
isAutoLogin: false,
|
||||
loginForm: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
loginRules: {
|
||||
username: [{ required: true, trigger: 'blur', validator: validateUsername }],
|
||||
password: [{ required: true, trigger: 'blur', validator: validatePass }]
|
||||
},
|
||||
loading: false,
|
||||
pwdType: 'password',
|
||||
tipsMsg: '',
|
||||
qrcodeClassName: 'login-qrcode',
|
||||
sessionId: '',
|
||||
loginUrl: '',
|
||||
loadingCode: false,
|
||||
checkLogin: null,
|
||||
checkTimeout: null,
|
||||
scanSuccess: false,
|
||||
pwdDisplay: true,
|
||||
cookiesName: 'UserName',
|
||||
cookiesToken: 'UserToken',
|
||||
modelType: 'class',
|
||||
loginClient: 'LianKeTang',
|
||||
path: '/trainingPlatform',
|
||||
lang: 'zh',
|
||||
language: '中文',
|
||||
logoImg: logoImgHyd,
|
||||
title: '城市轨道交通实训平台'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
project() {
|
||||
return this.$route.path.split('/')[1];
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.computedAttribute();
|
||||
if (Cookies.get(this.cookiesName) && Cookies.get(this.cookiesToken)) {
|
||||
const model = {'username': Cookies.get(this.cookiesName), 'password': Cookies.get(this.cookiesToken)};
|
||||
model.type = this.modelType;
|
||||
this.$store.dispatch('Login', model).then(() => {
|
||||
this.$store.dispatch('SetAccount', model.username);
|
||||
this.handleLoginSucessRoute();
|
||||
}).catch(error => {
|
||||
if (error.code === '30001') {
|
||||
this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect');
|
||||
} else {
|
||||
this.tipsMsg = error.message;
|
||||
}
|
||||
this.loading = false;
|
||||
setTimeout(() => { this.tipsMsg = ''; }, 5000);
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.title = this.title;
|
||||
},
|
||||
methods: {
|
||||
computedAttribute() {
|
||||
if (this.project.startsWith('design')) {
|
||||
this.cookiesName = 'UserDesignName';
|
||||
this.cookiesToken = 'UserDesignToken';
|
||||
this.modelType = 'design';
|
||||
this.loginClient = 'Design';
|
||||
this.path = UrlConfig.design.prefix;
|
||||
}
|
||||
|
||||
const nowLang = LangStorage.getLang('zh');
|
||||
if (nowLang === 'zh') {
|
||||
this.lang = 'en';
|
||||
this.language = 'English';
|
||||
}
|
||||
|
||||
removeToken();
|
||||
setSessionStorage('project', 'hyd');
|
||||
},
|
||||
clearTimer(timer) {
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
},
|
||||
checkLoginStatus() {
|
||||
const self = this;
|
||||
// 销毁则不再定时
|
||||
if (this && this._isDestroyed) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 清空已存在的定时器
|
||||
// 设置定时器检测
|
||||
this.clearTimer(this.checkLogin);
|
||||
this.checkLogin = setTimeout(() => {
|
||||
checkLoginStatus(self.sessionId).then(response => {
|
||||
// 设置扫码登录
|
||||
self.$store.dispatch('QrLoginSetting', { key: 'SET_TOKEN', value: response.data.token, type: this.modelType }).then(() => {
|
||||
// 清除定时器,设置路由
|
||||
self.clearTimer(self.checkLogin);
|
||||
this.handleLoginSucessRoute();
|
||||
});
|
||||
}).catch(error => {
|
||||
if (error.data && error.data.status === '1') {
|
||||
self.scanSuccess = true;
|
||||
}
|
||||
self.checkLoginStatus();
|
||||
});
|
||||
}, 3000);
|
||||
},
|
||||
showPwd() {
|
||||
if (this.pwdType === 'password') {
|
||||
this.pwdDisplay = false;
|
||||
this.pwdType = '';
|
||||
} else {
|
||||
this.pwdType = 'password';
|
||||
this.pwdDisplay = true;
|
||||
}
|
||||
},
|
||||
goToNext() {
|
||||
if (this.loginForm.username.length < 5) {
|
||||
return;
|
||||
} else {
|
||||
this.$refs['password'].focus();
|
||||
}
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
const model = Object.assign({}, this.loginForm);
|
||||
model.password = md5(model.password);
|
||||
model.type = this.modelType;
|
||||
this.loading = true;
|
||||
if (this.isAutoLogin) {
|
||||
Cookies.set(this.cookiesName, model.username, { expires: 2});
|
||||
Cookies.set(this.cookiesToken, model.password, { expires: 2});
|
||||
}
|
||||
this.$store.dispatch('Login', model).then(() => {
|
||||
this.$store.dispatch('SetAccount', model.username);
|
||||
this.handleLoginSucessRoute();
|
||||
}).catch(error => {
|
||||
if (error.code === '30001') {
|
||||
this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect');
|
||||
} else {
|
||||
this.tipsMsg = error.message;
|
||||
}
|
||||
this.loading = false;
|
||||
setTimeout(() => { this.tipsMsg = ''; }, 5000);
|
||||
});
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleLoginSucessRoute() {
|
||||
// 设置路由
|
||||
this.loading = false;
|
||||
this.tipsMsg = '';
|
||||
removeSessionStorage('againEnter');
|
||||
this.$router.push({ path: this.path });
|
||||
},
|
||||
handleLanguage() {
|
||||
this.$i18n.locale = this.lang;
|
||||
LangStorage.setLang(this.lang);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
$bg:#fff;
|
||||
$light_gray:#eee;
|
||||
|
||||
.login-container {
|
||||
background: #E4EAEA;
|
||||
.el-form-item{
|
||||
background: #fff !important;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1) !important;
|
||||
.el-input {
|
||||
height: 40px;
|
||||
width: 85%;
|
||||
background: #fff;
|
||||
input {
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0px;
|
||||
padding: 8px 9px 7px 5px;
|
||||
color: #000;
|
||||
height: 100%;
|
||||
|
||||
&:-webkit-autofill {
|
||||
box-shadow: 0 0 0px 1000px $bg inset !important;
|
||||
-webkit-text-fill-color: #000 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item_form_box {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
color: #454545;
|
||||
}
|
||||
|
||||
.item_form_password{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.tip-message {
|
||||
color: #F56C61;
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
height: 23px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
$bg:#f0f0f0;
|
||||
$qrbg:#fff;
|
||||
$dark_gray:#889aa4;
|
||||
$light_gray:#eee;
|
||||
$qrcodeSize: 270px;
|
||||
.popover_box {
|
||||
position: absolute;
|
||||
right: 80px;
|
||||
bottom: 106px;
|
||||
cursor: pointer;
|
||||
color: #225592;
|
||||
font-size: 14px;
|
||||
}
|
||||
.login-container {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-origin: border-box;
|
||||
background-size: 100% 100%;
|
||||
.content-box{
|
||||
width: 450px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fff;
|
||||
padding: 30px 30px 30px;
|
||||
margin-bottom: 20px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
.text-box{
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
font-size: 40px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.logo{
|
||||
vertical-align: middle;
|
||||
}
|
||||
.language_box{
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 40px;
|
||||
.language_btn{
|
||||
/*font-weight: bold;*/
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
.login-form {
|
||||
width: 440px;
|
||||
padding: 0 50px;
|
||||
}
|
||||
|
||||
.svg-container {
|
||||
padding-left: 14px;
|
||||
color: $dark_gray;
|
||||
vertical-align: middle;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
|
||||
&_login {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.title_box {
|
||||
font-size: 20px;
|
||||
color: #000;
|
||||
margin: 0px auto 30px auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.show-pwd {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 3px;
|
||||
font-size: 16px;
|
||||
color: $dark_gray;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
.qrcode-main{
|
||||
width: 300px;
|
||||
background-color: $qrbg;
|
||||
text-align: center;
|
||||
border-right: 1px solid #ececec;
|
||||
.tip-info {
|
||||
text-align: left;
|
||||
display: inline-block;
|
||||
color: green;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.login-code-box{
|
||||
width: 150px;
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.system-type {
|
||||
margin: 5px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
color: #353535;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -102,10 +102,9 @@ import QrcodeVue from 'qrcode.vue';
|
||||
import { getLoginWmurl, checkLoginStatus } from '@/api/login';
|
||||
import { LoginParams } from '@/utils/login';
|
||||
import bgImg from '@/assets/bg1.jpg';
|
||||
import { loginInfo } from '@/scripts/ConstDic';
|
||||
import { loginInfo, UrlConfig } from '@/scripts/ConstDic';
|
||||
import { removeToken } from '@/utils/auth';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import logoImgXty from '@/assets/logo_xty.png';
|
||||
import logoImgGzb from '@/assets/logo_gzb.png';
|
||||
import logoImgHyd from '@/assets/logo_hyd.png';
|
||||
|
@ -39,7 +39,7 @@
|
||||
import { getPublishLessonTree } from '@/api/jmap/lesson';
|
||||
import { trainingNotifyNew } from '@/api/simulation';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'LeftSlider',
|
||||
data() {
|
||||
|
@ -30,7 +30,7 @@ import { startTrainingNew, endTrainingNew } from '@/api/jmap/training';
|
||||
import { trainingNotifyNew } from '@/api/simulation';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'MenuLesson',
|
||||
|
@ -34,7 +34,7 @@
|
||||
<script>
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { postBuildMapImport, listMap } from '@/api/jmap/mapdraft';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { removeSessionStorage } from '@/utils/auth';
|
||||
import MapOperateMenu from './mapmanage/operateMenu';
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
<script>
|
||||
import { deleteMap } from '@/api/jmap/mapdraft';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import MapEdit from './edit';
|
||||
import MapSaveAs from './saveAs';
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
<script>
|
||||
import { getCommodityList, delCommodity, setCommodityStatus } from '@/api/management/goods';
|
||||
// import { UrlConfig } from '@/router/index';
|
||||
import Edit from './edit';
|
||||
|
||||
export default {
|
||||
|
@ -11,7 +11,7 @@ import { getOrderPageList } from '@/api/management/order';
|
||||
import { getSellerList } from '@/api/management/user';
|
||||
import { getOrganizationList } from '@/api/management/organization';
|
||||
import { getDistributeFromOrder } from '@/api/management/order';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import detail from './detail';
|
||||
|
||||
|
@ -7,9 +7,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { admin } from '@/router';
|
||||
import { admin } from '@/router/index_APP_TARGET';
|
||||
import { listPackagePermission, restorePackagePermission, getPackageQrCode, setCommodityStatus } from '@/api/management/distribute';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import Qcode from './Qcode';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<script>
|
||||
import { listUserPermision } from '@/api/management/author';
|
||||
import { superAdmin, admin } from '@/router';
|
||||
import { superAdmin, admin } from '@/router/index_APP_TARGET';
|
||||
import selectRole from './selectRole/list';
|
||||
import LangStorage from '@/utils/lang';
|
||||
|
||||
|
@ -53,7 +53,7 @@ import CreateEmptyPlan from './editTool/menus/createEmptyPlan';
|
||||
import { getRpListByUserMapId, publishRunPlan, releaseOrCancelRunPlan, previewRunPlan} from '@/api/designPlatform';
|
||||
import { getRpListByMapId, deleteRunPlan } from '@/api/runplan';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'UserRunPlanList',
|
||||
components: {
|
||||
|
@ -116,7 +116,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { planEffectiveCheck, runPlanNotify } from '@/api/runplan';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
|
@ -46,7 +46,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { getRpListByMapId, deleteRunPlan } from '@/api/runplan';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import EditPlanName from './editPlanName';
|
||||
|
||||
export default {
|
||||
|
@ -21,7 +21,7 @@
|
||||
<script>
|
||||
import { planEffectiveCheck, runPlanNotify } from '@/api/runplan';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'PlanStatusBar',
|
||||
|
@ -10,7 +10,7 @@
|
||||
<script>
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'PlanTitleBar',
|
||||
|
@ -27,7 +27,7 @@
|
||||
<script>
|
||||
import { getExamLessonDetail, setCourseList } from '@/api/management/exam';
|
||||
import { getDetailList } from '@/api/management/dictionary';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import editRule from './editRule';
|
||||
|
||||
export default {
|
||||
|
@ -14,7 +14,7 @@
|
||||
<script>
|
||||
import { getExamList, deleteExam, setExamEfficacy, setExamEffectivey } from '@/api/management/exam';
|
||||
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'List',
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user