Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4268c9a17c
@ -17,6 +17,15 @@ export function getLoginUrl(params) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取登陆url 小程序二维码
|
||||||
|
export function getLoginWmurl(params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/login/wmurl',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 获取登录信息
|
// 获取登录信息
|
||||||
export function getInfo(token) {
|
export function getInfo(token) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -131,3 +131,11 @@ export function listCanPackagePermission(params) {
|
|||||||
params: params
|
params: params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 设置权限分发列表 权限失效
|
||||||
|
export function setCommodityStatus(id) {
|
||||||
|
return request({
|
||||||
|
url: `/api/distribute/${id}/invalid`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -125,3 +125,11 @@ export function getOperateTrainingList(data) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 另存为 操作定义
|
||||||
|
export function postOperateSaveAs(skinCode, other) {
|
||||||
|
return request({
|
||||||
|
url: `/api/operate/${skinCode}/saveAs/${other}`,
|
||||||
|
method: 'post'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -399,3 +399,19 @@ export function postDailyRunPlanLoadGenerate(id) {
|
|||||||
method: 'post'
|
method: 'post'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 加载通用排班计划
|
||||||
|
export function postSchedulingCommonGenerate(mapId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scheduling/common/generate?mapId=${mapId}`,
|
||||||
|
method: 'post'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从加载计划创建每日计划
|
||||||
|
export function postRunPlanTemplate(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/runPlan/template/${data.id}/copyAs/${data.skinCode}?name=${data.name}`,
|
||||||
|
method: 'post'
|
||||||
|
});
|
||||||
|
}
|
BIN
src/assets/bg.jpg
Normal file
BIN
src/assets/bg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 71 KiB |
BIN
src/assets/bg1.jpg
Normal file
BIN
src/assets/bg1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 77 KiB |
@ -107,19 +107,19 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
width() {
|
width() {
|
||||||
let fontNum = 0;
|
let fontNum = 0;
|
||||||
let newLabel="";
|
let newLabel='';
|
||||||
this.menu.forEach(elem => {
|
this.menu.forEach(elem => {
|
||||||
newLabel=elem.label.replace(/[^\u0000-\u00ff]/g,"aa");
|
newLabel = elem.label && elem.label.replace(/[^\u0000-\u00ff]/g, 'aa');
|
||||||
if (elem.label && newLabel.length > fontNum) {
|
if (elem.label && newLabel.length > fontNum) {
|
||||||
fontNum=newLabel.length;
|
fontNum=newLabel.length;
|
||||||
// fontNum = elem.label.length;
|
// fontNum = elem.label.length;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var width = fontNum/2 * this.defaultFontSize + 60 + 'px';
|
var width = fontNum/2 * this.defaultFontSize + 60 + 'px';
|
||||||
// if(this.$t('global.lanuage')==='en'){
|
// if(this.$t('global.lanuage')==='en'){
|
||||||
// width = fontNum/2 * this.defaultFontSize + 40 + 'px';
|
// width = fontNum/2 * this.defaultFontSize + 40 + 'px';
|
||||||
// }
|
// }
|
||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -193,7 +193,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
calculateSubWidth(item) {
|
calculateSubWidth(item) {
|
||||||
// debugger;
|
|
||||||
const children = item.children;
|
const children = item.children;
|
||||||
let width = 0;
|
let width = 0;
|
||||||
let fontNum = 0;
|
let fontNum = 0;
|
||||||
@ -204,7 +203,7 @@ export default {
|
|||||||
});
|
});
|
||||||
width = fontNum * this.defaultFontSize + 20 + 'px';
|
width = fontNum * this.defaultFontSize + 20 + 'px';
|
||||||
return width;
|
return width;
|
||||||
},
|
},
|
||||||
openLoadFile(item) {
|
openLoadFile(item) {
|
||||||
const obj = this.$refs[item.label][0];
|
const obj = this.$refs[item.label][0];
|
||||||
if (obj.files) {
|
if (obj.files) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="35%" :before-close="done => {}" :show-close="false" center>
|
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="35%" :before-close="done => {}" :show-close="false" center>
|
||||||
<div style="text-align:center; margin:auto;">
|
<div style="text-align:center; margin:auto;">
|
||||||
<qrcode-vue v-loading="loading" :value="url" :size="400" />
|
<qrcode-vue v-loading="loading" :value="url" :size="400" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -127,7 +127,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1">
|
<el-col :span="6" :offset="0">
|
||||||
<el-button type="primary" size="small" :disabled="!canQuery" @click="query">{{ $t('global.query') }}</el-button>
|
<el-button type="primary" size="small" :disabled="!canQuery" @click="query">{{ $t('global.query') }}</el-button>
|
||||||
<el-button v-if="queryForm.reset" type="primary" size="small" :disabled="!canQuery" @click="doClean">{{ $t('global.reset') }}</el-button>
|
<el-button v-if="queryForm.reset" type="primary" size="small" :disabled="!canQuery" @click="doClean">{{ $t('global.reset') }}</el-button>
|
||||||
<el-button v-if="exportFlag" type="primary" size="small" :disabled="!canQuery" @click="doExport">{{ $t('global.export') }}</el-button>
|
<el-button v-if="exportFlag" type="primary" size="small" :disabled="!canQuery" @click="doExport">{{ $t('global.export') }}</el-button>
|
||||||
|
@ -154,5 +154,9 @@ export default {
|
|||||||
no: 'No',
|
no: 'No',
|
||||||
details: 'Details',
|
details: 'Details',
|
||||||
enterNameToFilter: 'Enter a name to filter',
|
enterNameToFilter: 'Enter a name to filter',
|
||||||
colon: ':'
|
colon: ':',
|
||||||
|
processFailure: 'Process failure',
|
||||||
|
enterLastStep: 'Please enter a hint and click next',
|
||||||
|
pleaseOpearte: 'Please proceed',
|
||||||
|
help: 'help'
|
||||||
};
|
};
|
||||||
|
62
src/i18n/langs/en/ibp.js
Normal file
62
src/i18n/langs/en/ibp.js
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
export default {
|
||||||
|
stationName: 'Station name:',
|
||||||
|
save: 'Save',
|
||||||
|
background: 'Background',
|
||||||
|
line: 'Line',
|
||||||
|
text: 'Text',
|
||||||
|
rect: 'Rect',
|
||||||
|
button: 'Button',
|
||||||
|
circularLamp: 'Circular lamp',
|
||||||
|
arrow: 'Arrow',
|
||||||
|
escalatorFrame: 'Escalator frame',
|
||||||
|
alarm: 'Alarm',
|
||||||
|
telephoneTerminal: 'Telephone terminal',
|
||||||
|
escalator: 'Escalator',
|
||||||
|
key: 'Key',
|
||||||
|
digitalClock: 'Digital clock',
|
||||||
|
rotateTip: 'Rotate tip',
|
||||||
|
alarmCode: 'Alarm code',
|
||||||
|
alarmWidth: 'Alarm width',
|
||||||
|
xCoordinate: 'X-axis coordinate',
|
||||||
|
yCoordinate: 'Y-axis coordinate',
|
||||||
|
createNow: 'Create now',
|
||||||
|
generateCode: 'Generate Code',
|
||||||
|
arrowCode: 'Arrow code',
|
||||||
|
arrowDirection: 'Arrow direction',
|
||||||
|
arrowLength: 'Arrow length',
|
||||||
|
arrowWidth: 'Arrow width',
|
||||||
|
arrowColor: 'Arrow color',
|
||||||
|
vertexXCoordinate: 'Vertex X-axis coordinate',
|
||||||
|
vertexYCoordinate: 'vertex Y-axis coordinate',
|
||||||
|
up: 'Up',
|
||||||
|
down: 'Down',
|
||||||
|
left: 'Left',
|
||||||
|
right: 'Right',
|
||||||
|
backgroundWidth: 'backgroundWidth',
|
||||||
|
backgroundHeight: 'backgroundHeight',
|
||||||
|
buttonCode: 'Button code',
|
||||||
|
buttonColor: 'Button color',
|
||||||
|
buttonWidth: 'Button width',
|
||||||
|
redButton: 'Red button',
|
||||||
|
blueButton: 'Blue button',
|
||||||
|
yellowButton: 'Yellow button',
|
||||||
|
greenButton: 'Green button',
|
||||||
|
grayButton: 'Gray button',
|
||||||
|
digitalClockCode: 'Digital clock code',
|
||||||
|
digitalClockWidth: 'Digital clock width',
|
||||||
|
escalatorCode: 'Escalator code',
|
||||||
|
escalatorWidth: 'Escalator width',
|
||||||
|
escalatorHeight: 'Escalator height',
|
||||||
|
escalatorColor: 'Escalator color',
|
||||||
|
startingDirection: 'Starting direction',
|
||||||
|
doNotStart: 'Do not start',
|
||||||
|
startUp: 'Start up',
|
||||||
|
startDown: 'Start down',
|
||||||
|
keyCode: 'Key code',
|
||||||
|
keyWidth: 'Key width',
|
||||||
|
keyDirection: 'Key direction',
|
||||||
|
level: 'Level',
|
||||||
|
vertical: 'Vertical',
|
||||||
|
upperText: 'Upper text',
|
||||||
|
lowerText: 'Lower text'
|
||||||
|
};
|
@ -23,6 +23,7 @@ import display from './display';
|
|||||||
import joinTraining from './joinTraining';
|
import joinTraining from './joinTraining';
|
||||||
import trainRoom from './trainRoom';
|
import trainRoom from './trainRoom';
|
||||||
import menu from './menu';
|
import menu from './menu';
|
||||||
|
import ibp from './ibp';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
...enLocale,
|
...enLocale,
|
||||||
@ -49,5 +50,6 @@ export default {
|
|||||||
display,
|
display,
|
||||||
joinTraining,
|
joinTraining,
|
||||||
trainRoom,
|
trainRoom,
|
||||||
menu
|
menu,
|
||||||
|
ibp
|
||||||
};
|
};
|
||||||
|
@ -9,4 +9,11 @@ export default {
|
|||||||
confirmSignalOpen: 'Please confirm that the signal ahead is open',
|
confirmSignalOpen: 'Please confirm that the signal ahead is open',
|
||||||
faultInformation: 'Fault information:',
|
faultInformation: 'Fault information:',
|
||||||
vWeek: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
vWeek: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||||
|
trackCheck: 'Track check',
|
||||||
|
signalCheck: 'Signal check',
|
||||||
|
turnoutCheck: 'Turnout check',
|
||||||
|
stationInfoDisplay: 'Station information — display',
|
||||||
|
stationInfoHidden: 'Station information — hidden',
|
||||||
|
trainInfoDisplay: 'Train information — display',
|
||||||
|
trainInfoHidden: 'Train information — hidden'
|
||||||
};
|
};
|
||||||
|
@ -28,6 +28,10 @@ export default {
|
|||||||
stepDetail: 'Detail',
|
stepDetail: 'Detail',
|
||||||
generation: 'Generation',
|
generation: 'Generation',
|
||||||
skinType: 'Skin Type',
|
skinType: 'Skin Type',
|
||||||
|
saveAs: 'Save As',
|
||||||
|
skinTypeFrom: 'from',
|
||||||
|
skinTypeTo: 'to',
|
||||||
|
copyLesson: 'Duplicate course definition',
|
||||||
minDuration: 'The Best Available',
|
minDuration: 'The Best Available',
|
||||||
maxDuration: 'The Largest Available',
|
maxDuration: 'The Largest Available',
|
||||||
trainingRemark: 'Explain',
|
trainingRemark: 'Explain',
|
||||||
@ -52,6 +56,7 @@ export default {
|
|||||||
createChapter: 'Create chapter',
|
createChapter: 'Create chapter',
|
||||||
contentSorting: 'Content sorting',
|
contentSorting: 'Content sorting',
|
||||||
courseList: 'Course list',
|
courseList: 'Course list',
|
||||||
|
countSkinCode: 'Duplicate skin cannot be the same type as the copied skin',
|
||||||
createNewCoursesFromRelease: 'Create new courses from release',
|
createNewCoursesFromRelease: 'Create new courses from release',
|
||||||
courseName: 'Course name:',
|
courseName: 'Course name:',
|
||||||
parentChapter: 'Parent chapter:',
|
parentChapter: 'Parent chapter:',
|
||||||
|
@ -257,7 +257,7 @@ export default {
|
|||||||
acceptConversionResponseTimeout: 'Accept conversion response timeout',
|
acceptConversionResponseTimeout: 'Accept conversion response timeout',
|
||||||
controlModeTransfersuccees: 'Control mode transfer succees',
|
controlModeTransfersuccees: 'Control mode transfer succees',
|
||||||
controlModeTransferFailed: 'Control mode transfer failed',
|
controlModeTransferFailed: 'Control mode transfer failed',
|
||||||
senedMessageOne: 'A transfer request has been sent and timed out after ',
|
senedMessageOne: 'A transfer request has been sent and timed out after, ',
|
||||||
senedMessageTwo: 'seconds.',
|
senedMessageTwo: 'seconds.',
|
||||||
normal: 'Normal',
|
normal: 'Normal',
|
||||||
selectData: 'Please select a piece of data',
|
selectData: 'Please select a piece of data',
|
||||||
@ -359,6 +359,8 @@ export default {
|
|||||||
addTask2: 'Add task',
|
addTask2: 'Add task',
|
||||||
deleteTask2: 'Delete task',
|
deleteTask2: 'Delete task',
|
||||||
replace: 'replace',
|
replace: 'replace',
|
||||||
|
jumpStop: 'Jump stop',
|
||||||
|
centerDetainTrain: 'Center detain train',
|
||||||
inTheLibrary: 'In the library',
|
inTheLibrary: 'In the library',
|
||||||
outOfTheLibrary: 'Out of the library',
|
outOfTheLibrary: 'Out of the library',
|
||||||
changeTripNumber: 'Change trip number',
|
changeTripNumber: 'Change trip number',
|
||||||
|
@ -100,11 +100,17 @@ export default {
|
|||||||
permission: 'Permission',
|
permission: 'Permission',
|
||||||
orderSelectionItem: 'Order selection item',
|
orderSelectionItem: 'Order selection item',
|
||||||
orderDetails: 'Order details',
|
orderDetails: 'Order details',
|
||||||
|
universalPackage: '万能权限',
|
||||||
|
createPackage: '创建权限',
|
||||||
|
package: '权限包',
|
||||||
|
basePackage: '基础权限',
|
||||||
statusType: 'Status type',
|
statusType: 'Status type',
|
||||||
private: 'Private',
|
private: 'Private',
|
||||||
public: 'Public',
|
public: 'Public',
|
||||||
pleaseEnterContent: 'Please enter content',
|
pleaseEnterContent: 'Please enter content',
|
||||||
selectGoods: 'Select Goods',
|
selectGoods: 'Select Goods',
|
||||||
month: ' month',
|
month: ' month',
|
||||||
yuan: ' yuan'
|
yuan: ' yuan',
|
||||||
|
back: '返回',
|
||||||
|
next: '下一步'
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,233 @@
|
|||||||
export default {
|
export default {
|
||||||
|
updateStation: {
|
||||||
|
level1: 'level one: ',
|
||||||
|
level2: 'level two: ',
|
||||||
|
level3: 'level three: ',
|
||||||
|
level4: 'level four: ',
|
||||||
|
level5: 'level five: ',
|
||||||
|
updateData: 'Update data',
|
||||||
|
pleaseInputLevel1: 'Please input level one',
|
||||||
|
pleaseInputLevel2: 'Please input level two',
|
||||||
|
pleaseInputLevel3: 'Please input level three',
|
||||||
|
pleaseInputLevel4: 'Please input level four',
|
||||||
|
pleaseInputLevel5: 'Please input level five',
|
||||||
|
systemOutPut: 'System output',
|
||||||
|
selectPrintArea: 'Selec print area',
|
||||||
|
selectDeleteRoute: 'Select delete route',
|
||||||
|
routeSelect: 'Route select',
|
||||||
|
quicklyAddTask: 'Quickly add task',
|
||||||
|
quicklyAddLoop: 'Quickly add loop',
|
||||||
|
deletePlanCar: 'Delete plan car'
|
||||||
|
},
|
||||||
|
openRunPlan: {
|
||||||
|
selectRunplan: 'Select run graph',
|
||||||
|
delete: 'Delete',
|
||||||
|
modify: 'Modify',
|
||||||
|
runPlanList: 'Run graph list',
|
||||||
|
getRunPlanListFail: 'Get run graph list Failed',
|
||||||
|
confirmDeleteRunPlan: 'Are you sure to delete this run graph?',
|
||||||
|
deleteSuccess: 'Delete success!',
|
||||||
|
pleaseSelectRunplan: 'please select run graph'
|
||||||
|
},
|
||||||
|
modifying: {
|
||||||
|
tripNumber: 'Trip number: ',
|
||||||
|
pleaseSelect: 'Please select',
|
||||||
|
manual: 'Manual',
|
||||||
|
defaultStopTime: 'Default stop time',
|
||||||
|
serviceNumber: 'Service number: ',
|
||||||
|
clearGuest: 'Clear guest',
|
||||||
|
continuationPlan: 'Continuation plan',
|
||||||
|
firstTrain: 'First train',
|
||||||
|
serialNumber: 'Serial number: ',
|
||||||
|
defaultRunLevel: 'Default run level: ',
|
||||||
|
startTime: 'Start Time:',
|
||||||
|
selectTime: 'Select Time',
|
||||||
|
inStock: 'In Stock',
|
||||||
|
outStock: 'Out Stock',
|
||||||
|
lastTrain: 'Last Train',
|
||||||
|
route: 'Route: ',
|
||||||
|
// 起始站
|
||||||
|
// 起始区段
|
||||||
|
// 终到站
|
||||||
|
// 终到区段
|
||||||
|
// 描述
|
||||||
|
detail: 'Detail: ',
|
||||||
|
station: 'Station',
|
||||||
|
section: 'Section',
|
||||||
|
stopTime: 'Stop time',
|
||||||
|
runLevel: 'Run level',
|
||||||
|
arrivalTime: 'Arrival time',
|
||||||
|
departureTime: 'Departure time',
|
||||||
|
showDefaultTime: 'Show default stop time and run level',
|
||||||
|
automatic: 'Automatic',
|
||||||
|
default: 'Default',
|
||||||
|
modifyTask: 'Modify task',
|
||||||
|
setMessageTip1: 'Please set the start interval of the start section',
|
||||||
|
setMessageTip2: 'to the section',
|
||||||
|
setMessageTip3: '.',
|
||||||
|
modifyTaskSuccess: 'Modify task success!',
|
||||||
|
modifyTaskFailed: 'Modify task failed',
|
||||||
|
|
||||||
|
startingStation: 'Start station',
|
||||||
|
startSection: 'Start section',
|
||||||
|
endStation: 'End station',
|
||||||
|
endSection: 'End section',
|
||||||
|
direction: 'Direction',
|
||||||
|
distance: 'Distance',
|
||||||
|
operation: 'Operation',
|
||||||
|
edit: 'Edit',
|
||||||
|
save: 'Save',
|
||||||
|
cancelAndQuit: 'Cancel and quit',
|
||||||
|
modifySuccess: 'Modify Success',
|
||||||
|
modifyFailed: 'Modify Failed',
|
||||||
|
modifyRunLevel: 'Modify run level',
|
||||||
|
|
||||||
|
startStationTips: 'Start station departure time unchanged',
|
||||||
|
endStationTips: 'End station departure time unchanged',
|
||||||
|
startStationTitle: 'Start station',
|
||||||
|
startedStation: 'Start station',
|
||||||
|
endStationTitle: 'End station',
|
||||||
|
endedStation: 'End station',
|
||||||
|
description: 'Description',
|
||||||
|
modifyTaskRoute: 'Modify task route',
|
||||||
|
|
||||||
|
modifyStartTime: 'Modify start time: ',
|
||||||
|
modifyStartTimeTitle: 'Modify start time',
|
||||||
|
search: 'Search',
|
||||||
|
modifyTwoStationTime: 'Modify the time between the two stations'
|
||||||
|
},
|
||||||
|
editSmoothRun: {
|
||||||
|
trainProportion: 'Train proportion',
|
||||||
|
allTheLoopTrainProportion: 'Use the same size loop train proportion for all time periods',
|
||||||
|
sizeOfTheLoopTrainProportion: 'Large loop and small loop train proportion',
|
||||||
|
pleaseSelect: 'Please select',
|
||||||
|
startTime: 'Start time',
|
||||||
|
stopTime: 'Stop time',
|
||||||
|
runInterval: 'Run interval',
|
||||||
|
add: 'Add',
|
||||||
|
delete: 'Delete',
|
||||||
|
modify: 'Modify',
|
||||||
|
editSmoothRunTime: 'Edit smooth run time'
|
||||||
|
},
|
||||||
buy: 'Buy',
|
buy: 'Buy',
|
||||||
offlineMappingSoftware: 'Offline mapping software',
|
offlineMappingSoftware: 'Offline mapping software',
|
||||||
lianPlanSystem: 'Urban rail transit lian planning system',
|
lianPlanSystem: 'Urban rail transit lian planning system',
|
||||||
lianPlanDescription: 'Lian plan is a map compiling test system, can be real simulation to achieve the simulation of running test of new operation diagram, the system can realize editing operation diagram, import operation diagram and according to the standard of operation diagram simulation real driving environment, solve the problem that can not be updated for operation diagram test. It can find out the unreasonable places in the new diagram in time and make real-time adjustment on the diagram, so as to avoid the problem of finding problems in the operation of the new diagram and requiring manual intervention of dispatchers, and minimize the impact of the fault on the normal operation of subway.',
|
lianPlanDescription: 'Lian plan is a map compiling test system, can be real simulation to achieve the simulation of running test of new operation diagram, the system can realize editing operation diagram, import operation diagram and according to the standard of operation diagram simulation real driving environment, solve the problem that can not be updated for operation diagram test. It can find out the unreasonable places in the new diagram in time and make real-time adjustment on the diagram, so as to avoid the problem of finding problems in the operation of the new diagram and requiring manual intervention of dispatchers, and minimize the impact of the fault on the normal operation of subway.',
|
||||||
|
loopName: 'Loop name',
|
||||||
|
startingStation: 'Starting station',
|
||||||
|
terminal: 'Terminal',
|
||||||
|
planName: 'Plan name',
|
||||||
|
fuzhouIconDescription: 'Fuzhou icon description',
|
||||||
|
upBeginTripNumber: 'Up begin trip number',
|
||||||
|
downBeginTrain: 'Down begin train',
|
||||||
|
minimumTrainInterval: 'Minimum train interval',
|
||||||
|
maximumTrainInterval: 'Maximum train interval',
|
||||||
|
trainGeneratesInitialLabel: 'Train generates initial label',
|
||||||
|
minimumTurnbackTime: 'Minimum turnback time',
|
||||||
|
trainDepot: 'Train depot',
|
||||||
|
startingPlatform: 'Starting Platform',
|
||||||
|
endingPlatform: 'Ending Platform',
|
||||||
|
station: 'Station',
|
||||||
|
modifyAttribute: 'Modify attribute',
|
||||||
|
generalParameters: 'General parameters',
|
||||||
|
editingStation: 'Editing station',
|
||||||
|
editDepot: 'Edit parking lot / depot',
|
||||||
|
editCrossRailway: 'Edit cross railway',
|
||||||
|
editLoopRailway: 'Edit loop railway',
|
||||||
|
application: 'Application (A)',
|
||||||
|
parameter: 'Parameter',
|
||||||
|
numberOfTrainsAvailable: 'Number of trains available',
|
||||||
|
continuousMinimumInterval: 'Continuous minimum interval',
|
||||||
|
continuousReturnMaximumInterval: 'Continuous return maximum interval',
|
||||||
|
afterTheTrainHasBackInterval: 'After the train has a back interval',
|
||||||
|
secondsCanBeRunnedByTrain: 'seconds can be runned by train',
|
||||||
|
defaultStopTime: 'Default stop time:',
|
||||||
|
defaultRunLevel: 'Default run level:',
|
||||||
|
stopTime: 'Stop time',
|
||||||
|
runLevel: 'Run level',
|
||||||
|
platform: 'Platform',
|
||||||
|
modifyPlatformProperties: 'Modify platform properties',
|
||||||
|
file: 'File',
|
||||||
|
openRunningDiagram: 'Open run graph',
|
||||||
|
createRunningDiagram: 'Create run graph',
|
||||||
|
modifyRunningDiagramName: 'Modify run graph name',
|
||||||
|
modifyStationIntervalTime: 'Modify station interval time',
|
||||||
|
deleteRunningDiagram: 'Delete run graph',
|
||||||
|
view: 'View',
|
||||||
|
tool: 'Tool',
|
||||||
|
validityCheck: 'Validity check',
|
||||||
|
testRunningDiagram: 'Test run graph',
|
||||||
|
modify: 'Modify',
|
||||||
|
addPlan: 'Add plan',
|
||||||
|
deletePlan: 'Delete plan',
|
||||||
|
duplicatePlan: 'Duplicate plan',
|
||||||
|
addTask: 'Add task',
|
||||||
|
deleteTask: 'Delete task',
|
||||||
|
modifyTask: 'Modify task',
|
||||||
|
option: 'Option',
|
||||||
|
help: 'Help',
|
||||||
|
implemented: 'implementing......',
|
||||||
|
server1: 'Server 1',
|
||||||
|
server2: 'Server 2',
|
||||||
|
frontMachine1: 'Front machine 1',
|
||||||
|
frontMachine2: 'Front machine 2',
|
||||||
|
mainDispatcher: 'Main dispatcher',
|
||||||
|
dispatcher1: 'Dispatcher1',
|
||||||
|
dispatcher2: 'Dispatcher2',
|
||||||
|
dispatcher3: 'Dispatcher3',
|
||||||
|
bigScreen: 'Big screen',
|
||||||
|
maintenanceWorkstation: 'Maintenance workstation',
|
||||||
|
runGraphShowManualStation: 'Run graph show manual station',
|
||||||
|
jumpStop: 'Jump stop',
|
||||||
|
detainTrain: 'Detain train',
|
||||||
|
trainAlarm: 'Train alarm',
|
||||||
|
serviceNumber: 'Service number',
|
||||||
|
tripNumber: 'Trip number',
|
||||||
|
stationName: 'Station name:',
|
||||||
|
stationKilometerMark: 'Station kilometer mark:',
|
||||||
|
arriveTime: 'Arrive time:',
|
||||||
|
serviceAndTripNumber: 'Service And trip number',
|
||||||
|
testRunning: 'Test running',
|
||||||
|
serviceNumber2: 'Service number',
|
||||||
|
addPlanTrain: 'Add plan train',
|
||||||
|
trainRunningTimeInterval: 'Train running time interval',
|
||||||
|
sizeOfTheLoopTrainProportion: 'The size of the loop car proportion',
|
||||||
|
applicationRouteSelection: 'Application route selection',
|
||||||
|
bothway: 'bothway',
|
||||||
|
up: 'up',
|
||||||
|
down: 'down',
|
||||||
|
runningInterval: 'Running interval',
|
||||||
|
addASmoothRunningTime: 'Add a smooth running time',
|
||||||
|
addToTheFront: 'Add to the front',
|
||||||
|
addToTheEnd: 'Add to the end',
|
||||||
|
crossRailway: 'Cross railway',
|
||||||
|
startingSection: 'Starting section',
|
||||||
|
description: 'Description',
|
||||||
|
section: 'Section',
|
||||||
|
departureTime: 'departureTime',
|
||||||
|
showDefaultStopTimeAndRunLevel: 'Show default stop time and run level',
|
||||||
|
automatic: 'Automatic',
|
||||||
|
default: 'Default',
|
||||||
|
addTaskHint1: 'Please set the section running time of the start section ',
|
||||||
|
addTaskHint2: 'to the section',
|
||||||
|
addTaskHint3: '',
|
||||||
|
normalNew: 'Normal new',
|
||||||
|
createFromTheReleaseRunGraph: 'Create from the release run graph',
|
||||||
|
releaseRunGraph: 'Release run graph',
|
||||||
|
newRunGraph: 'New run graph',
|
||||||
|
deleteAllPreviousTasks: 'Delete all previous tasks (including this task)',
|
||||||
|
deleteAllSubsequentTasks: 'Delete all subsequent tasks (including this task)',
|
||||||
|
forward: 'Forward',
|
||||||
|
backward: 'Backward',
|
||||||
|
frequency: 'Frequency:',
|
||||||
|
intervals: 'Intervals:',
|
||||||
|
duplicateTrain: 'Duplicate train',
|
||||||
|
commissioningTrain: 'Commissioning train',
|
||||||
|
task: 'Task',
|
||||||
|
startTime: 'Start time',
|
||||||
|
endTime: 'End time',
|
||||||
|
editPlanningTrain: 'Edit planning train',
|
||||||
|
runGraphName: 'Run graph name',
|
||||||
|
tipOperationTime: '请先设置区段站间运行时间, 【文件】-> 【修改站间运行时间】',
|
||||||
|
serverTrainNum: '表号车次号'
|
||||||
};
|
};
|
||||||
|
@ -27,12 +27,14 @@ export default {
|
|||||||
createTime: 'Creation Time',
|
createTime: 'Creation Time',
|
||||||
detail: 'Detail',
|
detail: 'Detail',
|
||||||
generateRunPlan: 'Generate Daily Plan',
|
generateRunPlan: 'Generate Daily Plan',
|
||||||
|
generateRunjihua: 'Generate general shift schedule',
|
||||||
selectTemplateRunPlan: 'Select Template Run Plan',
|
selectTemplateRunPlan: 'Select Template Run Plan',
|
||||||
pleaseSelectTemplate: 'Please Select Template Run Plan',
|
pleaseSelectTemplate: 'Please Select Template Run Plan',
|
||||||
selectMap: 'Select Map',
|
selectMap: 'Select Map',
|
||||||
createCommonRunPlan: 'Create Common Run Plan',
|
createCommonRunPlan: 'Create Common Run Plan',
|
||||||
createCommonSuccess: 'Creation of a common run plan was successful',
|
createCommonSuccess: 'Creation of a common run plan was successful',
|
||||||
wellGenerateEveryRunPlan: 'This operation generates a daily running diagram. Do you want to continue?',
|
wellGenerateEveryRunPlan: 'This operation generates a daily running diagram. Do you want to continue?',
|
||||||
|
wellGenerateEveryRunjihua: 'This operation will generate a universal shift schedule. Do you want to continue?',
|
||||||
wellDelTemplate: 'This action deletes the diagram template. Do you want to continue?',
|
wellDelTemplate: 'This action deletes the diagram template. Do you want to continue?',
|
||||||
fullMark: 'Full Mark',
|
fullMark: 'Full Mark',
|
||||||
passScore: 'Passing Score',
|
passScore: 'Passing Score',
|
||||||
@ -47,6 +49,7 @@ export default {
|
|||||||
deleteGenerateEveryRunPlan: 'This operation will delete the daily running diagram. Do you want to continue?',
|
deleteGenerateEveryRunPlan: 'This operation will delete the daily running diagram. Do you want to continue?',
|
||||||
deleteGenerateRunPlanSuccess: 'Delete load plan successfully!',
|
deleteGenerateRunPlanSuccess: 'Delete load plan successfully!',
|
||||||
addEveryRunPlanSuccess: 'Load plan create daily plan successfully!',
|
addEveryRunPlanSuccess: 'Load plan create daily plan successfully!',
|
||||||
|
addEveryRunjihuaSuccess: 'Load plan to create universal scheduling plan successful!',
|
||||||
publisherId: 'Publisher Id',
|
publisherId: 'Publisher Id',
|
||||||
publishTime: 'Time',
|
publishTime: 'Time',
|
||||||
publishVersion: 'Version',
|
publishVersion: 'Version',
|
||||||
@ -90,6 +93,7 @@ export default {
|
|||||||
addExamRluesError: 'Add rule does not match full score',
|
addExamRluesError: 'Add rule does not match full score',
|
||||||
addExamRules: 'Please add exam rules!',
|
addExamRules: 'Please add exam rules!',
|
||||||
saveRuleFailed: 'Save rules failed: ',
|
saveRuleFailed: 'Save rules failed: ',
|
||||||
|
selectSkinCode: 'Select the skin',
|
||||||
|
|
||||||
selectTypeScope: 'Please select type scope',
|
selectTypeScope: 'Please select type scope',
|
||||||
operationType: 'Operation type',
|
operationType: 'Operation type',
|
||||||
@ -104,5 +108,6 @@ export default {
|
|||||||
inputNumberError: 'The input value must be greater than the number of questions',
|
inputNumberError: 'The input value must be greater than the number of questions',
|
||||||
inputScorePerQuestion: 'Please input score per question',
|
inputScorePerQuestion: 'Please input score per question',
|
||||||
selectTestType: 'Please select test type',
|
selectTestType: 'Please select test type',
|
||||||
modifyRules: 'Modify Rules'
|
modifyRules: 'Modify Rules',
|
||||||
|
enterRunPlanName: 'Please enter the name of the diagram'
|
||||||
};
|
};
|
||||||
|
@ -275,5 +275,36 @@ export default {
|
|||||||
inputMaxDuration: 'Please input max duration',
|
inputMaxDuration: 'Please input max duration',
|
||||||
accessNumber: 'Please input the number of permissions',
|
accessNumber: 'Please input the number of permissions',
|
||||||
courseNameEmpty: 'Course name cannot be empty',
|
courseNameEmpty: 'Course name cannot be empty',
|
||||||
purchaseMonth: 'Please input the number of months to buy'
|
purchaseMonth: 'Please input the number of months to buy',
|
||||||
|
pleaseEnterGoodPrice: '请输入商品价格',
|
||||||
|
enterTheNameOfTheRunGraph: 'Please enter the name of the run graph',
|
||||||
|
chooseToPublishTheRunGraph: 'Please choose to publish the run chart',
|
||||||
|
enterTheAlarmCode: 'Please enter the alarm code',
|
||||||
|
enterTheAlarmWidth: 'Please enter the alarm width',
|
||||||
|
enterTheEscalatorFrameCode: 'Please enter the escalator frame code',
|
||||||
|
enterTheEscalatorFrameWidth: 'Please enter the escalator frame width',
|
||||||
|
enterTheEscalatorFrameHeight: 'Please enter the escalator frame height',
|
||||||
|
enterTheBorderWidth: 'Please enter the border width',
|
||||||
|
selectTheDirectionOfTheArrow: 'Please select the direction of the arrow',
|
||||||
|
enterTheArrowCode: 'Please enter the arrow code',
|
||||||
|
enterTheArrowLength: 'Please enter the arrow length',
|
||||||
|
enterTheArrowWidth: 'Please enter the arrow width',
|
||||||
|
enterTheArrowColor: 'Please enter the arrow color',
|
||||||
|
enterTheBackgroundWidth: 'Please enter the background width',
|
||||||
|
enterTheBackgroundHeight: 'Please enter the background height',
|
||||||
|
selectTheButtonColor: 'Please select the button color',
|
||||||
|
enterTheButtonCode: 'Please enter the button code',
|
||||||
|
enterTheButtonWidth: 'Please enter the button width',
|
||||||
|
enterTheDigitalClockCode: 'Please enter the digital clock code',
|
||||||
|
enterTheDigitalClockWidth: 'Please enter the digital clock width',
|
||||||
|
selectTheStartingDirection: 'Please select the starting direction',
|
||||||
|
enterTheElevatorCode: 'Please enter the elevator code',
|
||||||
|
enterTheElevatorWidth: 'Please enter the elevator width',
|
||||||
|
enterTheElevatorHeight: 'Please enter the elevator height',
|
||||||
|
enterTheElevatorColor: 'Please enter the elevator color',
|
||||||
|
enterTheKeyCode: 'Please enter the key code',
|
||||||
|
enterTheKeyWidth: 'Please enter the key width',
|
||||||
|
enterTheKeyDirection: 'Please select the key direction',
|
||||||
|
enterTheUpperText: 'Please enter the upper text',
|
||||||
|
enterTheLowerText: 'Please enter the lower text'
|
||||||
};
|
};
|
||||||
|
@ -78,5 +78,7 @@ export default {
|
|||||||
modifyConversition: 'Modify Conversition',
|
modifyConversition: 'Modify Conversition',
|
||||||
modifyConversitionButton: 'modify',
|
modifyConversitionButton: 'modify',
|
||||||
drivingByPlan: 'Driving By Plan',
|
drivingByPlan: 'Driving By Plan',
|
||||||
scriptBack: 'Back'
|
scriptBack: 'Back',
|
||||||
|
speakTo: 'to',
|
||||||
|
executeCommandTips: 'execute command: '
|
||||||
};
|
};
|
||||||
|
@ -20,10 +20,10 @@ export default {
|
|||||||
operationAbnormal: 'Abnormal operation',
|
operationAbnormal: 'Abnormal operation',
|
||||||
createSuccess: 'Creating a successful',
|
createSuccess: 'Creating a successful',
|
||||||
|
|
||||||
linkCheckList: '有 link 绘图不规范, 未生成区段',
|
linkCheckList: 'Link drawing is not standard, no section is generated',
|
||||||
allLinkCreate: '所有link都有相关区段,所以未生成任何区段',
|
allLinkCreate: 'All links have related extents, so no extents are generated',
|
||||||
incidenceRelation: '可能是多余的,请检查关联关系',
|
incidenceRelation: 'May be redundant, please check the association relationship',
|
||||||
linkNoneSplit: '有问题,没有进行拆分',
|
linkNoneSplit: "There's a problem. There's no split",
|
||||||
|
|
||||||
cannotCoincide: 'The starting and ending coordinates cannot coincide',
|
cannotCoincide: 'The starting and ending coordinates cannot coincide',
|
||||||
cannotMerged: 'Non-physical extents exist and cannot be merged',
|
cannotMerged: 'Non-physical extents exist and cannot be merged',
|
||||||
@ -170,5 +170,33 @@ export default {
|
|||||||
selectAPieceOfData: 'Please select a piece of data',
|
selectAPieceOfData: 'Please select a piece of data',
|
||||||
selectSpeedLimitValueTip: 'Please select the speed limit value, click the "release" button, and issue the command!',
|
selectSpeedLimitValueTip: 'Please select the speed limit value, click the "release" button, and issue the command!',
|
||||||
addTrainIdTip: 'Add train identification number: successful',
|
addTrainIdTip: 'Add train identification number: successful',
|
||||||
editTrainIdTip: 'Modify train identification number: successful'
|
editTrainIdTip: 'Modify train identification number: successful',
|
||||||
|
enterPrice: 'Please enter the price',
|
||||||
|
publishMap: 'Get publish map',
|
||||||
|
addPackage: 'Please add permission',
|
||||||
|
deletePlanSuccessfully: 'Delete plan successfully',
|
||||||
|
deletePlanFailed: 'Delete plan failed',
|
||||||
|
importRunGraphFailed: 'Import the run graph failed:',
|
||||||
|
parseRunGraphFailed: 'Parsing the run graph failed:',
|
||||||
|
runGraphVerificationFailed: 'Run graph verification failed',
|
||||||
|
selectARunGraphFirst: 'Please select a run graph first.',
|
||||||
|
deleteTrainHint: 'Really want to delete the train',
|
||||||
|
selectAPlan: 'Please select a plan',
|
||||||
|
selectATrain: 'Please select a train',
|
||||||
|
requestingStationDataFailed: 'Requesting station data failed',
|
||||||
|
serviceNumberExistHint: 'This table number already exists. Is it mandatory to set it? (The forced setup program may be abnormal)',
|
||||||
|
serviceNumberLengthHint: 'Length should be two digits',
|
||||||
|
chooseToOpenTheRunGraph: 'Please choose to open the running chart',
|
||||||
|
addTaskSuccessfully: 'Add task successfully!',
|
||||||
|
addTaskFailed: 'Add task failed!',
|
||||||
|
createAnEmptyRunGraphSuccessfully: 'Create an empty run graph successfully!',
|
||||||
|
createARunGraphSuccessfully: 'Create a running diagram successfully!',
|
||||||
|
deleteTaskSuccessfully: 'Delete task successfully!',
|
||||||
|
deleteTaskFailed: 'Delete task failed!',
|
||||||
|
duplicatePlanSuccessful: 'Duplicate plan successful!',
|
||||||
|
duplicatePlanFailed: 'Duplicate plan failed!',
|
||||||
|
runGraphNameModifiedSuccessfully: 'Run graph name modified successfully!',
|
||||||
|
modifyRunGraphNameFailed: 'Modify run graph name failed!',
|
||||||
|
planCreationSuccessful: 'Plan creation successful!',
|
||||||
|
createPlanFailed: 'Failed to create plan!'
|
||||||
};
|
};
|
||||||
|
@ -154,5 +154,10 @@ export default {
|
|||||||
no: '否',
|
no: '否',
|
||||||
details: '详情',
|
details: '详情',
|
||||||
enterNameToFilter: '输入名称进行过滤',
|
enterNameToFilter: '输入名称进行过滤',
|
||||||
colon: ':'
|
colon: ':',
|
||||||
|
processFailure: '处理失败',
|
||||||
|
enterLastStep: '请输入提示并点击下一步',
|
||||||
|
pleaseOpearte: '请开始操作',
|
||||||
|
help: '帮助'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
69
src/i18n/langs/zh/ibp.js
Normal file
69
src/i18n/langs/zh/ibp.js
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
export default {
|
||||||
|
stationName: '车站名称:',
|
||||||
|
save: '保存',
|
||||||
|
background: '背景板',
|
||||||
|
line: '线条',
|
||||||
|
text: '文字',
|
||||||
|
rect: '矩形',
|
||||||
|
button: '按钮',
|
||||||
|
circularLamp: '圆形灯',
|
||||||
|
arrow: '箭头',
|
||||||
|
escalatorFrame: '扶梯框',
|
||||||
|
alarm: '报警器',
|
||||||
|
telephoneTerminal: '电话端子',
|
||||||
|
escalator: '扶梯',
|
||||||
|
key: '钥匙',
|
||||||
|
digitalClock: '数字时钟',
|
||||||
|
rotateTip: '旋转提示',
|
||||||
|
alarmCode: '报警器编号',
|
||||||
|
alarmWidth: '报警器宽度',
|
||||||
|
xCoordinate: 'X轴坐标',
|
||||||
|
yCoordinate: 'Y轴坐标',
|
||||||
|
createNow: '立即创建',
|
||||||
|
generateCode: '生成编号',
|
||||||
|
escalatorFrameCode: '扶梯框编号',
|
||||||
|
escalatorFrameWidth: '扶梯框宽度',
|
||||||
|
escalatorFrameHeight: '扶梯框高度',
|
||||||
|
borderWidth: '边框宽度',
|
||||||
|
recommendedSize: '(建议尺寸25)',
|
||||||
|
arrowCode: '箭头编号',
|
||||||
|
arrowDirection: '箭头方向',
|
||||||
|
arrowLength: '箭头长度',
|
||||||
|
arrowWidth: '箭头宽度',
|
||||||
|
arrowColor: '箭头颜色',
|
||||||
|
vertexXCoordinate: '顶点X轴坐标',
|
||||||
|
vertexYCoordinate: '顶点Y轴坐标',
|
||||||
|
up: '向上',
|
||||||
|
down: '向下',
|
||||||
|
left: '向左',
|
||||||
|
right: '向右',
|
||||||
|
backgroundWidth: '背景板宽度',
|
||||||
|
backgroundHeight: '背景板高度',
|
||||||
|
buttonCode: '按钮编号',
|
||||||
|
buttonColor: '按钮颜色',
|
||||||
|
buttonWidth: '按钮宽度',
|
||||||
|
redButton: '红色按钮',
|
||||||
|
blueButton: '蓝色按钮',
|
||||||
|
yellowButton: '黄色按钮',
|
||||||
|
greenButton: '绿色按钮',
|
||||||
|
grayButton: '灰色按钮',
|
||||||
|
digitalClockCode: '数字时钟编号',
|
||||||
|
digitalClockWidth: '数字时钟宽度',
|
||||||
|
escalatorCode: '扶梯编号',
|
||||||
|
escalatorWidth: '扶梯宽度',
|
||||||
|
escalatorHeight: '扶梯高度',
|
||||||
|
escalatorColor: '扶梯颜色',
|
||||||
|
startingDirection: '启动方向',
|
||||||
|
doNotStart: '不启动',
|
||||||
|
startUp: '向上启动',
|
||||||
|
startDown: '向下启动',
|
||||||
|
keyCode: '钥匙编号',
|
||||||
|
keyWidth: '钥匙宽度',
|
||||||
|
keyDirection: '钥匙朝向',
|
||||||
|
level: '水平',
|
||||||
|
vertical: '竖直',
|
||||||
|
upperText: '上侧文字',
|
||||||
|
lowerText: '下侧文本',
|
||||||
|
circularLampCode: '圆形灯编号',
|
||||||
|
circularLampRadius: '圆形灯半径'
|
||||||
|
};
|
@ -23,6 +23,7 @@ import display from './display';
|
|||||||
import joinTraining from './joinTraining';
|
import joinTraining from './joinTraining';
|
||||||
import trainRoom from './trainRoom';
|
import trainRoom from './trainRoom';
|
||||||
import menu from './menu';
|
import menu from './menu';
|
||||||
|
import ibp from './ibp';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
...cnLocale,
|
...cnLocale,
|
||||||
@ -49,5 +50,6 @@ export default {
|
|||||||
display,
|
display,
|
||||||
joinTraining,
|
joinTraining,
|
||||||
trainRoom,
|
trainRoom,
|
||||||
menu
|
menu,
|
||||||
|
ibp
|
||||||
};
|
};
|
||||||
|
@ -9,4 +9,11 @@ export default {
|
|||||||
confirmSignalOpen: '请确认前方信号开放',
|
confirmSignalOpen: '请确认前方信号开放',
|
||||||
faultInformation: '故障信息:',
|
faultInformation: '故障信息:',
|
||||||
vWeek: ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
vWeek: ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
||||||
|
trackCheck: '轨道检查',
|
||||||
|
signalCheck: '信号机检查',
|
||||||
|
turnoutCheck: '道岔检查',
|
||||||
|
stationInfoDisplay: '站台信息——显示',
|
||||||
|
stationInfoHidden: '站台信息——隐藏',
|
||||||
|
trainInfoDisplay: '列车信息——显示',
|
||||||
|
trainInfoHidden: '列车信息——隐藏'
|
||||||
};
|
};
|
||||||
|
@ -27,6 +27,10 @@ export default {
|
|||||||
wellDelTrainingRule: '此操作将删除此实训规则, 是否继续?',
|
wellDelTrainingRule: '此操作将删除此实训规则, 是否继续?',
|
||||||
stepDetail: '步骤明细',
|
stepDetail: '步骤明细',
|
||||||
generation: '自动生成',
|
generation: '自动生成',
|
||||||
|
saveAs: '另存为',
|
||||||
|
skinTypeFrom: '从',
|
||||||
|
skinTypeTo: '到',
|
||||||
|
copyLesson: '复制课程定义',
|
||||||
skinType: '皮肤类型',
|
skinType: '皮肤类型',
|
||||||
minDuration: '最佳用时',
|
minDuration: '最佳用时',
|
||||||
maxDuration: '最大用时',
|
maxDuration: '最大用时',
|
||||||
@ -96,6 +100,7 @@ export default {
|
|||||||
platform: '站台',
|
platform: '站台',
|
||||||
train: '列车',
|
train: '列车',
|
||||||
station: '车站',
|
station: '车站',
|
||||||
trainWindow: '车次窗'
|
trainWindow: '车次窗',
|
||||||
|
countSkinCode: '复制皮肤与被复制皮肤类型不能一样'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -361,6 +361,7 @@ export default {
|
|||||||
lineStartTime: '线路开始时间',
|
lineStartTime: '线路开始时间',
|
||||||
lineEndTime: '线路结束时间',
|
lineEndTime: '线路结束时间',
|
||||||
lineDetails: '线路详细信息',
|
lineDetails: '线路详细信息',
|
||||||
|
jumpStop: '跳停',
|
||||||
station: '车站',
|
station: '车站',
|
||||||
affectSubsequentTasks: '影响后续任务',
|
affectSubsequentTasks: '影响后续任务',
|
||||||
manual: '手工',
|
manual: '手工',
|
||||||
|
@ -86,7 +86,7 @@ export default {
|
|||||||
select: '选择',
|
select: '选择',
|
||||||
chooseGoods: '选择商品',
|
chooseGoods: '选择商品',
|
||||||
permissionName: '权限名称',
|
permissionName: '权限名称',
|
||||||
permissionGoodName: '权限商品名称',
|
permissionGoodName: '权限名称', // 创建时 商品名称与权限名称一致
|
||||||
receivingPermission: '领取权限',
|
receivingPermission: '领取权限',
|
||||||
isPackage: '是否权限包',
|
isPackage: '是否权限包',
|
||||||
modifyPermissionContent: '修改权限内容',
|
modifyPermissionContent: '修改权限内容',
|
||||||
@ -105,8 +105,11 @@ export default {
|
|||||||
createPackage: '创建权限',
|
createPackage: '创建权限',
|
||||||
package: '权限包',
|
package: '权限包',
|
||||||
basePackage: '基础权限',
|
basePackage: '基础权限',
|
||||||
|
universalPackage: '万能权限',
|
||||||
pleaseEnterContent: '请输入内容',
|
pleaseEnterContent: '请输入内容',
|
||||||
selectGoods: '选择商品',
|
selectGoods: '选择商品',
|
||||||
month: '月',
|
month: '月',
|
||||||
yuan: '元'
|
yuan: '元',
|
||||||
|
back: '返回',
|
||||||
|
next: '下一步'
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,236 @@
|
|||||||
export default {
|
export default {
|
||||||
|
updateStation: {
|
||||||
|
level1: '等级一:',
|
||||||
|
level2: '等级二:',
|
||||||
|
level3: '等级三:',
|
||||||
|
level4: '等级四:',
|
||||||
|
level5: '等级五:',
|
||||||
|
updateData: '更新数据',
|
||||||
|
pleaseInputLevel1: '请输入等级一',
|
||||||
|
pleaseInputLevel2: '请输入等级二',
|
||||||
|
pleaseInputLevel3: '请输入等级三',
|
||||||
|
pleaseInputLevel4: '请输入等级四',
|
||||||
|
pleaseInputLevel5: '请输入等级五',
|
||||||
|
systemOutPut: '系统输出框',
|
||||||
|
selectPrintArea: '选择打印区域',
|
||||||
|
selectDeleteRoute: '选择删除交路',
|
||||||
|
routeSelect: '交路选择',
|
||||||
|
quicklyAddTask: '快速增加任务',
|
||||||
|
quicklyAddLoop: '快速增加环路',
|
||||||
|
deletePlanCar: '删除计划车'
|
||||||
|
},
|
||||||
|
openRunPlan: {
|
||||||
|
selectRunplan: '选择运行图',
|
||||||
|
delete: '删除',
|
||||||
|
modify: '修改',
|
||||||
|
runPlanList: '运行图列表',
|
||||||
|
getRunPlanListFail: '获取运行图列表失败',
|
||||||
|
confirmDeleteRunPlan: '您确认是否删除此运行图?',
|
||||||
|
deleteSuccess: '删除成功!',
|
||||||
|
pleaseSelectRunplan: '请选择运行图'
|
||||||
|
},
|
||||||
|
modifying: {
|
||||||
|
tripNumber: '车次号:',
|
||||||
|
pleaseSelect: '请选择',
|
||||||
|
manual: '手工',
|
||||||
|
defaultStopTime: '缺省停站时间:',
|
||||||
|
serviceNumber: '表号:',
|
||||||
|
clearGuest: '清客',
|
||||||
|
continuationPlan: '延续计划',
|
||||||
|
firstTrain: '首班车',
|
||||||
|
serialNumber: '序列号:',
|
||||||
|
defaultRunLevel: '缺省运行等级:',
|
||||||
|
startTime: '开始时间',
|
||||||
|
selectTime: '选择时间',
|
||||||
|
inStock: '入库',
|
||||||
|
outStock: '出库',
|
||||||
|
lastTrain: '末班车',
|
||||||
|
route: '交路:',
|
||||||
|
// startingStation 起始站
|
||||||
|
// startSection 起始区段
|
||||||
|
// endStationTitle 终到站
|
||||||
|
// endSection 终到区段
|
||||||
|
// description 描述
|
||||||
|
detail: '详情:',
|
||||||
|
station: '车站',
|
||||||
|
section: '区段',
|
||||||
|
stopTime: '停站时间',
|
||||||
|
runLevel: '运行等级',
|
||||||
|
arrivalTime: '到点',
|
||||||
|
departureTime: '发点',
|
||||||
|
showDefaultTime: '显示默认停站时间和运行等级',
|
||||||
|
automatic: '自动',
|
||||||
|
default: '默认',
|
||||||
|
modifyTask: '修改任务',
|
||||||
|
setMessageTip1: '请先设置开始区段',
|
||||||
|
setMessageTip2: '终到区段',
|
||||||
|
setMessageTip3: '的站间运行时间',
|
||||||
|
modifyTaskSuccess: '修改任务成功!',
|
||||||
|
modifyTaskFailed: '修改任务失败',
|
||||||
|
|
||||||
|
startingStation: '起始站',
|
||||||
|
startSection: '起始区段',
|
||||||
|
endStation: '终点站',
|
||||||
|
endSection: '终点区段',
|
||||||
|
direction: '方向',
|
||||||
|
distance: '距离',
|
||||||
|
operation: '操作',
|
||||||
|
edit: '编辑',
|
||||||
|
save: '保存',
|
||||||
|
cancelAndQuit: '取消&退出',
|
||||||
|
modifySuccess: '修改成功!',
|
||||||
|
modifyFailed: '修改失败',
|
||||||
|
modifyRunLevel: '修改运行等级',
|
||||||
|
|
||||||
|
startStationTips: '起始站发车时间不变',
|
||||||
|
endStationTips: '终到站到达时间不变',
|
||||||
|
startStationTitle: '起始站',
|
||||||
|
startedStation: '起始站台',
|
||||||
|
endStationTitle: '终到站',
|
||||||
|
endedStation: '终到站台',
|
||||||
|
description: '描述',
|
||||||
|
modifyTaskRoute: '修改任务交路',
|
||||||
|
time: '时间',
|
||||||
|
|
||||||
|
modifyStartTime: '修改开始时间:',
|
||||||
|
modifyStartTimeTitle: '修改起始时间',
|
||||||
|
search: '查找',
|
||||||
|
modifyTwoStationTime: '修改两站之间的时间'
|
||||||
|
},
|
||||||
|
editSmoothRun: {
|
||||||
|
trainProportion: '分车比例',
|
||||||
|
allTheLoopTrainProportion: '所有时段使用相同大小环路分车比例',
|
||||||
|
sizeOfTheLoopTrainProportion: '大环路与小环路分车比例:',
|
||||||
|
pleaseSelect: '请选择',
|
||||||
|
startTime: '开始时间',
|
||||||
|
stopTime: '结束时间',
|
||||||
|
runInterval: '运行间隔',
|
||||||
|
add: '增加',
|
||||||
|
delete: '删除',
|
||||||
|
modify: '修改',
|
||||||
|
editSmoothRunTime: '编辑平稳运行时段'
|
||||||
|
},
|
||||||
buy: '购买',
|
buy: '购买',
|
||||||
offlineMappingSoftware: '离线编图软件',
|
offlineMappingSoftware: '离线编图软件',
|
||||||
lianPlanSystem: '城市轨道交通琏计划系统',
|
lianPlanSystem: '城市轨道交通琏计划系统',
|
||||||
lianPlanDescription: '琏计划是一款编图测试系统,能够真实模拟实现对新运行图的仿真运行测试,该系统能够实现编辑运行图、导入运行图并按照运行图标准模拟真实行车环境,解决了无法针对运行图更新进行测试的问题。能够及时找出新图中不合理的地方并且在图上实时作出调整,避免了新运行图在运营过程中发现问题需要调度员人工进行干预的情况,最大程度降低故障对地铁正常运营的影响。'
|
lianPlanDescription: '琏计划是一款编图测试系统,能够真实模拟实现对新运行图的仿真运行测试,该系统能够实现编辑运行图、导入运行图并按照运行图标准模拟真实行车环境,解决了无法针对运行图更新进行测试的问题。能够及时找出新图中不合理的地方并且在图上实时作出调整,避免了新运行图在运营过程中发现问题需要调度员人工进行干预的情况,最大程度降低故障对地铁正常运营的影响。',
|
||||||
|
loopName: '环路名',
|
||||||
|
startingStation: '起始站',
|
||||||
|
terminal: '终点站',
|
||||||
|
planName: '计划名称',
|
||||||
|
fuzhouIconDescription: '福州图标说明',
|
||||||
|
upBeginTripNumber: '上行起始车次号',
|
||||||
|
downBeginTrain: '下行起始车次',
|
||||||
|
minimumTrainInterval: '最小列车间隔',
|
||||||
|
maximumTrainInterval: '最大列车间隔',
|
||||||
|
trainGeneratesInitialLabel: '列车生成起始标号',
|
||||||
|
minimumTurnbackTime: '最小折返时间',
|
||||||
|
trainDepot: '车辆段',
|
||||||
|
startingPlatform: '起始站台',
|
||||||
|
endingPlatform: '终点站台',
|
||||||
|
station: '车站',
|
||||||
|
modifyAttribute: '修改属性',
|
||||||
|
generalParameters: '一般参数',
|
||||||
|
editingStation: '编辑车站',
|
||||||
|
editDepot: '编辑停车场/车辆段',
|
||||||
|
editCrossRailway: '编辑交路',
|
||||||
|
editLoopRailway: '编辑环路',
|
||||||
|
application: '应 用(A)',
|
||||||
|
parameter: '参数',
|
||||||
|
numberOfTrainsAvailable: '可用列车数',
|
||||||
|
continuousMinimumInterval: '连续出车最小间隔',
|
||||||
|
continuousReturnMaximumInterval: '连续回车最大间隔',
|
||||||
|
afterTheTrainHasBackInterval: '有车回段后间隔',
|
||||||
|
secondsCanBeRunnedByTrain: '秒才能用列车出段',
|
||||||
|
defaultStopTime: '省缺停站时间:',
|
||||||
|
defaultRunLevel: '省缺运行等级:',
|
||||||
|
stopTime: '停站时间',
|
||||||
|
runLevel: '运行等级',
|
||||||
|
platform: '站台',
|
||||||
|
modifyPlatformProperties: '修改站台属性',
|
||||||
|
file: '文件',
|
||||||
|
openRunningDiagram: '打开运行图',
|
||||||
|
createRunningDiagram: '创建运行图',
|
||||||
|
modifyRunningDiagramName: '修改运行图名称',
|
||||||
|
modifyStationIntervalTime: '修改站间运行时间',
|
||||||
|
deleteRunningDiagram: '删除运行图',
|
||||||
|
view: '查看',
|
||||||
|
tool: '工具',
|
||||||
|
validityCheck: '有效性检查',
|
||||||
|
testRunningDiagram: '测试运行图',
|
||||||
|
modify: '修改',
|
||||||
|
addPlan: '增加计划',
|
||||||
|
deletePlan: '删除计划',
|
||||||
|
duplicatePlan: '复制计划',
|
||||||
|
addTask: '增加任务',
|
||||||
|
deleteTask: '删除任务',
|
||||||
|
modifyTask: '修改任务',
|
||||||
|
option: '选项',
|
||||||
|
help: '帮助',
|
||||||
|
implemented: '实现中......',
|
||||||
|
server1: '服务器1',
|
||||||
|
server2: '服务器2',
|
||||||
|
frontMachine1: '前置机1',
|
||||||
|
frontMachine2: '前置机2',
|
||||||
|
mainDispatcher: '主调',
|
||||||
|
dispatcher1: '调度台1',
|
||||||
|
dispatcher2: '调度台2',
|
||||||
|
dispatcher3: '调度台3',
|
||||||
|
bigScreen: '大屏',
|
||||||
|
maintenanceWorkstation: '维护工作站',
|
||||||
|
runGraphShowManualStation: '运行图显示人工站',
|
||||||
|
jumpStop: '跳停',
|
||||||
|
detainTrain: '扣车',
|
||||||
|
trainAlarm: '列车报警',
|
||||||
|
serviceNumber: '表号',
|
||||||
|
tripNumber: '车次号',
|
||||||
|
stationName: '车站名称:',
|
||||||
|
stationKilometerMark: '车站公里标:',
|
||||||
|
arriveTime: '到站时间:',
|
||||||
|
serviceAndTripNumber: '表号车次',
|
||||||
|
testRunning: '测试运行',
|
||||||
|
serviceNumber2: '服务号',
|
||||||
|
addPlanTrain: '添加计划车',
|
||||||
|
trainRunningTimeInterval: '列车运行时间间隔',
|
||||||
|
sizeOfTheLoopTrainProportion: '大小环路分车比例',
|
||||||
|
applicationRouteSelection: '应用路线选择',
|
||||||
|
bothway: '双向',
|
||||||
|
up: '上行',
|
||||||
|
down: '下行',
|
||||||
|
runningInterval: '运行间隔',
|
||||||
|
distributionRatio: '分车比例',
|
||||||
|
addASmoothRunningTime: '添加平稳运行时段',
|
||||||
|
addToTheFront: '加在最前',
|
||||||
|
addToTheEnd: '加在最后',
|
||||||
|
crossRailway: '交路',
|
||||||
|
startingSection: '起始区段',
|
||||||
|
endingSection: '终到区段',
|
||||||
|
description: '描述',
|
||||||
|
section: '区段',
|
||||||
|
departureTime: '发点',
|
||||||
|
showDefaultStopTimeAndRunLevel: '显示默认停站时间和运行等级',
|
||||||
|
automatic: '自动',
|
||||||
|
default: '默认',
|
||||||
|
addTaskHint1: '请先设置开始区段',
|
||||||
|
addTaskHint2: '终到区段',
|
||||||
|
addTaskHint3: '的站间运行时间',
|
||||||
|
normalNew: '正常新建',
|
||||||
|
runGraphName: '运行图名称',
|
||||||
|
createFromTheReleaseRunGraph: '从发布运行图创建',
|
||||||
|
releaseRunGraph: '发布运行图',
|
||||||
|
newRunGraph: '新建运行图',
|
||||||
|
deleteAllPreviousTasks: '删除以前所有任务(包含本任务)',
|
||||||
|
deleteAllSubsequentTasks: '删除以后所有任务(包含本任务)',
|
||||||
|
forward: '向前',
|
||||||
|
backward: '向后',
|
||||||
|
frequency: '次数:',
|
||||||
|
intervals: '间隔时间:',
|
||||||
|
duplicateTrain: '复制列车',
|
||||||
|
commissioningTrain: '调试车',
|
||||||
|
task: '任务',
|
||||||
|
startTime: '起始时间',
|
||||||
|
endTime: '终到时间',
|
||||||
|
editPlanningTrain: '编辑计划车',
|
||||||
|
tipOperationTime: '请先设置区段站间运行时间, 【文件】-> 【修改站间运行时间】',
|
||||||
|
serverTrainNum: '表号车次号'
|
||||||
};
|
};
|
||||||
|
@ -27,12 +27,17 @@ export default {
|
|||||||
createTime: '创建时间',
|
createTime: '创建时间',
|
||||||
detail: '详情',
|
detail: '详情',
|
||||||
generateRunPlan: '生成每日运行图',
|
generateRunPlan: '生成每日运行图',
|
||||||
|
copyRunPlan: '复制运行图',
|
||||||
|
generateRunjihua: '生成通用派班计划',
|
||||||
selectTemplateRunPlan: '选择模板运行图',
|
selectTemplateRunPlan: '选择模板运行图',
|
||||||
pleaseSelectTemplate: '请选择模板运行图',
|
pleaseSelectTemplate: '请选择模板运行图',
|
||||||
selectMap: '选择地图',
|
selectMap: '选择地图',
|
||||||
|
selectSkinCode: '选择皮肤',
|
||||||
createCommonRunPlan: '创建通用运行图',
|
createCommonRunPlan: '创建通用运行图',
|
||||||
createCommonSuccess: '创建通用运行图成功',
|
createCommonSuccess: '创建通用运行图成功',
|
||||||
wellGenerateEveryRunPlan: '此操作将生成每日运行图, 是否继续?',
|
wellGenerateEveryRunPlan: '此操作将生成每日运行图, 是否继续?',
|
||||||
|
wellGenerateEveryRunjihua: '此操作将生成通用派班计划, 是否继续?',
|
||||||
|
copyRunPlanContinue: '此操作将复制该运行图, 是否继续?',
|
||||||
wellDelTemplate: '此操作将删除此运行图模板, 是否继续?',
|
wellDelTemplate: '此操作将删除此运行图模板, 是否继续?',
|
||||||
fullMark: '满分',
|
fullMark: '满分',
|
||||||
passScore: '及格分',
|
passScore: '及格分',
|
||||||
@ -47,6 +52,7 @@ export default {
|
|||||||
deleteGenerateEveryRunPlan: '此操作将删除此运行图, 是否继续?',
|
deleteGenerateEveryRunPlan: '此操作将删除此运行图, 是否继续?',
|
||||||
deleteGenerateRunPlanSuccess: '删除加载计划成功!',
|
deleteGenerateRunPlanSuccess: '删除加载计划成功!',
|
||||||
addEveryRunPlanSuccess: '加载计划创建每日计划成功!',
|
addEveryRunPlanSuccess: '加载计划创建每日计划成功!',
|
||||||
|
addEveryRunjihuaSuccess: '加载计划创建通用排班计划成功!',
|
||||||
publisherId: '发布人id',
|
publisherId: '发布人id',
|
||||||
publishTime: '时间',
|
publishTime: '时间',
|
||||||
publishVersion: '版本',
|
publishVersion: '版本',
|
||||||
@ -106,6 +112,7 @@ export default {
|
|||||||
// inputNumericType 请输入数字值
|
// inputNumericType 请输入数字值
|
||||||
// addRules 添加规则
|
// addRules 添加规则
|
||||||
selectTestType: '请选择试题类型',
|
selectTestType: '请选择试题类型',
|
||||||
modifyRules: '修改规则'
|
modifyRules: '修改规则',
|
||||||
|
enterRunPlanName: '请输入运行图名称'
|
||||||
// refreshFailed 刷新失败
|
// refreshFailed 刷新失败
|
||||||
};
|
};
|
||||||
|
@ -277,5 +277,36 @@ export default {
|
|||||||
enterTheServiceNumber: '请输入表号',
|
enterTheServiceNumber: '请输入表号',
|
||||||
enterTheTripNumber: '请输入车次号',
|
enterTheTripNumber: '请输入车次号',
|
||||||
enterTheTargetCode: '请输入目的地号',
|
enterTheTargetCode: '请输入目的地号',
|
||||||
selectStation: '请选择车站'
|
selectStation: '请选择车站',
|
||||||
|
pleaseEnterGoodPrice: '请输入商品价格',
|
||||||
|
enterTheNameOfTheRunGraph: '请输入运行图名称',
|
||||||
|
chooseToPublishTheRunGraph: '请选择发布运行图',
|
||||||
|
enterTheAlarmCode: '请输入报警器编号',
|
||||||
|
enterTheAlarmWidth: '请输入报警器宽度',
|
||||||
|
enterTheEscalatorFrameCode: '请输入扶梯框编号',
|
||||||
|
enterTheEscalatorFrameWidth: '请输入扶梯框宽度',
|
||||||
|
enterTheEscalatorFrameHeight: '请输入扶梯框高度',
|
||||||
|
enterTheBorderWidth: '请输入边框宽度',
|
||||||
|
selectTheDirectionOfTheArrow: '请选择箭头方向',
|
||||||
|
enterTheArrowCode: '请输入箭头编号',
|
||||||
|
enterTheArrowLength: '请输入箭头长度',
|
||||||
|
enterTheArrowWidth: '请输入箭头线宽',
|
||||||
|
enterTheArrowColor: '请输入箭头颜色',
|
||||||
|
enterTheBackgroundWidth: '请输入背景板宽度',
|
||||||
|
enterTheBackgroundHeight: '请输入背景板高度',
|
||||||
|
selectTheButtonColor: '请选择按钮颜色',
|
||||||
|
enterTheButtonCode: '请输入按钮编号',
|
||||||
|
enterTheButtonWidth: '请输入按钮宽度',
|
||||||
|
enterTheDigitalClockCode: '请输入电子表编号',
|
||||||
|
enterTheDigitalClockWidth: '请输入电子表宽度',
|
||||||
|
selectTheStartingDirection: '请选择启动方向',
|
||||||
|
enterTheElevatorCode: '请输入电梯编号',
|
||||||
|
enterTheElevatorWidth: '请输入电梯宽度',
|
||||||
|
enterTheElevatorHeight: '请输入电梯高度',
|
||||||
|
enterTheElevatorColor: '请输入电梯颜色',
|
||||||
|
enterTheKeyCode: '请输入钥匙编号',
|
||||||
|
enterTheKeyWidth: '请输入钥匙宽度',
|
||||||
|
selectTheKeyDirection: '请选择钥匙朝向',
|
||||||
|
enterTheUpperText: '请输入上侧文字',
|
||||||
|
enterTheLowerText: '请输入下侧文字'
|
||||||
};
|
};
|
||||||
|
@ -79,5 +79,7 @@ export default {
|
|||||||
modifyConversitionButton: '修改',
|
modifyConversitionButton: '修改',
|
||||||
|
|
||||||
drivingByPlan: '按计划行车',
|
drivingByPlan: '按计划行车',
|
||||||
scriptBack: '返回'
|
scriptBack: '返回',
|
||||||
|
speakTo: '对',
|
||||||
|
executeCommandTips: '执行指令: '
|
||||||
};
|
};
|
||||||
|
@ -170,5 +170,33 @@ export default {
|
|||||||
selectAPieceOfData: '请选择一条数据',
|
selectAPieceOfData: '请选择一条数据',
|
||||||
selectSpeedLimitValueTip: '请选择限速值后,点击“下达”按钮,下达命令!',
|
selectSpeedLimitValueTip: '请选择限速值后,点击“下达”按钮,下达命令!',
|
||||||
addTrainIdTip: '添加列车识别号:成功',
|
addTrainIdTip: '添加列车识别号:成功',
|
||||||
editTrainIdTip: '修改列车识别号:成功'
|
editTrainIdTip: '修改列车识别号:成功',
|
||||||
|
enterPrice: '请输入价格',
|
||||||
|
publishMap: '获取发布地图',
|
||||||
|
addPackage: '请添加权限',
|
||||||
|
deletePlanSuccessfully: '删除计划成功',
|
||||||
|
deletePlanFailed: '删除计划失败',
|
||||||
|
importRunGraphFailed: '导入运行图失败:',
|
||||||
|
parseRunGraphFailed: '解析运行图失败:',
|
||||||
|
runGraphVerificationFailed: '运行图校验失败',
|
||||||
|
selectARunGraphFirst: '请先选择一个运行图',
|
||||||
|
deleteTrainHint: '是否要删除列车',
|
||||||
|
selectAPlan: '请选择一条计划',
|
||||||
|
selectATrain: '请选择一个车次',
|
||||||
|
requestingStationDataFailed: '请求车站数据失败',
|
||||||
|
serviceNumberExistHint: '本表号已存在,是否强制设置?(强制设置程序可能会出现异常)',
|
||||||
|
serviceNumberLengthHint: '长度应为两位数',
|
||||||
|
chooseToOpenTheRunGraph: '请选打开运行图',
|
||||||
|
addTaskSuccessfully: '添加任务成功!',
|
||||||
|
addTaskFailed: '添加任务失败!',
|
||||||
|
createAnEmptyRunGraphSuccessfully: '创建空运行图成功!',
|
||||||
|
createARunGraphSuccessfully: '创建运行图成功!',
|
||||||
|
deleteTaskSuccessfully: '删除任务成功!',
|
||||||
|
deleteTaskFailed: '删除任务失败!',
|
||||||
|
duplicatePlanSuccessful: '复制计划成功!',
|
||||||
|
duplicatePlanFailed: '复制计划失败!',
|
||||||
|
runGraphNameModifiedSuccessfully: '修改运行图名称成功!',
|
||||||
|
modifyRunGraphNameFailed: '修改运行图名称失败!',
|
||||||
|
planCreationSuccessful: '创建计划成功!',
|
||||||
|
createPlanFailed: '创建计划失败!'
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,7 @@ export default {
|
|||||||
endSimulation: '结束仿真',
|
endSimulation: '结束仿真',
|
||||||
distributeTheRoomQRCode: '分发房间二维码',
|
distributeTheRoomQRCode: '分发房间二维码',
|
||||||
increaseIbp: '增加IBP',
|
increaseIbp: '增加IBP',
|
||||||
kickOutTheRoom: '提出房间',
|
kickOutTheRoom: '踢出房间',
|
||||||
sending: '发送中...',
|
sending: '发送中...',
|
||||||
holdAndTalk: '按住说话',
|
holdAndTalk: '按住说话',
|
||||||
recording: '录音中...',
|
recording: '录音中...',
|
||||||
|
File diff suppressed because one or more lines are too long
@ -79,6 +79,8 @@ class MouseController extends Eventful {
|
|||||||
if (eventTool.notLeftMouse(e)) {
|
if (eventTool.notLeftMouse(e)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
e.event.preventDefault();
|
||||||
|
e.event.stopPropagation();
|
||||||
const em = new EventModel(e);
|
const em = new EventModel(e);
|
||||||
this.eventTarget = em.eventTarget;
|
this.eventTarget = em.eventTarget;
|
||||||
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
|
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
|
||||||
@ -94,7 +96,7 @@ class MouseController extends Eventful {
|
|||||||
mousemove(e) {
|
mousemove(e) {
|
||||||
if (eventTool.notLeftMouse(e) ||
|
if (eventTool.notLeftMouse(e) ||
|
||||||
!this._moveOnMouseMove ||
|
!this._moveOnMouseMove ||
|
||||||
!this._dragging
|
!this._dragging || !this.isAllowDragging
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -112,7 +114,7 @@ class MouseController extends Eventful {
|
|||||||
this._preventDefaultMouseMove && eventTool.stop(e.event);
|
this._preventDefaultMouseMove && eventTool.stop(e.event);
|
||||||
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
|
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
|
||||||
return true;
|
return true;
|
||||||
} else if (this.isAllowDragging) {
|
} else if (this.isAllowDragging && this.eventTarget) {
|
||||||
this.eventTarget.grouper.drift(dx, dy, e);
|
this.eventTarget.grouper.drift(dx, dy, e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -122,7 +124,6 @@ class MouseController extends Eventful {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
console.log('-------', this.eventTarget._type===deviceType.Background);
|
|
||||||
if (!eventTool.notLeftMouse(e)&&this.isAllowDragging && this.eventTarget) {
|
if (!eventTool.notLeftMouse(e)&&this.isAllowDragging && this.eventTarget) {
|
||||||
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
|
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
|
||||||
this.eventTarget.dirty();
|
this.eventTarget.dirty();
|
||||||
|
@ -35,7 +35,6 @@ export default class background extends Group {
|
|||||||
});
|
});
|
||||||
this.add(this.imageBg);
|
this.add(this.imageBg);
|
||||||
}).catch((encodingError) => {
|
}).catch((encodingError) => {
|
||||||
// Do something with the error.
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
setModel(dx, dy) {
|
setModel(dx, dy) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
|
import deviceType from './constant/deviceType';
|
||||||
import {createTransform, createBoundingRect} from './utils/parser';
|
import {createTransform, createBoundingRect} from './utils/parser';
|
||||||
|
|
||||||
class TransformHandle {
|
class TransformHandle {
|
||||||
@ -17,7 +17,7 @@ class TransformHandle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
revisibleView(view) {
|
revisibleView(view) {
|
||||||
if (this.checkVisible(view)) {
|
if (this.checkVisible(view)||view._type === deviceType.Background) {
|
||||||
view.show();
|
view.show();
|
||||||
} else {
|
} else {
|
||||||
view.hide();
|
view.hide();
|
||||||
|
@ -153,9 +153,9 @@ export function Jl3dDriving(updatemmi,sound) {
|
|||||||
if (trainlisttest.list[code].runMode == '02') {
|
if (trainlisttest.list[code].runMode == '02') {
|
||||||
|
|
||||||
if (trainlisttest.list[code].isStandTrack == true) {
|
if (trainlisttest.list[code].isStandTrack == true) {
|
||||||
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/19/trainlisttest.list[code].len);
|
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/19.5/trainlisttest.list[code].len);
|
||||||
} else {
|
} else {
|
||||||
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/19/trainlisttest.list[code].len);
|
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/20.3/trainlisttest.list[code].len);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
|
|||||||
checkColor: '#00FF00' // 信号字体
|
checkColor: '#00FF00' // 信号字体
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
|
guidName: 'defult', // 默认引导类型
|
||||||
stopWidth: 2, // 禁止线宽度
|
stopWidth: 2, // 禁止线宽度
|
||||||
borderVariable: true, // 信号灯边框可变
|
borderVariable: true, // 信号灯边框可变
|
||||||
borderWidth: 0.5, // 信号灯边框线宽度
|
borderWidth: 0.5, // 信号灯边框线宽度
|
||||||
|
@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
|
|||||||
checkColor: '#00FF00' // 信号字体
|
checkColor: '#00FF00' // 信号字体
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
|
guidName: 'defult', // 默认引导类型
|
||||||
stopWidth: 2, // 禁止线宽度
|
stopWidth: 2, // 禁止线宽度
|
||||||
borderVariable: true, // 信号灯边框可变
|
borderVariable: true, // 信号灯边框可变
|
||||||
borderWidth: 0.5, // 信号灯边框线宽度
|
borderWidth: 0.5, // 信号灯边框线宽度
|
||||||
|
@ -86,13 +86,13 @@ class SkinCode extends defaultStyle {
|
|||||||
width: 5, // 区段宽度
|
width: 5, // 区段宽度
|
||||||
beyondWidth: 0, // 区段宽超出宽度
|
beyondWidth: 0, // 区段宽超出宽度
|
||||||
invadeColor: '#FFFFFF', // 区段侵入颜色
|
invadeColor: '#FFFFFF', // 区段侵入颜色
|
||||||
spareColor: '#5578B6', // 区段空闲颜色
|
spareColor: '#618cc3', // 区段空闲颜色
|
||||||
communicationOccupiedColor: '#FF00FF', // 区段通信车占用颜色
|
communicationOccupiedColor: '#FF00FF', // 区段通信车占用颜色
|
||||||
unCommunicationOccupiedColor: '#DE310C', // 区段非通讯车占用颜色
|
unCommunicationOccupiedColor: '#DE310C', // 区段非通讯车占用颜色
|
||||||
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
|
routeLockColor: '#3FFD46', // 区段路由锁定颜色
|
||||||
faultLockColor: '#006400', // 区段故障锁定颜色
|
faultLockColor: '#006400', // 区段故障锁定颜色
|
||||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||||
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
|
protectionLockedColor: '#3FFD46', // 保护区段锁闭
|
||||||
blockColor: '#00FF00', // 区段封锁颜色
|
blockColor: '#00FF00', // 区段封锁颜色
|
||||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||||
@ -152,6 +152,7 @@ class SkinCode extends defaultStyle {
|
|||||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
|
guidName: 'chengdu_03', // 成都三号线引导类型
|
||||||
borderVariable: true, // 信号灯边框可变
|
borderVariable: true, // 信号灯边框可变
|
||||||
stopWidth: 2, // 禁止线宽度
|
stopWidth: 2, // 禁止线宽度
|
||||||
borderWidth: 2, // 信号灯边框线宽度
|
borderWidth: 2, // 信号灯边框线宽度
|
||||||
@ -208,7 +209,7 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
stand: { // 站台
|
stand: { // 站台
|
||||||
headFontSize: 10, // 站台首端字体大小
|
headFontSize: 10, // 站台首端字体大小
|
||||||
spareColor: '#808080', // 站台空闲颜色
|
spareColor: '#ffffff', // 站台空闲颜色
|
||||||
stopColor: '#FFF000', // 站台列车停站颜色
|
stopColor: '#FFF000', // 站台列车停站颜色
|
||||||
jumpStopColor: '#808080', // 站台跳停颜色
|
jumpStopColor: '#808080', // 站台跳停颜色
|
||||||
designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色
|
designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色
|
||||||
|
@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
|
|||||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
|
guidName: 'defult', // 默认引导类型
|
||||||
borderVariable: true, // 信号灯边框可变
|
borderVariable: true, // 信号灯边框可变
|
||||||
stopWidth: 2, // 禁止线宽度
|
stopWidth: 2, // 禁止线宽度
|
||||||
borderWidth: 2, // 信号灯边框线宽度
|
borderWidth: 2, // 信号灯边框线宽度
|
||||||
|
@ -143,6 +143,7 @@ class SkinCode extends defaultStyle {
|
|||||||
nameBorderShow: true // 信号机名字边框显示
|
nameBorderShow: true // 信号机名字边框显示
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
|
guidName: 'defult', // 默认引导类型
|
||||||
stopWidth: 2, // 禁止线宽度
|
stopWidth: 2, // 禁止线宽度
|
||||||
borderWidth: 1, // 信号灯边框线宽度
|
borderWidth: 1, // 信号灯边框线宽度
|
||||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||||
|
@ -89,6 +89,10 @@ class ESigLamp extends Group {
|
|||||||
this.lamp.setStyle({stroke: color});
|
this.lamp.setStyle({stroke: color});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setStyle(data) {
|
||||||
|
this.lamp.setStyle(data);
|
||||||
|
}
|
||||||
|
|
||||||
setStop(has) {
|
setStop(has) {
|
||||||
if (has) {
|
if (has) {
|
||||||
this.lstop.show();
|
this.lstop.show();
|
||||||
|
@ -318,7 +318,7 @@ class Signal extends Group {
|
|||||||
|
|
||||||
// 引导
|
// 引导
|
||||||
guid() {
|
guid() {
|
||||||
if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯 允许引导信号
|
if (this.count == 2 && this.model.lightType == '01' && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号
|
||||||
if (this.lamps[0]) {
|
if (this.lamps[0]) {
|
||||||
this.lamps[0].setStop(false);
|
this.lamps[0].setStop(false);
|
||||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||||
@ -327,6 +327,9 @@ class Signal extends Group {
|
|||||||
this.lamps[1].setStop(false);
|
this.lamps[1].setStop(false);
|
||||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||||
}
|
}
|
||||||
|
} else if (this.count == 1 && this.model.lightType == '01' && this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||||
|
this.lamps[0].setStop(false);
|
||||||
|
this.lamps[0].setStyle({ fill: this.style.Signal.lamp.yellowColor, stroke: this.style.Signal.lamp.redColor, lineWidth: 2.5 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,6 +436,9 @@ class Signal extends Group {
|
|||||||
this.sigDelay.hide();
|
this.sigDelay.hide();
|
||||||
this.sigAuto.animationRecover();
|
this.sigAuto.animationRecover();
|
||||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||||
|
if (this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||||
|
this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
import LangStorage from '@/utils/lang';
|
||||||
|
|
||||||
class EMouse extends Group {
|
class EMouse extends Group {
|
||||||
constructor(device) {
|
constructor(device) {
|
||||||
@ -10,19 +11,25 @@ class EMouse extends Group {
|
|||||||
create() {
|
create() {
|
||||||
let destinationText = '';
|
let destinationText = '';
|
||||||
switch (this.device.model.destinationStatus) {
|
switch (this.device.model.destinationStatus) {
|
||||||
case '01': destinationText = '准点'; break;
|
case '01': destinationText = LangStorage.getLang() == 'en' ? 'fiducial point' : '准点'; break;
|
||||||
case '02': destinationText = '早点'; break;
|
case '02': destinationText = LangStorage.getLang() == 'en' ? 'soon' : '早点'; break;
|
||||||
case '03': destinationText = '严重早点'; break;
|
case '03': destinationText = LangStorage.getLang() == 'en' ? 'Severe early' : '严重早点'; break;
|
||||||
case '04': destinationText = '晚点'; break;
|
case '04': destinationText = LangStorage.getLang() == 'en' ? 'behind schedule' : '晚点'; break;
|
||||||
case '05': destinationText = '严重晚点'; break;
|
case '05': destinationText = LangStorage.getLang() == 'en' ? 'Serious delays' : '严重晚点'; break;
|
||||||
default: destinationText = '未知'; break;
|
default: destinationText = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break;
|
||||||
}
|
}
|
||||||
let trainType = '';
|
let trainType = '';
|
||||||
switch (this.device.model.type) {
|
switch (this.device.model.type) {
|
||||||
case '01': trainType = '计划车'; break;
|
case '01': trainType = LangStorage.getLang() == 'en' ? 'Plan the car' : '计划车'; break;
|
||||||
case '02': trainType = '头码车'; break;
|
case '02': trainType = LangStorage.getLang() == 'en' ? 'Head size car' : '头码车'; break;
|
||||||
case '03': trainType = '人工车'; break;
|
case '03': trainType = LangStorage.getLang() == 'en' ? 'Artificial car' : '人工车'; break;
|
||||||
default: trainType = '未知'; break;
|
default: trainType = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break;
|
||||||
|
}
|
||||||
|
let text = '';
|
||||||
|
if (LangStorage.getLang() == 'en') {
|
||||||
|
text = ` The train type: ${trainType} \n table number: ${this.device.model.serviceNumber} \n Train no: ${this.device.model.tripNumber}\n Destination: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n The number of: ${this.device.model.groupNumber}\n Point in the morning and evening: ${destinationText}\n moving direction: ${this.device.model.directionType == '02' ? 'up' : 'down'}\n Crew: \n The station name: \n The terminal name: \n Take up the orbit: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n In the station: \n train-ground communication: normal \n Run level: 4 \n Button vehicle state: ${this.device.model.runControlStatus == '01' ? 'normal' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n Stationary state: ${this.device.model.runStatus == '02' ? 'Has not stopped' : 'come to a standstill'}\n blocked state: no \n train speed: ${this.device.model.speed || 0} km/h \n Authorized distance of train movement: ${this.device.model.maLen || 0} m`;
|
||||||
|
} else {
|
||||||
|
text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
|
||||||
}
|
}
|
||||||
// 文字描述
|
// 文字描述
|
||||||
this.arrowText = new Text({
|
this.arrowText = new Text({
|
||||||
@ -31,7 +38,7 @@ class EMouse extends Group {
|
|||||||
style: {
|
style: {
|
||||||
x: this.device.model.point.x + 50,
|
x: this.device.model.point.x + 50,
|
||||||
y: this.device.model.point.y + 25,
|
y: this.device.model.point.y + 25,
|
||||||
text: `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`,
|
text: text,
|
||||||
textFill: '#000',
|
textFill: '#000',
|
||||||
textAlign: 'letf',
|
textAlign: 'letf',
|
||||||
textFont: 10 + 'px consolas',
|
textFont: 10 + 'px consolas',
|
||||||
|
@ -1,72 +1,81 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou_01 notice-info" :title="title" :visible.sync="show" width="360px" :before-close="doClose"
|
<el-dialog
|
||||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
<div class="context">
|
class="fuzhou_01 notice-info"
|
||||||
<template v-for="message in messages">
|
:title="title"
|
||||||
<span>{{message}}</span><br>
|
:visible.sync="show"
|
||||||
</template>
|
width="360px"
|
||||||
</div>
|
:before-close="doClose"
|
||||||
<el-row justify="center" class="button-group">
|
:z-index="2000"
|
||||||
<el-col :span="10" :offset="8">
|
:modal="false"
|
||||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
append-to-body
|
||||||
</el-row>
|
>
|
||||||
</span>
|
<div class="context">
|
||||||
</el-dialog>
|
<template v-for="message in messages">
|
||||||
|
<span>{{ message }}</span><br>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="10" :offset="8">
|
||||||
|
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NoticeInfo',
|
name: 'NoticeInfo',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
messages: ['命令下达失败'],
|
messages: ['命令下达失败'],
|
||||||
operate: null
|
operate: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '提示';
|
return '提示';
|
||||||
},
|
},
|
||||||
domIdSure() {
|
domIdSure() {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, messages) {
|
doShow(operate, messages) {
|
||||||
this.operate = operate || {};
|
this.operate = operate || {};
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.messages = ['命令下达失败'];
|
this.messages = ['命令下达失败'];
|
||||||
if (messages) {
|
if (messages) {
|
||||||
this.messages = messages;
|
this.messages = messages;
|
||||||
}
|
}
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,389 +1,392 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
}
|
default() {
|
||||||
},
|
return null;
|
||||||
data() {
|
}
|
||||||
return {
|
}
|
||||||
menu: [],
|
},
|
||||||
menuNormal: {
|
data() {
|
||||||
local: [
|
return {
|
||||||
// {
|
menu: [],
|
||||||
// label: '区段故障解锁',
|
menuNormal: {
|
||||||
// handler: this.fault,
|
local: [
|
||||||
// disabledCallback: MenuDisabledState.Section.fault,
|
// {
|
||||||
// auth: { station: true, center: false }
|
// label: '区段故障解锁',
|
||||||
// },
|
// handler: this.fault,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.fault,
|
||||||
// label: '区段切除',
|
// auth: { station: true, center: false }
|
||||||
// handler: this.split,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.split,
|
// {
|
||||||
// auth: { station: true, center: false }
|
// label: '区段切除',
|
||||||
// },
|
// handler: this.split,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.split,
|
||||||
// label: '区段激活',
|
// auth: { station: true, center: false }
|
||||||
// handler: this.active,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.active,
|
// {
|
||||||
// auth: { station: true, center: false }
|
// label: '区段激活',
|
||||||
// },
|
// handler: this.active,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.active,
|
||||||
// label: '区段计轴预复位',
|
// auth: { station: true, center: false }
|
||||||
// handler: this.axlePreReset,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.axlePreReset,
|
// {
|
||||||
// auth: { station: true, center: false }
|
// label: '区段计轴预复位',
|
||||||
// },
|
// handler: this.axlePreReset,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.axlePreReset,
|
||||||
// label: '区段封锁',
|
// auth: { station: true, center: false }
|
||||||
// handler: this.lock,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.lock,
|
// {
|
||||||
// auth: { station: true, center: false }
|
// label: '区段封锁',
|
||||||
// },
|
// handler: this.lock,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.lock,
|
||||||
// label: '区段解封',
|
// auth: { station: true, center: false }
|
||||||
// handler: this.unlock,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.unlock,
|
// {
|
||||||
// auth: { station: true, center: false }
|
// label: '区段解封',
|
||||||
// },
|
// handler: this.unlock,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.unlock,
|
||||||
// label: '区段设置限速',
|
// auth: { station: true, center: false }
|
||||||
// handler: this.setSpeed,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.setSpeed,
|
// {
|
||||||
// auth: { station: true, center: false }
|
// label: '区段设置限速',
|
||||||
// },
|
// handler: this.setSpeed,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||||
// label: '区段取消限速',
|
// auth: { station: true, center: false }
|
||||||
// handler: this.cancelSpeed,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
// {
|
||||||
// auth: { station: true, center: false }
|
// label: '区段取消限速',
|
||||||
// }
|
// handler: this.cancelSpeed,
|
||||||
],
|
// disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||||
central: [
|
// auth: { station: true, center: false }
|
||||||
// {
|
// }
|
||||||
// label: '区段故障解锁',
|
],
|
||||||
// handler: this.fault,
|
central: [
|
||||||
// disabledCallback: MenuDisabledState.Section.fault,
|
// {
|
||||||
// auth: { station: false, center: true }
|
// label: '区段故障解锁',
|
||||||
// },
|
// handler: this.fault,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.fault,
|
||||||
// label: '区段切除',
|
// auth: { station: false, center: true }
|
||||||
// handler: this.split,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.split,
|
// {
|
||||||
// auth: { station: false, center: true }
|
// label: '区段切除',
|
||||||
// },
|
// handler: this.split,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.split,
|
||||||
// label: '区段激活',
|
// auth: { station: false, center: true }
|
||||||
// handler: this.active,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.active,
|
// {
|
||||||
// auth: { station: false, center: true }
|
// label: '区段激活',
|
||||||
// },
|
// handler: this.active,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.active,
|
||||||
// label: '计轴预复位',
|
// auth: { station: false, center: true }
|
||||||
// handler: this.axlePreReset,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.axlePreReset,
|
// {
|
||||||
// auth: { station: false, center: false }
|
// label: '计轴预复位',
|
||||||
// },
|
// handler: this.axlePreReset,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.axlePreReset,
|
||||||
// label: '区段封锁',
|
// auth: { station: false, center: false }
|
||||||
// handler: this.lock,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.lock,
|
// {
|
||||||
// auth: { station: false, center: true }
|
// label: '区段封锁',
|
||||||
// },
|
// handler: this.lock,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.lock,
|
||||||
// label: '区段解封',
|
// auth: { station: false, center: true }
|
||||||
// handler: this.unlock,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.unlock,
|
// {
|
||||||
// auth: { station: false, center: true }
|
// label: '区段解封',
|
||||||
// },
|
// handler: this.unlock,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.unlock,
|
||||||
// label: '区段设置限速',
|
// auth: { station: false, center: true }
|
||||||
// handler: this.setSpeed,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.setSpeed,
|
// {
|
||||||
// auth: { station: false, center: true }
|
// label: '区段设置限速',
|
||||||
// },
|
// handler: this.setSpeed,
|
||||||
// {
|
// disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||||
// label: '区段取消限速',
|
// auth: { station: false, center: true }
|
||||||
// handler: this.cancelSpeed,
|
// },
|
||||||
// disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
// {
|
||||||
// auth: { station: false, center: true }
|
// label: '区段取消限速',
|
||||||
// }
|
// handler: this.cancelSpeed,
|
||||||
]
|
// disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||||
},
|
// auth: { station: false, center: true }
|
||||||
menuTrain: [
|
// }
|
||||||
{
|
]
|
||||||
label: '新建列车',
|
},
|
||||||
handler: this.newTrain,
|
menuTrain: [
|
||||||
disabledCallback: MenuDisabledState.Section.newTrain
|
{
|
||||||
},
|
label: '新建列车',
|
||||||
],
|
handler: this.newTrain,
|
||||||
menuForce: [
|
disabledCallback: MenuDisabledState.Section.newTrain
|
||||||
{
|
}
|
||||||
label: '设置故障',
|
],
|
||||||
handler: this.setStoppage,
|
menuForce: [
|
||||||
disabledCallback: MenuDisabledState.Section.setStoppage
|
{
|
||||||
},
|
label: '设置故障',
|
||||||
{
|
handler: this.setStoppage,
|
||||||
label: '取消故障',
|
disabledCallback: MenuDisabledState.Section.setStoppage
|
||||||
handler: this.cancelStoppage,
|
},
|
||||||
disabledCallback: MenuDisabledState.Section.cancelStoppage
|
{
|
||||||
}
|
label: '取消故障',
|
||||||
]
|
handler: this.cancelStoppage,
|
||||||
}
|
disabledCallback: MenuDisabledState.Section.cancelStoppage
|
||||||
},
|
}
|
||||||
watch: {
|
]
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
};
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
},
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
watch: {
|
||||||
} else {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
this.doClose();
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
||||||
}
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
}
|
} else {
|
||||||
},
|
this.doClose();
|
||||||
computed: {
|
}
|
||||||
...mapGetters('training', [
|
}
|
||||||
'mode',
|
},
|
||||||
'operatemode'
|
computed: {
|
||||||
]),
|
...mapGetters('training', [
|
||||||
...mapGetters('menuOperation', [
|
'mode',
|
||||||
'buttonOperation'
|
'operatemode'
|
||||||
])
|
]),
|
||||||
},
|
...mapGetters('menuOperation', [
|
||||||
methods: {
|
'buttonOperation'
|
||||||
clickEvent() {
|
])
|
||||||
let self = this;
|
},
|
||||||
window.onclick = function (e) {
|
methods: {
|
||||||
self.doClose();
|
clickEvent() {
|
||||||
}
|
const self = this;
|
||||||
},
|
window.onclick = function (e) {
|
||||||
initMenu() {
|
self.doClose();
|
||||||
//编辑模式菜单列表
|
};
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
},
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
initMenu() {
|
||||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain]
|
// 编辑模式菜单列表
|
||||||
}
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
|
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
|
||||||
|
}
|
||||||
|
|
||||||
//故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
this.menu = menuConvert(this.menu);
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.stoppage.menu.operation
|
operation: OperationEvent.Section.stoppage.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.cancelStoppage.menu.operation
|
operation: OperationEvent.Section.cancelStoppage.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//故障解锁
|
// 故障解锁
|
||||||
fault() {
|
fault() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.fault.menu.operation
|
operation: OperationEvent.Section.fault.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//切除
|
// 切除
|
||||||
split() {
|
split() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.split.menu.operation
|
operation: OperationEvent.Section.split.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//激活
|
// 激活
|
||||||
active() {
|
active() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.active.menu.operation
|
operation: OperationEvent.Section.active.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//区段计轴预复位
|
// 区段计轴预复位
|
||||||
axlePreReset() {
|
axlePreReset() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.axlePreReset.menu.operation
|
operation: OperationEvent.Section.axlePreReset.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//区段解锁
|
// 区段解锁
|
||||||
lock() {
|
lock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.lock.menu.operation
|
operation: OperationEvent.Section.lock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//区段封锁
|
// 区段封锁
|
||||||
unlock() {
|
unlock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.unlock.menu.operation
|
operation: OperationEvent.Section.unlock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//设置速度
|
// 设置速度
|
||||||
setSpeed() {
|
setSpeed() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.setSpeed.menu.operation
|
operation: OperationEvent.Section.setSpeed.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$refs.speedCmdControl.doShow(operate, this.selected);
|
// this.$refs.speedCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//取消速度
|
// 取消速度
|
||||||
cancelSpeed() {
|
cancelSpeed() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.cancelSpeed.menu.operation
|
operation: OperationEvent.Section.cancelSpeed.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempData = response.data;
|
// const tempData = response.data;
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//新建列车
|
// 新建列车
|
||||||
newTrain() {
|
newTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation
|
operation: OperationEvent.Section.newtrain.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainCreate.doShow(operate, this.selected);
|
this.$refs.trainCreate.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,432 +1,439 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px"
|
<el-dialog v-dialogDrag class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<span class="base-label">命令信息</span>
|
||||||
<span class="base-label">命令信息</span>
|
<el-form label-position="center" size="mini">
|
||||||
<el-form label-position="center" size="mini">
|
<el-row>
|
||||||
<el-row>
|
<el-col :span="8">
|
||||||
<el-col :span="8">
|
<el-form-item label="类型" label-width="40px">
|
||||||
<el-form-item label="类型" label-width="40px">
|
<el-select v-model="operation" size="small" disabled>
|
||||||
<el-select v-model="operation" size="small" disabled>
|
<el-option
|
||||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
v-for="option in typeList"
|
||||||
:value="option.code">
|
:key="option.code"
|
||||||
</el-option>
|
:label="option.name"
|
||||||
</el-select>
|
:value="option.code"
|
||||||
</el-form-item>
|
/>
|
||||||
</el-col>
|
</el-select>
|
||||||
<el-col :span="8">
|
</el-form-item>
|
||||||
<el-form-item label="车站名称" label-width="80px">
|
</el-col>
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="车站名称" label-width="80px">
|
||||||
</el-col>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
<el-col :span="8">
|
</el-form-item>
|
||||||
<el-form-item label="信号机名称" label-width="100px">
|
</el-col>
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="信号机名称" label-width="100px">
|
||||||
</el-col>
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
</el-row>
|
</el-form-item>
|
||||||
</el-form>
|
</el-col>
|
||||||
</div>
|
</el-row>
|
||||||
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
|
</el-form>
|
||||||
highlight-current-row height="200">
|
</div>
|
||||||
<el-table-column prop="order" :width="50" label="序号">
|
<el-table
|
||||||
</el-table-column>
|
ref="tempData"
|
||||||
<el-table-column prop="date" :width="160" label="时间">
|
class="table"
|
||||||
</el-table-column>
|
:data="tempData"
|
||||||
<el-table-column prop="context" :width="180" label="执行过程">
|
border
|
||||||
</el-table-column>
|
style="width: 100%"
|
||||||
<el-table-column prop="result" label="执行结果">
|
size="mini"
|
||||||
</el-table-column>
|
highlight-current-row
|
||||||
</el-table>
|
height="200"
|
||||||
<span class="notice">{{message}}</span>
|
>
|
||||||
<el-row class="button-group">
|
<el-table-column prop="order" :width="50" label="序号" />
|
||||||
<el-col :span="2" :offset="2">
|
<el-table-column prop="date" :width="160" label="时间" />
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
<el-table-column prop="context" :width="180" label="执行过程" />
|
||||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
<el-table-column prop="result" label="执行结果" />
|
||||||
</el-col>
|
</el-table>
|
||||||
<el-col :span="2" :offset="2">
|
<span class="notice">{{ message }}</span>
|
||||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
<el-row class="button-group">
|
||||||
</el-button>
|
<el-col :span="2" :offset="2">
|
||||||
</el-col>
|
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
||||||
<el-col :span="2" :offset="2">
|
v-show="timeCountCommand>0"
|
||||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
>({{ timeCountCommand }})</span></el-button>
|
||||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="2" :offset="2">
|
||||||
<el-col :span="2" :offset="2">
|
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
||||||
</el-col>
|
v-show="timeCountConfirm>0"
|
||||||
</el-row>
|
>({{ timeCountConfirm }})</span></el-button>
|
||||||
</el-dialog>
|
</el-col>
|
||||||
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate"></confirm-signal-unlock>
|
<el-col :span="2" :offset="2">
|
||||||
</div>
|
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2" :offset="2">
|
||||||
|
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { now } from '@/utils/date';
|
import { now } from '@/utils/date';
|
||||||
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
|
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteCmdControl',
|
name: 'RouteCmdControl',
|
||||||
components: {
|
components: {
|
||||||
ConfirmSignalUnlock
|
ConfirmSignalUnlock
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
backOperate: '',
|
backOperate: '',
|
||||||
selected: '',
|
selected: '',
|
||||||
order: 0,
|
order: 0,
|
||||||
row: null,
|
row: null,
|
||||||
timer: null,
|
timer: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
cmdDisabled: [true, true, true],
|
cmdDisabled: [true, true, true],
|
||||||
stpDisabled: true,
|
stpDisabled: true,
|
||||||
tempData: [],
|
tempData: [],
|
||||||
message: '',
|
message: '',
|
||||||
timeCountCommand: -1,
|
timeCountCommand: -1,
|
||||||
timeCountConfirm: -1,
|
timeCountConfirm: -1,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: ''
|
signalName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
typeList() {
|
typeList() {
|
||||||
return [
|
return [
|
||||||
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
|
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
|
||||||
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
|
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
|
||||||
]
|
];
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCommand() {
|
domIdCommand() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
return OperationEvent.Signal.unlock.order.domId;
|
return OperationEvent.Signal.unlock.order.domId;
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
/** 办理引导进路*/
|
/** 办理引导进路*/
|
||||||
return OperationEvent.Signal.guide.order.domId;
|
return OperationEvent.Signal.guide.order.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
domIdConfirm1() {
|
domIdConfirm1() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
return OperationEvent.Signal.unlock.confirm1.domId;
|
return OperationEvent.Signal.unlock.confirm1.domId;
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
/** 办理引导进路*/
|
/** 办理引导进路*/
|
||||||
return OperationEvent.Signal.guide.confirm1.domId;
|
return OperationEvent.Signal.guide.confirm1.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
domIdConfirm2() {
|
domIdConfirm2() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
return OperationEvent.Signal.unlock.confirm2.domId;
|
return OperationEvent.Signal.unlock.confirm2.domId;
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
/** 办理引导进路*/
|
/** 办理引导进路*/
|
||||||
return OperationEvent.Signal.guide.confirm2.domId;
|
return OperationEvent.Signal.guide.confirm2.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
domIdStop() {
|
domIdStop() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
return OperationEvent.Signal.unlock.stop.domId;
|
return OperationEvent.Signal.unlock.stop.domId;
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
/** 办理引导进路*/
|
/** 办理引导进路*/
|
||||||
return OperationEvent.Signal.guide.stop.domId;
|
return OperationEvent.Signal.guide.stop.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
domIdClose() {
|
domIdClose() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
return OperationEvent.Command.close.menu.domId;
|
return OperationEvent.Command.close.menu.domId;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
return '信号解封';
|
return '信号解封';
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
return '办理引导进路';
|
return '办理引导进路';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
cmdDisabled: {
|
cmdDisabled: {
|
||||||
handler(val, oldVal) {
|
handler(val, oldVal) {
|
||||||
this.stpDisabled = true;
|
this.stpDisabled = true;
|
||||||
val.forEach((elem, index) => {
|
val.forEach((elem, index) => {
|
||||||
// 在确定1之前的操作才可以终止
|
// 在确定1之前的操作才可以终止
|
||||||
if (elem == false && 1 <= index && index <= 2) {
|
if (elem == false && index >= 1 && index <= 2) {
|
||||||
this.stpDisabled = false;
|
this.stpDisabled = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
if (!this.$store.state.menuOperation.break) {
|
if (!this.$store.state.menuOperation.break) {
|
||||||
if (this.timeCountCommand > 0) {
|
if (this.timeCountCommand > 0) {
|
||||||
this.timeCountCommand--;
|
this.timeCountCommand--;
|
||||||
} else if (this.timeCountCommand == 0) {
|
} else if (this.timeCountCommand == 0) {
|
||||||
this.setButtonEnable({ step: 0 });
|
this.setButtonEnable({ step: 0 });
|
||||||
this.timeCountCommand = -1;
|
this.timeCountCommand = -1;
|
||||||
}
|
}
|
||||||
if (this.timeCountConfirm > 0) {
|
if (this.timeCountConfirm > 0) {
|
||||||
this.timeCountConfirm--;
|
this.timeCountConfirm--;
|
||||||
} else if (this.timeCountConfirm == 0) {
|
} else if (this.timeCountConfirm == 0) {
|
||||||
this.setButtonEnable({ step: 0 });
|
this.setButtonEnable({ step: 0 });
|
||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name
|
this.signalName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.order = 0;
|
this.order = 0;
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
|
|
||||||
this.tempData = [];
|
this.tempData = [];
|
||||||
this.timeCountCommand = -1;
|
this.timeCountCommand = -1;
|
||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
this.cmdDisabled = [false, true, true];
|
this.cmdDisabled = [false, true, true];
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.stpDisabled = true;
|
this.stpDisabled = true;
|
||||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
this.setMessage('请点击“下达”按钮,下达命令!');
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
command() {
|
command() {
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 第一步带弹框处理*/
|
/** 第一步带弹框处理*/
|
||||||
this.commandHasPopUp();
|
this.commandHasPopUp();
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
/** 第一步不带弹框处理*/
|
/** 第一步不带弹框处理*/
|
||||||
this.commandNoPopUp();
|
this.commandNoPopUp();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
commandHasPopUp() {
|
commandHasPopUp() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
operate.operation = OperationEvent.Signal.unlock.order.operation
|
operate.operation = OperationEvent.Signal.unlock.order.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
this.setMessage('请点击“确认1”按钮,确认命令!');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
|
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commandNoPopUp() {
|
commandNoPopUp() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type
|
type: MapDeviceType.Signal.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
/** 办理引导进路*/
|
/** 办理引导进路*/
|
||||||
operate.operation = OperationEvent.Signal.guide.order.operation
|
operate.operation = OperationEvent.Signal.guide.order.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
this.setMessage('请点击“确认1”按钮,确认命令!');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.setButtonEnable({ step: 1 });
|
this.setButtonEnable({ step: 1 });
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
||||||
} else {
|
} else {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm1() {
|
confirm1() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
|
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
/** 办理引导进路*/
|
/** 办理引导进路*/
|
||||||
operate.operation = OperationEvent.Signal.guide.confirm1.operation;
|
operate.operation = OperationEvent.Signal.guide.confirm1.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
this.setMessage('请点击“确认2”按钮,确认命令!');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.timeCountCommand = -1;
|
this.timeCountCommand = -1;
|
||||||
this.timeCountConfirm = 10;
|
this.timeCountConfirm = 10;
|
||||||
this.setButtonEnable({ step: 2 });
|
this.setButtonEnable({ step: 2 });
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
||||||
} else {
|
} else {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm2() {
|
confirm2() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type
|
type: MapDeviceType.Signal.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
|
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
/** 办理引导进路*/
|
/** 办理引导进路*/
|
||||||
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
|
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
|
||||||
}
|
}
|
||||||
this.setMessage('');
|
this.setMessage('');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.timeCountCommand = -1;
|
this.timeCountCommand = -1;
|
||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
this.setButtonEnable({ step: -1 });
|
this.setButtonEnable({ step: -1 });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
||||||
} else {
|
} else {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.timeCountCommand = -1;
|
this.timeCountCommand = -1;
|
||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
this.setButtonEnable({ step: -1 });
|
this.setButtonEnable({ step: -1 });
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
operate.operation = OperationEvent.Signal.unlock.stop.operation;
|
operate.operation = OperationEvent.Signal.unlock.stop.operation;
|
||||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
/** 办理引导进路*/
|
/** 办理引导进路*/
|
||||||
operate.operation = OperationEvent.Signal.guide.stop.operation;
|
operate.operation = OperationEvent.Signal.guide.stop.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.setButtonEnable({ step: 0 });
|
||||||
|
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
|
||||||
|
} else {
|
||||||
|
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
if (valid) {
|
||||||
if (valid) {
|
this.doClose();
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
}
|
||||||
this.setButtonEnable({ step: 0 });
|
}).catch(error => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
|
this.doClose();
|
||||||
} else {
|
});
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
},
|
||||||
}
|
getOperate(operate) {
|
||||||
}).catch(error => {
|
/** 弹框返回值处理*/
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
})
|
/** 信号解封*/
|
||||||
},
|
this.backOperate = operate;
|
||||||
close() {
|
this.setButtonEnable(operate);
|
||||||
let operate = {
|
if (operate.success) {
|
||||||
type: MapDeviceType.Signal.type,
|
this.timeCountCommand = 30;
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' });
|
||||||
}
|
} else {
|
||||||
|
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
}
|
||||||
if (valid) {
|
}
|
||||||
this.doClose();
|
},
|
||||||
}
|
setButtonEnable(param) {
|
||||||
}).catch(error => {
|
this.cmdDisabled = [true, true, true];
|
||||||
this.doClose();
|
if (param && param.step >= 0) {
|
||||||
});
|
this.cmdDisabled[param.step] = false;
|
||||||
},
|
}
|
||||||
getOperate(operate) {
|
},
|
||||||
/** 弹框返回值处理*/
|
setMessage(message) {
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
this.message = message;
|
||||||
/** 信号解封*/
|
},
|
||||||
this.backOperate = operate;
|
writeRecord(param) {
|
||||||
this.setButtonEnable(operate);
|
this.tempData.push(param);
|
||||||
if (operate.success) {
|
},
|
||||||
this.timeCountCommand = 30;
|
editRecord(param) {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' });
|
this.tempData.forEach(elem => {
|
||||||
} else {
|
if (elem.order == param.order) {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
|
for (var prop in param) {
|
||||||
}
|
elem[prop] = param[prop];
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
setButtonEnable(param) {
|
});
|
||||||
this.cmdDisabled = [true, true, true];
|
}
|
||||||
if (param && param.step >= 0) {
|
}
|
||||||
this.cmdDisabled[param.step] = false;
|
};
|
||||||
}
|
|
||||||
},
|
|
||||||
setMessage(message) {
|
|
||||||
this.message = message;
|
|
||||||
},
|
|
||||||
writeRecord(param) {
|
|
||||||
this.tempData.push(param);
|
|
||||||
},
|
|
||||||
editRecord(param) {
|
|
||||||
this.tempData.forEach(elem => {
|
|
||||||
if (elem.order == param.order) {
|
|
||||||
for (var prop in param) {
|
|
||||||
elem[prop] = param[prop];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
@ -1,284 +1,320 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="320px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row class="header">
|
class="beijing-01__systerm stand-detain-train"
|
||||||
<el-col :span="10"><span>集中站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
:visible.sync="show"
|
||||||
|
width="320px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-row class="header">
|
||||||
|
<el-col :span="10"><span>集中站</span></el-col>
|
||||||
|
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10" :offset="2">
|
||||||
|
<el-input v-model="standName" size="small" disabled />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div v-if="!earlyDepar">
|
||||||
|
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
|
||||||
|
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
|
||||||
|
<el-row style="margin-top: -13px;">
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-radio
|
||||||
|
v-model="radio"
|
||||||
|
label="1"
|
||||||
|
:disabled="radio == 2"
|
||||||
|
style="display: block; text-align: left;"
|
||||||
|
>
|
||||||
|
本站台上行</el-radio>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-radio
|
||||||
|
v-model="radio"
|
||||||
|
label="2"
|
||||||
|
:disabled="radio == 1"
|
||||||
|
style="display: block; text-align: left;"
|
||||||
|
>
|
||||||
|
本站台上行</el-radio>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
</div>
|
||||||
<el-col :span="10">
|
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
|
||||||
</el-col>
|
<el-row style="margin-top: -13px;">
|
||||||
<el-col :span="10" :offset="2">
|
<el-col :span="11">
|
||||||
<el-input v-model="standName" size="small" disabled></el-input>
|
<el-radio
|
||||||
</el-col>
|
v-model="radio1"
|
||||||
|
label="1"
|
||||||
|
:disabled="radio1 == '2'"
|
||||||
|
style="display: block; text-align: left;"
|
||||||
|
>
|
||||||
|
扣车</el-radio>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-radio
|
||||||
|
v-model="radio1"
|
||||||
|
label="2"
|
||||||
|
:disabled="radio1 == '1'"
|
||||||
|
style="display: block; text-align: left;"
|
||||||
|
>
|
||||||
|
取消扣车</el-radio>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div v-if="!earlyDepar">
|
</div>
|
||||||
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
|
</div>
|
||||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
|
<div v-if="earlyDepar">
|
||||||
<el-row style="margin-top: -13px;">
|
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
|
||||||
<el-col :span="11">
|
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
|
||||||
<el-radio v-model="radio" label="1" :disabled="radio == 2"
|
<el-row style="margin-top: -13px;">
|
||||||
style="display: block; text-align: left;">
|
<el-col :span="11">
|
||||||
本站台上行</el-radio>
|
<el-radio
|
||||||
</el-col>
|
:id="upRadioId"
|
||||||
<el-col :span="11" :offset="2">
|
v-model="radio2"
|
||||||
<el-radio v-model="radio" label="2" :disabled="radio == 1"
|
label="1"
|
||||||
style="display: block; text-align: left;">
|
style="display: block; text-align: left;"
|
||||||
本站台上行</el-radio>
|
@change="changeRadio"
|
||||||
</el-col>
|
>
|
||||||
</el-row>
|
本站台上行</el-radio>
|
||||||
</div>
|
</el-col>
|
||||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
<el-col :span="11" :offset="2">
|
||||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
|
<el-radio
|
||||||
<el-row style="margin-top: -13px;">
|
:id="downRadioId"
|
||||||
<el-col :span="11">
|
v-model="radio2"
|
||||||
<el-radio v-model="radio1" label="1" :disabled="radio1 == '2'"
|
label="2"
|
||||||
style="display: block; text-align: left;">
|
style="display: block; text-align: left;"
|
||||||
扣车</el-radio>
|
@change="changeRadio"
|
||||||
</el-col>
|
>
|
||||||
<el-col :span="11" :offset="2">
|
本站台下行</el-radio>
|
||||||
<el-radio v-model="radio1" label="2" :disabled="radio1 == '1'"
|
</el-col>
|
||||||
style="display: block; text-align: left;">
|
|
||||||
取消扣车</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="earlyDepar">
|
|
||||||
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
|
|
||||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
|
|
||||||
<el-row style="margin-top: -13px;">
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-radio v-model="radio2" label="1" :id="upRadioId"
|
|
||||||
style="display: block; text-align: left;" @change="changeRadio">
|
|
||||||
本站台上行</el-radio>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-radio v-model="radio2" label="2" :id="downRadioId"
|
|
||||||
style="display: block; text-align: left;" @change="changeRadio">
|
|
||||||
本站台下行</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-row class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
</div>
|
||||||
</el-dialog>
|
</div>
|
||||||
|
<el-row class="button-group">
|
||||||
|
<el-col :span="10" :offset="2">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="4">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetainTrain',
|
name: 'StandDetainTrain',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
standName: '',
|
standName: '',
|
||||||
stationName: '',
|
stationName: '',
|
||||||
selected: null,
|
selected: null,
|
||||||
operation: null,
|
operation: null,
|
||||||
radio: '1',
|
radio: '1',
|
||||||
radio1: '1',
|
radio1: '1',
|
||||||
radio2: '1',
|
radio2: '1',
|
||||||
earlyDepar: false,
|
earlyDepar: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
upRadioId() {
|
upRadioId() {
|
||||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
|
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
|
||||||
},
|
},
|
||||||
downRadioId() {
|
downRadioId() {
|
||||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
|
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
this.earlyDepar = false;
|
this.earlyDepar = false;
|
||||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||||
this.radio1 = '1';
|
this.radio1 = '1';
|
||||||
return '扣车';
|
return '扣车';
|
||||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||||
this.radio1 = '2';
|
this.radio1 = '2';
|
||||||
return '取消扣车';
|
return '取消扣车';
|
||||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||||
this.earlyDepar = true;
|
this.earlyDepar = true;
|
||||||
if (this.selected.direction == '01') {
|
if (this.selected.direction == '01') {
|
||||||
this.radio2 = '2';
|
this.radio2 = '2';
|
||||||
} else {
|
} else {
|
||||||
this.radio2 = '1';
|
this.radio2 = '1';
|
||||||
}
|
}
|
||||||
return '提前发车'
|
return '提前发车';
|
||||||
}
|
}
|
||||||
},
|
return '';
|
||||||
},
|
}
|
||||||
mounted() {
|
},
|
||||||
this.$nextTick(() => {
|
mounted() {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$nextTick(() => {
|
||||||
})
|
this.$store.dispatch('training/tipReload');
|
||||||
},
|
});
|
||||||
methods: {
|
},
|
||||||
doShow(operate, selected) {
|
methods: {
|
||||||
this.selected = selected;
|
doShow(operate, selected) {
|
||||||
if (!this.dialogShow) {
|
this.selected = selected;
|
||||||
this.standName = '';
|
if (!this.dialogShow) {
|
||||||
this.stationName = '';
|
this.standName = '';
|
||||||
if (selected) {
|
this.stationName = '';
|
||||||
this.standName = selected.name;
|
if (selected) {
|
||||||
}
|
this.standName = selected.name;
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
}
|
||||||
this.standName = selected.name;
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
this.standName = selected.name;
|
||||||
if (station) {
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
this.stationName = station.name;
|
if (station) {
|
||||||
}
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
changeRadio(val) {
|
changeRadio(val) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: '',
|
operation: '',
|
||||||
val: val
|
val: val
|
||||||
}
|
};
|
||||||
if (val == 1) {
|
if (val == 1) {
|
||||||
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
|
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
|
||||||
} else if (val == 2) {
|
} else if (val == 2) {
|
||||||
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
|
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||||
/** 设置扣车*/
|
/** 设置扣车*/
|
||||||
this.setDetainTrain();
|
this.setDetainTrain();
|
||||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||||
/** 取消扣车*/
|
/** 取消扣车*/
|
||||||
this.cancelDetainTrain();
|
this.cancelDetainTrain();
|
||||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||||
/** 提前发车*/
|
/** 提前发车*/
|
||||||
this.earlyDeparture();
|
this.earlyDeparture();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消扣车
|
// 取消扣车
|
||||||
cancelDetainTrain() {
|
cancelDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//提前发车
|
// 提前发车
|
||||||
earlyDeparture() {
|
earlyDeparture() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.stand-detain-train .context {
|
.stand-detain-train .context {
|
||||||
|
@ -1,330 +1,356 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row class="header">
|
class="beijing-01__systerm stand-detain-train"
|
||||||
<el-col :span="11"><span>集中站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="11" :offset="2"><span>站台</span></el-col>
|
:visible.sync="show"
|
||||||
</el-row>
|
width="380px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-row class="header">
|
||||||
|
<el-col :span="11"><span>集中站</span></el-col>
|
||||||
|
<el-col :span="11" :offset="2"><span>站台</span></el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-input v-model="standName" size="small" disabled />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form label-width="70px" size="mini" style="">
|
||||||
|
<el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;">
|
||||||
|
<span class="base-label" style="display:block; padding-left: 20px;">范围</span>
|
||||||
|
<el-radio-group :id="selfStationStandId" v-model="model.val1" @change="upAndDownStreamChangeVal1">
|
||||||
|
<div style="margin-bottom: 8px;">
|
||||||
|
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 8px;">
|
||||||
|
<el-radio :label="downstream" :disabled="model.direction !== '01'">本站台下行跳停</el-radio>
|
||||||
|
</div>
|
||||||
|
</el-radio-group>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="10">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-radio-group id="stand_upDown_choose" :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange">
|
||||||
</el-col>
|
<div style="margin-bottom: 8px;">
|
||||||
<el-col :span="11" :offset="2">
|
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
|
||||||
<el-input v-model="standName" size="small" disabled></el-input>
|
</div>
|
||||||
</el-col>
|
<div style="margin-bottom: 8px;">
|
||||||
|
<el-radio :label="downstream" :disabled="model.direction !== '01'">指定列车下行跳停</el-radio>
|
||||||
|
</div>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" align="top" :offset="2">
|
||||||
|
<span>车组号</span>
|
||||||
|
<el-select
|
||||||
|
:id="selectTrainId"
|
||||||
|
v-model="model.tripNumber"
|
||||||
|
style="width: 110px;"
|
||||||
|
size="mini"
|
||||||
|
:disabled="!model.val2"
|
||||||
|
@change="trainNoSelectChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="option in trainList"
|
||||||
|
:key="option.groupNumber"
|
||||||
|
:label="option.groupNumber"
|
||||||
|
:value="option.groupNumber"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form label-width="70px" size="mini" style="">
|
</el-row>
|
||||||
<el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;">
|
</el-form>
|
||||||
<span class="base-label" style="display:block; padding-left: 20px;">范围</span>
|
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
||||||
<el-radio-group v-model="model.val1" :id="selfStationStandId" @change="upAndDownStreamChangeVal1">
|
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
|
||||||
<div style="margin-bottom: 8px;">
|
<el-row style="margin-top: -13px;">
|
||||||
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
|
<el-col :span="11">
|
||||||
</div>
|
<el-radio
|
||||||
<div style="margin-bottom: 8px;">
|
v-model="radio1"
|
||||||
<el-radio :label="downstream" :disabled="model.direction !== '01'">本站台下行跳停</el-radio>
|
:label="JumpStopSet"
|
||||||
</div>
|
:disabled="radio1 == JumpStopCancel"
|
||||||
</el-radio-group>
|
style="display: block; text-align: left;"
|
||||||
<el-row>
|
>
|
||||||
<el-col :span="10">
|
设置</el-radio>
|
||||||
<el-radio-group id="stand_upDown_choose" v-model="model.val2" :id="otherStationStandId" @change="upAndDownStreamChange">
|
</el-col>
|
||||||
<div style="margin-bottom: 8px;">
|
<el-col :span="11" :offset="2">
|
||||||
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
|
<el-radio
|
||||||
</div>
|
v-model="radio1"
|
||||||
<div style="margin-bottom: 8px;">
|
:label="JumpStopCancel"
|
||||||
<el-radio :label="downstream" :disabled="model.direction !== '01'">指定列车下行跳停</el-radio>
|
:disabled="radio1 == JumpStopSet"
|
||||||
</div>
|
style="display: block; text-align: left;"
|
||||||
</el-radio-group>
|
>
|
||||||
</el-col>
|
取消</el-radio>
|
||||||
<el-col :span="11" align="top" :offset="2">
|
</el-col>
|
||||||
<span>车组号</span>
|
</el-row>
|
||||||
<el-select id="stand_trainNo_select" style="width: 110px;" v-model="model.tripNumber"
|
</div>
|
||||||
size="mini" @change="trainNoSelectChange" :disabled="!model.val2" :id="selectTrainId">
|
<el-row class="button-group">
|
||||||
<el-option v-for="option in trainList" :key="option.groupNumber" :label="option.groupNumber"
|
<el-col :span="10" :offset="2">
|
||||||
:value="option.groupNumber">
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
</el-option>
|
</el-col>
|
||||||
</el-select>
|
<el-col :span="8" :offset="4">
|
||||||
</el-col>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-row>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
<notice-info ref="noticeInfo" />
|
||||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
</el-dialog>
|
||||||
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
|
|
||||||
<el-row style="margin-top: -13px;">
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-radio v-model="radio1" :label="JumpStopSet" :disabled="radio1 == JumpStopCancel"
|
|
||||||
style="display: block; text-align: left;">
|
|
||||||
设置</el-radio>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-radio v-model="radio1" :label="JumpStopCancel" :disabled="radio1 == JumpStopSet"
|
|
||||||
style="display: block; text-align: left;">
|
|
||||||
取消</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<el-row class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetainTrains',
|
name: 'StandDetainTrains',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
standName: '',
|
standName: '',
|
||||||
stationName: '',
|
stationName: '',
|
||||||
selected: null,
|
selected: null,
|
||||||
operation: null,
|
operation: null,
|
||||||
trainList: [],
|
trainList: [],
|
||||||
radio1: '',
|
radio1: '',
|
||||||
model: {
|
model: {
|
||||||
val1: '',
|
val1: '',
|
||||||
val2: '',
|
val2: '',
|
||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
direction: '',
|
direction: ''
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'map'
|
'map'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
selectTrainId() {
|
selectTrainId() {
|
||||||
if (this.radio1 == this.JumpStopSet) {
|
if (this.radio1 == this.JumpStopSet) {
|
||||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
|
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
|
||||||
} else {
|
} else {
|
||||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
|
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selfStationStandId() {
|
selfStationStandId() {
|
||||||
if (this.radio1 == this.JumpStopSet) {
|
if (this.radio1 == this.JumpStopSet) {
|
||||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.selfStationStand.domId : '';
|
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.selfStationStand.domId : '';
|
||||||
} else {
|
} else {
|
||||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.selfStationStand.domId : '';
|
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.selfStationStand.domId : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
otherStationStandId() {
|
otherStationStandId() {
|
||||||
if (this.radio1 == this.JumpStopSet) {
|
if (this.radio1 == this.JumpStopSet) {
|
||||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.otherStationStand.domId : '';
|
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.otherStationStand.domId : '';
|
||||||
} else {
|
} else {
|
||||||
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.otherStationStand.domId : '';
|
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.otherStationStand.domId : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '跳停';
|
return '跳停';
|
||||||
},
|
},
|
||||||
upstream() {
|
upstream() {
|
||||||
return '02'; //上行
|
return '02'; // 上行
|
||||||
},
|
},
|
||||||
downstream() {
|
downstream() {
|
||||||
return '01'; //下行
|
return '01'; // 下行
|
||||||
},
|
},
|
||||||
JumpStopSet() {
|
JumpStopSet() {
|
||||||
return OperationEvent.StationStand.setJumpStop.menu.operation;
|
return OperationEvent.StationStand.setJumpStop.menu.operation;
|
||||||
},
|
},
|
||||||
JumpStopCancel() {
|
JumpStopCancel() {
|
||||||
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
|
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'model.val1'(val) {
|
'model.val1'(val) {
|
||||||
if (val) this.model.val2 = '';
|
if (val) this.model.val2 = '';
|
||||||
},
|
},
|
||||||
'model.val2'(val) {
|
'model.val2'(val) {
|
||||||
if (val) this.model.val1 = '';
|
if (val) this.model.val1 = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.radio1 = '',
|
this.radio1 = '',
|
||||||
this.standName = '';
|
this.standName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected) {
|
if (selected) {
|
||||||
this.standName = selected.name;
|
this.standName = selected.name;
|
||||||
}
|
}
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standName = selected.name;
|
this.standName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.radio1 = operate.operation;
|
this.radio1 = operate.operation;
|
||||||
this.model.direction = selected.direction;
|
this.model.direction = selected.direction;
|
||||||
this.model.val1 = selected.direction // 站台的上下行方向, 01:下行 /02:上行
|
this.model.val1 = selected.direction; // 站台的上下行方向, 01:下行 /02:上行
|
||||||
this.model.val2 = '';
|
this.model.val2 = '';
|
||||||
this.model.tripNumber = '';
|
this.model.tripNumber = '';
|
||||||
|
|
||||||
/** 加载列车数据*/
|
/** 加载列车数据*/
|
||||||
this.trainList = this.map.trainList;
|
this.trainList = this.map.trainList;
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||||
/** 设置跳停*/
|
/** 设置跳停*/
|
||||||
this.setJumpStop();
|
this.setJumpStop();
|
||||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||||
/** 取消跳停*/
|
/** 取消跳停*/
|
||||||
this.cancelJumpStop();
|
this.cancelJumpStop();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置跳停
|
// 设置跳停
|
||||||
setJumpStop() {
|
setJumpStop() {
|
||||||
let val = this.model.val1;
|
let val = this.model.val1;
|
||||||
if (this.model.val2) {
|
if (this.model.val2) {
|
||||||
val = this.model.val2 + '::' + this.model.tripNumber;
|
val = this.model.val2 + '::' + this.model.tripNumber;
|
||||||
}
|
}
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||||
// val: this.selected.direction //站台的上下行方向, 01:下行 /02:上行
|
// val: this.selected.direction //站台的上下行方向, 01:下行 /02:上行
|
||||||
val: val,
|
val: val
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消跳停
|
// 取消跳停
|
||||||
cancelJumpStop() {
|
cancelJumpStop() {
|
||||||
let val = this.model.val1;
|
let val = this.model.val1;
|
||||||
if (this.model.val2) {
|
if (this.model.val2) {
|
||||||
val = this.model.val2 + '::' + this.model.tripNumber;
|
val = this.model.val2 + '::' + this.model.tripNumber;
|
||||||
}
|
}
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||||
val: val //站台的上下行方向, 01:下行 /02:上行
|
val: val // 站台的上下行方向, 01:下行 /02:上行
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
upAndDownStreamChange(val) {
|
upAndDownStreamChange(val) {
|
||||||
let operation = this.radio1 == this.JumpStopSet ?
|
const operation = this.radio1 == this.JumpStopSet
|
||||||
OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
|
? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
|
||||||
this.model.val1 = '';
|
this.model.val1 = '';
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: operation
|
operation: operation
|
||||||
}
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
upAndDownStreamChangeVal1(val) {
|
upAndDownStreamChangeVal1(val) {
|
||||||
let operation = this.radio1 == this.JumpStopSet ?
|
const operation = this.radio1 == this.JumpStopSet
|
||||||
OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
|
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
|
||||||
this.model.val1 = '';
|
this.model.val1 = '';
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: operation
|
operation: operation
|
||||||
}
|
};
|
||||||
this.model.val2 = '';
|
this.model.val2 = '';
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
trainNoSelectChange(val) {
|
trainNoSelectChange(val) {
|
||||||
let operation = this.radio1 == this.JumpStopSet ?
|
const operation = this.radio1 == this.JumpStopSet
|
||||||
OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||||
this.model.val1 = '';
|
this.model.val1 = '';
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: operation,
|
operation: operation,
|
||||||
val: val
|
val: val
|
||||||
}
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.stand-detain-train .context {
|
.stand-detain-train .context {
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
class="beijing-01__systerm station-control"
|
v-dialogDrag
|
||||||
:title="title" :visible.sync="show" width="400px"
|
class="beijing-01__systerm station-control"
|
||||||
:before-close="doClose"
|
:title="title"
|
||||||
:show-close="true" :z-index="2000" :modal="false" v-dialogDrag
|
:visible.sync="show"
|
||||||
:close-on-click-modal="false"
|
width="400px"
|
||||||
>
|
:before-close="doClose"
|
||||||
|
:show-close="true"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-radio-group v-model="control" :disabled="true">
|
<el-radio-group v-model="control" :disabled="true">
|
||||||
<el-row v-for="item in Object.keys(controlProps)" style="padding-bottom: 10px;padding-top:10px" :key="item">
|
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
|
||||||
<el-radio :label="item" disabled="false">{{ controlProps[item] }}</el-radio>
|
<el-radio :label="item" disabled="false">{{ controlProps[item] }}</el-radio>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@ -16,7 +21,7 @@ class="beijing-01__systerm station-control"
|
|||||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"/>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
class="beijing-01__systerm view-train-id"
|
v-dialogDrag
|
||||||
title="列车识别号显示设置" :visible.sync="show" width="420px"
|
class="beijing-01__systerm view-train-id"
|
||||||
:before-close="doClose"
|
title="列车识别号显示设置"
|
||||||
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
|
:visible.sync="show"
|
||||||
>
|
width="420px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||||
<span class="base-label">计划车显示模式</span>
|
<span class="base-label">计划车显示模式</span>
|
||||||
<el-radio-group v-model="planMode">
|
<el-radio-group v-model="planMode">
|
||||||
@ -51,7 +56,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
|
|||||||
<span class="base-label">字体大小</span>
|
<span class="base-label">字体大小</span>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model="fontSize" size="small" min="16" max="99"/>
|
<el-input v-model="fontSize" size="small" min="16" max="99" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10" :offset="1">
|
<el-col :span="10" :offset="1">
|
||||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||||
@ -66,7 +71,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"/>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -76,20 +81,20 @@ import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ViewTrainId',
|
name: 'ViewTrainId',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
operate: null,
|
operate: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
planMode: 5,
|
planMode: 5,
|
||||||
headMode: 5,
|
headMode: 5,
|
||||||
fontSize: 16,
|
fontSize: 16
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
@ -1,31 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="statusDownTrainDetail"></div>
|
<div id="statusDownTrainDetail" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'StatusDownTrainDetail',
|
name: 'StatusDownTrainDetail',
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
}
|
default() {
|
||||||
},
|
return null;
|
||||||
data() {
|
}
|
||||||
return {
|
}
|
||||||
}
|
},
|
||||||
},
|
data() {
|
||||||
mounted() {
|
return {
|
||||||
}
|
};
|
||||||
}
|
},
|
||||||
|
mounted() {
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
#statusDownTrainDetail {
|
|
||||||
z-index: 1000;
|
|
||||||
position: absolute;
|
|
||||||
height: $height;
|
|
||||||
line-height: $height;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
@ -137,8 +137,9 @@ export default {
|
|||||||
lastPoint = train.stationTimeList[idx - 1];
|
lastPoint = train.stationTimeList[idx - 1];
|
||||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
|
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
|
||||||
num = this.computedReentryNumber(train.tripNumber);
|
num = this.computedReentryNumber(train.tripNumber);
|
||||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode]);
|
const aa = `${train.directionCode}${train.tripNumber}`;
|
||||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode]);
|
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
|
||||||
|
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 如果是备用车,按车次添加线*/
|
/** 如果是备用车,按车次添加线*/
|
||||||
|
@ -122,7 +122,6 @@
|
|||||||
import XLSX from 'xlsx';
|
import XLSX from 'xlsx';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { importRunPlan } from '@/api/runplan';
|
import { importRunPlan } from '@/api/runplan';
|
||||||
import { importData } from '../planConvert';
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
|
||||||
|
@ -1,381 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog class="chengdou-03__systerm alxe-effective" :title="title" :visible.sync="show" width="420px"
|
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
|
||||||
<div style="padding: 10px 20px;border: 1px solid lightgray;">
|
|
||||||
<span class="base-label">准备</span>
|
|
||||||
<div style="margin-top: 10px">
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="9">车站</el-col>
|
|
||||||
<el-col :span="9">轨道/计轴</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="9">
|
|
||||||
<el-input :type="type" v-model="model.stationName" size="mini" :disabled="true"></el-input>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="9">
|
|
||||||
<el-input :type="type" v-model="model.sectionName" size="mini" :disabled="true"></el-input>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" :offset="1">
|
|
||||||
<el-button :id="domIdConfirm1" size="mini" @click="commitOnce" :disabled="type==='password'">确认
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
|
||||||
<span class="base-label">确认</span>
|
|
||||||
<div>
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="9">车站</el-col>
|
|
||||||
<el-col :span="9">轨道/计轴</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row type="flex" justify="left">
|
|
||||||
<el-col :span="9">
|
|
||||||
<el-select :id="domIdChoose1" v-model="model.confirmStationName" filterable size="mini"
|
|
||||||
@change="stationSelectChange" :disabled="type==='text'">
|
|
||||||
<el-option v-for="(option,index) in filterStationList" :key="index" :label="option.name"
|
|
||||||
:value="option.name">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="9">
|
|
||||||
<el-select :id="domIdChoose2" v-model="model.confirmSectionName" filterable size="mini"
|
|
||||||
@change="sectionSelectChange" :disabled="type==='text'">
|
|
||||||
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name"
|
|
||||||
:value="option.name">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4" :offset="1">
|
|
||||||
<el-button :id="domIdConfirm2" size="mini" :loading="loading" @click="commit"
|
|
||||||
:disabled="type==='text'">确认</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-row type="flex" justify="left" style="margin-top:20px">
|
|
||||||
<el-col :span="6" :offset="1"> 操作倒计时</el-col>
|
|
||||||
<el-col :span="16">
|
|
||||||
<el-input v-model="model.time" size="mini" :readonly="true"></el-input>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :offset="1"> 状态</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :offset="1" :span="23">
|
|
||||||
<el-input type="textarea" :rows="2" placeholder="" v-model="model.status">
|
|
||||||
</el-input>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="botton-group" style="margin-top:20px">
|
|
||||||
<el-col :span="4" :offset="10">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
|
||||||
<popup-alarm ref="popupAlarm"></popup-alarm>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
|
||||||
import PopupAlarm from './childDialog/popupAlarm';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'AlxeEffective',
|
|
||||||
components: {
|
|
||||||
NoticeInfo,
|
|
||||||
PopupAlarm
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
type: 'text',
|
|
||||||
timeout: 1000,
|
|
||||||
timenum: 30,
|
|
||||||
stepNum: 0,
|
|
||||||
task: null,
|
|
||||||
model: {
|
|
||||||
stationName: '',
|
|
||||||
sectionName: '',
|
|
||||||
confirmStationName: '',
|
|
||||||
confirmSectionName: '',
|
|
||||||
status: '',
|
|
||||||
time: 0,
|
|
||||||
},
|
|
||||||
selected: null,
|
|
||||||
operate: null,
|
|
||||||
operation: '',
|
|
||||||
randomSectionList: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'stationList',
|
|
||||||
'sectionList'
|
|
||||||
]),
|
|
||||||
filterStationList() {
|
|
||||||
let i = 0, list = [];
|
|
||||||
if (this.stationList) {
|
|
||||||
this.stationList.forEach(elem => {
|
|
||||||
if (list.findIndex(it => { return it.name == elem.name }) < 0) {
|
|
||||||
list.push({ name: elem.name });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
},
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdConfirm1() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
|
||||||
return OperationEvent.Section.alxeEffective.confirm1.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdConfirm2() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
|
||||||
return OperationEvent.Section.alxeEffective.confirm2.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdChoose1() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
|
||||||
return OperationEvent.Section.alxeEffective.choose1.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdChoose2() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
|
||||||
return OperationEvent.Section.alxeEffective.choose2.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
this.earlyDepar = false;
|
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
|
||||||
return '确认计轴恢复工作';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'model.sectionName': function (name) {
|
|
||||||
let index = Math.floor(Math.random(1) * 5);
|
|
||||||
for (var i = 0; i < 5; i++) {
|
|
||||||
if (i == index) {
|
|
||||||
this.randomSectionList.push({ name });
|
|
||||||
} else {
|
|
||||||
let section = this.sectionList[Math.floor(Math.random(1) * this.sectionList.length)];
|
|
||||||
if (section.type != '02') {
|
|
||||||
if (this.randomSectionList.findIndex(it => { return it.name == section.name }) < 0) {
|
|
||||||
this.randomSectionList.push({ name: section.name });
|
|
||||||
} else {
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
stopTask() {
|
|
||||||
if (this.task) {
|
|
||||||
clearInterval(this.task);
|
|
||||||
this.task = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.stepNum < 3) {
|
|
||||||
this.$store.dispatch('training/backSteps', this.stepNum);
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.model.name = '';
|
|
||||||
this.model.time = '';
|
|
||||||
this.type = 'text';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
this.operate = operate || {};
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.status = '';
|
|
||||||
this.model.stationName = '';
|
|
||||||
this.model.sectionName = '';
|
|
||||||
this.model.confirmStationName = '';
|
|
||||||
this.model.confirmSectionName = '';
|
|
||||||
if (selected) {
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
|
||||||
if (selected.isSwitchSection) {
|
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
|
||||||
if (section) {
|
|
||||||
this.model.sectionName = section.name;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
|
||||||
if (section) {
|
|
||||||
this.model.sectionName = section.name;
|
|
||||||
this.model.sectionName = `${section.name}-${selected.name}`;
|
|
||||||
} else {
|
|
||||||
this.model.sectionName = `${selected.name}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
|
|
||||||
if (section) {
|
|
||||||
this.model.sectionName = section.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.model.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.stepNum = 0;
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.stopTask();
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
waitSelectEvent() {
|
|
||||||
if (!this.$store.state.menuOperation.break) {
|
|
||||||
this.model.time -= 1;
|
|
||||||
if (this.model.time <= 0) {
|
|
||||||
this.stopTask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
commitOnce() {
|
|
||||||
this.stepNum = 1;
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Section.alxeEffective.confirm1.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.type = 'password';
|
|
||||||
this.model.time = this.timenum;
|
|
||||||
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
stationSelectChange(val) {
|
|
||||||
if (this.model.confirmStationName === this.model.stationName) {
|
|
||||||
this.stepNum = 2;
|
|
||||||
} else {
|
|
||||||
this.model.time = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Section.alxeEffective.choose1.operation,
|
|
||||||
val: val
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
sectionSelectChange(val) {
|
|
||||||
if (this.model.confirmSectionName === this.model.sectionName) {
|
|
||||||
this.stepNum = 2;
|
|
||||||
} else {
|
|
||||||
this.model.time = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Section.alxeEffective.choose2.operation,
|
|
||||||
val: val
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 确认计轴恢复工作*/
|
|
||||||
commit() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Section.alxeEffective.confirm2.operation,
|
|
||||||
val: this.selected.code
|
|
||||||
}
|
|
||||||
|
|
||||||
this.model.status = '';
|
|
||||||
if (this.model.stationName == this.model.confirmStationName &&
|
|
||||||
this.model.sectionName == this.model.confirmSectionName) {
|
|
||||||
this.stepNum = 3;
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.type = 'text';
|
|
||||||
this.stopTask();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.popupAlarm.doShow(Object.assign(this.operate, { val: operate.val }),
|
|
||||||
[`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
if (this.model.stationName != this.model.confirmStationName) {
|
|
||||||
this.model.status = '车站选择错误';
|
|
||||||
} else if (this.model.sectionName != this.model.confirmSectionName) {
|
|
||||||
this.model.status = '区段选择错误';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.alxe-effective .context {
|
|
||||||
height: 80px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,196 +1,209 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm" :visible.sync="show" width="360px" :before-close="doClose" :zIndex="2000"
|
<el-dialog
|
||||||
:modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row>
|
class="chengdou-03__systerm"
|
||||||
<el-col :span="22" :offset="1">
|
:visible.sync="show"
|
||||||
<el-input placeholder="请使用软键盘输入" v-model="encryptionPassword" size="medium" :disabled="true"></el-input>
|
width="360px"
|
||||||
</el-col>
|
:before-close="doClose"
|
||||||
</el-row>
|
:z-index="2000"
|
||||||
<el-row v-if="showMistake">
|
:modal="false"
|
||||||
<el-col :span="22" :offset="1">
|
:close-on-click-modal="false"
|
||||||
<span class="password-error">*密码输入错误请重新输入*</span>
|
append-to-body
|
||||||
</el-col>
|
>
|
||||||
</el-row>
|
<el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-col :span="22" :offset="1">
|
||||||
<el-col :span="4" :offset="1">
|
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
|
||||||
<el-button @click="inputNum">7</el-button>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
<el-col :span="4" :offset="4">
|
<el-row v-if="showMistake">
|
||||||
<el-button @click="inputNum">8</el-button>
|
<el-col :span="22" :offset="1">
|
||||||
</el-col>
|
<span class="password-error">*密码输入错误请重新输入*</span>
|
||||||
<el-col :span="4" :offset="4">
|
</el-col>
|
||||||
<el-button @click="inputNum">9</el-button>
|
</el-row>
|
||||||
</el-col>
|
<el-row justify="center" class="button-group">
|
||||||
</el-row>
|
<el-col :span="4" :offset="1">
|
||||||
<el-row justify="center" class="button-group">
|
<el-button @click="inputNum">7</el-button>
|
||||||
<el-col :span="4" :offset="1">
|
</el-col>
|
||||||
<el-button @click="inputNum">4</el-button>
|
<el-col :span="4" :offset="4">
|
||||||
</el-col>
|
<el-button @click="inputNum">8</el-button>
|
||||||
<el-col :span="4" :offset="4">
|
</el-col>
|
||||||
<el-button @click="inputNum">5</el-button>
|
<el-col :span="4" :offset="4">
|
||||||
</el-col>
|
<el-button @click="inputNum">9</el-button>
|
||||||
<el-col :span="4" :offset="4">
|
</el-col>
|
||||||
<el-button @click="inputNum">6</el-button>
|
</el-row>
|
||||||
</el-col>
|
<el-row justify="center" class="button-group">
|
||||||
</el-row>
|
<el-col :span="4" :offset="1">
|
||||||
<el-row justify="center" class="button-group">
|
<el-button @click="inputNum">4</el-button>
|
||||||
<el-col :span="4" :offset="1">
|
</el-col>
|
||||||
<el-button @click="inputNum">1</el-button>
|
<el-col :span="4" :offset="4">
|
||||||
</el-col>
|
<el-button @click="inputNum">5</el-button>
|
||||||
<el-col :span="4" :offset="4">
|
</el-col>
|
||||||
<el-button @click="inputNum">2</el-button>
|
<el-col :span="4" :offset="4">
|
||||||
</el-col>
|
<el-button @click="inputNum">6</el-button>
|
||||||
<el-col :span="4" :offset="4">
|
</el-col>
|
||||||
<el-button @click="inputNum">3</el-button>
|
</el-row>
|
||||||
</el-col>
|
<el-row justify="center" class="button-group">
|
||||||
</el-row>
|
<el-col :span="4" :offset="1">
|
||||||
<el-row justify="center" class="button-group">
|
<el-button @click="inputNum">1</el-button>
|
||||||
<el-col :span="4" :offset="1">
|
</el-col>
|
||||||
<el-button @click="inputNum">0</el-button>
|
<el-col :span="4" :offset="4">
|
||||||
</el-col>
|
<el-button @click="inputNum">2</el-button>
|
||||||
<el-col :span="4" :offset="4">
|
</el-col>
|
||||||
<el-button @click="inputClear">C</el-button>
|
<el-col :span="4" :offset="4">
|
||||||
</el-col>
|
<el-button @click="inputNum">3</el-button>
|
||||||
<el-col :span="4" :offset="4">
|
</el-col>
|
||||||
<el-button @click="backSpace"><-</el-button>
|
</el-row>
|
||||||
</el-col>
|
<el-row justify="center" class="button-group">
|
||||||
</el-row>
|
<el-col :span="4" :offset="1">
|
||||||
<el-row justify="center" class="button-group">
|
<el-button @click="inputNum">0</el-button>
|
||||||
<el-col :span="4" :offset="1">
|
</el-col>
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
<el-col :span="4" :offset="4">
|
||||||
</el-col>
|
<el-button @click="inputClear">C</el-button>
|
||||||
<el-col :span="4" :offset="12">
|
</el-col>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-col :span="4" :offset="4">
|
||||||
</el-col>
|
<el-button @click="backSpace"> < </el-button>
|
||||||
</el-row>
|
</el-col>
|
||||||
</el-dialog>
|
</el-row>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="4" :offset="1">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4" :offset="12">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'passwordBox',
|
name: 'PasswordBox',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
/*写死的初始密码*/
|
/* 写死的初始密码*/
|
||||||
correctPassword: '123456',
|
correctPassword: '123456',
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
operation: null,
|
operation: null,
|
||||||
checkHasInput: false,
|
checkHasInput: false,
|
||||||
/*输入值*/
|
/* 输入值*/
|
||||||
passwordCheck: '',
|
passwordCheck: '',
|
||||||
/*输入值替换为对应长度的星号*/
|
/* 输入值替换为对应长度的星号*/
|
||||||
encryptionPassword: '',
|
encryptionPassword: '',
|
||||||
loading: false,
|
loading: false,
|
||||||
showMistake: false,
|
showMistake: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
domIdCancel: {
|
||||||
|
get: function () {
|
||||||
|
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||||
|
},
|
||||||
|
set: function () {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
domIdConfirm() {
|
||||||
show() {
|
if (this.operate && this.operate.operateCode) {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : '';
|
||||||
},
|
} else {
|
||||||
domIdCancel: {
|
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||||
get: function () {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
|
||||||
},
|
|
||||||
set: function () {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdConfirm: {
|
|
||||||
get: function () {
|
|
||||||
return OperationEvent.Command.close.confirm.domId;
|
|
||||||
},
|
|
||||||
set: function () {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
mounted() {
|
},
|
||||||
this.$nextTick(() => {
|
mounted() {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$nextTick(() => {
|
||||||
})
|
this.$store.dispatch('training/tipReload');
|
||||||
},
|
});
|
||||||
methods: {
|
},
|
||||||
doShow(operate) {
|
methods: {
|
||||||
this.operate = operate || {};
|
doShow(operate) {
|
||||||
this.dialogShow = true;
|
this.operate = operate || {};
|
||||||
this.checkHasInput = false;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.checkHasInput = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$nextTick(function () {
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.showMistake = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
});
|
||||||
commit() {
|
},
|
||||||
let operate = {
|
doClose() {
|
||||||
send: false,
|
this.loading = false;
|
||||||
type: this.operate.type,
|
this.dialogShow = false;
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
this.showMistake = false;
|
||||||
};
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
if (this.passwordCheck === this.correctPassword) {
|
},
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
commit() {
|
||||||
this.loading = false;
|
const operate = {
|
||||||
|
send: this.operate.operateCode != null,
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: this.operate.operateCode != null ? this.operate.operateCode : OperationEvent.Command.close.confirm.operation
|
||||||
|
};
|
||||||
|
if (this.operate.val) {
|
||||||
|
operate['val'] = this.operate.val;
|
||||||
|
}
|
||||||
|
|
||||||
if (valid) {
|
if (this.passwordCheck === this.correctPassword) {
|
||||||
this.$emit('checkOver', this.operate.operation);
|
|
||||||
this.doClose();
|
|
||||||
this.inputClear();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.showMistake = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/*软键盘输入*/
|
|
||||||
inputNum(e) {
|
|
||||||
this.showMistake = false;
|
|
||||||
this.passwordCheck += e.path[0].innerText;
|
|
||||||
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
|
|
||||||
},
|
|
||||||
/*软键盘清除*/
|
|
||||||
inputClear() {
|
|
||||||
this.showMistake = false;
|
|
||||||
this.passwordCheck = '';
|
|
||||||
this.encryptionPassword = '';
|
|
||||||
},
|
|
||||||
/*软键盘回退*/
|
|
||||||
backSpace() {
|
|
||||||
this.showMistake = false;
|
|
||||||
let password = this.passwordCheck;
|
|
||||||
if (password !== '') {
|
|
||||||
this.passwordCheck = password.substring(0, password.length - 1);
|
|
||||||
this.encryptionPassword = this.passwordCheck;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
send: false,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.close.password.operation,
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$emit('checkOver');
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.inputClear();
|
this.inputClear();
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.showMistake = true;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
/* 软键盘输入*/
|
||||||
|
inputNum(e) {
|
||||||
|
this.showMistake = false;
|
||||||
|
this.passwordCheck += e.path[0].innerText;
|
||||||
|
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
|
||||||
|
},
|
||||||
|
/* 软键盘清除*/
|
||||||
|
inputClear() {
|
||||||
|
this.showMistake = false;
|
||||||
|
this.passwordCheck = '';
|
||||||
|
this.encryptionPassword = '';
|
||||||
|
},
|
||||||
|
/* 软键盘回退*/
|
||||||
|
backSpace() {
|
||||||
|
this.showMistake = false;
|
||||||
|
const password = this.passwordCheck;
|
||||||
|
if (password !== '') {
|
||||||
|
this.passwordCheck = password.substring(0, password.length - 1);
|
||||||
|
this.encryptionPassword = this.passwordCheck;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
send: false,
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Command.close.password.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
this.inputClear();
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,363 +1,356 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm signal-control" :title="title" :visible.sync="show" width="440px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row>
|
class="chengdou-03__systerm signal-control"
|
||||||
<el-col :span="2"><span>车站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="6">
|
:visible.sync="show"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
width="440px"
|
||||||
</el-col>
|
:before-close="doClose"
|
||||||
<el-col :span="5" :offset="1"><span>始端信号机</span></el-col>
|
:z-index="2000"
|
||||||
<el-col :span="6">
|
:modal="false"
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
>
|
||||||
</el-row>
|
<el-row>
|
||||||
<el-row justify="center" style="margin-top: 50px">
|
<el-col :span="2"><span>车站</span></el-col>
|
||||||
<el-col :span="11" :offset="13">
|
<el-col :span="6">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="5" :offset="1"><span>始端信号机</span></el-col>
|
||||||
</el-row>
|
<el-col :span="6">
|
||||||
<confirm-control ref="confirmControl"></confirm-control>
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
<password-box ref="password" @checkOver="confirm"></password-box>
|
</el-col>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
</el-row>
|
||||||
</el-dialog>
|
<el-row justify="center" style="margin-top: 50px">
|
||||||
|
<el-col :span="11" :offset="13">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<confirm-control ref="confirmControl" />
|
||||||
|
<password-box ref="password" @checkOver="doClose" />
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import PasswordBox from './childDialog/passwordInputBox';
|
import PasswordBox from './childDialog/passwordInputBox';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteControl',
|
name: 'RouteControl',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl,
|
ConfirmControl,
|
||||||
PasswordBox,
|
PasswordBox,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
selected: null,
|
selected: null,
|
||||||
tempdata: [],
|
tempdata: [],
|
||||||
operation: null,
|
operation: null,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: ''
|
signalName: '',
|
||||||
|
operateCode: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
domIdCancel() {
|
||||||
|
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||||
|
},
|
||||||
|
domIdConfirm() {
|
||||||
|
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
|
return '取消列车进路';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||||
|
return '总人解';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
|
return '重开信号';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
|
||||||
|
return '信号封锁';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
|
return '信号解封';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
|
return '进路收人工控';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||||
|
return '进路交自动控';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
|
return '信号关灯';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate, selected, tempdata) {
|
||||||
|
this.selected = selected;
|
||||||
|
this.tempdata = tempdata;
|
||||||
|
if (!this.dialogShow) {
|
||||||
|
this.signalName = '';
|
||||||
|
this.stationName = '';
|
||||||
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
|
this.signalName = selected.name;
|
||||||
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
|
if (station) {
|
||||||
|
this.stationName = station.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.operation = operate.operation;
|
||||||
|
this.operateCode = operate.code;
|
||||||
|
}
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
mouseCancelState(this.selected);
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
|
/** 取消列车进路*/
|
||||||
|
this.cancelTrainRoute();
|
||||||
|
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||||
|
/** 总人解*/
|
||||||
|
this.humanTrainRoute();
|
||||||
|
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
|
/** 信号重开*/
|
||||||
|
this.reopenSignal();
|
||||||
|
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
|
||||||
|
/** 信号封锁*/
|
||||||
|
this.lock();
|
||||||
|
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
|
/** 信号解封*/
|
||||||
|
this.unlock();
|
||||||
|
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
|
/** 进路收人工控*/
|
||||||
|
this.humanControl();
|
||||||
|
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||||
|
/** 进路交自动控*/
|
||||||
|
this.atsAutoControl();
|
||||||
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
|
/** 信号关灯*/
|
||||||
|
this.signalClose();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 取消列车进路
|
||||||
|
cancelTrainRoute() {
|
||||||
|
if (this.$store.state.training.prdType == '01') {
|
||||||
|
/** 现地工作站*/
|
||||||
|
this.cancelTrainRouteByLocal();
|
||||||
|
} else if (this.$store.state.training.prdType == '02') {
|
||||||
|
/** 行调工作站*/
|
||||||
|
this.cancelTrainRouteByCentral();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 现地工作站取消进路
|
||||||
|
cancelTrainRouteByLocal() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
}
|
this.loading = true;
|
||||||
},
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
computed: {
|
this.loading = false;
|
||||||
show() {
|
if (valid) {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
this.doClose();
|
||||||
},
|
}
|
||||||
domIdCancel() {
|
}).catch(() => {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
this.loading = false;
|
||||||
},
|
this.doClose();
|
||||||
domIdConfirm() {
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
});
|
||||||
},
|
},
|
||||||
title() {
|
// 行调工作站取消进路
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
cancelTrainRouteByCentral() {
|
||||||
return '取消列车进路';
|
const operate = {
|
||||||
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
send: true,
|
||||||
return '总人解';
|
type: MapDeviceType.Signal.type,
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
||||||
return '重开信号';
|
};
|
||||||
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
|
|
||||||
return '信号封锁';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
return '信号解封';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
|
||||||
return '进路收人工控';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
|
||||||
return '进路交自动控';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
return '信号关灯';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected, tempdata) {
|
|
||||||
this.selected = selected;
|
|
||||||
this.tempdata = tempdata;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name
|
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
/** 取消列车进路*/
|
|
||||||
this.cancelTrainRoute();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
|
||||||
/** 总人解*/
|
|
||||||
this.humanTrainRoute();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
/** 信号重开*/
|
|
||||||
this.reopenSignal();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
|
|
||||||
/** 信号封锁*/
|
|
||||||
this.lock();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 信号解封*/
|
|
||||||
this.unlock();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
|
||||||
/** 进路收人工控*/
|
|
||||||
this.humanControl();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
|
||||||
/** 进路交自动控*/
|
|
||||||
this.atsAutoControl();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
|
||||||
this.signalClose();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//取消列车进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
if (this.$store.state.training.prdType == '01') {
|
|
||||||
/** 现地工作站*/
|
|
||||||
this.cancelTrainRouteByLocal();
|
|
||||||
} else if (this.$store.state.training.prdType == '02') {
|
|
||||||
/** 行调工作站*/
|
|
||||||
this.cancelTrainRouteByCentral();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//现地工作站取消进路
|
|
||||||
cancelTrainRouteByLocal() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//行调工作站取消进路
|
// 总人解
|
||||||
cancelTrainRouteByCentral() {
|
humanTrainRoute() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
type: MapDeviceType.Signal.type,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
operateCode: OperationEvent.Signal.humanTrainRoute.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
if (valid) {
|
||||||
this.loading = false;
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
this.$refs.password.doShow(operate);
|
||||||
this.doClose();
|
}
|
||||||
}
|
}).catch(() => {
|
||||||
}).catch(error => {
|
this.loading = false;
|
||||||
this.loading = false;
|
this.doClose();
|
||||||
this.doClose();
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
});
|
||||||
});
|
},
|
||||||
},
|
// 信号重开
|
||||||
//总人解
|
reopenSignal() {
|
||||||
humanTrainRoute() {
|
const operate = {
|
||||||
let operate = {
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
operation: OperationEvent.Signal.reopenSignal.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.loading = true;
|
||||||
if (valid) {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$refs.password.doShow();
|
this.loading = false;
|
||||||
}
|
if (valid) {
|
||||||
}).catch(error => {
|
this.doClose();
|
||||||
});
|
}
|
||||||
},
|
}).catch(() => {
|
||||||
//信号重开
|
this.loading = false;
|
||||||
reopenSignal() {
|
this.doClose();
|
||||||
let operate = {
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
send: true,
|
});
|
||||||
type: MapDeviceType.Signal.type,
|
},
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
// 信号封锁
|
||||||
}
|
lock() {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Signal.lock.menu.operation,
|
||||||
|
operateCode: OperationEvent.Signal.lock.confirm.operation
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
if (valid) {
|
||||||
this.loading = false;
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
this.$refs.password.doShow(operate);
|
||||||
this.doClose();
|
}
|
||||||
}
|
}).catch(() => {
|
||||||
}).catch(error => {
|
});
|
||||||
this.loading = false;
|
},
|
||||||
this.doClose();
|
// 信号解封
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
unlock() {
|
||||||
});
|
const operate = {
|
||||||
},
|
type: MapDeviceType.Signal.type,
|
||||||
//信号解封
|
operation: OperationEvent.Signal.unlock.menu.operation,
|
||||||
lock() {
|
operateCode: OperationEvent.Signal.unlock.confirm.operation
|
||||||
let operate = {
|
};
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.lock.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.password.doShow();
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
this.$refs.password.doShow(operate);
|
||||||
}).catch(error => {
|
}
|
||||||
});
|
}).catch(() => {
|
||||||
},
|
});
|
||||||
//信号解封
|
},
|
||||||
unlock() {
|
// 进路收人工控
|
||||||
let operate = {
|
humanControl() {
|
||||||
type: MapDeviceType.Signal.type,
|
const operate = {
|
||||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
type: MapDeviceType.Signal.type,
|
||||||
}
|
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||||
|
operateCode: OperationEvent.Signal.humanControl.confirm.operation,
|
||||||
|
val: this.operateCode
|
||||||
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.loading = true;
|
||||||
if (valid) {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$refs.password.doShow();
|
this.loading = false;
|
||||||
}
|
if (valid) {
|
||||||
}).catch(error => {
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
});
|
this.$refs.password.doShow(operate);
|
||||||
},
|
}
|
||||||
//进路收人工控
|
}).catch(() => {
|
||||||
humanControl() {
|
this.loading = false;
|
||||||
let operate = {
|
// this.doClose();
|
||||||
send: true,
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
type: MapDeviceType.Signal.type,
|
});
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
},
|
||||||
val: 'all'
|
// 进路交自动控
|
||||||
}
|
atsAutoControl() {
|
||||||
|
const operate = {
|
||||||
|
// send: true,
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||||
|
operateCode: OperationEvent.Signal.atsAutoControl.confirm.operation,
|
||||||
|
val: this.operateCode
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
this.$refs.password.doShow(operate);
|
||||||
}).catch(error => {
|
}
|
||||||
this.loading = false;
|
}).catch(() => {
|
||||||
this.doClose();
|
this.loading = false;
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
// this.doClose();
|
||||||
});
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
},
|
});
|
||||||
//进路交自动控
|
},
|
||||||
atsAutoControl() {
|
// 信号关灯
|
||||||
let operate = {
|
signalClose() {
|
||||||
send: true,
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||||
val: 'all'
|
messages: [`信号关灯: ${this.signalName}`]
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}).catch(error => {
|
this.$refs.confirmControl.doShow(operate);
|
||||||
this.loading = false;
|
}
|
||||||
this.doClose();
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//信号关灯
|
// 取消
|
||||||
signalClose() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
messages: [`信号关灯: ${this.signalName}`],
|
};
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
if (valid) {
|
||||||
this.loading = false;
|
this.doClose();
|
||||||
if (valid) {
|
}
|
||||||
this.doClose();
|
}).catch(() => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.doClose();
|
||||||
this.$refs.confirmControl.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
});
|
||||||
}).catch(error => {
|
}
|
||||||
this.loading = false;
|
}
|
||||||
});
|
};
|
||||||
},
|
|
||||||
//破铅封确认
|
|
||||||
confirm() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
|
||||||
//总人解
|
|
||||||
operate.operation = OperationEvent.Signal.humanTrainRoute.menu.confirm;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
|
|
||||||
//信号封锁
|
|
||||||
operate.operation = OperationEvent.Signal.lock.menu.confirm;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
//信号解封
|
|
||||||
operate.operation = OperationEvent.Signal.unlock.menu.confirm;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//取消
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
@ -1,140 +1,155 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog class="chengdou-03__systerm route-detail" :title="title" :visible.sync="show" width="460px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row>
|
class="chengdou-03__systerm route-detail"
|
||||||
<el-col :span="2"><span>车站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="6">
|
:visible.sync="show"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
width="460px"
|
||||||
</el-col>
|
:before-close="doClose"
|
||||||
<el-col :span="6" :offset="1"><span>始端信号机</span></el-col>
|
:z-index="2000"
|
||||||
<el-col :span="6">
|
:modal="false"
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
>
|
||||||
</el-row>
|
<el-row>
|
||||||
<div style="margin-top: 20px">
|
<el-col :span="2"><span>车站</span></el-col>
|
||||||
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
|
<el-col :span="6">
|
||||||
:height="140">
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
<el-table-column type="index" label="Id" width="40">
|
</el-col>
|
||||||
</el-table-column>
|
<el-col :span="6" :offset="1"><span>始端信号机</span></el-col>
|
||||||
<el-table-column label="描述" width="140">
|
<el-col :span="6">
|
||||||
<template slot-scope="scope">
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
<span>{{scope.row.name}}</span>
|
</el-col>
|
||||||
</template>
|
</el-row>
|
||||||
</el-table-column>
|
<div style="margin-top: 20px">
|
||||||
<el-table-column label="方向" width="60">
|
<el-table
|
||||||
<template slot-scope="scope">
|
ref="tempTable"
|
||||||
<span>{{scope.row.name}}</span>
|
:data="tempData"
|
||||||
</template>
|
border
|
||||||
</el-table-column>
|
style="width: 100%"
|
||||||
<el-table-column label="完整性">
|
size="mini"
|
||||||
<template slot-scope="scope">
|
highlight-current-row
|
||||||
<span>{{scope.row.name}}</span>
|
:height="140"
|
||||||
</template>
|
>
|
||||||
</el-table-column>
|
<el-table-column type="index" label="Id" width="40" />
|
||||||
<el-table-column prop="status" label="控制">
|
<el-table-column label="描述" width="140">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.controlType == '01'">自动</span>
|
<span>{{ scope.row.name }}</span>
|
||||||
<span v-else>人工</span>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="方向" width="60">
|
||||||
</el-table>
|
<template slot-scope="scope">
|
||||||
</div>
|
<span>{{ scope.row.name }}</span>
|
||||||
<el-row justify="center" class="button-group">
|
</template>
|
||||||
<el-col :span="5" :offset="19">
|
</el-table-column>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-table-column label="完整性">
|
||||||
</el-col>
|
<template slot-scope="scope">
|
||||||
</el-row>
|
<span>{{ scope.row.name }}</span>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
</template>
|
||||||
</el-dialog>
|
</el-table-column>
|
||||||
</div>
|
<el-table-column prop="status" label="控制">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.controlType == '01'">自动</span>
|
||||||
|
<span v-else>人工</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="5" :offset="19">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteDetail',
|
name: 'RouteDetail',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
selected: null,
|
selected: null,
|
||||||
tempData: [],
|
tempData: [],
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: '',
|
signalName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'signalList'
|
'signalList'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '查询进路状态'
|
return '查询进路状态';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是因为断点激活则需要,初始化菜单初始值
|
// 如果不是因为断点激活则需要,初始化菜单初始值
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name
|
this.signalName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.tempData = tempData || [];
|
this.tempData = tempData || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,247 +1,257 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row>
|
class="chengdou-03__systerm route-setting"
|
||||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="6">
|
:visible.sync="show"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
width="460px"
|
||||||
</el-col>
|
:before-close="doClose"
|
||||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
:z-index="2000"
|
||||||
<el-col :span="6">
|
:modal="false"
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
>
|
||||||
</el-row>
|
<el-row>
|
||||||
<div class="route-table-box">
|
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||||
<span class="route-table-tip">进路列表</span>
|
<el-col :span="6">
|
||||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini"
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
@row-click="clickEvent" height="90" highlight-current-row>
|
</el-col>
|
||||||
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px">
|
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||||
</el-table-column>
|
<el-col :span="6">
|
||||||
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px">
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
<template slot-scope="scope">
|
</el-col>
|
||||||
{{ controlTypeNameMap[scope.row.controlType] }}
|
</el-row>
|
||||||
</template>
|
<div class="route-table-box">
|
||||||
</el-table-column>
|
<span class="route-table-tip">进路列表</span>
|
||||||
<el-table-column prop="controlType" label="进路描述" :id="domIdChoose" style="margin-left:30px">
|
<el-table
|
||||||
<template slot-scope="scope">
|
ref="table"
|
||||||
无
|
:data="tempData"
|
||||||
</template>
|
border
|
||||||
</el-table-column>
|
:cell-style="tableStyle"
|
||||||
</el-table>
|
style="width: 99%;"
|
||||||
</div>
|
size="mini"
|
||||||
<el-row justify="center" style="margin-top: 40px">
|
height="90"
|
||||||
<el-col :span="12" :offset="12">
|
highlight-current-row
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled"
|
@row-click="clickEvent"
|
||||||
@click="commit">执行</el-button>
|
>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
|
||||||
</el-col>
|
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
|
||||||
</el-row>
|
<template slot-scope="scope">{{ controlTypeNameMap[scope.row.controlType] }} </template>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
</el-table-column>
|
||||||
<!-- <password ref="password"></password> -->
|
<el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
|
||||||
</el-dialog>
|
<template>无</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<el-row justify="center" style="margin-top: 40px">
|
||||||
|
<el-col :span="12" :offset="12">
|
||||||
|
<el-button
|
||||||
|
:id="domIdConfirm"
|
||||||
|
type="primary"
|
||||||
|
:loading="loading"
|
||||||
|
:disabled="commitDisabled"
|
||||||
|
@click="commit"
|
||||||
|
>执行</el-button>
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
<password-box ref="passwordBox" @checkOver="doClose" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic.js';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import PasswordBox from './childDialog/passwordInputBox.vue';
|
||||||
// import Password from './childDialog/childDialog/password';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteSelection',
|
name: 'RouteSelection',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl,
|
NoticeInfo,
|
||||||
NoticeInfo,
|
PasswordBox
|
||||||
// Password
|
},
|
||||||
},
|
data() {
|
||||||
data() {
|
return {
|
||||||
return {
|
tempData: [],
|
||||||
tempData: [],
|
beforeSectionList: [],
|
||||||
beforeSectionList: [],
|
dialogShow: false,
|
||||||
dialogShow: false,
|
loading: false,
|
||||||
loading: false,
|
selected: null,
|
||||||
selected: null,
|
row: null,
|
||||||
row: null,
|
operation: '',
|
||||||
operation: '',
|
display: true,
|
||||||
display: true,
|
stationName: '',
|
||||||
stationName: '',
|
signalName: '',
|
||||||
signalName: '',
|
tableStyle: {
|
||||||
tableStyle: {
|
'border-bottom': 'none'
|
||||||
'border-bottom': 'none',
|
},
|
||||||
},
|
controlTypeNameMap: {
|
||||||
controlTypeNameMap: {
|
'01': '折返',
|
||||||
'01': '折返',
|
'02': '直通'
|
||||||
'02': '直通',
|
}
|
||||||
}
|
};
|
||||||
}
|
},
|
||||||
},
|
computed: {
|
||||||
computed: {
|
show() {
|
||||||
show() {
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
},
|
||||||
},
|
domIdCancel() {
|
||||||
domIdCancel() {
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
},
|
||||||
},
|
domIdChoose() {
|
||||||
domIdChoose() {
|
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
|
||||||
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
|
},
|
||||||
},
|
domIdConfirm() {
|
||||||
domIdConfirm() {
|
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : '';
|
||||||
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : ''
|
},
|
||||||
},
|
title() {
|
||||||
title() {
|
return '办理引导进路';
|
||||||
return '办理引导进路'
|
},
|
||||||
},
|
commitDisabled() {
|
||||||
commitDisabled() {
|
let disabled = true;
|
||||||
let disabled = true;
|
if (this.row) {
|
||||||
if (this.row) {
|
disabled = !this.row.canSetting;
|
||||||
disabled = !this.row.canSetting
|
}
|
||||||
}
|
return disabled;
|
||||||
return disabled;
|
}
|
||||||
}
|
},
|
||||||
},
|
mounted() {
|
||||||
mounted() {
|
this.$nextTick(() => {
|
||||||
this.$nextTick(() => {
|
this.$store.dispatch('training/tipReload');
|
||||||
this.$store.dispatch('training/tipReload');
|
});
|
||||||
})
|
},
|
||||||
},
|
methods: {
|
||||||
methods: {
|
getProtectedSectionName(row) {
|
||||||
getProtectedSectionName(row) {
|
let name = '';
|
||||||
let name = '';
|
if (row &&
|
||||||
if (row &&
|
|
||||||
row.overlapSectionList &&
|
row.overlapSectionList &&
|
||||||
row.overlapSectionList &&
|
row.overlapSectionList &&
|
||||||
row.overlapSectionList.length > 0) {
|
row.overlapSectionList.length > 0) {
|
||||||
|
|
||||||
let protect = row.overlapSectionList[0];
|
const protect = row.overlapSectionList[0];
|
||||||
name = `${protect.name}`;
|
name = `${protect.name}`;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
name = `${name}(${station.name})`
|
name = `${name}(${station.name})`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
},
|
},
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,而是第一次显示,则需要设置初始值
|
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name
|
this.signalName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tempData = tempData || [];
|
this.tempData = tempData || [];
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.guide();
|
this.guide();
|
||||||
this.$refs.table.setCurrentRow();
|
this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
guide() {
|
guide() {
|
||||||
// 恢复之前选中设备
|
// 恢复之前选中设备
|
||||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||||
this.beforeSectionList.forEach(elem => {
|
this.beforeSectionList.forEach(elem => {
|
||||||
elem.cutOff = false;
|
elem.cutOff = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||||
this.beforeSectionList = [];
|
this.beforeSectionList = [];
|
||||||
},
|
},
|
||||||
clickEvent(row, event, column) {
|
clickEvent(row, event, column) {
|
||||||
this.row = row;
|
this.row = row;
|
||||||
if (row) {
|
if (row) {
|
||||||
// 恢复进路区段的切除状态
|
// 恢复进路区段的切除状态
|
||||||
this.guide();
|
this.guide();
|
||||||
|
row.canSetting = true;
|
||||||
|
// 设置选中区段为切除状态
|
||||||
|
if (row.containSectionList && row.containSectionList.length) {
|
||||||
|
// 设置新选的进路区段为切除状态
|
||||||
|
row.containSectionList.forEach(elem => {
|
||||||
|
elem.cutOff = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (row.canSetting) {
|
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
||||||
// 设置选中区段为切除状态
|
this.beforeSectionList = row.containSectionList || [];
|
||||||
if (row.containSectionList && row.containSectionList.length) {
|
|
||||||
// 设置新选的进路区段为切除状态
|
|
||||||
row.containSectionList.forEach(elem => {
|
|
||||||
elem.cutOff = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
// 设置选中指令
|
||||||
this.beforeSectionList = row.containSectionList || [];
|
const operate = {
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Signal.guide.choose.operation,
|
||||||
|
val: row.code
|
||||||
|
};
|
||||||
|
|
||||||
// 设置选中指令
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
let operate = {
|
if (valid) {
|
||||||
type: MapDeviceType.Signal.type,
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
operation: OperationEvent.Signal.guide.choose.operation,
|
}
|
||||||
val: row.code
|
});
|
||||||
};
|
}
|
||||||
|
},
|
||||||
|
// 办理引导进路
|
||||||
|
commit() {
|
||||||
|
if (this.row && this.row.canSetting) {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Signal.guide.menu.operation,
|
||||||
|
operateCode: OperationEvent.Signal.guide.confirm.operation
|
||||||
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.loading = true;
|
||||||
if (valid) {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.loading = false;
|
||||||
}
|
if (valid) {
|
||||||
});
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
this.$refs.passwordBox.doShow(operate);
|
||||||
}
|
} else {
|
||||||
},
|
this.doClose();
|
||||||
commit() {
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
if (this.row && this.row.canSetting) {
|
}
|
||||||
let operate = {
|
}).catch(() => {
|
||||||
type: MapDeviceType.Signal.type,
|
this.loading = false;
|
||||||
operation: OperationEvent.Signal.guide.menu.operation,
|
this.doClose();
|
||||||
}
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
if (valid) {
|
||||||
this.loading = false;
|
this.doClose();
|
||||||
if (valid) {
|
}
|
||||||
this.$refs.password.doShow(operate);
|
}).catch(() => {
|
||||||
}
|
this.doClose();
|
||||||
}).catch((error) => {
|
});
|
||||||
this.loading = false;
|
}
|
||||||
})
|
}
|
||||||
}
|
};
|
||||||
},
|
|
||||||
confirm() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.guide.confirm.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
}).catch((error) => {
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.route-table-tip {
|
.route-table-tip {
|
||||||
|
@ -1,235 +1,251 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row>
|
class="chengdou-03__systerm route-setting"
|
||||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="6">
|
:visible.sync="show"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
width="460px"
|
||||||
</el-col>
|
:before-close="doClose"
|
||||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
:z-index="2000"
|
||||||
<el-col :span="6">
|
:modal="false"
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
>
|
||||||
</el-row>
|
<el-row>
|
||||||
<div class="route-table-box">
|
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||||
<span class="route-table-tip">进路列表</span>
|
<el-col :span="6">
|
||||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini"
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
@row-click="clickEvent" height="150" highlight-current-row>
|
</el-col>
|
||||||
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px">
|
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||||
</el-table-column>
|
<el-col :span="6">
|
||||||
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px">
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
<template slot-scope="scope">
|
</el-col>
|
||||||
{{ controlTypeNameMap[scope.row.controlType] }}
|
</el-row>
|
||||||
</template>
|
<div class="route-table-box">
|
||||||
</el-table-column>
|
<span class="route-table-tip">进路列表</span>
|
||||||
<el-table-column prop="controlType" label="进路描述" :id="domIdChoose" style="margin-left:30px">
|
<el-table
|
||||||
<template slot-scope="scope">
|
ref="table"
|
||||||
无
|
:data="tempData"
|
||||||
</template>
|
border
|
||||||
</el-table-column>
|
:cell-style="tableStyle"
|
||||||
</el-table>
|
style="width: 99%;"
|
||||||
</div>
|
size="mini"
|
||||||
<el-row justify="center" style="margin-top: 70px">
|
height="150"
|
||||||
<el-col :span="12" :offset="12">
|
highlight-current-row
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled"
|
@row-click="clickEvent"
|
||||||
@click="commit">执行</el-button>
|
>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
|
||||||
</el-col>
|
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
|
||||||
</el-row>
|
<template slot-scope="scope">
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
{{ controlTypeNameMap[scope.row.controlType] }}
|
||||||
</el-dialog>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
|
||||||
|
<template>无</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<el-row justify="center" style="margin-top: 70px">
|
||||||
|
<el-col :span="12" :offset="12">
|
||||||
|
<el-button
|
||||||
|
:id="domIdConfirm"
|
||||||
|
type="primary"
|
||||||
|
:loading="loading"
|
||||||
|
:disabled="commitDisabled"
|
||||||
|
@click="commit"
|
||||||
|
>执行</el-button>
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteSelection',
|
name: 'RouteSelection',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl,
|
NoticeInfo
|
||||||
NoticeInfo
|
},
|
||||||
},
|
data() {
|
||||||
data() {
|
return {
|
||||||
return {
|
tempData: [],
|
||||||
tempData: [],
|
beforeSectionList: [],
|
||||||
beforeSectionList: [],
|
dialogShow: false,
|
||||||
dialogShow: false,
|
loading: false,
|
||||||
loading: false,
|
selected: null,
|
||||||
selected: null,
|
row: null,
|
||||||
row: null,
|
operation: '',
|
||||||
operation: '',
|
display: true,
|
||||||
display: true,
|
stationName: '',
|
||||||
stationName: '',
|
signalName: '',
|
||||||
signalName: '',
|
tableStyle: {
|
||||||
tableStyle: {
|
'border-bottom': 'none'
|
||||||
'border-bottom': 'none',
|
},
|
||||||
},
|
controlTypeNameMap: {
|
||||||
controlTypeNameMap: {
|
'01': '折返',
|
||||||
'01': '折返',
|
'02': '直通'
|
||||||
'02': '直通',
|
}
|
||||||
}
|
};
|
||||||
}
|
},
|
||||||
},
|
computed: {
|
||||||
computed: {
|
show() {
|
||||||
show() {
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
},
|
||||||
},
|
domIdCancel() {
|
||||||
domIdCancel() {
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
},
|
||||||
},
|
domIdChoose() {
|
||||||
domIdChoose() {
|
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
},
|
||||||
},
|
domIdConfirm() {
|
||||||
domIdConfirm() {
|
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''
|
},
|
||||||
},
|
title() {
|
||||||
title() {
|
return '办理进路';
|
||||||
return '办理进路'
|
},
|
||||||
},
|
commitDisabled() {
|
||||||
commitDisabled() {
|
let disabled = true;
|
||||||
let disabled = true;
|
if (this.row) {
|
||||||
if (this.row) {
|
disabled = !this.row.canSetting;
|
||||||
disabled = !this.row.canSetting
|
}
|
||||||
}
|
return disabled;
|
||||||
return disabled;
|
}
|
||||||
}
|
},
|
||||||
},
|
mounted() {
|
||||||
mounted() {
|
this.$nextTick(() => {
|
||||||
this.$nextTick(() => {
|
this.$store.dispatch('training/tipReload');
|
||||||
this.$store.dispatch('training/tipReload');
|
});
|
||||||
})
|
},
|
||||||
},
|
methods: {
|
||||||
methods: {
|
getProtectedSectionName(row) {
|
||||||
getProtectedSectionName(row) {
|
let name = '';
|
||||||
let name = '';
|
if (row &&
|
||||||
if (row &&
|
|
||||||
row.overlapSectionList &&
|
row.overlapSectionList &&
|
||||||
row.overlapSectionList &&
|
row.overlapSectionList &&
|
||||||
row.overlapSectionList.length > 0) {
|
row.overlapSectionList.length > 0) {
|
||||||
|
|
||||||
let protect = row.overlapSectionList[0];
|
const protect = row.overlapSectionList[0];
|
||||||
name = `${protect.name}`;
|
name = `${protect.name}`;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
name = `${name}(${station.name})`
|
name = `${name}(${station.name})`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
},
|
},
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,而是第一次显示,则需要设置初始值
|
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name
|
this.signalName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tempData = tempData || [];
|
this.tempData = tempData || [];
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.restoreBeforeDevices();
|
this.restoreBeforeDevices();
|
||||||
this.$refs.table.setCurrentRow();
|
this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
restoreBeforeDevices() {
|
restoreBeforeDevices() {
|
||||||
// 恢复之前选中设备
|
// 恢复之前选中设备
|
||||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||||
this.beforeSectionList.forEach(elem => {
|
this.beforeSectionList.forEach(elem => {
|
||||||
elem.cutOff = false;
|
elem.cutOff = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||||
this.beforeSectionList = [];
|
this.beforeSectionList = [];
|
||||||
},
|
},
|
||||||
clickEvent(row, event, column) {
|
clickEvent(row, event, column) {
|
||||||
this.row = row;
|
this.row = row;
|
||||||
if (row) {
|
if (row) {
|
||||||
// 恢复进路区段的切除状态
|
// 恢复进路区段的切除状态
|
||||||
this.restoreBeforeDevices();
|
this.restoreBeforeDevices();
|
||||||
|
row.canSetting = true;
|
||||||
|
// 设置选中区段为切除状态
|
||||||
|
if (row.containSectionList && row.containSectionList.length) {
|
||||||
|
// 设置新选的进路区段为切除状态
|
||||||
|
row.containSectionList.forEach(elem => {
|
||||||
|
elem.cutOff = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (row.canSetting) {
|
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
||||||
// 设置选中区段为切除状态
|
this.beforeSectionList = row.containSectionList || [];
|
||||||
if (row.containSectionList && row.containSectionList.length) {
|
|
||||||
// 设置新选的进路区段为切除状态
|
|
||||||
row.containSectionList.forEach(elem => {
|
|
||||||
elem.cutOff = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
// 设置选中指令
|
||||||
this.beforeSectionList = row.containSectionList || [];
|
const operate = {
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||||
|
val: row.code
|
||||||
|
};
|
||||||
|
|
||||||
// 设置选中指令
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
let operate = {
|
if (valid) {
|
||||||
type: MapDeviceType.Signal.type,
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
}
|
||||||
val: row.code
|
});
|
||||||
};
|
}
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
if (this.row && this.row.canSetting) {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.loading = true;
|
||||||
if (valid) {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.loading = false;
|
||||||
}
|
if (valid) {
|
||||||
});
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}).catch(() => {
|
||||||
},
|
this.loading = false;
|
||||||
commit() {
|
this.doClose();
|
||||||
if (this.row && this.row.canSetting) {
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
let operate = {
|
});
|
||||||
send: true,
|
}
|
||||||
type: MapDeviceType.Signal.type,
|
},
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
cancel() {
|
||||||
}
|
const operate = {
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
if (valid) {
|
||||||
this.loading = false;
|
this.doClose();
|
||||||
if (valid) {
|
}
|
||||||
this.doClose();
|
}).catch(() => {
|
||||||
}
|
this.doClose();
|
||||||
}).catch((error) => {
|
});
|
||||||
this.loading = false;
|
}
|
||||||
this.doClose();
|
}
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
};
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.route-table-tip {
|
.route-table-tip {
|
||||||
|
@ -1,435 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog class="chengdou-03__systerm section-cmd-control" :title="title" :visible.sync="show" width="800px"
|
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
|
||||||
<span class="base-label">命令信息</span>
|
|
||||||
<el-form label-position="center" size="mini">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="类型" label-width="40px">
|
|
||||||
<el-select v-model="operation" size="small" disabled>
|
|
||||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
|
||||||
:value="option.code">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="车站名称" label-width="80px">
|
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="区段名称" label-width="100px">
|
|
||||||
<el-input v-model="sectionName" size="small" disabled></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
|
|
||||||
highlight-current-row height="200">
|
|
||||||
<el-table-column prop="order" :width="50" label="序号">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="date" :width="160" label="时间">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="context" :width="180" label="执行过程">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="result" label="执行结果">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<span class="notice">{{message}}</span>
|
|
||||||
<el-row class="button-group">
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
|
||||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
|
||||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
|
||||||
import { now } from '@/utils/date';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SectionCmdControl',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
backOperate: '',
|
|
||||||
selected: '',
|
|
||||||
order: 0,
|
|
||||||
row: null,
|
|
||||||
timer: null,
|
|
||||||
operation: '',
|
|
||||||
cmdDisabled: [true, true, true],
|
|
||||||
stpDisabled: true,
|
|
||||||
tempData: [],
|
|
||||||
message: '',
|
|
||||||
timeCountCommand: -1,
|
|
||||||
timeCountConfirm: -1,
|
|
||||||
stationName: '',
|
|
||||||
sectionName: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
typeList() {
|
|
||||||
return [
|
|
||||||
{ code: OperationEvent.Section.unlock.menu.operation, name: '区段解封' },
|
|
||||||
{ code: OperationEvent.Section.fault.menu.operation, name: '区段故障解锁' },
|
|
||||||
{ code: OperationEvent.Section.axlePreReset.menu.operation, name: '区段计轴预复位' },
|
|
||||||
]
|
|
||||||
},
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCommand() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
return OperationEvent.Section.unlock.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
return OperationEvent.Section.fault.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
return OperationEvent.Section.axlePreReset.order.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdConfirm1() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
return OperationEvent.Section.unlock.confirm1.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
return OperationEvent.Section.fault.confirm1.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
return OperationEvent.Section.axlePreReset.confirm1.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdConfirm2() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
return OperationEvent.Section.unlock.confirm2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
return OperationEvent.Section.fault.confirm2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
return OperationEvent.Section.axlePreReset.confirm2.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdStop() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
return OperationEvent.Section.unlock.stop.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
return OperationEvent.Section.fault.stop.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
return OperationEvent.Section.axlePreReset.stop.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdClose() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
return OperationEvent.Command.close.menu.domId;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
return '区段解封';
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
return '区段故障解锁';
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
return '区段计轴预复位';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
cmdDisabled: {
|
|
||||||
handler(val, oldVal) {
|
|
||||||
this.stpDisabled = true;
|
|
||||||
val.forEach((elem, index) => {
|
|
||||||
// 在确定1之前的操作才可以终止
|
|
||||||
if (elem == false && 1 <= index && index <= 2) {
|
|
||||||
this.stpDisabled = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (!this.$store.state.menuOperation.break) {
|
|
||||||
if (this.timeCountCommand > 0) {
|
|
||||||
this.timeCountCommand--;
|
|
||||||
} else if (this.timeCountCommand == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
}
|
|
||||||
if (this.timeCountConfirm > 0) {
|
|
||||||
this.timeCountConfirm--;
|
|
||||||
} else if (this.timeCountConfirm == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.timer = null;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.sectionName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
|
||||||
if (selected.type === '02') {
|
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
|
||||||
if (section) {
|
|
||||||
this.sectionName += section.name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.sectionName += selected.name
|
|
||||||
|
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.order = 0;
|
|
||||||
this.operation = operate.operation || '';
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.tempData = [];
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.cmdDisabled = [false, true, true];
|
|
||||||
}
|
|
||||||
this.stpDisabled = true;
|
|
||||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
command() {
|
|
||||||
if (this.operation == OperationEvent.Section.fault.menu.operation ||
|
|
||||||
this.operation == OperationEvent.Section.unlock.menu.operation ||
|
|
||||||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|
|
||||||
this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 第一步不带弹框处理*/
|
|
||||||
this.commandNoPopUp();
|
|
||||||
} else {
|
|
||||||
/** 第一步带弹框处理*/
|
|
||||||
this.commandHasPopUp();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
commandHasPopUp() {
|
|
||||||
},
|
|
||||||
commandNoPopUp() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Section.type
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
operate.operation = OperationEvent.Section.unlock.order.operation
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Section.fault.order.operation
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
operate.operation = OperationEvent.Section.axlePreReset.order.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
confirm1() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Section.fault.confirm1.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
operate.operation = OperationEvent.Section.axlePreReset.confirm1.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = 10;
|
|
||||||
this.setButtonEnable({ step: 2 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
confirm2() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Section.type
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
|
|
||||||
}
|
|
||||||
this.setMessage('');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
stop() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
operate.operation = OperationEvent.Section.unlock.stop.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Section.fault.stop.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
operate.operation = OperationEvent.Section.axlePreReset.stop.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getOperate(operate) {
|
|
||||||
/** 弹框返回值处理*/
|
|
||||||
},
|
|
||||||
setButtonEnable(param) {
|
|
||||||
this.cmdDisabled = [true, true, true];
|
|
||||||
if (param && param.step >= 0) {
|
|
||||||
this.cmdDisabled[param.step] = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setMessage(message) {
|
|
||||||
this.message = message;
|
|
||||||
},
|
|
||||||
writeRecord(param) {
|
|
||||||
this.tempData.push(param);
|
|
||||||
},
|
|
||||||
editRecord(param) {
|
|
||||||
this.tempData.forEach(elem => {
|
|
||||||
if (elem.order == param.order) {
|
|
||||||
for (var prop in param) {
|
|
||||||
elem[prop] = param[prop];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -1,215 +1,230 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm section-control" :title="title" :visible.sync="show" width="440px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row>
|
class="chengdou-03__systerm section-control"
|
||||||
<el-col :span="3"><span>车站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="6">
|
:visible.sync="show"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
width="440px"
|
||||||
</el-col>
|
:before-close="doClose"
|
||||||
<el-col :span="3" :offset="2"><span>区段</span></el-col>
|
:z-index="2000"
|
||||||
<el-col :span="6">
|
:modal="false"
|
||||||
<el-input v-model="sectionName" size="small" disabled></el-input>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
>
|
||||||
</el-row>
|
<el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-col :span="3"><span>车站</span></el-col>
|
||||||
<el-col :span="11" :offset="13">
|
<el-col :span="6">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="3" :offset="2"><span>区段</span></el-col>
|
||||||
</el-row>
|
<el-col :span="6">
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<el-input v-model="sectionName" size="small" disabled />
|
||||||
</el-dialog>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="11" :offset="13">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
<password-box ref="passwordBox" @checkOver="doClose" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import PasswordBox from './childDialog/passwordInputBox';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionControl',
|
name: 'SectionControl',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo,
|
||||||
},
|
PasswordBox
|
||||||
data() {
|
},
|
||||||
return {
|
data() {
|
||||||
dialogShow: false,
|
return {
|
||||||
loading: false,
|
dialogShow: false,
|
||||||
selected: null,
|
loading: false,
|
||||||
operation: '',
|
selected: null,
|
||||||
stationName: '',
|
operation: '',
|
||||||
sectionName: '',
|
stationName: '',
|
||||||
}
|
sectionName: ''
|
||||||
},
|
};
|
||||||
computed: {
|
},
|
||||||
show() {
|
computed: {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
show() {
|
||||||
},
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
domIdCancel() {
|
},
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
domIdCancel() {
|
||||||
},
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
domIdConfirm() {
|
},
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
domIdConfirm() {
|
||||||
},
|
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||||
title() {
|
},
|
||||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
title() {
|
||||||
return '区段封锁';
|
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
return '区段封锁';
|
||||||
return '区段控制';
|
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
return '区段控制';
|
||||||
return '区段控制';
|
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
return '区段控制';
|
||||||
return '区故解'
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
}
|
return '区故解';
|
||||||
}
|
}
|
||||||
},
|
return '';
|
||||||
mounted() {
|
}
|
||||||
this.$nextTick(() => {
|
},
|
||||||
this.$store.dispatch('training/tipReload');
|
mounted() {
|
||||||
})
|
this.$nextTick(() => {
|
||||||
},
|
this.$store.dispatch('training/tipReload');
|
||||||
methods: {
|
});
|
||||||
doShow(operate, selected) {
|
},
|
||||||
this.selected = selected;
|
methods: {
|
||||||
if (!this.dialogShow) {
|
doShow(operate, selected) {
|
||||||
this.sectionName = '';
|
this.selected = selected;
|
||||||
this.stationName = '';
|
if (!this.dialogShow) {
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
this.sectionName = '';
|
||||||
if (selected.type === '02') {
|
this.stationName = '';
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
if (section) {
|
if (selected.type === '02') {
|
||||||
this.sectionName += section.name
|
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||||
}
|
if (section) {
|
||||||
}
|
this.sectionName += section.name;
|
||||||
this.sectionName += selected.name
|
}
|
||||||
|
}
|
||||||
|
this.sectionName += selected.name;
|
||||||
|
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.operation = operate.operation || '';
|
this.operation = operate.operation || '';
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||||
/** 区段封锁*/
|
/** 区段封锁*/
|
||||||
this.lock();
|
this.lock();
|
||||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||||
/** 轨道区段切除*/
|
/** 轨道区段切除*/
|
||||||
this.split();
|
this.split();
|
||||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||||
/** 轨道区段激活*/
|
/** 轨道区段激活*/
|
||||||
this.active();
|
this.active();
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
/** 区故解*/
|
/** 区故解*/
|
||||||
this.fault();
|
this.fault();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//道岔单锁
|
// 道岔单锁
|
||||||
lock() {
|
lock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.lock.menu.operation,
|
operation: OperationEvent.Section.lock.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//轨道区段切除
|
// 轨道区段切除
|
||||||
split() {
|
split() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.split.menu.operation,
|
operation: OperationEvent.Section.split.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//轨道区段激活
|
// 轨道区段激活
|
||||||
active() {
|
active() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.active.menu.operation,
|
operation: OperationEvent.Section.active.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//区故解
|
// 区故解
|
||||||
fault() {
|
fault() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
// send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.fault.menu.operation,
|
operation: OperationEvent.Section.fault.menu.operation,
|
||||||
}
|
operateCode: OperationEvent.Section.fault.confirm.operation
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
this.$refs.passwordBox.doShow(operate);
|
||||||
}).catch(error => {
|
}
|
||||||
this.loading = false;
|
}).catch(() => {
|
||||||
this.doClose();
|
this.loading = false;
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.doClose();
|
||||||
});
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
},
|
});
|
||||||
cancel() {
|
},
|
||||||
let operate = {
|
cancel() {
|
||||||
type: MapDeviceType.Section.type,
|
const operate = {
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
type: MapDeviceType.Section.type,
|
||||||
}
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,783 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog class="chengdou-03__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px"
|
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
|
||||||
<div style="padding: 10px 20px 2px; margin-bottom: 25px; border: 1px solid lightgray;">
|
|
||||||
<span class="base-label">会话管理</span>
|
|
||||||
<el-form label-position="center" size="mini" style="margin-top: -15px;">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="3">
|
|
||||||
<el-button type="primary" style="width: 110px; line-height: 26px;" @click="commit">查询会话状态
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="1">
|
|
||||||
<el-input v-model="dialogueStatus" size="mini" disabled></el-input>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3" :offset="1">
|
|
||||||
<el-button type="primary" style="width: 110px; line-height: 26px;" :id="openConversationId"
|
|
||||||
@click="openMessage('open')" :disabled="!isOpenMessage">打开会话
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="3" :offset="1">
|
|
||||||
<el-button type="primary" style="width: 110px; line-height: 26px;" :id="closeConversationId"
|
|
||||||
@click="openMessage('close')" :disabled="isOpenMessage">关闭会话
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<div style="margin-bottom: 15px;">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="15">
|
|
||||||
<div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;">
|
|
||||||
<div style="float: left; width: 20%; padding: 25px 8px 0;">
|
|
||||||
<div style="margin-bottom: 5px;">限速数值</div>
|
|
||||||
<el-select v-model="firstScetion.speed" size="mini" :disabled="spdDisabled"
|
|
||||||
placeholder="" :id="firstLimitSpeedId"
|
|
||||||
@change="changeSelect(firstScetion.speed, '1')">
|
|
||||||
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;">
|
|
||||||
<span class="base-label" style="left: 0px;">起点</span>
|
|
||||||
<div style="margin-bottom: 5px;">区间选择</div>
|
|
||||||
<el-select v-model="firstScetion.startSection" size="mini" :disabled="spdDisabled"
|
|
||||||
placeholder="" @change="changeSelect(firstScetion.startSection, '2')"
|
|
||||||
:id="firstStartSectionId">
|
|
||||||
<el-option v-for="item in regionList" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value"></el-option>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
<div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div>
|
|
||||||
<el-input v-model="firstScetion.startValue" :min="0" size="mini" :disabled="spdDisabled"
|
|
||||||
:id="firstStartvalueId" @blur="changeSelect(firstScetion.startValue, '3')">
|
|
||||||
</el-input>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;">
|
|
||||||
<span class="base-label" style="left: 0px;">终点</span>
|
|
||||||
<div style="margin-bottom: 5px;">区间选择</div>
|
|
||||||
<el-select v-model="firstScetion.endSection" size="mini" :disabled="spdDisabled"
|
|
||||||
placeholder="" @change="changeSelect(firstScetion.endSection, '4')"
|
|
||||||
:id="firstEndSectionId">
|
|
||||||
<el-option v-for="item in regionList" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value"></el-option>
|
|
||||||
</el-select>
|
|
||||||
<div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div>
|
|
||||||
<el-input v-model="firstScetion.endValue" :min="0" size="mini" :disabled="spdDisabled"
|
|
||||||
:id="firstEndvalueId" @blur="changeSelect(firstScetion.endValue, '5')">
|
|
||||||
</el-input>
|
|
||||||
</div>
|
|
||||||
<div style="float: left; width: 20%; padding:8px;">
|
|
||||||
<el-button type="primary" style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
|
|
||||||
@click="CheckEquipment" :disabled="spdDisabled" :id="firstCheckId">查看设备
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" style="width: 90px; margin: 0; line-height: 26px;"
|
|
||||||
@click="Confirmed" :disabled="firstDisabled" :id="firstComfirmId">首次确认
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="9">
|
|
||||||
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
|
|
||||||
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表:</span>
|
|
||||||
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
|
|
||||||
<div v-for="item in equipmentText">
|
|
||||||
{{item.name}}: {{item.text}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<div style="margin-bottom: 15px;">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="15">
|
|
||||||
<div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;">
|
|
||||||
<div style="float: left; width: 20%; padding: 25px 8px 0;">
|
|
||||||
<div style="margin-bottom: 5px;">限速数值</div>
|
|
||||||
<el-select v-model="secondScetion.speed" size="mini" :disabled="stpDisabled"
|
|
||||||
placeholder="" @change="changeSelect(secondScetion.speed, '6')"
|
|
||||||
:id="secondLimitSpeedId">
|
|
||||||
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;">
|
|
||||||
<span class="base-label" style="left: 0px;">起点</span>
|
|
||||||
<div style="margin-bottom: 5px;">区间选择</div>
|
|
||||||
<el-select v-model="secondScetion.startSection" size="mini" :disabled="stpDisabled"
|
|
||||||
placeholder="" @change="changeSelect(secondScetion.startSection, '7')"
|
|
||||||
:id="secondStartSectionId">
|
|
||||||
<el-option v-for="item in regionList" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value"></el-option>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
<div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div>
|
|
||||||
<el-select v-model="secondScetion.startValue" size="mini" :disabled="stpDisabled"
|
|
||||||
placeholder="" @change="changeSelect(secondScetion.startValue, '8')"
|
|
||||||
:id="secondStartvalueId">
|
|
||||||
<el-option v-for="item in startSectionList" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value"></el-option>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;">
|
|
||||||
<span class="base-label" style="left: 0px;">终点</span>
|
|
||||||
<div style="margin-bottom: 5px;">区间选择</div>
|
|
||||||
<el-select v-model="secondScetion.endSection" size="mini" :disabled="stpDisabled"
|
|
||||||
placeholder="" @change="changeSelect(secondScetion.endSection, '9')"
|
|
||||||
:id="secondEndSectionId">
|
|
||||||
<el-option v-for="item in regionList" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value"></el-option>
|
|
||||||
</el-select>
|
|
||||||
<div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div>
|
|
||||||
<el-select v-model="secondScetion.endValue" size="mini" :disabled="stpDisabled"
|
|
||||||
placeholder="" @change="changeSelect(secondScetion.endValue, '10')"
|
|
||||||
:id="secondEndvalueId">
|
|
||||||
<el-option v-for="item in endSectionList" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value"></el-option>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div style="float: left; width: 20%; padding:8px;">
|
|
||||||
<el-button type="primary" style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
|
|
||||||
@click="CheckSecondEquipment" :id="secondCheckId">查看设备
|
|
||||||
</el-button>
|
|
||||||
<el-button type="primary" style="width: 90px; margin: 0; line-height: 26px;"
|
|
||||||
@click="confirm" :disabled="secondDisabled" :id="secondComfirmId">确认发送
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="9">
|
|
||||||
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
|
|
||||||
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表:</span>
|
|
||||||
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
|
|
||||||
<div v-for="item in equipmentText1">
|
|
||||||
{{item.name}}: {{item.text}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="5">
|
|
||||||
<div style="float: left; height: 30px; line-height: 30px; margin-right:10px;">操作倒计时</div>
|
|
||||||
<div style="border: 2px inset #E9E9E9; height: 30px; width: 45px;float: left;">
|
|
||||||
{{timeCountConfirm == -1 ? '' : timeCountConfirm}}</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="19">
|
|
||||||
<div style="float: left; height: 30px; line-height: 30px; margin-right:10px;">状态</div>
|
|
||||||
<div style="border: 2px inset #E9E9E9; height: 30px; width: calc(100% - 38px);float: left;">
|
|
||||||
{{messageStatus}}</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="button-group">
|
|
||||||
<el-button :id="domIdClose" style="margin: 0px auto; display: block;" @click="close">关闭</el-button>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
<confirm-tip ref='ConfirmTip' @close="closeMessage"></confirm-tip>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
|
||||||
import { now } from '@/utils/date';
|
|
||||||
import ConfirmTip from './childDialog/confirmTip';
|
|
||||||
import { sendCommand } from '@/api/jmap/training';
|
|
||||||
import router from '@/router';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SectionCmdSpeed',
|
|
||||||
components: {
|
|
||||||
ConfirmTip
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
selected: '',
|
|
||||||
order: 0,
|
|
||||||
code: '',
|
|
||||||
row: null,
|
|
||||||
timer: null,
|
|
||||||
type: '',
|
|
||||||
operation: '',
|
|
||||||
spdDisabled: true,
|
|
||||||
firstDisabled: true,
|
|
||||||
secondDisabled: true,
|
|
||||||
stpDisabled: true,
|
|
||||||
timeCountCommand: -1,
|
|
||||||
timeCountConfirm: -1,
|
|
||||||
equipmentText: [],
|
|
||||||
equipmentText1: [],
|
|
||||||
maxSpeed: 85,
|
|
||||||
speedSpace: 5,
|
|
||||||
stationName: '111',
|
|
||||||
name: '',
|
|
||||||
speed: '',
|
|
||||||
regionList: [],
|
|
||||||
startSectionList: [],
|
|
||||||
endSectionList: [],
|
|
||||||
sectionList: [
|
|
||||||
{
|
|
||||||
value: 'up',
|
|
||||||
name: '上行'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'down',
|
|
||||||
name: '下行'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
messageStatus: '请先打开会话!',
|
|
||||||
dialogueStatus: '会话已关闭',
|
|
||||||
isOpenMessage: true,
|
|
||||||
codeText: '',
|
|
||||||
firstScetion: {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: '',
|
|
||||||
},
|
|
||||||
firstShow: false,
|
|
||||||
copyScetion: {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: '',
|
|
||||||
},
|
|
||||||
secondScetion: {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: '',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
speedList() {
|
|
||||||
let list = [{ value: -1, name: '无限速' }];
|
|
||||||
for (var i = 5; i * this.speedSpace <= this.maxSpeed; i++) {
|
|
||||||
list.push({ value: String(i * this.speedSpace), name: String(i * this.speedSpace) });
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
return '公里标输入临时限速';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
openConversationId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.openConversation.domId : '';
|
|
||||||
},
|
|
||||||
closeConversationId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.closeConversation.domId : '';
|
|
||||||
},
|
|
||||||
firstLimitSpeedId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstLimitSpeed.domId : '';
|
|
||||||
},
|
|
||||||
firstStartSectionId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstStartSection.domId : '';
|
|
||||||
},
|
|
||||||
firstStartvalueId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstStartvalue.domId : '';
|
|
||||||
},
|
|
||||||
firstEndSectionId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstEndSection.domId : '';
|
|
||||||
},
|
|
||||||
firstEndvalueId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstEndvalue.domId : '';
|
|
||||||
},
|
|
||||||
firstCheckId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstCheck.domId : '';
|
|
||||||
},
|
|
||||||
firstComfirmId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstComfirm.domId : '';
|
|
||||||
},
|
|
||||||
secondLimitSpeedId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondLimitSpeed.domId : '';
|
|
||||||
},
|
|
||||||
secondStartSectionId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondStartSection.domId : '';
|
|
||||||
},
|
|
||||||
secondStartvalueId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondStartvalue.domId : '';
|
|
||||||
},
|
|
||||||
secondEndSectionId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondEndSection.domId : '';
|
|
||||||
},
|
|
||||||
secondEndvalueId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondEndvalue.domId : '';
|
|
||||||
},
|
|
||||||
secondCheckId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondCheck.domId : '';
|
|
||||||
},
|
|
||||||
secondComfirmId() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.confirmLimit.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdClose() {
|
|
||||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.domIdClose.domId : '';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'timeCountCommand': function (val) {
|
|
||||||
if (val <= 0) {
|
|
||||||
this.dialogueStatus = `会话已关闭`;
|
|
||||||
// this.openMessage('close');
|
|
||||||
this.isOpenMessage = true;
|
|
||||||
this.spdDisabled = true;
|
|
||||||
this.firstDisabled = true;
|
|
||||||
this.secondDisabled = true;
|
|
||||||
this.messageStatus = '请先打开会话!';
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
if (this.speed) {
|
|
||||||
this.messageStatus = '会话关闭成功';
|
|
||||||
}
|
|
||||||
this.equipmentText = [];
|
|
||||||
this.equipmentText1 = [];
|
|
||||||
this.firstScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: '',
|
|
||||||
};
|
|
||||||
this.secondScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: '',
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
this.dialogueStatus = `会话打开,剩余时间${val}秒`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
firstScetion: {
|
|
||||||
handler: function (val) {
|
|
||||||
if (val.speed && val.startSection && val.endSection && val.startValue != '' && val.endValue != '') {
|
|
||||||
this.firstShow = true;
|
|
||||||
} else {
|
|
||||||
this.firstShow = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
this.regionList = this.$ConstSelect.RegionTypeList;
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (this.timeCountCommand > 0) {
|
|
||||||
this.timeCountCommand--;
|
|
||||||
} else if (this.timeCountCommand == 0) { // 关闭会话
|
|
||||||
this.isOpenMessage = true;
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
}
|
|
||||||
if (this.timeCountConfirm > 0) {
|
|
||||||
this.timeCountConfirm--;
|
|
||||||
} else if (this.timeCountConfirm == 0) { // 关闭会话
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.timer = null;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected, tempData) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.name = '';
|
|
||||||
if (selected) {
|
|
||||||
this.timeCountCommand = -1; // 倒计时
|
|
||||||
this.order = 0;
|
|
||||||
this.type = operate.type;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.code = operate.code;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.secondScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: '',
|
|
||||||
}
|
|
||||||
this.firstScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: '',
|
|
||||||
}
|
|
||||||
this.speed = 0;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
// mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
openMessage(state) {
|
|
||||||
if (state == 'open') { // 打开会话
|
|
||||||
let operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.openConversation.operation,
|
|
||||||
}
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.isOpenMessage = false;
|
|
||||||
this.spdDisabled = false
|
|
||||||
this.messageStatus = '会话打开成功';
|
|
||||||
this.speed = 1;
|
|
||||||
this.timeCountCommand = 120;
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
} else { // 关闭会话
|
|
||||||
let operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.closeConversation.operation,
|
|
||||||
}
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.isOpenMessage = true;
|
|
||||||
this.spdDisabled = true;
|
|
||||||
this.firstDisabled = true;
|
|
||||||
this.secondDisabled = true;
|
|
||||||
this.messageStatus = '请先打开会话!';
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.startSectionList = [];
|
|
||||||
this.endSectionList = [];
|
|
||||||
if (this.speed) {
|
|
||||||
this.messageStatus = '会话关闭成功';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
CheckEquipment() { // 第一次确认设备
|
|
||||||
if (this.firstShow) {
|
|
||||||
let value = `${this.firstScetion.speed}::${this.firstScetion.startSection}::${this.firstScetion.startValue}::${this.firstScetion.endSection}::${this.firstScetion.endValue}`;
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
val: value,
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.firstCheck.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.firstDisabled = false; // 运行首次发送
|
|
||||||
this.getEquipmentList(response.data);
|
|
||||||
this.copyScetion = {
|
|
||||||
speed: this.firstScetion.speed,
|
|
||||||
startSection: this.firstScetion.startSection,
|
|
||||||
endSection: this.firstScetion.endSection,
|
|
||||||
startValue: this.firstScetion.startValue,
|
|
||||||
endValue: this.firstScetion.endValue,
|
|
||||||
}
|
|
||||||
this.startSectionList = [];
|
|
||||||
this.endSectionList = [];
|
|
||||||
for (let index = 0; index < 4; index++) {
|
|
||||||
let starData = {
|
|
||||||
value: Number(this.firstScetion.startValue) + index,
|
|
||||||
label: Number(this.firstScetion.startValue) + index,
|
|
||||||
}
|
|
||||||
this.startSectionList.push(starData);
|
|
||||||
let endData = {
|
|
||||||
value: Number(this.firstScetion.endValue) + index,
|
|
||||||
label: Number(this.firstScetion.endValue) + index,
|
|
||||||
}
|
|
||||||
this.endSectionList.push(endData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getEquipmentList(list) {
|
|
||||||
this.equipmentText = [];
|
|
||||||
let stationStand = [];
|
|
||||||
let stationText = [];
|
|
||||||
this.codeText = '';
|
|
||||||
let arr = [];
|
|
||||||
list.forEach(ele => {
|
|
||||||
if (stationStand.indexOf(ele.stationCode) == -1) {
|
|
||||||
stationStand.push(ele.stationCode);
|
|
||||||
let text = this.getTextName(ele);
|
|
||||||
stationText.push(text)
|
|
||||||
} else {
|
|
||||||
let index = stationStand.indexOf(ele.stationCode)
|
|
||||||
let text = this.getTextName(ele);
|
|
||||||
stationText[index] += text;
|
|
||||||
}
|
|
||||||
arr.push(ele.code);
|
|
||||||
});
|
|
||||||
this.codeText = arr.join('::');
|
|
||||||
stationStand.forEach((item, index) => {
|
|
||||||
let stationStandName = this.$store.getters['map/getDeviceByCode'](item);
|
|
||||||
let data = {
|
|
||||||
text: stationText[index],
|
|
||||||
name: stationStandName.name,
|
|
||||||
};
|
|
||||||
this.equipmentText.push(data);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getTextName(ele) {
|
|
||||||
if (ele.switchSectionType) {
|
|
||||||
switch (ele.switchSectionType) {
|
|
||||||
case '01': {
|
|
||||||
return `${ele.name}(主), `;
|
|
||||||
} break;
|
|
||||||
case '02': {
|
|
||||||
return `${ele.name}(定), `;
|
|
||||||
} break;
|
|
||||||
case '03': {
|
|
||||||
return `${ele.name}(反), `;
|
|
||||||
} break;
|
|
||||||
}
|
|
||||||
} else if (ele.parentName) {
|
|
||||||
return `${ele.parentName}-${ele.name}, `;
|
|
||||||
} else {
|
|
||||||
return `${ele.name}, `;
|
|
||||||
};
|
|
||||||
},
|
|
||||||
CheckSecondEquipment() { // 二次查看设备
|
|
||||||
if (this.secondScetion.speed == this.copyScetion.speed && this.secondScetion.startSection == this.copyScetion.startSection && this.secondScetion.endSection == this.copyScetion.endSection && this.secondScetion.startValue == this.copyScetion.startValue && this.secondScetion.endValue == this.copyScetion.endValue) {
|
|
||||||
let operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.secondCheck.operation,
|
|
||||||
}
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.equipmentText1 = this.equipmentText;
|
|
||||||
this.secondDisabled = false; // 第二次确认发送
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.firstScetion = {
|
|
||||||
speed: this.copyScetion.speed,
|
|
||||||
startSection: this.copyScetion.startSection,
|
|
||||||
endSection: this.copyScetion.endSection,
|
|
||||||
startValue: this.copyScetion.startValue,
|
|
||||||
endValue: this.copyScetion.endValue,
|
|
||||||
}
|
|
||||||
this.firstDisabled = true;
|
|
||||||
this.secondScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '',
|
|
||||||
endValue: ''
|
|
||||||
};
|
|
||||||
this.spdDisabled = false;
|
|
||||||
this.equipmentText = [];
|
|
||||||
this.stpDisabled = true;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
let operate = {
|
|
||||||
message: `两次值不一致`
|
|
||||||
}
|
|
||||||
this.$refs.ConfirmTip.doShow(operate);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
changeSelect(value, val) {
|
|
||||||
let operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: '',
|
|
||||||
val: value
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (val) {
|
|
||||||
case '1': {
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstLimitSpeed.operation;
|
|
||||||
} break;
|
|
||||||
case '2': {
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartSection.operation;
|
|
||||||
} break;
|
|
||||||
case '3': {
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartvalue.operation;
|
|
||||||
} break;
|
|
||||||
case '4': {
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndSection.operation;
|
|
||||||
} break;
|
|
||||||
case '5': {
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndvalue.operation;
|
|
||||||
} break;
|
|
||||||
case '6': {
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondLimitSpeed.operation;
|
|
||||||
} break;
|
|
||||||
case '7': {
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartSection.operation;
|
|
||||||
} break;
|
|
||||||
case '8': {
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartvalue.operation;
|
|
||||||
} break;
|
|
||||||
case '9': {
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndSection.operation;
|
|
||||||
} break;
|
|
||||||
case '10': {
|
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndvalue.operation;
|
|
||||||
} break;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
Confirmed() { // 第一次确认
|
|
||||||
let operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.firstComfirm.operation,
|
|
||||||
}
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.spdDisabled = true;
|
|
||||||
this.stpDisabled = false;
|
|
||||||
this.firstDisabled = true;
|
|
||||||
this.messageStatus = '收到Confirm request消息';
|
|
||||||
this.timeCountConfirm = 60; // 倒计时
|
|
||||||
this.firstScetion = {
|
|
||||||
speed: '',
|
|
||||||
startSection: '',
|
|
||||||
endSection: '',
|
|
||||||
startValue: '***',
|
|
||||||
endValue: '***',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
confirm() { // 第二次确认
|
|
||||||
// let value = `${this.secondScetion.speed}::${this.codeText}`;
|
|
||||||
let value = `${this.secondScetion.speed}::${this.secondScetion.startSection}::${this.secondScetion.startValue}::${this.secondScetion.endSection}::${this.secondScetion.endValue}`;
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
val: value,
|
|
||||||
type: this.type,
|
|
||||||
code: this.code,
|
|
||||||
operation: OperationEvent.Section.confirmLimit.menu.operation,
|
|
||||||
}
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
let group = router.currentRoute.query.group;
|
|
||||||
let command = this.handleMenuConfirmLimit(operate);
|
|
||||||
sendCommand(group, command).then((response) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.stpDisabled = true;
|
|
||||||
this.messageStatus = '临时限速设置成功';
|
|
||||||
}).catch(error => {
|
|
||||||
let operate = {
|
|
||||||
message: error.message
|
|
||||||
}
|
|
||||||
this.$refs.ConfirmTip.doShow(operate);
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
let operate = {
|
|
||||||
message: error.message
|
|
||||||
}
|
|
||||||
this.$refs.ConfirmTip.doShow(operate);
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
close() { // 设置成功 关闭弹窗
|
|
||||||
let operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.domIdClose.operation,
|
|
||||||
}
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
if (this.isOpenMessage) {
|
|
||||||
this.doClose();
|
|
||||||
} else {
|
|
||||||
let operate = {
|
|
||||||
message: `是否关闭会话,并关闭窗口`,
|
|
||||||
confirmId: OperationEvent.Section.setLimitSpeed.close.domId,
|
|
||||||
}
|
|
||||||
this.$refs.ConfirmTip.doShow(operate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
|
|
||||||
},
|
|
||||||
closeMessage() {
|
|
||||||
let operate = {
|
|
||||||
type: this.type,
|
|
||||||
operation: OperationEvent.Section.setLimitSpeed.close.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.ConfirmTip.doClose();
|
|
||||||
this.isOpenMessage = true;
|
|
||||||
this.spdDisabled = true;
|
|
||||||
this.firstDisabled = true;
|
|
||||||
this.secondDisabled = true;
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.startSectionList = [];
|
|
||||||
this.endSectionList = [];
|
|
||||||
this.doClose();
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 处理右键菜单 确认临时限速
|
|
||||||
handleMenuConfirmLimit(operate) {
|
|
||||||
return {
|
|
||||||
type: operate.type,
|
|
||||||
code: operate.code,
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Section.confirmLimit.event,
|
|
||||||
val: operate.val
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
File diff suppressed because it is too large
Load Diff
@ -1,416 +1,360 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm switch-control" :title="title" :visible.sync="show" width="300px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row class="header">
|
class="chengdou-03__systerm switch-control"
|
||||||
<el-col :span="11"><span>车站名称</span></el-col>
|
:title="title"
|
||||||
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
|
:visible.sync="show"
|
||||||
</el-row>
|
width="300px"
|
||||||
<el-row>
|
:before-close="doClose"
|
||||||
<el-col :span="11">
|
:z-index="2000"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
:modal="false"
|
||||||
</el-col>
|
:close-on-click-modal="false"
|
||||||
<el-col :span="11" :offset="2">
|
>
|
||||||
<el-input v-model="switchName" size="small" disabled></el-input>
|
<el-row class="header">
|
||||||
</el-col>
|
<el-col :span="11"><span>车站名称</span></el-col>
|
||||||
</el-row>
|
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
|
||||||
<el-row justify="center" class="button-group">
|
</el-row>
|
||||||
<el-col :span="10" :offset="2">
|
<el-row>
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
<el-col :span="11">
|
||||||
</el-col>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
<el-col :span="8" :offset="4">
|
</el-col>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-col :span="11" :offset="2">
|
||||||
</el-col>
|
<el-input v-model="switchName" size="small" disabled />
|
||||||
</el-row>
|
</el-col>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
</el-row>
|
||||||
<password-box ref="passwordBox" @checkOver="toSwitchControl"></password-box>
|
<el-row justify="center" class="button-group">
|
||||||
</el-dialog>
|
<el-col :span="10" :offset="2">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="4">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
<password-box ref="passwordBox" @checkOver="doClose" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import PasswordBox from './childDialog/passwordInputBox';
|
import PasswordBox from './childDialog/passwordInputBox';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchControl',
|
name: 'SwitchControl',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
PasswordBox,
|
PasswordBox
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
selected: null,
|
selected: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
stationName: '',
|
stationName: '',
|
||||||
switchName: '',
|
switchName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||||
return '道岔单锁';
|
return '道岔单锁';
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||||
return '道岔封锁';
|
return '道岔封锁';
|
||||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
||||||
return '道岔转动';
|
return '道岔转动';
|
||||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
||||||
return '道岔强扳';
|
return '道岔强扳';
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||||
return '区段切除';
|
return '区段切除';
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
||||||
return '区段激活';
|
return '区段激活';
|
||||||
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
||||||
return '单操到定位';
|
return '单操到定位';
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||||
return '单操到反位';
|
return '单操到反位';
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||||
return '区故解';
|
return '区故解';
|
||||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
return '道岔解锁';
|
return '道岔解锁';
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
return '道岔解封';
|
return '道岔解封';
|
||||||
}
|
}
|
||||||
}
|
return '';
|
||||||
},
|
}
|
||||||
mounted() {
|
},
|
||||||
this.$nextTick(() => {
|
mounted() {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$nextTick(() => {
|
||||||
})
|
this.$store.dispatch('training/tipReload');
|
||||||
},
|
});
|
||||||
methods: {
|
},
|
||||||
doShow(operate, selected) {
|
methods: {
|
||||||
this.selected = selected;
|
doShow(operate, selected) {
|
||||||
if (!this.dialogShow) {
|
this.selected = selected;
|
||||||
this.switchName = '';
|
if (!this.dialogShow) {
|
||||||
this.stationName = '';
|
this.switchName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
this.stationName = '';
|
||||||
this.switchName = selected.name
|
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
this.switchName = selected.name;
|
||||||
if (station) {
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
this.stationName = station.name;
|
if (station) {
|
||||||
}
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
this.operation = operate.operation;
|
}
|
||||||
}
|
this.operation = operate.operation;
|
||||||
this.dialogShow = true;
|
}
|
||||||
this.$nextTick(function () {
|
this.dialogShow = true;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$nextTick(function () {
|
||||||
});
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
});
|
||||||
doClose() {
|
},
|
||||||
this.loading = false;
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.loading = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.dialogShow = false;
|
||||||
mouseCancelState(this.selected);
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
mouseCancelState(this.selected);
|
||||||
commit() {
|
},
|
||||||
//debugger;
|
commit() {
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
// debugger;
|
||||||
/** 道岔单锁*/
|
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||||
this.lock();
|
/** 道岔单锁*/
|
||||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
this.lock();
|
||||||
/* 道岔解锁*/
|
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
this.unlock();
|
/* 道岔解锁*/
|
||||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
this.unlock();
|
||||||
/** 道岔转动*/
|
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
||||||
this.turnout(this.operation);
|
/** 道岔强扳*/
|
||||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
this.turnoutForce();
|
||||||
/** 道岔强扳*/
|
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
||||||
this.turnoutForce();
|
/* 单操到正位*/
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
this.locate();
|
||||||
/** 区段激活*/
|
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||||
this.split();
|
/* 单操到反位*/
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
this.reverse();
|
||||||
/** 区段激活*/
|
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||||
this.active();
|
/** 道岔封锁*/
|
||||||
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
this.openPasswordBox(this.operation, OperationEvent.Switch.block.confirm.operation);
|
||||||
/*单操到正位*/
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
this.locate();
|
/* 道岔解封*/
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
this.openPasswordBox(this.operation, OperationEvent.Switch.unblock.confirm.operation);
|
||||||
/*单操到反位*/
|
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||||
this.reverse();
|
/* 区故解*/
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation);
|
||||||
/** 道岔封锁*/
|
}
|
||||||
this.openPasswordBox(this.operation);
|
},
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
// 道岔单锁
|
||||||
/*道岔解封*/
|
lock() {
|
||||||
this.openPasswordBox(this.operation);
|
const operate = {
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
send: true,
|
||||||
/*区故解*/
|
type: MapDeviceType.Switch.type,
|
||||||
this.openPasswordBox(this.operation);
|
operation: OperationEvent.Switch.lock.menu.operation
|
||||||
}
|
};
|
||||||
},
|
|
||||||
//道岔单锁
|
|
||||||
lock() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔解锁
|
// 道岔解锁
|
||||||
unlock() {
|
unlock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
operation: OperationEvent.Switch.unlock.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
//道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
block() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Switch.block.menu.operation,
|
operation: OperationEvent.Switch.block.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔解封
|
// 道岔解封
|
||||||
unblock() {
|
unblock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
operation: OperationEvent.Switch.unblock.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔转动
|
// 道岔强扮
|
||||||
turnout(operation) {
|
turnoutForce() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
||||||
}
|
};
|
||||||
|
this.loading = true;
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 单操到正位
|
||||||
|
locate() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.Switch.type,
|
||||||
|
operation: OperationEvent.Switch.locate.menu.operation
|
||||||
|
};
|
||||||
|
this.loading = true;
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.loading = true;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 单操到反位
|
||||||
|
reverse() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.Switch.type,
|
||||||
|
operation: OperationEvent.Switch.reverse.menu.operation
|
||||||
|
};
|
||||||
|
this.loading = true;
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.loading = true;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 区故解
|
||||||
|
fault() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.Switch.type,
|
||||||
|
operation: OperationEvent.Switch.fault.menu.operation
|
||||||
|
};
|
||||||
|
this.loading = true;
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 打开密码输入框
|
||||||
|
openPasswordBox(operation, code) {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.Switch.type,
|
||||||
|
operation: operation,
|
||||||
|
operateCode: code
|
||||||
|
};
|
||||||
|
this.loading = true;
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.passwordBox.doShow(operate);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 密码输入正确会回调
|
||||||
|
toSwitchControl(operation) {
|
||||||
|
if (operation === OperationEvent.Switch.fault.menu.operation) {
|
||||||
|
this.fault();
|
||||||
|
} else if (operation === OperationEvent.Switch.block.menu.operation) {
|
||||||
|
this.block();
|
||||||
|
} else if (operation === OperationEvent.Switch.unblock.menu.operation) {
|
||||||
|
this.unblock();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.Switch.type,
|
||||||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
if (valid) {
|
||||||
this.loading = false;
|
this.doClose();
|
||||||
if (valid) {
|
}
|
||||||
this.doClose();
|
}).catch(() => {
|
||||||
}
|
this.doClose();
|
||||||
}).catch(error => {
|
});
|
||||||
this.loading = false;
|
}
|
||||||
this.doClose();
|
}
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
};
|
||||||
});
|
|
||||||
},
|
|
||||||
//道岔强扮
|
|
||||||
turnoutForce() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
|
||||||
}
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//区段切除
|
|
||||||
split() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.split.menu.operation,
|
|
||||||
}
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//区段激活
|
|
||||||
active() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.active.menu.operation,
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//单操到正位
|
|
||||||
locate() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.locate.menu.operation,
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = true;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//单操到反位
|
|
||||||
reverse() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = true;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//区故解
|
|
||||||
fault() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.fault.menu.operation,
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//打开密码输入框
|
|
||||||
openPasswordBox(operation) {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: operation,
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.passwordBox.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//密码输入正确会回调
|
|
||||||
toSwitchControl(operation) {
|
|
||||||
if (operation === OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
this.fault();
|
|
||||||
} else if (operation === OperationEvent.Switch.block.menu.operation) {
|
|
||||||
this.block();
|
|
||||||
} else if (operation === OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
this.unblock();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
@ -5,6 +5,7 @@
|
|||||||
<template v-show="isShowBar">
|
<template v-show="isShowBar">
|
||||||
<menu-bar ref="menuBar" :selected="selected" />
|
<menu-bar ref="menuBar" :selected="selected" />
|
||||||
</template>
|
</template>
|
||||||
|
<menu-button ref="menuButton" />
|
||||||
<menu-station-control ref="menuStationControl" :selected="selected" />
|
<menu-station-control ref="menuStationControl" :selected="selected" />
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||||
@ -12,7 +13,7 @@
|
|||||||
<menu-section ref="menuSection" :selected="selected" />
|
<menu-section ref="menuSection" :selected="selected" />
|
||||||
<menu-train ref="menuTrain" :selected="selected" />
|
<menu-train ref="menuTrain" :selected="selected" />
|
||||||
<menu-station ref="menuStation" :selected="selected" />
|
<menu-station ref="menuStation" :selected="selected" />
|
||||||
<menu-limit ref="menuLimit" :selected="selected" />
|
<!-- <menu-limit ref="menuLimit" :selected="selected" /> -->
|
||||||
<passive-alarm ref="passiveAlarm" />
|
<passive-alarm ref="passiveAlarm" />
|
||||||
<passive-contorl ref="passiveControl" />
|
<passive-contorl ref="passiveControl" />
|
||||||
<passive-Timeout ref="passiveTimeout" />
|
<passive-Timeout ref="passiveTimeout" />
|
||||||
@ -24,6 +25,7 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuCancel from './menuCancel';
|
import MenuCancel from './menuCancel';
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
|
import MenuButton from './menuButton';
|
||||||
import MenuStationControl from './menuStationControl';
|
import MenuStationControl from './menuStationControl';
|
||||||
import MenuStationStand from './menuStationStand';
|
import MenuStationStand from './menuStationStand';
|
||||||
import MenuSwitch from './menuSwitch';
|
import MenuSwitch from './menuSwitch';
|
||||||
@ -31,7 +33,7 @@ import MenuSection from './menuSection';
|
|||||||
import MenuTrain from './menuTrain';
|
import MenuTrain from './menuTrain';
|
||||||
import MenuStation from './menuStation';
|
import MenuStation from './menuStation';
|
||||||
import MenuBar from './menuBar';
|
import MenuBar from './menuBar';
|
||||||
import MenuLimit from './menuLimit';
|
// import MenuLimit from './menuLimit';
|
||||||
import PassiveAlarm from './passiveDialog/alarm';
|
import PassiveAlarm from './passiveDialog/alarm';
|
||||||
import PassiveContorl from './passiveDialog/control';
|
import PassiveContorl from './passiveDialog/control';
|
||||||
import PassiveTimeout from './passiveDialog/timeout';
|
import PassiveTimeout from './passiveDialog/timeout';
|
||||||
@ -40,6 +42,7 @@ export default {
|
|||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
components: {
|
components: {
|
||||||
MenuBar,
|
MenuBar,
|
||||||
|
MenuButton,
|
||||||
MenuCancel,
|
MenuCancel,
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
@ -48,7 +51,7 @@ export default {
|
|||||||
MenuStationStand,
|
MenuStationStand,
|
||||||
MenuStation,
|
MenuStation,
|
||||||
MenuTrain,
|
MenuTrain,
|
||||||
MenuLimit,
|
// MenuLimit,
|
||||||
PassiveAlarm,
|
PassiveAlarm,
|
||||||
PassiveContorl,
|
PassiveContorl,
|
||||||
PassiveTimeout
|
PassiveTimeout
|
||||||
|
@ -8,13 +8,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<li
|
<li v-if="handleShow(item)" :id="getDomId(item)" :key="i" class="nav-li" @click.stop="selectedClassA(item, i)">
|
||||||
v-if="handleShow(item)"
|
|
||||||
:id="getDomId(item)"
|
|
||||||
:key="i"
|
|
||||||
class="nav-li"
|
|
||||||
@click.stop="selectedClassA(item, i)"
|
|
||||||
>
|
|
||||||
<span class="nav-li-text">{{ item.title }}</span>
|
<span class="nav-li-text">{{ item.title }}</span>
|
||||||
<ul class="nav-ul" :class="{'active' :i==classA}">
|
<ul class="nav-ul" :class="{'active' :i==classA}">
|
||||||
<template v-for="(child,j) in item.children">
|
<template v-for="(child,j) in item.children">
|
||||||
@ -23,13 +17,7 @@
|
|||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
<span class="separator"> </span>
|
<span class="separator"> </span>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li v-else :id="getDomId(child)" :key="j" class="menu-li" @click.stop="selectedClassB(child, j)">
|
||||||
v-else
|
|
||||||
:id="getDomId(child)"
|
|
||||||
:key="j"
|
|
||||||
class="menu-li"
|
|
||||||
@click.stop="selectedClassB(child, j)"
|
|
||||||
>
|
|
||||||
<div class="menu-li-block">
|
<div class="menu-li-block">
|
||||||
<span class="menu-li-text">
|
<span class="menu-li-text">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
@ -42,13 +30,7 @@
|
|||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
<span class="separator"> </span>
|
<span class="separator"> </span>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li v-else-if="grandchild.show" :id="getDomId(grandchild)" :key="k" class="menu-li" @click.stop="hookClick(grandchild)">
|
||||||
v-else-if="grandchild.show"
|
|
||||||
:id="getDomId(grandchild)"
|
|
||||||
:key="k"
|
|
||||||
class="menu-li"
|
|
||||||
@click.stop="hookClick(grandchild)"
|
|
||||||
>
|
|
||||||
<div class="menu-li-block">
|
<div class="menu-li-block">
|
||||||
<span class="menu-li-text">
|
<span class="menu-li-text">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
@ -65,13 +47,7 @@
|
|||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
<span class="separator"> </span>
|
<span class="separator"> </span>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li v-else-if="child.show" :id="getDomId(child)" :key="j" class="menu-li" @click.stop="hookClick(child)">
|
||||||
v-else-if="child.show"
|
|
||||||
:id="getDomId(child)"
|
|
||||||
:key="j"
|
|
||||||
class="menu-li"
|
|
||||||
@click.stop="hookClick(child)"
|
|
||||||
>
|
|
||||||
<div class="menu-li-block">
|
<div class="menu-li-block">
|
||||||
<span class="menu-li-text">
|
<span class="menu-li-text">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
@ -812,7 +788,7 @@ export default {
|
|||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
operation: item.operate.operation
|
operation: item.operate
|
||||||
};
|
};
|
||||||
this.tempClassA = index;
|
this.tempClassA = index;
|
||||||
this.tempClassB = -1;
|
this.tempClassB = -1;
|
||||||
@ -834,7 +810,7 @@ export default {
|
|||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
operation: item.operate.operation
|
operation: item.operate
|
||||||
};
|
};
|
||||||
this.tempClassB = index;
|
this.tempClassB = index;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -850,151 +826,11 @@ export default {
|
|||||||
this.closeMenu(true);
|
this.closeMenu(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 转为站控
|
|
||||||
turnToStationControl(order) {
|
|
||||||
const operate = {
|
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.closeMenu(true);
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.stationControlConvert.doShow(operate);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 强制转为站控
|
|
||||||
mandatoryStationControl(order) {
|
|
||||||
const operate = {
|
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.closeMenu(true);
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.passwordBox.doShow(operate);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 请求中控
|
|
||||||
conterStationControl(order) {
|
|
||||||
const operate = {
|
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.closeMenu(true);
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.stationControlConvert.doShow(operate);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置列车识别号显示
|
|
||||||
setTrainIdDisplay(order) {
|
|
||||||
const operate = {
|
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.closeMenu(true);
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.viewTrainId.doShow(operate);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置设备显示
|
|
||||||
setNameDisplay(order) {
|
|
||||||
const operate = {
|
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.closeMenu(true);
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.viewName.doShow(operate);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置名称显示
|
|
||||||
setDeviceDisplay(order) {
|
|
||||||
const operate = {
|
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.closeMenu(true);
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.viewDevice.doShow(operate);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 添加计划车
|
|
||||||
addPlanTrain(order) {
|
|
||||||
const operate = {
|
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.closeMenu(true);
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.trainAdd.doShow(operate);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 平移计划车
|
|
||||||
translatPlanTrain(order) {
|
|
||||||
const operate = {
|
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.closeMenu(true);
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.trainTranstalet.doShow(operate);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 删除计划车
|
|
||||||
delPlanTrain(order) {
|
|
||||||
const operate = {
|
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.closeMenu(true);
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.trainDelete.doShow(operate);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 用户管理
|
|
||||||
userManage(order) {
|
|
||||||
const operate = {
|
|
||||||
type: 'bar',
|
|
||||||
operation: order.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.closeMenu(true);
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.manageUser.doShow(operate);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 关于
|
// 关于
|
||||||
about(order) {
|
about(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
operation: order.operation
|
operation: order.operate
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -1021,7 +857,7 @@ export default {
|
|||||||
setLimitSpeed(order) {
|
setLimitSpeed(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
operation: order.operation
|
operation: order.operate
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -1034,7 +870,7 @@ export default {
|
|||||||
cancleLimitSpeed(order) {
|
cancleLimitSpeed(order) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
operation: order.operation
|
operation: order.operate
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
280
src/jmap/theme/chengdu_03/menus/menuButton.vue
Normal file
280
src/jmap/theme/chengdu_03/menus/menuButton.vue
Normal file
@ -0,0 +1,280 @@
|
|||||||
|
<template>
|
||||||
|
<div v-if="isShowBtn" class="menu" style="height: 45px;" :style="{left: point.x+'px', top: point.y+'px' }">
|
||||||
|
<button :id="Signal.arrangementRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.arrangementRoute.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>排</b><b>列</b></center>
|
||||||
|
<center><b>进</b><b>路</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="Signal.cancelTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.cancelTrainRoute.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>总</b></center>
|
||||||
|
<center><b>取</b><b>消</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="Signal.guide.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.guide.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>引</b><b>导</b></center>
|
||||||
|
<center><b>进</b><b>路</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<!-- 流程未做暂不显示 -->
|
||||||
|
<!-- <button :id="Switch.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.guideLock.button.operation)">
|
||||||
|
<span style="color: red">
|
||||||
|
<center><b>引</b><b>导</b></center>
|
||||||
|
<center><b>总</b><b>锁</b></center>
|
||||||
|
</span>
|
||||||
|
</button> -->
|
||||||
|
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanTrainRoute.button.operation)">
|
||||||
|
<span style="color: red">
|
||||||
|
<center><b>总</b></center>
|
||||||
|
<center><b>人</b><b>解</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="Section.fault.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Section.fault.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>区</b></center>
|
||||||
|
<center><b>故</b><b>解</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="Switch.locate.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Switch.locate.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>道</b><b>岔</b></center>
|
||||||
|
<center><b>定</b><b>操</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="Switch.reverse.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.reverse.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>道</b><b>岔</b></center>
|
||||||
|
<center><b>反</b><b>操</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="Switch.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.lock.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>道</b><b>岔</b></center>
|
||||||
|
<center><b>单</b><b>锁</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="Switch.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.unlock.button.operation)">
|
||||||
|
<span style="color: red">
|
||||||
|
<center><b>道</b><b>岔</b></center>
|
||||||
|
<center><b>解</b><b>锁</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="MixinCommand.block.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.block.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>封</b></center>
|
||||||
|
<center><b>锁</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="MixinCommand.unblock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.unblock.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>解</b></center>
|
||||||
|
<center><b>封</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="MixinCommand.functionButton.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.functionButton.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center>
|
||||||
|
<b style="color:deepskyblue">功</b>
|
||||||
|
<b style="color:burlywood">能</b>
|
||||||
|
</center>
|
||||||
|
<center>
|
||||||
|
<b style="color: red">按</b>
|
||||||
|
<b style="color:forestgreen">钮</b>
|
||||||
|
</center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="Signal.atsAutoControl.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.atsAutoControl.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>自</b></center>
|
||||||
|
<center><b>动</b><b>控</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button :id="Signal.humanControl.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanControl.button.operation)">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>人</b></center>
|
||||||
|
<center><b>工</b><b>控</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button id="mbm_clear" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown('mbm_clear')">
|
||||||
|
<span style="color: black">
|
||||||
|
<center><b>清</b></center>
|
||||||
|
<center><b>除</b></center>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<password-box ref="password" @checkOver="doClose" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
|
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
||||||
|
import { deepAssign } from '@/utils/index';
|
||||||
|
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'MapButtonMenu',
|
||||||
|
components: {
|
||||||
|
PasswordBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
point: {
|
||||||
|
x: -1000,
|
||||||
|
y: -1000
|
||||||
|
},
|
||||||
|
operation: '0',
|
||||||
|
buttonName: '',
|
||||||
|
buttonDownColor: '#A8A8A8',
|
||||||
|
buttonUpColor: '#DCDCDC',
|
||||||
|
width: 58,
|
||||||
|
tempData: null,
|
||||||
|
offset: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
Switch() {
|
||||||
|
return OperationEvent.Switch;
|
||||||
|
},
|
||||||
|
Section() {
|
||||||
|
return OperationEvent.Section;
|
||||||
|
},
|
||||||
|
Signal() {
|
||||||
|
return OperationEvent.Signal;
|
||||||
|
},
|
||||||
|
MixinCommand() {
|
||||||
|
return OperationEvent.MixinCommand;
|
||||||
|
},
|
||||||
|
isShowBtn() {
|
||||||
|
return this.$store.state.training.prdType == '01';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.config.canvasOffsetCount': function (val) {
|
||||||
|
this.resetPosition();
|
||||||
|
},
|
||||||
|
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||||
|
this.updateButtonShow(val, old);
|
||||||
|
},
|
||||||
|
'$store.state.menuOperation.selectedCount': function (val) {
|
||||||
|
this.selectedChange();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.resetPosition();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doClose() {
|
||||||
|
|
||||||
|
},
|
||||||
|
resetPosition() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const canvasOffset = this.$store.state.config.canvasOffset;
|
||||||
|
this.point = {
|
||||||
|
x: canvasOffset.x + 20,
|
||||||
|
y: canvasOffset.y + this.$store.state.config.height - 65
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
updateButtonShow(val, old) {
|
||||||
|
if (old) {
|
||||||
|
// 恢复旧按钮显示
|
||||||
|
const domId = getDomIdByOperation(old);
|
||||||
|
const dom = document.getElementById(domId);
|
||||||
|
if (dom) {
|
||||||
|
dom.disabled = false;
|
||||||
|
dom.style.backgroundColor = this.buttonUpColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (val) {
|
||||||
|
// 新按钮按下效果
|
||||||
|
const domId = getDomIdByOperation(val);
|
||||||
|
const dom = document.getElementById(domId);
|
||||||
|
if (dom) {
|
||||||
|
dom.disabled = true;
|
||||||
|
dom.style.backgroundColor = this.buttonDownColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttonDown(operation) {
|
||||||
|
if (operation != 'mbm_clear') {
|
||||||
|
const operate = {
|
||||||
|
type: 'mbm',
|
||||||
|
operation: operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
if (operation == this.Signal.humanTrainRoute.button.operation) { // 总人解操作 显示密码窗
|
||||||
|
this.$refs.password.doShow(operate);
|
||||||
|
}
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
OperateHandler.cleanOperates(); // 清空操作组
|
||||||
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectedChange() {
|
||||||
|
// 按钮按下时
|
||||||
|
if (this.$store.state.menuOperation.buttonOperation) {
|
||||||
|
const model = this.$store.state.menuOperation.selected;
|
||||||
|
if (model._type) {
|
||||||
|
const deviceType = MapDeviceType[model._type];
|
||||||
|
const modelData = deepAssign({}, model);
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
model: modelData,
|
||||||
|
code: model.code,
|
||||||
|
type: deviceType.type,
|
||||||
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
|
tempData: this.tempData
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
|
if (valid) {
|
||||||
|
if (response) {
|
||||||
|
this.tempData = response.data;
|
||||||
|
// console.log(this.tempData, '步骤数据');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
OperateHandler.cleanOperates(); // 清空操作组
|
||||||
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
$bg: #fff;
|
||||||
|
$hoverBg: #f5f7fa;
|
||||||
|
.button_box{
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.menu {
|
||||||
|
background-color: $bg;
|
||||||
|
position: fixed;
|
||||||
|
border: 1px solid gray;
|
||||||
|
z-index: 10;
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
.dsp-block {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: unset;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dsp-block:hover {
|
||||||
|
background-color: $hoverBg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -20,7 +20,6 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: [],
|
|
||||||
menuScreen: [
|
menuScreen: [
|
||||||
{
|
{
|
||||||
label: '放大地图',
|
label: '放大地图',
|
||||||
@ -53,12 +52,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
|
||||||
if (!this.isScreen && this.menu && this.menu.length > 1) {
|
|
||||||
// this.menu[0].disabled = (this.menu[0] && val) ? true : true;
|
|
||||||
// this.menu[1].disabled = !((this.menu[1] && val));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
@ -75,41 +68,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
this.menuNormal = [];
|
|
||||||
// this.stationList.forEach(station => {
|
|
||||||
// if (station.code === station.concentrateStationCode) {
|
|
||||||
// let node = {
|
|
||||||
// label: station.name,
|
|
||||||
// children: []
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// this.stationList.forEach(elem => {
|
|
||||||
// if (elem.visible) {
|
|
||||||
// let next = elem;
|
|
||||||
// while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
|
||||||
// next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (station.code == next.code) {
|
|
||||||
// node.children.push({
|
|
||||||
// code: elem.code,
|
|
||||||
// label: elem.name,
|
|
||||||
// handler: this.mapLocation,
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
//
|
|
||||||
// this.menuNormal.push(node);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
if (this.isScreen) {
|
if (this.isScreen) {
|
||||||
this.menu = [...this.menuScreen];
|
this.menu = [...this.menuScreen];
|
||||||
}
|
}
|
||||||
// else {
|
|
||||||
// this.menu = [...this.menuNormal];
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
@ -123,13 +84,6 @@ export default {
|
|||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置地图定位
|
|
||||||
mapLocation(item) {
|
|
||||||
if (item) {
|
|
||||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 放大地图
|
// 放大地图
|
||||||
magnifyMap() {
|
magnifyMap() {
|
||||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
class="chengdou-03__systerm view-train-id"
|
v-dialogDrag
|
||||||
title="列车识别号显示设置" :visible.sync="show" width="420px"
|
class="chengdou-03__systerm view-train-id"
|
||||||
:before-close="doClose"
|
title="列车识别号显示设置"
|
||||||
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
|
:visible.sync="show"
|
||||||
>
|
width="420px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||||
<span class="base-label">计划车显示模式</span>
|
<span class="base-label">计划车显示模式</span>
|
||||||
<el-radio-group v-model="planMode">
|
<el-radio-group v-model="planMode">
|
||||||
@ -51,7 +56,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
|
|||||||
<span class="base-label">字体大小</span>
|
<span class="base-label">字体大小</span>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model="fontSize" size="small" min="16" max="99"/>
|
<el-input v-model="fontSize" size="small" min="16" max="99" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10" :offset="1">
|
<el-col :span="10" :offset="1">
|
||||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||||
@ -66,7 +71,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"/>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -76,20 +81,20 @@ import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ViewTrainId',
|
name: 'ViewTrainId',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
operate: null,
|
operate: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
planMode: 5,
|
planMode: 5,
|
||||||
headMode: 5,
|
headMode: 5,
|
||||||
fontSize: 16,
|
fontSize: 16
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
@ -1,118 +1,120 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<cancel-all-limit ref="cancelAllLimit"></cancel-all-limit>
|
<cancel-all-limit ref="cancelAllLimit" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import CancelAllLimit from './dialog/cancelAllLimit';
|
import CancelAllLimit from './dialog/cancelAllLimit';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuLimit',
|
name: 'MenuLimit',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
CancelAllLimit,
|
CancelAllLimit
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
}
|
default() {
|
||||||
},
|
return null;
|
||||||
data() {
|
}
|
||||||
return {
|
}
|
||||||
menu: [{
|
},
|
||||||
label: '取消全线临时限速',
|
data() {
|
||||||
handler: this.cancelSpeed,
|
return {
|
||||||
disabledCallback: '',
|
menu: [{
|
||||||
auth: { station: true, center: false }
|
label: '取消全线临时限速',
|
||||||
}],
|
handler: this.cancelSpeed,
|
||||||
menuNormal: {
|
disabledCallback: '',
|
||||||
local: [
|
auth: { station: true, center: false }
|
||||||
{
|
}],
|
||||||
label: '取消全线临时限速',
|
menuNormal: {
|
||||||
handler: this.cancelSpeed,
|
local: [
|
||||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
{
|
||||||
auth: { station: true, center: false }
|
label: '取消全线临时限速',
|
||||||
}
|
handler: this.cancelSpeed,
|
||||||
],
|
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||||
central: [
|
auth: { station: true, center: false }
|
||||||
{
|
}
|
||||||
label: '取消全线临时限速',
|
],
|
||||||
handler: this.cancelSpeed,
|
central: [
|
||||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
{
|
||||||
auth: { station: false, center: true }
|
label: '取消全线临时限速',
|
||||||
}
|
handler: this.cancelSpeed,
|
||||||
]
|
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||||
},
|
auth: { station: false, center: true }
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
watch: {
|
}
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
};
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
},
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
computed: {
|
||||||
} else {
|
...mapGetters('training', [
|
||||||
this.doClose();
|
'mode',
|
||||||
}
|
'operatemode'
|
||||||
}
|
]),
|
||||||
},
|
...mapGetters('menuOperation', [
|
||||||
computed: {
|
'buttonOperation'
|
||||||
...mapGetters('training', [
|
])
|
||||||
'mode',
|
},
|
||||||
'operatemode'
|
watch: {
|
||||||
]),
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
...mapGetters('menuOperation', [
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
||||||
'buttonOperation'
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
])
|
} else {
|
||||||
},
|
this.doClose();
|
||||||
methods: {
|
}
|
||||||
clickEvent() {
|
}
|
||||||
let self = this;
|
},
|
||||||
window.onclick = function (e) {
|
methods: {
|
||||||
self.doClose();
|
clickEvent() {
|
||||||
}
|
const self = this;
|
||||||
},
|
window.onclick = function (e) {
|
||||||
initMenu() {
|
self.doClose();
|
||||||
//编辑模式菜单列表
|
};
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
},
|
||||||
this.menu = [...this.menu]
|
initMenu() {
|
||||||
}
|
// 编辑模式菜单列表
|
||||||
},
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
doShow(point) {
|
this.menu = [...this.menu];
|
||||||
this.clickEvent();
|
}
|
||||||
this.initMenu();
|
},
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
doShow(point) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.clickEvent();
|
||||||
}
|
this.initMenu();
|
||||||
},
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
doClose() {
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
}
|
||||||
this.$refs.popMenu.close();
|
},
|
||||||
}
|
doClose() {
|
||||||
},
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
//取消速度
|
this.$refs.popMenu.close();
|
||||||
cancelSpeed() {
|
}
|
||||||
let operate = {
|
},
|
||||||
start: true,
|
// 取消速度
|
||||||
send: true,
|
cancelSpeed() {
|
||||||
code: this.selected.code,
|
const operate = {
|
||||||
type: MapDeviceType.LimitControl.type,
|
start: true,
|
||||||
label: MapDeviceType.LimitControl.label,
|
send: true,
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
|
code: this.selected.code,
|
||||||
};
|
type: MapDeviceType.LimitControl.type,
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
label: MapDeviceType.LimitControl.label,
|
||||||
if (valid) {
|
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
};
|
||||||
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
}
|
if (valid) {
|
||||||
});
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
},
|
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,403 +1,286 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<section-control ref="sectionControl"></section-control>
|
<section-control ref="sectionControl" />
|
||||||
<section-cmd-control ref="sectionCmdControl"></section-cmd-control>
|
<train-create ref="trainCreate" />
|
||||||
<speed-cmd-control ref="speedCmdControl"></speed-cmd-control>
|
<section-detail ref="sectionDetail" />
|
||||||
<train-create ref="trainCreate"></train-create>
|
<notice-info ref="noticeInfo" />
|
||||||
<alxe-effective ref="alxeEffective"></alxe-effective>
|
</div>
|
||||||
<section-detail ref="sectionDetail"></section-detail>
|
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SectionControl from './dialog/sectionControl';
|
import SectionControl from './dialog/sectionControl';
|
||||||
import SectionCmdControl from './dialog/sectionCmdControl';
|
import SectionDetail from './dialog/sectionDetail';
|
||||||
import SectionDetail from './dialog/sectionDetail';
|
import TrainCreate from './dialog/trainCreate';
|
||||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import TrainCreate from './dialog/trainCreate';
|
import { mapGetters } from 'vuex';
|
||||||
import AlxeEffective from './dialog/alxeEffective';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { mapGetters } from 'vuex';
|
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { mouseCancelState } from './utils/menuItemStatus';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
|
||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
SectionControl,
|
SectionControl,
|
||||||
SectionCmdControl,
|
SectionDetail,
|
||||||
SectionDetail,
|
TrainCreate,
|
||||||
SpeedCmdControl,
|
NoticeInfo
|
||||||
TrainCreate,
|
},
|
||||||
AlxeEffective,
|
props: {
|
||||||
NoticeInfo
|
selected: {
|
||||||
},
|
type: Object,
|
||||||
props: {
|
default: () => {
|
||||||
selected: {
|
return null;
|
||||||
type: Object
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
local: [
|
||||||
{
|
// {
|
||||||
label: '区故解',
|
// label: '区故解',
|
||||||
handler: this.fault,
|
// handler: this.fault,
|
||||||
disabledCallback: MenuDisabledState.Section.fault,
|
// disabledCallback: MenuDisabledState.Section.fault,
|
||||||
auth: { station: true, center: false }
|
// auth: { station: true, center: false }
|
||||||
},
|
// }
|
||||||
{
|
],
|
||||||
label: '属性',
|
central: [
|
||||||
handler: this.detail,
|
{
|
||||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
label: '区故解',
|
||||||
auth: { station: false, center: true }
|
handler: this.fault,
|
||||||
},
|
disabledCallback: MenuDisabledState.Section.fault,
|
||||||
// {
|
auth: { station: true, center: false }
|
||||||
// label: '区段激活',
|
},
|
||||||
// handler: this.active,
|
{
|
||||||
// disabledCallback: MenuDisabledState.Section.active,
|
label: '设置临时限速',
|
||||||
// auth: { station: true, center: false }
|
handler: this.setSpeed,
|
||||||
// },
|
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||||
// {
|
auth: { station: false, center: true }
|
||||||
// label: '区段切除',
|
},
|
||||||
// handler: this.split,
|
{
|
||||||
// disabledCallback: MenuDisabledState.Section.split,
|
label: '属性',
|
||||||
// auth: { station: true, center: false }
|
handler: this.detail,
|
||||||
// },
|
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||||
// {
|
auth: { station: false, center: true }
|
||||||
// label: '区段计轴预复位',
|
}
|
||||||
// handler: this.axlePreReset,
|
]
|
||||||
// disabledCallback: MenuDisabledState.Section.axlePreReset,
|
},
|
||||||
// auth: { station: true, center: false }
|
menuTrain: [
|
||||||
// },
|
{
|
||||||
// {
|
label: '新建列车',
|
||||||
// label: '区段封锁',
|
handler: this.newTrain,
|
||||||
// handler: this.lock,
|
disabledCallback: MenuDisabledState.Section.newTrain
|
||||||
// disabledCallback: MenuDisabledState.Section.lock,
|
}
|
||||||
// auth: { station: true, center: false }
|
],
|
||||||
// },
|
menuForce: [
|
||||||
// {
|
{
|
||||||
// label: '区段解封',
|
label: '设置计轴失效',
|
||||||
// handler: this.unlock,
|
handler: this.alxeFailure,
|
||||||
// disabledCallback: MenuDisabledState.Section.unlock,
|
disabledCallback: MenuDisabledState.Section.alxeFailure
|
||||||
// auth: { station: true, center: false }
|
},
|
||||||
// },
|
{
|
||||||
// {
|
label: this.$t('menu.menuSection.setFault'),
|
||||||
// label: '区段设置限速',
|
handler: this.setStoppage,
|
||||||
// handler: this.setSpeed,
|
disabledCallback: MenuDisabledState.Section.setStoppage
|
||||||
// disabledCallback: MenuDisabledState.Section.setSpeed,
|
},
|
||||||
// auth: { station: true, center: false }
|
{
|
||||||
// },
|
label: this.$t('menu.menuSection.cancelFault'),
|
||||||
// {
|
handler: this.cancelStoppage,
|
||||||
// label: '区段取消限速',
|
disabledCallback: MenuDisabledState.Section.cancelStoppage
|
||||||
// handler: this.cancelSpeed,
|
}
|
||||||
// disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
]
|
||||||
// auth: { station: true, center: false }
|
};
|
||||||
// },
|
},
|
||||||
// {
|
computed: {
|
||||||
// label: '确认计轴有效',
|
...mapGetters('training', [
|
||||||
// handler: this.alxeEffective,
|
'mode',
|
||||||
// disabledCallback: MenuDisabledState.Section.alxeEffective,
|
'operatemode'
|
||||||
// auth: { station: false, center: true }
|
]),
|
||||||
// },
|
...mapGetters('menuOperation', [
|
||||||
],
|
'buttonOperation'
|
||||||
central: [
|
])
|
||||||
{
|
},
|
||||||
label: '区故解',
|
watch: {
|
||||||
handler: this.fault,
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
disabledCallback: MenuDisabledState.Section.fault,
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
||||||
auth: { station: true, center: false }
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
},
|
} else {
|
||||||
{
|
this.doClose();
|
||||||
label: '属性',
|
}
|
||||||
handler: this.detail,
|
}
|
||||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
},
|
||||||
auth: { station: false, center: true }
|
methods: {
|
||||||
},
|
clickEvent() {
|
||||||
]
|
const self = this;
|
||||||
},
|
window.onclick = function (e) {
|
||||||
menuTrain: [
|
self.doClose();
|
||||||
{
|
};
|
||||||
label: '新建列车',
|
},
|
||||||
handler: this.newTrain,
|
initMenu() {
|
||||||
disabledCallback: MenuDisabledState.Section.newTrain
|
// 编辑模式菜单列表
|
||||||
},
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
],
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
menuForce: [
|
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
|
||||||
{
|
}
|
||||||
label: '设置计轴失效',
|
|
||||||
handler: this.alxeFailure,
|
|
||||||
disabledCallback: MenuDisabledState.Section.alxeFailure
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
|
||||||
} else {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('training', [
|
|
||||||
'mode',
|
|
||||||
'operatemode'
|
|
||||||
]),
|
|
||||||
...mapGetters('menuOperation', [
|
|
||||||
'buttonOperation'
|
|
||||||
])
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
clickEvent() {
|
|
||||||
let self = this;
|
|
||||||
window.onclick = function (e) {
|
|
||||||
self.doClose();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
initMenu() {
|
|
||||||
//编辑模式菜单列表
|
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
|
||||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain]
|
|
||||||
}
|
|
||||||
|
|
||||||
//故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
this.menu = menuConvert(this.menu);
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置计轴失效
|
// 设置计轴失效
|
||||||
alxeFailure() {
|
alxeFailure() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.alxeFailure.menu.operation
|
operation: OperationEvent.Section.alxeFailure.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//新建列车
|
// 新建列车
|
||||||
newTrain() {
|
newTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation
|
operation: OperationEvent.Section.newtrain.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainCreate.doShow(operate, this.selected);
|
this.$refs.trainCreate.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//故障解锁
|
// 故障解锁
|
||||||
fault() {
|
fault() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.fault.menu.operation
|
operation: OperationEvent.Section.fault.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
detail() {
|
detail() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
label: MapDeviceType.Section.label,
|
label: MapDeviceType.Section.label,
|
||||||
operation: OperationEvent.Section.detail.menu.operation
|
operation: OperationEvent.Section.detail.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.sectionDetail.doShow(operate, this.selected);
|
this.$refs.sectionDetail.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
undeveloped() {
|
// 设置故障
|
||||||
this.doClose();
|
setStoppage() {
|
||||||
this.$alert('实现中......', '提示', {
|
const operate = {
|
||||||
confirmButtonText: '确定',
|
start: true,
|
||||||
callback: action => {
|
send: true,
|
||||||
}
|
code: this.selected.code,
|
||||||
});
|
type: MapDeviceType.Section.type,
|
||||||
},
|
label: MapDeviceType.Section.label,
|
||||||
// //切除
|
operation: OperationEvent.Section.stoppage.menu.operation
|
||||||
// split() {
|
};
|
||||||
// let operate = {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
// start: true,
|
if (valid) {
|
||||||
// code: this.selected.code,
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// type: MapDeviceType.Section.type,
|
} else {
|
||||||
// label: MapDeviceType.Section.label,
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
// operation: OperationEvent.Section.split.menu.operation
|
}
|
||||||
// };
|
}).catch(() => {
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
// if (valid) {
|
});
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
},
|
||||||
// this.$refs.sectionControl.doShow(operate, this.selected);
|
// 取消故障
|
||||||
// }
|
cancelStoppage() {
|
||||||
// });
|
const operate = {
|
||||||
// },
|
start: true,
|
||||||
// alxeEffective() {
|
send: true,
|
||||||
// let operate = {
|
code: this.selected.code,
|
||||||
// start: true,
|
type: MapDeviceType.Section.type,
|
||||||
// code: this.selected.code,
|
label: MapDeviceType.Section.label,
|
||||||
// type: MapDeviceType.Section.type,
|
operation: OperationEvent.Section.cancelStoppage.menu.operation
|
||||||
// label: MapDeviceType.Section.label,
|
};
|
||||||
// operation: OperationEvent.Section.alxeEffective.menu.operation
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
// };
|
if (valid) {
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// if (valid) {
|
} else {
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
// this.$refs.alxeEffective.doShow(operate, this.selected);
|
}
|
||||||
// }
|
}).catch(() => {
|
||||||
// });
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
// },
|
});
|
||||||
// //激活
|
},
|
||||||
// active() {
|
// 设置速度
|
||||||
// let operate = {
|
setSpeed() {
|
||||||
// start: true,
|
const operate = {
|
||||||
// code: this.selected.code,
|
start: true,
|
||||||
// type: MapDeviceType.Section.type,
|
code: this.selected.code,
|
||||||
// label: MapDeviceType.Section.label,
|
type: MapDeviceType.Section.type,
|
||||||
// operation: OperationEvent.Section.active.menu.operation
|
label: MapDeviceType.Section.label,
|
||||||
// };
|
operation: OperationEvent.Section.setSpeed.menu.operation
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
};
|
||||||
// if (valid) {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
if (valid) {
|
||||||
// this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// }
|
// this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||||
// });
|
}
|
||||||
// },
|
});
|
||||||
// //区段计轴预复位
|
},
|
||||||
// axlePreReset() {
|
undeveloped() {
|
||||||
// let operate = {
|
this.doClose();
|
||||||
// start: true,
|
this.$alert('实现中......', '提示', {
|
||||||
// code: this.selected.code,
|
confirmButtonText: '确定',
|
||||||
// type: MapDeviceType.Section.type,
|
callback: action => {
|
||||||
// label: MapDeviceType.Section.label,
|
}
|
||||||
// operation: OperationEvent.Section.axlePreReset.menu.operation
|
});
|
||||||
// };
|
}
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
}
|
||||||
// if (valid) {
|
};
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// //区段解锁
|
|
||||||
// lock() {
|
|
||||||
// let operate = {
|
|
||||||
// start: true,
|
|
||||||
// code: this.selected.code,
|
|
||||||
// type: MapDeviceType.Section.type,
|
|
||||||
// label: MapDeviceType.Section.label,
|
|
||||||
// operation: OperationEvent.Section.lock.menu.operation
|
|
||||||
// };
|
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
// if (valid) {
|
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.sectionControl.doShow(operate, this.selected);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// //区段封锁
|
|
||||||
// unlock() {
|
|
||||||
// let operate = {
|
|
||||||
// start: true,
|
|
||||||
// code: this.selected.code,
|
|
||||||
// type: MapDeviceType.Section.type,
|
|
||||||
// label: MapDeviceType.Section.label,
|
|
||||||
// operation: OperationEvent.Section.unlock.menu.operation
|
|
||||||
// };
|
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
// if (valid) {
|
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// //设置速度
|
|
||||||
// setSpeed() {
|
|
||||||
// let operate = {
|
|
||||||
// start: true,
|
|
||||||
// code: this.selected.code,
|
|
||||||
// type: MapDeviceType.Section.type,
|
|
||||||
// label: MapDeviceType.Section.label,
|
|
||||||
// operation: OperationEvent.Section.setLimitSpeed.menu.operation
|
|
||||||
// };
|
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
// if (valid) {
|
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.speedCmdControl.doShow(operate, this.selected);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// //取消速度
|
|
||||||
// cancelSpeed() {
|
|
||||||
// let operate = {
|
|
||||||
// start: true,
|
|
||||||
// send: true,
|
|
||||||
// code: this.selected.code,
|
|
||||||
// type: MapDeviceType.Section.type,
|
|
||||||
// label: MapDeviceType.Section.label,
|
|
||||||
// operation: OperationEvent.Section.cancelSpeed.menu.operation
|
|
||||||
// };
|
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
|
||||||
// if (valid) {
|
|
||||||
// let tempData = response.data;
|
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
File diff suppressed because it is too large
Load Diff
@ -1,153 +1,156 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
import { mouseCancelState } from './utils/menuItemStatus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationMenu',
|
name: 'StationMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
}
|
default: () => {
|
||||||
},
|
return null;
|
||||||
data() {
|
}
|
||||||
return {
|
}
|
||||||
menu: [],
|
},
|
||||||
menuNormal: {
|
data() {
|
||||||
local: [
|
return {
|
||||||
],
|
menu: [],
|
||||||
central: [
|
menuNormal: {
|
||||||
],
|
local: [
|
||||||
},
|
],
|
||||||
menuForce: [
|
central: [
|
||||||
{
|
]
|
||||||
label: '设置ZC故障',
|
},
|
||||||
handler: this.setStoppage,
|
menuForce: [
|
||||||
disabledCallback: MenuDisabledState.Station.setStoppage
|
{
|
||||||
},
|
label: '设置ZC故障',
|
||||||
{
|
handler: this.setStoppage,
|
||||||
label: '取消ZC故障',
|
disabledCallback: MenuDisabledState.Station.setStoppage
|
||||||
handler: this.cancelStoppage,
|
},
|
||||||
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
{
|
||||||
}
|
label: '取消ZC故障',
|
||||||
]
|
handler: this.cancelStoppage,
|
||||||
}
|
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
||||||
},
|
}
|
||||||
watch: {
|
]
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
};
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
},
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
computed: {
|
||||||
} else {
|
...mapGetters('training', [
|
||||||
this.doClose();
|
'mode',
|
||||||
}
|
'operatemode'
|
||||||
}
|
]),
|
||||||
},
|
...mapGetters('menuOperation', [
|
||||||
computed: {
|
'buttonOperation'
|
||||||
...mapGetters('training', [
|
])
|
||||||
'mode',
|
},
|
||||||
'operatemode'
|
watch: {
|
||||||
]),
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
...mapGetters('menuOperation', [
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
||||||
'buttonOperation'
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
])
|
} else {
|
||||||
},
|
this.doClose();
|
||||||
methods: {
|
}
|
||||||
clickEvent() {
|
}
|
||||||
let self = this;
|
},
|
||||||
window.onclick = function (e) {
|
methods: {
|
||||||
self.doClose();
|
clickEvent() {
|
||||||
}
|
const self = this;
|
||||||
},
|
window.onclick = function (e) {
|
||||||
initMenu() {
|
self.doClose();
|
||||||
this.menu = [];
|
};
|
||||||
if (this.selected.concentrateStationCode == this.selected.code) {
|
},
|
||||||
//编辑模式菜单列表
|
initMenu() {
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = [];
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.selected.concentrateStationCode == this.selected.code) {
|
||||||
this.menu = [...this.menu, ...this.menuForce]
|
// 编辑模式菜单列表
|
||||||
}
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
}
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.selected.centralized) {
|
if (this.selected.centralized) {
|
||||||
//故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = [...this.menuForce]
|
this.menu = [...this.menuForce];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
this.menu = menuConvert(this.menu);
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.stoppage.menu.operation
|
operation: OperationEvent.Station.stoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,69 +1,69 @@
|
|||||||
<template>
|
<template>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
|
||||||
import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
|
|
||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationControlMenu',
|
name: 'StationControlMenu',
|
||||||
props: {
|
components: {
|
||||||
selected: {
|
PopMenu
|
||||||
type: Object
|
},
|
||||||
}
|
props: {
|
||||||
},
|
selected: {
|
||||||
components: {
|
type: Object,
|
||||||
PopMenu
|
default() {
|
||||||
},
|
return null;
|
||||||
data() {
|
}
|
||||||
return {
|
}
|
||||||
menu: [],
|
},
|
||||||
menuNormal: [
|
data() {
|
||||||
],
|
return {
|
||||||
menuForce: [
|
menu: [],
|
||||||
]
|
menuNormal: [
|
||||||
}
|
],
|
||||||
},
|
menuForce: [
|
||||||
watch: {
|
]
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
};
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
},
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
computed: {
|
||||||
} else {
|
...mapGetters('training', [
|
||||||
this.doClose();
|
'mode',
|
||||||
}
|
'operatemode'
|
||||||
}
|
]),
|
||||||
},
|
...mapGetters('menuOperation', [
|
||||||
computed: {
|
'buttonOperation'
|
||||||
...mapGetters('training', [
|
])
|
||||||
'mode',
|
},
|
||||||
'operatemode'
|
watch: {
|
||||||
]),
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
...mapGetters('menuOperation', [
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
||||||
'buttonOperation'
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
])
|
} else {
|
||||||
},
|
this.doClose();
|
||||||
methods: {
|
}
|
||||||
clickEvent() {
|
}
|
||||||
let self = this;
|
},
|
||||||
window.onclick = function (e) {
|
methods: {
|
||||||
self.doClose();
|
clickEvent() {
|
||||||
}
|
const self = this;
|
||||||
},
|
window.onclick = function (e) {
|
||||||
doShow(point) {
|
self.doClose();
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
};
|
||||||
this.$refs.popMenu.close();
|
},
|
||||||
}
|
doShow(point) {
|
||||||
},
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
doClose() {
|
this.$refs.popMenu.close();
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
}
|
||||||
this.$refs.popMenu.close();
|
},
|
||||||
}
|
doClose() {
|
||||||
}
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
}
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,372 +1,345 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<stand-control ref="standControl"></stand-control>
|
<stand-control ref="standControl" />
|
||||||
<stand-detail ref="standDetail"></stand-detail>
|
<stand-detail ref="standDetail" />
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import StandControl from './dialog/standControl';
|
import StandControl from './dialog/standControl';
|
||||||
import StandDetail from './dialog/standDetail';
|
import StandDetail from './dialog/standDetail';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
import { mouseCancelState } from './utils/menuItemStatus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
StandControl,
|
StandControl,
|
||||||
StandDetail,
|
StandDetail,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
}
|
default: () => {
|
||||||
},
|
return null;
|
||||||
data() {
|
}
|
||||||
return {
|
}
|
||||||
menu: [],
|
},
|
||||||
menuNormal: {
|
data() {
|
||||||
local: [
|
return {
|
||||||
{
|
menu: [],
|
||||||
label: '设置扣车',
|
menuNormal: {
|
||||||
handler: this.setDetainTrain,
|
local: [
|
||||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
{
|
||||||
auth: { station: true, center: true },
|
label: '设置跳停',
|
||||||
},
|
handler: this.setJumpStop,
|
||||||
{
|
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
||||||
label: '取消扣车',
|
auth: { station: true, center: true }
|
||||||
handler: this.cancelDetainTrain,
|
},
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
{
|
||||||
auth: { station: true, center: true },
|
label: '取消跳停',
|
||||||
},
|
handler: this.cancelJumpStop,
|
||||||
{
|
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
||||||
label: '设置跳停',
|
auth: { station: true, center: true }
|
||||||
handler: this.setJumpStop,
|
}
|
||||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
],
|
||||||
auth: { station: true, center: true },
|
central: [
|
||||||
},
|
{
|
||||||
{
|
label: '设置扣车',
|
||||||
label: '取消跳停',
|
handler: this.setDetainTrain,
|
||||||
handler: this.cancelJumpStop,
|
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
auth: { station: true, center: true }
|
||||||
auth: { station: true, center: true },
|
},
|
||||||
},
|
{
|
||||||
{
|
label: '取消扣车',
|
||||||
label: '设置停站时间',
|
handler: this.cancelDetainTrain,
|
||||||
handler: this.setStopTime,
|
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
auth: { station: true, center: true }
|
||||||
auth: { station: true, center: true },
|
},
|
||||||
},
|
{
|
||||||
{
|
label: '设置跳停',
|
||||||
label: '设置站间运行等级',
|
handler: this.setJumpStop,
|
||||||
handler: this.setRunLevel,
|
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
auth: { station: true, center: true }
|
||||||
auth: { station: true, center: true },
|
},
|
||||||
},
|
{
|
||||||
{
|
label: '取消跳停',
|
||||||
label: '属性',
|
handler: this.cancelJumpStop,
|
||||||
handler: this.detail,
|
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
auth: { station: true, center: true }
|
||||||
auth: { station: true, center: true },
|
},
|
||||||
}
|
{
|
||||||
],
|
label: '设置停站时间',
|
||||||
central: [
|
handler: this.setStopTime,
|
||||||
{
|
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
||||||
label: '设置扣车',
|
auth: { station: true, center: true }
|
||||||
handler: this.setDetainTrain,
|
},
|
||||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
{
|
||||||
auth: { station: true, center: true },
|
label: '设置站间运行等级',
|
||||||
},
|
handler: this.setRunLevel,
|
||||||
{
|
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
||||||
label: '取消扣车',
|
auth: { station: true, center: true }
|
||||||
handler: this.cancelDetainTrain,
|
},
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
{
|
||||||
auth: { station: true, center: true },
|
label: '属性',
|
||||||
},
|
handler: this.detail,
|
||||||
{
|
disabledCallback: MenuDisabledState.StationStand.detail,
|
||||||
label: '设置跳停',
|
auth: { station: true, center: true }
|
||||||
handler: this.setJumpStop,
|
}
|
||||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
]
|
||||||
auth: { station: true, center: true },
|
},
|
||||||
},
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '取消跳停',
|
label: '设置故障',
|
||||||
handler: this.cancelJumpStop,
|
handler: this.setStoppage,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
disabledCallback: MenuDisabledState.StationStand.setStoppage
|
||||||
auth: { station: true, center: true },
|
},
|
||||||
},
|
{
|
||||||
{
|
label: '取消故障',
|
||||||
label: '设置停站时间',
|
handler: this.cancelStoppage,
|
||||||
handler: this.setStopTime,
|
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
|
||||||
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
}
|
||||||
auth: { station: true, center: true },
|
]
|
||||||
},
|
};
|
||||||
{
|
},
|
||||||
label: '设置站间运行等级',
|
computed: {
|
||||||
handler: this.setRunLevel,
|
...mapGetters('training', [
|
||||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
'mode',
|
||||||
auth: { station: true, center: true },
|
'operatemode'
|
||||||
},
|
]),
|
||||||
{
|
...mapGetters('menuOperation', [
|
||||||
label: '属性',
|
'buttonOperation'
|
||||||
handler: this.detail,
|
])
|
||||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
},
|
||||||
auth: { station: true, center: true },
|
watch: {
|
||||||
}
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
]
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
|
||||||
},
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
menuForce: [
|
} else {
|
||||||
{
|
this.doClose();
|
||||||
label: '设置故障',
|
}
|
||||||
handler: this.setStoppage,
|
}
|
||||||
disabledCallback: MenuDisabledState.StationStand.setStoppage
|
},
|
||||||
},
|
methods: {
|
||||||
{
|
clickEvent() {
|
||||||
label: '取消故障',
|
const self = this;
|
||||||
handler: this.cancelStoppage,
|
window.onclick = function (e) {
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
|
self.doClose();
|
||||||
}
|
};
|
||||||
]
|
},
|
||||||
}
|
initMenu() {
|
||||||
},
|
// 编辑模式菜单列表
|
||||||
computed: {
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
...mapGetters('training', [
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
'mode',
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
'operatemode'
|
}
|
||||||
]),
|
|
||||||
...mapGetters('menuOperation', [
|
|
||||||
'buttonOperation'
|
|
||||||
])
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
|
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
|
||||||
} else {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
clickEvent() {
|
|
||||||
let self = this;
|
|
||||||
window.onclick = function (e) {
|
|
||||||
self.doClose();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
initMenu() {
|
|
||||||
//编辑模式菜单列表
|
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
|
||||||
this.menu = [...this.menu, ...this.menuForce]
|
|
||||||
}
|
|
||||||
|
|
||||||
//故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
this.menu = menuConvert(this.menu);
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
label: MapDeviceType.StationStand.label,
|
label: MapDeviceType.StationStand.label,
|
||||||
operation: OperationEvent.StationStand.stoppage.menu.operation
|
operation: OperationEvent.StationStand.stoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
label: MapDeviceType.StationStand.label,
|
label: MapDeviceType.StationStand.label,
|
||||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation
|
operation: OperationEvent.StationStand.cancelStoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
label: MapDeviceType.StationStand.label,
|
label: MapDeviceType.StationStand.label,
|
||||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消扣车
|
// 取消扣车
|
||||||
cancelDetainTrain() {
|
cancelDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
label: MapDeviceType.StationStand.label,
|
label: MapDeviceType.StationStand.label,
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//设置跳停
|
// 设置跳停
|
||||||
setJumpStop() {
|
setJumpStop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
label: MapDeviceType.StationStand.label,
|
label: MapDeviceType.StationStand.label,
|
||||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation
|
operation: OperationEvent.StationStand.setJumpStop.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消跳停
|
// 取消跳停
|
||||||
cancelJumpStop() {
|
cancelJumpStop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
label: MapDeviceType.StationStand.label,
|
label: MapDeviceType.StationStand.label,
|
||||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
|
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//停站时间控制
|
// 停站时间控制
|
||||||
setStopTime() {
|
setStopTime() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
label: MapDeviceType.StationStand.label,
|
label: MapDeviceType.StationStand.label,
|
||||||
operation: OperationEvent.StationStand.setStopTime.menu.operation
|
operation: OperationEvent.StationStand.setStopTime.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempDate = null;
|
let tempDate = null;
|
||||||
if (response) {
|
if (response) {
|
||||||
tempDate = response.data;
|
tempDate = response.data;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected, tempDate);
|
this.$refs.standControl.doShow(operate, this.selected, tempDate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 设置运行等级
|
// 设置运行等级
|
||||||
setRunLevel() {
|
setRunLevel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
label: MapDeviceType.StationStand.label,
|
label: MapDeviceType.StationStand.label,
|
||||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation
|
operation: OperationEvent.StationStand.setRunLevel.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempDate = null;
|
let tempDate = null;
|
||||||
if (response) {
|
if (response) {
|
||||||
tempDate = response.data;
|
tempDate = response.data;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected, tempDate);
|
this.$refs.standControl.doShow(operate, this.selected, tempDate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//查询站台状态
|
// 查询站台状态
|
||||||
detail() {
|
detail() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
label: MapDeviceType.StationStand.label,
|
label: MapDeviceType.StationStand.label,
|
||||||
operation: OperationEvent.StationStand.detail.menu.operation
|
operation: OperationEvent.StationStand.detail.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempDate = null;
|
let tempDate = null;
|
||||||
if (response) {
|
if (response) {
|
||||||
tempDate = response.data;
|
tempDate = response.data;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
|
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,462 +1,453 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<section-control ref="sectionControl"></section-control>
|
<section-control ref="sectionControl" />
|
||||||
<switch-control ref="switchControl"></switch-control>
|
<switch-control ref="switchControl" />
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SectionControl from './dialog/sectionControl';
|
import SectionControl from './dialog/sectionControl';
|
||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from './dialog/switchControl';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||||
import { mouseCancelState } from './utils/menuItemStatus';
|
import { mouseCancelState } from './utils/menuItemStatus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
SectionControl,
|
SectionControl,
|
||||||
SwitchControl,
|
SwitchControl,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
}
|
default: () => {
|
||||||
},
|
return null;
|
||||||
data() {
|
}
|
||||||
return {
|
}
|
||||||
menu: [],
|
},
|
||||||
menuNormal: {
|
data() {
|
||||||
local: [
|
return {
|
||||||
{
|
menu: [],
|
||||||
label: '单操到定位',
|
menuNormal: {
|
||||||
handler: this.locate,
|
local: [
|
||||||
disabledCallback: MenuDisabledState.Switch.locate,
|
// {
|
||||||
auth: { station: true, center: true }
|
// label: '单操到定位',
|
||||||
},
|
// handler: this.locate,
|
||||||
{
|
// disabledCallback: MenuDisabledState.Switch.locate,
|
||||||
label: '单操到反位',
|
// auth: { station: true, center: true }
|
||||||
handler: this.reverse,
|
// },
|
||||||
disabledCallback: MenuDisabledState.Switch.reverse,
|
// {
|
||||||
auth: { station: true, center: true }
|
// label: '单操到反位',
|
||||||
},
|
// handler: this.reverse,
|
||||||
{
|
// disabledCallback: MenuDisabledState.Switch.reverse,
|
||||||
label: '道岔单锁',
|
// auth: { station: true, center: true }
|
||||||
handler: this.lock,
|
// },
|
||||||
disabledCallback: MenuDisabledState.Switch.lock,
|
// {
|
||||||
auth: { station: true, center: false }
|
// label: '道岔单锁',
|
||||||
},
|
// handler: this.lock,
|
||||||
{
|
// disabledCallback: MenuDisabledState.Switch.lock,
|
||||||
label: '道岔解锁',
|
// auth: { station: true, center: false }
|
||||||
handler: this.unlock,
|
// },
|
||||||
disabledCallback: MenuDisabledState.Switch.unlock,
|
// {
|
||||||
auth: { station: true, center: true }
|
// label: '道岔解锁',
|
||||||
},
|
// handler: this.unlock,
|
||||||
{
|
// disabledCallback: MenuDisabledState.Switch.unlock,
|
||||||
label: '道岔封锁',
|
// auth: { station: true, center: true }
|
||||||
handler: this.block,
|
// },
|
||||||
disabledCallback: MenuDisabledState.Switch.block,
|
// {
|
||||||
auth: { station: true, center: true }
|
// label: '道岔封锁',
|
||||||
},
|
// handler: this.block,
|
||||||
{
|
// disabledCallback: MenuDisabledState.Switch.block,
|
||||||
label: '道岔解封',
|
// auth: { station: true, center: true }
|
||||||
handler: this.unblock,
|
// },
|
||||||
disabledCallback: MenuDisabledState.Switch.unblock,
|
// {
|
||||||
auth: { station: true, center: true }
|
// label: '道岔解封',
|
||||||
},
|
// handler: this.unblock,
|
||||||
{
|
// disabledCallback: MenuDisabledState.Switch.unblock,
|
||||||
label: '区故解',
|
// auth: { station: true, center: true }
|
||||||
handler: this.fault,
|
// }
|
||||||
disabledCallback: MenuDisabledState.Switch.fault,
|
],
|
||||||
auth: { station: true, center: true }
|
central: [
|
||||||
},
|
{
|
||||||
{
|
label: '单操到定位',
|
||||||
label: '属性',
|
handler: this.locate,
|
||||||
handler: this.undeveloped,
|
disabledCallback: MenuDisabledState.Switch.locate,
|
||||||
disabledCallback: MenuDisabledState.Switch.property,
|
auth: { station: true, center: true }
|
||||||
auth: { station: true, center: true }
|
},
|
||||||
},
|
{
|
||||||
],
|
label: '单操到反位',
|
||||||
central: [
|
handler: this.reverse,
|
||||||
{
|
disabledCallback: MenuDisabledState.Switch.reverse,
|
||||||
label: '单操到定位',
|
auth: { station: true, center: true }
|
||||||
handler: this.locate,
|
},
|
||||||
disabledCallback: MenuDisabledState.Switch.locate,
|
{
|
||||||
auth: { station: true, center: true }
|
label: '道岔单锁',
|
||||||
},
|
handler: this.lock,
|
||||||
{
|
disabledCallback: MenuDisabledState.Switch.lock,
|
||||||
label: '单操到反位',
|
auth: { station: true, center: false }
|
||||||
handler: this.reverse,
|
},
|
||||||
disabledCallback: MenuDisabledState.Switch.reverse,
|
{
|
||||||
auth: { station: true, center: true }
|
label: '道岔解锁',
|
||||||
},
|
handler: this.unlock,
|
||||||
{
|
disabledCallback: MenuDisabledState.Switch.unlock,
|
||||||
label: '道岔单锁',
|
auth: { station: true, center: true }
|
||||||
handler: this.lock,
|
},
|
||||||
disabledCallback: MenuDisabledState.Switch.lock,
|
{
|
||||||
auth: { station: true, center: false }
|
label: '道岔封锁',
|
||||||
},
|
handler: this.block,
|
||||||
{
|
disabledCallback: MenuDisabledState.Switch.block,
|
||||||
label: '道岔解锁',
|
auth: { station: true, center: true }
|
||||||
handler: this.unlock,
|
},
|
||||||
disabledCallback: MenuDisabledState.Switch.unlock,
|
{
|
||||||
auth: { station: true, center: true }
|
label: '道岔解封',
|
||||||
},
|
handler: this.unblock,
|
||||||
{
|
disabledCallback: MenuDisabledState.Switch.unblock,
|
||||||
label: '道岔封锁',
|
auth: { station: true, center: true }
|
||||||
handler: this.block,
|
},
|
||||||
disabledCallback: MenuDisabledState.Switch.block,
|
{
|
||||||
auth: { station: true, center: true }
|
label: '区故解',
|
||||||
},
|
handler: this.fault,
|
||||||
{
|
disabledCallback: MenuDisabledState.Switch.fault,
|
||||||
label: '道岔解封',
|
auth: { station: true, center: true }
|
||||||
handler: this.unblock,
|
}
|
||||||
disabledCallback: MenuDisabledState.Switch.unblock,
|
// {
|
||||||
auth: { station: true, center: true }
|
// label: '属性',
|
||||||
},
|
// handler: this.undeveloped,
|
||||||
{
|
// disabledCallback: MenuDisabledState.Switch.property,
|
||||||
label: '区故解',
|
// auth: { station: true, center: true }
|
||||||
handler: this.fault,
|
// }
|
||||||
disabledCallback: MenuDisabledState.Switch.fault,
|
]
|
||||||
auth: { station: true, center: true }
|
},
|
||||||
},
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '属性',
|
label: '设置故障',
|
||||||
handler: this.undeveloped,
|
handler: this.setStoppage,
|
||||||
disabledCallback: MenuDisabledState.Switch.property,
|
disabledCallback: MenuDisabledState.Switch.setStoppage,
|
||||||
auth: { station: true, center: true }
|
auth: {
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
menuForce: [
|
|
||||||
{
|
|
||||||
label: '设置故障',
|
|
||||||
handler: this.setStoppage,
|
|
||||||
disabledCallback: MenuDisabledState.Switch.setStoppage,
|
|
||||||
auth: {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消故障',
|
label: '取消故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.cancelStoppage,
|
||||||
disabledCallback: MenuDisabledState.Switch.cancelStoppage,
|
disabledCallback: MenuDisabledState.Switch.cancelStoppage,
|
||||||
auth: {
|
auth: {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
computed: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
...mapGetters('training', [
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
'mode',
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
'operatemode'
|
||||||
} else {
|
]),
|
||||||
this.doClose();
|
...mapGetters('menuOperation', [
|
||||||
}
|
'buttonOperation'
|
||||||
}
|
])
|
||||||
},
|
},
|
||||||
computed: {
|
watch: {
|
||||||
...mapGetters('training', [
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
'mode',
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||||
'operatemode'
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
]),
|
} else {
|
||||||
...mapGetters('menuOperation', [
|
this.doClose();
|
||||||
'buttonOperation'
|
}
|
||||||
])
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
let self = this;
|
const self = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
self.doClose();
|
self.doClose();
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
//编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce]
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
}
|
}
|
||||||
|
|
||||||
//故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
this.menu = menuConvert(this.menu);
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.stoppage.menu.operation
|
operation: OperationEvent.Switch.stoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation
|
operation: OperationEvent.Switch.cancelStoppage.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//道岔单锁
|
// 道岔单锁
|
||||||
lock() {
|
lock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.lock.menu.operation
|
operation: OperationEvent.Switch.lock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔解封
|
// 道岔解封
|
||||||
unlock() {
|
unlock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.unlock.menu.operation
|
operation: OperationEvent.Switch.unlock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
block() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.block.menu.operation
|
operation: OperationEvent.Switch.block.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔解封
|
// 道岔解封
|
||||||
unblock() {
|
unblock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.unblock.menu.operation
|
operation: OperationEvent.Switch.unblock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔强扳
|
// 道岔强扳
|
||||||
switchTurnoutForce() {
|
switchTurnoutForce() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔转动
|
// 道岔转动
|
||||||
switchTurnout() {
|
switchTurnout() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.turnout.menu.operation
|
operation: OperationEvent.Switch.turnout.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
if (operate.operation) {
|
if (operate.operation) {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//道岔故障解锁
|
// 道岔故障解锁/ 区故解
|
||||||
fault() {
|
fault() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.fault.menu.operation
|
operation: OperationEvent.Switch.fault.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔取消速度
|
// 道岔取消速度
|
||||||
cancelSpeed() {
|
cancelSpeed() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation
|
operation: OperationEvent.Switch.cancelSpeed.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempData = response.data;
|
const tempData = response.data;
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//区段切除
|
// 区段切除
|
||||||
split() {
|
split() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.split.menu.operation
|
operation: OperationEvent.Switch.split.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//区段激活
|
// 区段激活
|
||||||
active() {
|
active() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.active.menu.operation
|
operation: OperationEvent.Switch.active.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//单操到定位
|
// 单操到定位
|
||||||
locate() {
|
locate() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.locate.menu.operation
|
operation: OperationEvent.Switch.locate.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//单操到反位
|
// 单操到反位
|
||||||
reverse() {
|
reverse() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
label: MapDeviceType.Switch.label,
|
label: MapDeviceType.Switch.label,
|
||||||
operation: OperationEvent.Switch.reverse.menu.operation
|
operation: OperationEvent.Switch.reverse.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
undeveloped() {
|
undeveloped() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$alert('实现中......', '提示', {
|
this.$alert('实现中......', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
callback: action => {
|
callback: action => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,149 +1,159 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="menuTool">
|
<div id="menuTool">
|
||||||
<div class="nav">
|
<div class="nav">
|
||||||
<div class="tool" v-for="(item,index) in tools" :key="index">
|
<div v-for="(item,index) in tools" :key="index" class="tool">
|
||||||
<img :src="item.src" :alt="item.title" />
|
<img :src="item.src" :alt="item.title">
|
||||||
</div>
|
</div>
|
||||||
<img class="logo" :src="logoImg" />
|
<img class="logo" :src="logoImg">
|
||||||
<system-time class="time" v-if="isShowSystemTime" :time="time" :zoom="2" :width="180" :height="48" :fine="2"
|
<system-time
|
||||||
:top="6"></system-time>
|
v-if="isShowSystemTime"
|
||||||
</div>
|
class="time"
|
||||||
|
:time="time"
|
||||||
|
:zoom="2"
|
||||||
|
:width="180"
|
||||||
|
:height="48"
|
||||||
|
:fine="2"
|
||||||
|
:top="6"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
// import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
// import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
// import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { prefixIntrger } from '@/utils/date';
|
import { prefixIntrger } from '@/utils/date';
|
||||||
import SystemTime from '@/views/components/systemTime/index';
|
import SystemTime from '@/views/components/systemTime/index';
|
||||||
import logo_ from '@/assets/logo_.png';
|
import logo_ from '@/assets/logo_.png';
|
||||||
|
|
||||||
|
export default {
|
||||||
export default {
|
name: 'MenuTool',
|
||||||
name: 'MenuTool',
|
components: {
|
||||||
props: {
|
SystemTime
|
||||||
selected: {
|
},
|
||||||
type: Object
|
props: {
|
||||||
}
|
selected: {
|
||||||
},
|
type: Object,
|
||||||
components: {
|
default() {
|
||||||
SystemTime
|
return null;
|
||||||
},
|
}
|
||||||
data() {
|
}
|
||||||
return {
|
},
|
||||||
logoImg: logo_,
|
data() {
|
||||||
time: '00:0000',
|
return {
|
||||||
tools: [
|
logoImg: logo_,
|
||||||
{
|
time: '00:0000',
|
||||||
title: '服务器1',
|
tools: [
|
||||||
operate: '',
|
{
|
||||||
src: logo_,
|
title: '服务器1',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: logo_,
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '服务器2',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '服务器2',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '前置机1',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '前置机1',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '前置机2',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '前置机2',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '主调',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '主调',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '调度台1',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '调度台1',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '调度台2',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '调度台2',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '调度台3',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '调度台3',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '大屏',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '大屏',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '维护工作站',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '维护工作站',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '运行图显示人工站',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '运行图显示人工站',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '跳停',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '跳停',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '扣车',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: '',
|
title: '扣车',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
},
|
src: '',
|
||||||
{
|
click: this.undeveloped
|
||||||
title: '列车报警',
|
},
|
||||||
operate: '',
|
{
|
||||||
src: logo_,
|
title: '列车报警',
|
||||||
click: this.undeveloped,
|
operate: '',
|
||||||
}
|
src: logo_,
|
||||||
]
|
click: this.undeveloped
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
watch: {
|
};
|
||||||
'$store.state.training.initTime': function (initTime) {
|
},
|
||||||
let date = new Date(initTime);
|
computed: {
|
||||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
|
isShowSystemTime() {
|
||||||
}
|
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
||||||
},
|
}
|
||||||
computed: {
|
},
|
||||||
isShowSystemTime() {
|
watch: {
|
||||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
'$store.state.training.initTime': function (initTime) {
|
||||||
}
|
const date = new Date(initTime);
|
||||||
},
|
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||||
mounted() {
|
}
|
||||||
this.initTools();
|
},
|
||||||
},
|
mounted() {
|
||||||
methods: {
|
this.initTools();
|
||||||
initTools() {
|
},
|
||||||
this.tools = [];
|
methods: {
|
||||||
}
|
initTools() {
|
||||||
}
|
this.tools = [];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
<style scoped rel="stylesheet/scss" lang="scss">
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
$top: 30px;
|
$top: 30px;
|
||||||
$width: 50px;
|
$width: 50px;
|
||||||
@ -187,7 +197,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
position: relative;
|
position: relative;
|
||||||
float: right;
|
float: right;
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<train-control ref="trainControl" />
|
<train-control ref="trainControl" />
|
||||||
<train-delete ref="trainDelete" />
|
|
||||||
<train-move ref="trainMove" />
|
|
||||||
<train-switch ref="trainSwitch" />
|
|
||||||
<train-edit-number ref="trainEditNumber" />
|
<train-edit-number ref="trainEditNumber" />
|
||||||
<train-create-number ref="trainCreateNumber" />
|
<train-create-number ref="trainCreateNumber" />
|
||||||
<train-move-number ref="trainMoveNumber" />
|
<train-move-number ref="trainMoveNumber" />
|
||||||
@ -22,9 +19,9 @@ import { OperateMode } from '@/scripts/ConstDic';
|
|||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
|
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
|
||||||
import TrainControl from './dialog/trainControl';
|
import TrainControl from './dialog/trainControl';
|
||||||
import TrainDelete from './dialog/trainDelete';
|
// import TrainDelete from './dialog/trainDelete';
|
||||||
import TrainMove from './dialog/trainMove';
|
// import TrainMove from './dialog/trainMove';
|
||||||
import TrainSwitch from './dialog/trainSwitch';
|
// import TrainSwitch from './dialog/trainSwitch';
|
||||||
import TrainEditNumber from './dialog/trainEditNumber';
|
import TrainEditNumber from './dialog/trainEditNumber';
|
||||||
import TrainMoveNumber from './dialog/trainMoveNumber';
|
import TrainMoveNumber from './dialog/trainMoveNumber';
|
||||||
import TrainCreateNumber from './dialog/trainCreateNumber';
|
import TrainCreateNumber from './dialog/trainCreateNumber';
|
||||||
@ -38,9 +35,6 @@ export default {
|
|||||||
PopMenu,
|
PopMenu,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
TrainControl,
|
TrainControl,
|
||||||
TrainDelete,
|
|
||||||
TrainMove,
|
|
||||||
TrainSwitch,
|
|
||||||
TrainEditNumber,
|
TrainEditNumber,
|
||||||
TrainMoveNumber,
|
TrainMoveNumber,
|
||||||
TrainCreateNumber,
|
TrainCreateNumber,
|
||||||
@ -195,7 +189,6 @@ export default {
|
|||||||
doClose() {
|
doClose() {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
// this.$store.dispatch('map/setTrainWindowShow', false);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
@ -334,30 +327,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
undeveloped() {
|
|
||||||
this.doClose();
|
|
||||||
this.$alert('实现中......', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
callback: action => {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 添加列车识别号
|
|
||||||
addTrainId() {
|
|
||||||
const operate = {
|
|
||||||
start: true,
|
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
label: MapDeviceType.Train.label,
|
|
||||||
operation: OperationEvent.Train.addTrainId.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.trainControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 创建车组号
|
// 创建车组号
|
||||||
createTrainNo() {
|
createTrainNo() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -374,22 +343,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 删除列车识别号
|
|
||||||
delTrainId() {
|
|
||||||
const operate = {
|
|
||||||
start: true,
|
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
label: MapDeviceType.Train.label,
|
|
||||||
operation: OperationEvent.Train.delTrainId.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.trainDelete.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 删除车组号
|
// 删除车组号
|
||||||
deleteTrainNo() {
|
deleteTrainNo() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -406,22 +359,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 修改列车识别号
|
|
||||||
editTrainId() {
|
|
||||||
const operate = {
|
|
||||||
start: true,
|
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
label: MapDeviceType.Train.label,
|
|
||||||
operation: OperationEvent.Train.editTrainId.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.trainControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 修改车组号
|
// 修改车组号
|
||||||
editTrainNo() {
|
editTrainNo() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -454,35 +391,11 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 移动列车识别号
|
undeveloped() {
|
||||||
moveTrainId() {
|
this.doClose();
|
||||||
const operate = {
|
this.$alert('实现中......', '提示', {
|
||||||
start: true,
|
confirmButtonText: '确定',
|
||||||
code: this.selected.code,
|
callback: action => {
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
label: MapDeviceType.Train.label,
|
|
||||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.trainMove.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 交换列车识别号
|
|
||||||
switchTrainId() {
|
|
||||||
const operate = {
|
|
||||||
start: true,
|
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Train.type,
|
|
||||||
label: MapDeviceType.Train.label,
|
|
||||||
operation: OperationEvent.Train.switchTrainId.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.trainSwitch.doShow(operate, this.selected);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="statusBar"></div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'StatusBar',
|
|
||||||
props: {
|
|
||||||
selected: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
#statusBar {
|
|
||||||
z-index: 1000;
|
|
||||||
position: absolute;
|
|
||||||
height: $height;
|
|
||||||
line-height: $height;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,31 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="statusDownTrainDetail"></div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'StatusDownTrainDetail',
|
|
||||||
props: {
|
|
||||||
selected: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
#statusDownTrainDetail {
|
|
||||||
z-index: 1000;
|
|
||||||
position: absolute;
|
|
||||||
height: $height;
|
|
||||||
line-height: $height;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,31 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="statusUpTrainDetail"></div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'StatusUpTrainDetail',
|
|
||||||
props: {
|
|
||||||
selected: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
#statusUpTrainDetail {
|
|
||||||
z-index: 1000;
|
|
||||||
position: absolute;
|
|
||||||
height: $height;
|
|
||||||
line-height: $height;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -77,6 +77,20 @@ export const MenuDisabledState = {
|
|||||||
if (device && device.status == deviceState.Section.status.State13) {
|
if (device && device.status == deviceState.Section.status.State13) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 设置故障
|
||||||
|
setStoppage() {
|
||||||
|
const device = getCurrentStateObject();
|
||||||
|
if (device && device.fault) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 取消故障
|
||||||
|
cancelStoppage() {
|
||||||
|
const device = getCurrentStateObject();
|
||||||
|
if (device && !device.fault) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Signal: {
|
Signal: {
|
||||||
@ -377,9 +391,6 @@ export const MenuDisabledState = {
|
|||||||
// 单操到反位
|
// 单操到反位
|
||||||
reverse() {
|
reverse() {
|
||||||
},
|
},
|
||||||
// 区故解
|
|
||||||
solution() {
|
|
||||||
},
|
|
||||||
// 属性
|
// 属性
|
||||||
property() {
|
property() {
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@ export default {
|
|||||||
importData(Sheet, JsonData) {
|
importData(Sheet, JsonData) {
|
||||||
var dataList = convertSheetToList(Sheet, false);
|
var dataList = convertSheetToList(Sheet, false);
|
||||||
var needList = Object.keys(this.ExcelConfig.columns);
|
var needList = Object.keys(this.ExcelConfig.columns);
|
||||||
|
|
||||||
if (dataList && dataList.length) {
|
if (dataList && dataList.length) {
|
||||||
for (var rowIndex = this.ExcelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) {
|
for (var rowIndex = this.ExcelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) {
|
||||||
for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList[this.ExcelConfig.beginCol].length; colIndex += this.ExcelConfig.fieldNum + 1) {
|
for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList[this.ExcelConfig.beginCol].length; colIndex += this.ExcelConfig.fieldNum + 1) {
|
||||||
@ -118,8 +117,9 @@ export default {
|
|||||||
lastPoint = train.stationTimeList[idx - 1];
|
lastPoint = train.stationTimeList[idx - 1];
|
||||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
|
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
|
||||||
num = this.computedReentryNumber(train.tripNumber);
|
num = this.computedReentryNumber(train.tripNumber);
|
||||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode]);
|
const aa = `${train.directionCode}${train.tripNumber}`;
|
||||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode]);
|
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
|
||||||
|
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 如果是备用车,按车次添加线*/
|
/** 如果是备用车,按车次添加线*/
|
||||||
|
@ -122,7 +122,6 @@
|
|||||||
import XLSX from 'xlsx';
|
import XLSX from 'xlsx';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { importRunPlan } from '@/api/runplan';
|
import { importRunPlan } from '@/api/runplan';
|
||||||
import { importData } from '../planConvert';
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
|
||||||
|
@ -1,72 +1,81 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm notice-info" :title="title" :visible.sync="show" width="360px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
<div class="context">
|
class="chengdou-03__systerm notice-info"
|
||||||
<template v-for="message in messages">
|
:title="title"
|
||||||
<span>{{message}}</span><br>
|
:visible.sync="show"
|
||||||
</template>
|
width="360px"
|
||||||
</div>
|
:before-close="doClose"
|
||||||
<el-row justify="center" class="button-group">
|
:z-index="2000"
|
||||||
<el-col :span="10" :offset="8">
|
:modal="false"
|
||||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
append-to-body
|
||||||
</el-row>
|
>
|
||||||
</span>
|
<span class="context">
|
||||||
</el-dialog>
|
<template v-for="(message, index) in messages">
|
||||||
|
<span :key="index">{{ message }}</span>
|
||||||
|
</template>
|
||||||
|
</span>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="10" :offset="8">
|
||||||
|
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NoticeInfo',
|
name: 'NoticeInfo',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
messages: ['命令下达失败'],
|
messages: ['命令下达失败'],
|
||||||
operate: null
|
operate: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '提示';
|
return '提示';
|
||||||
},
|
},
|
||||||
domIdSure() {
|
domIdSure() {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, messages) {
|
doShow(operate, messages) {
|
||||||
this.operate = operate || {};
|
this.operate = operate || {};
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.messages = ['命令下达失败'];
|
this.messages = ['命令下达失败'];
|
||||||
if (messages) {
|
if (messages) {
|
||||||
this.messages = messages;
|
this.messages = messages;
|
||||||
}
|
}
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,163 +1,173 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
<div class="context">
|
class="chengdou-03__systerm confirm-control"
|
||||||
<template v-for="message in messages">
|
:title="title"
|
||||||
<span>{{message}}</span>
|
:visible.sync="show"
|
||||||
</template>
|
width="360px"
|
||||||
</div>
|
:before-close="doClose"
|
||||||
<el-row justify="center" class="button-group">
|
:z-index="2000"
|
||||||
<el-col :span="10" :offset="2">
|
:modal="false"
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
append-to-body
|
||||||
<el-col :span="8" :offset="4">
|
>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<div class="context">
|
||||||
</el-col>
|
<template v-for="(message, index) in messages">
|
||||||
</el-row>
|
<span :key="index">{{ message }}</span>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
</template>
|
||||||
</el-dialog>
|
</div>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="10" :offset="2">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="4">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmTrain',
|
name: 'ConfirmTrain',
|
||||||
data() {
|
components: {
|
||||||
return {
|
NoticeInfo
|
||||||
dialogShow: false,
|
},
|
||||||
loading: false,
|
data() {
|
||||||
operate: {},
|
return {
|
||||||
messages: '',
|
dialogShow: false,
|
||||||
operation: null
|
loading: false,
|
||||||
}
|
operate: {},
|
||||||
},
|
messages: '',
|
||||||
components: {
|
operation: null
|
||||||
NoticeInfo
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||||
return '添加列车识别号';
|
return '添加列车识别号';
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||||
return '修改列车识别号';
|
return '修改列车识别号';
|
||||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||||
return '删除列车识别号';
|
return '删除列车识别号';
|
||||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||||
return '移动列车识别号';
|
return '移动列车识别号';
|
||||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||||
return '交换列车识别号';
|
return '交换列车识别号';
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||||
return '修改车组号'
|
return '修改车组号';
|
||||||
}
|
}
|
||||||
},
|
return '';
|
||||||
domIdCancel() {
|
},
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
domIdCancel() {
|
||||||
},
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
domIdConfirm() {
|
},
|
||||||
if (this.dialogShow) {
|
domIdConfirm() {
|
||||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||||
/** 添加列车识别号*/
|
/** 添加列车识别号*/
|
||||||
return OperationEvent.Train.addTrainId.confirm.domId
|
return OperationEvent.Train.addTrainId.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||||
/** 修改列车识别号*/
|
/** 修改列车识别号*/
|
||||||
return OperationEvent.Train.editTrainId.confirm.domId
|
return OperationEvent.Train.editTrainId.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||||
/** 删除列车识别号*/
|
/** 删除列车识别号*/
|
||||||
return OperationEvent.Train.delTrainId.confirm.domId
|
return OperationEvent.Train.delTrainId.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||||
/** 移动列车识别号*/
|
/** 移动列车识别号*/
|
||||||
return OperationEvent.Train.moveTrainId.confirm.domId
|
return OperationEvent.Train.moveTrainId.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||||
/** 交换列车识别号*/
|
/** 交换列车识别号*/
|
||||||
return OperationEvent.Train.switchTrainId.confirm.domId
|
return OperationEvent.Train.switchTrainId.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||||
/** 修改车组号*/
|
/** 修改车组号*/
|
||||||
return OperationEvent.Train.editTrainNo.confirm.domId
|
return OperationEvent.Train.editTrainNo.confirm.domId;
|
||||||
}
|
}
|
||||||
}
|
return '';
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.operate = operate || {};
|
this.operate = operate || {};
|
||||||
this.messages = operate.messages;
|
this.messages = operate.messages;
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||||
this.routeSetting();
|
this.routeSetting();
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||||
this.routeSetting();
|
this.routeSetting();
|
||||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||||
this.routeSetting();
|
this.routeSetting();
|
||||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||||
this.routeSetting();
|
this.routeSetting();
|
||||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||||
this.routeSetting();
|
this.routeSetting();
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||||
this.routeSetting();
|
this.routeSetting();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//进路设置
|
// 进路设置
|
||||||
routeSetting() {
|
routeSetting() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Train.addTrainId.confirm.operation,
|
operation: OperationEvent.Train.addTrainId.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,85 +1,94 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm popup-alarm" :title="title" :visible.sync="show" width="500px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row>
|
class="chengdou-03__systerm popup-alarm"
|
||||||
<el-col :offset="2">
|
:title="title"
|
||||||
<span v-for="message in messages">{{message}}</span><br>
|
:visible.sync="show"
|
||||||
</el-col>
|
width="500px"
|
||||||
</el-row>
|
:before-close="doClose"
|
||||||
<el-row justify="center" class="button-group">
|
:z-index="2000"
|
||||||
<el-col :span="10" :offset="8">
|
:modal="false"
|
||||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
append-to-body
|
||||||
</el-row>
|
>
|
||||||
</span>
|
<el-row>
|
||||||
</el-dialog>
|
<el-col :offset="2">
|
||||||
|
<span v-for="(message, index) in messages" :key="index">{{ message }}</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-button justify="center" class="button-group">
|
||||||
|
<el-col :span="10" :offset="8">
|
||||||
|
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-button>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Popup-Alarm',
|
name: 'PopupAlarm',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
messages: [],
|
messages: [],
|
||||||
operate: null,
|
operate: null,
|
||||||
operation: '',
|
operation: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '弹出式告警';
|
return '弹出式告警';
|
||||||
},
|
},
|
||||||
domIdSure() {
|
domIdSure() {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, messages) {
|
doShow(operate, messages) {
|
||||||
this.operate = operate || {};
|
this.operate = operate || {};
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.messages = messages || [];
|
this.messages = messages || [];
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
// 确认计轴有效
|
// 确认计轴有效
|
||||||
this.alxeEffective();
|
this.alxeEffective();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
alxeEffective() {
|
alxeEffective() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.alarm.operation,
|
operation: OperationEvent.Command.close.alarm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,247 +1,261 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row>
|
class="chengdou-03__systerm route-setting"
|
||||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="6">
|
:visible.sync="show"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
width="460px"
|
||||||
</el-col>
|
:before-close="doClose"
|
||||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
:z-index="2000"
|
||||||
<el-col :span="6">
|
:modal="false"
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
>
|
||||||
</el-row>
|
<el-col>
|
||||||
<div class="route-table-box">
|
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||||
<span class="route-table-tip">进路列表</span>
|
<el-col :span="6">
|
||||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini"
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
@row-click="clickEvent" height="90" highlight-current-row>
|
</el-col>
|
||||||
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px">
|
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||||
</el-table-column>
|
<el-col :span="6">
|
||||||
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px">
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
<template slot-scope="scope">
|
</el-col>
|
||||||
{{ controlTypeNameMap[scope.row.controlType] }}
|
</el-col>
|
||||||
</template>
|
<div class="route-table-box">
|
||||||
</el-table-column>
|
<span class="route-table-tip">进路列表</span>
|
||||||
<el-table-column prop="controlType" label="进路描述" :id="domIdChoose" style="margin-left:30px">
|
<el-table
|
||||||
<template slot-scope="scope">
|
ref="table"
|
||||||
无
|
:data="tempData"
|
||||||
</template>
|
border
|
||||||
</el-table-column>
|
:cell-style="tableStyle"
|
||||||
</el-table>
|
style="width: 99%;"
|
||||||
</div>
|
size="mini"
|
||||||
<el-row justify="center" style="margin-top: 40px">
|
height="90"
|
||||||
<el-col :span="12" :offset="12">
|
highlight-current-row
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled"
|
@row-click="clickEvent"
|
||||||
@click="commit">执行</el-button>
|
>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
|
||||||
</el-col>
|
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
|
||||||
</el-row>
|
<template slot-scope="scope">
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
{{ controlTypeNameMap[scope.row.controlType] }}
|
||||||
<!-- <password ref="password"></password> -->
|
</template>
|
||||||
</el-dialog>
|
</el-table-column>
|
||||||
|
<el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
|
||||||
|
<template>无</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<el-row justify="center" style="margin-top: 40px">
|
||||||
|
<el-col :span="12" :offset="12">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">执行</el-button>
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
<!-- <password ref="password"></password> -->
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
// import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
// import Password from './childDialog/childDialog/password';
|
// import Password from './childDialog/childDialog/password';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteSelection',
|
name: 'RouteSelection',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl,
|
// ConfirmControl,
|
||||||
NoticeInfo,
|
NoticeInfo
|
||||||
// Password
|
// Password
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tempData: [],
|
tempData: [],
|
||||||
beforeSectionList: [],
|
beforeSectionList: [],
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
selected: null,
|
selected: null,
|
||||||
row: null,
|
row: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
display: true,
|
display: true,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: '',
|
signalName: '',
|
||||||
tableStyle: {
|
tableStyle: {
|
||||||
'border-bottom': 'none',
|
'border-bottom': 'none'
|
||||||
},
|
},
|
||||||
controlTypeNameMap: {
|
controlTypeNameMap: {
|
||||||
'01': '折返',
|
'01': '折返',
|
||||||
'02': '直通',
|
'02': '直通'
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
|
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : ''
|
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '办理引导进路'
|
return '办理引导进路';
|
||||||
},
|
},
|
||||||
commitDisabled() {
|
commitDisabled() {
|
||||||
let disabled = true;
|
let disabled = true;
|
||||||
if (this.row) {
|
if (this.row) {
|
||||||
disabled = !this.row.canSetting
|
disabled = !this.row.canSetting;
|
||||||
}
|
}
|
||||||
return disabled;
|
return disabled;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getProtectedSectionName(row) {
|
getProtectedSectionName(row) {
|
||||||
let name = '';
|
let name = '';
|
||||||
if (row &&
|
if (row &&
|
||||||
row.overlapSectionList &&
|
row.overlapSectionList &&
|
||||||
row.overlapSectionList &&
|
row.overlapSectionList &&
|
||||||
row.overlapSectionList.length > 0) {
|
row.overlapSectionList.length > 0) {
|
||||||
|
|
||||||
let protect = row.overlapSectionList[0];
|
const protect = row.overlapSectionList[0];
|
||||||
name = `${protect.name}`;
|
name = `${protect.name}`;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
name = `${name}(${station.name})`
|
name = `${name}(${station.name})`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
},
|
},
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,而是第一次显示,则需要设置初始值
|
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name
|
this.signalName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tempData = tempData || [];
|
this.tempData = tempData || [];
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.guide();
|
this.guide();
|
||||||
this.$refs.table.setCurrentRow();
|
this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
guide() {
|
guide() {
|
||||||
// 恢复之前选中设备
|
// 恢复之前选中设备
|
||||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||||
this.beforeSectionList.forEach(elem => {
|
this.beforeSectionList.forEach(elem => {
|
||||||
elem.cutOff = false;
|
elem.cutOff = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||||
this.beforeSectionList = [];
|
this.beforeSectionList = [];
|
||||||
},
|
},
|
||||||
clickEvent(row, event, column) {
|
clickEvent(row, event, column) {
|
||||||
this.row = row;
|
this.row = row;
|
||||||
if (row) {
|
if (row) {
|
||||||
// 恢复进路区段的切除状态
|
// 恢复进路区段的切除状态
|
||||||
this.guide();
|
this.guide();
|
||||||
|
|
||||||
if (row.canSetting) {
|
if (row.canSetting) {
|
||||||
// 设置选中区段为切除状态
|
// 设置选中区段为切除状态
|
||||||
if (row.containSectionList && row.containSectionList.length) {
|
if (row.containSectionList && row.containSectionList.length) {
|
||||||
// 设置新选的进路区段为切除状态
|
// 设置新选的进路区段为切除状态
|
||||||
row.containSectionList.forEach(elem => {
|
row.containSectionList.forEach(elem => {
|
||||||
elem.cutOff = true;
|
elem.cutOff = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
||||||
this.beforeSectionList = row.containSectionList || [];
|
this.beforeSectionList = row.containSectionList || [];
|
||||||
|
|
||||||
// 设置选中指令
|
// 设置选中指令
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.guide.choose.operation,
|
operation: OperationEvent.Signal.guide.choose.operation,
|
||||||
val: row.code
|
val: row.code
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.row && this.row.canSetting) {
|
if (this.row && this.row.canSetting) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.guide.menu.operation,
|
operation: OperationEvent.Signal.guide.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.password.doShow(operate);
|
this.$refs.password.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.guide.confirm.operation,
|
operation: OperationEvent.Signal.guide.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.route-table-tip {
|
.route-table-tip {
|
||||||
|
@ -1,235 +1,249 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row>
|
class="chengdou-03__systerm route-setting"
|
||||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="6">
|
:visible.sync="show"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
width="460px"
|
||||||
</el-col>
|
:before-close="doClose"
|
||||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
:z-index="2000"
|
||||||
<el-col :span="6">
|
:modal="false"
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
>
|
||||||
</el-row>
|
<el-row>
|
||||||
<div class="route-table-box">
|
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||||
<span class="route-table-tip">进路列表</span>
|
<el-col :span="6">
|
||||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini"
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
@row-click="clickEvent" height="150" highlight-current-row>
|
</el-col>
|
||||||
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px">
|
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||||
</el-table-column>
|
<el-col :span="6">
|
||||||
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px">
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
<template slot-scope="scope">
|
</el-col>
|
||||||
{{ controlTypeNameMap[scope.row.controlType] }}
|
</el-row>
|
||||||
</template>
|
<div class="route-table-box">
|
||||||
</el-table-column>
|
<span class="route-table-tip">进路列表</span>
|
||||||
<el-table-column prop="controlType" label="进路描述" :id="domIdChoose" style="margin-left:30px">
|
<el-table
|
||||||
<template slot-scope="scope">
|
ref="table"
|
||||||
无
|
:data="tempData"
|
||||||
</template>
|
border
|
||||||
</el-table-column>
|
:cell-style="tableStyle"
|
||||||
</el-table>
|
style="width: 99%;"
|
||||||
</div>
|
size="mini"
|
||||||
<el-row justify="center" style="margin-top: 70px">
|
height="150"
|
||||||
<el-col :span="12" :offset="12">
|
highlight-current-row
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled"
|
@row-click="clickEvent"
|
||||||
@click="commit">执行</el-button>
|
>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
|
||||||
</el-col>
|
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
|
||||||
</el-row>
|
<template slot-scope="scope">
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
{{ controlTypeNameMap[scope.row.controlType] }}
|
||||||
</el-dialog>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
|
||||||
|
<template>无</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<el-row justify="center" style="margin-top: 70px">
|
||||||
|
<el-col :span="12" :offset="12">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">执行</el-button>
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
// import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteSelection',
|
name: 'RouteSelection',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl,
|
// ConfirmControl,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tempData: [],
|
tempData: [],
|
||||||
beforeSectionList: [],
|
beforeSectionList: [],
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
selected: null,
|
selected: null,
|
||||||
row: null,
|
row: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
display: true,
|
display: true,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: '',
|
signalName: '',
|
||||||
tableStyle: {
|
tableStyle: {
|
||||||
'border-bottom': 'none',
|
'border-bottom': 'none'
|
||||||
},
|
},
|
||||||
controlTypeNameMap: {
|
controlTypeNameMap: {
|
||||||
'01': '折返',
|
'01': '折返',
|
||||||
'02': '直通',
|
'02': '直通'
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''
|
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '办理进路'
|
return '办理进路';
|
||||||
},
|
},
|
||||||
commitDisabled() {
|
commitDisabled() {
|
||||||
let disabled = true;
|
let disabled = true;
|
||||||
if (this.row) {
|
if (this.row) {
|
||||||
disabled = !this.row.canSetting
|
disabled = !this.row.canSetting;
|
||||||
}
|
}
|
||||||
return disabled;
|
return disabled;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getProtectedSectionName(row) {
|
getProtectedSectionName(row) {
|
||||||
let name = '';
|
let name = '';
|
||||||
if (row &&
|
if (row &&
|
||||||
row.overlapSectionList &&
|
row.overlapSectionList &&
|
||||||
row.overlapSectionList &&
|
row.overlapSectionList &&
|
||||||
row.overlapSectionList.length > 0) {
|
row.overlapSectionList.length > 0) {
|
||||||
|
|
||||||
let protect = row.overlapSectionList[0];
|
const protect = row.overlapSectionList[0];
|
||||||
name = `${protect.name}`;
|
name = `${protect.name}`;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
name = `${name}(${station.name})`
|
name = `${name}(${station.name})`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
},
|
},
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,而是第一次显示,则需要设置初始值
|
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name
|
this.signalName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tempData = tempData || [];
|
this.tempData = tempData || [];
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.restoreBeforeDevices();
|
this.restoreBeforeDevices();
|
||||||
this.$refs.table.setCurrentRow();
|
this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
restoreBeforeDevices() {
|
restoreBeforeDevices() {
|
||||||
// 恢复之前选中设备
|
// 恢复之前选中设备
|
||||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||||
this.beforeSectionList.forEach(elem => {
|
this.beforeSectionList.forEach(elem => {
|
||||||
elem.cutOff = false;
|
elem.cutOff = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||||
this.beforeSectionList = [];
|
this.beforeSectionList = [];
|
||||||
},
|
},
|
||||||
clickEvent(row, event, column) {
|
clickEvent(row, event, column) {
|
||||||
this.row = row;
|
this.row = row;
|
||||||
if (row) {
|
if (row) {
|
||||||
// 恢复进路区段的切除状态
|
// 恢复进路区段的切除状态
|
||||||
this.restoreBeforeDevices();
|
this.restoreBeforeDevices();
|
||||||
|
|
||||||
if (row.canSetting) {
|
if (row.canSetting) {
|
||||||
// 设置选中区段为切除状态
|
// 设置选中区段为切除状态
|
||||||
if (row.containSectionList && row.containSectionList.length) {
|
if (row.containSectionList && row.containSectionList.length) {
|
||||||
// 设置新选的进路区段为切除状态
|
// 设置新选的进路区段为切除状态
|
||||||
row.containSectionList.forEach(elem => {
|
row.containSectionList.forEach(elem => {
|
||||||
elem.cutOff = true;
|
elem.cutOff = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
||||||
this.beforeSectionList = row.containSectionList || [];
|
this.beforeSectionList = row.containSectionList || [];
|
||||||
|
|
||||||
// 设置选中指令
|
// 设置选中指令
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||||
val: row.code
|
val: row.code
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.row && this.row.canSetting) {
|
if (this.row && this.row.canSetting) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.route-table-tip {
|
.route-table-tip {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,208 +1,216 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm stand-detail" :title="title" :visible.sync="show" width="380px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row class="header">
|
class="chengdou-03__systerm stand-detail"
|
||||||
<el-col :span="10">
|
:title="title"
|
||||||
<span>车站</span>
|
:visible.sync="show"
|
||||||
</el-input>
|
width="380px"
|
||||||
</el-col>
|
:before-close="doClose"
|
||||||
<el-col :span="10" :offset="2">
|
:z-index="2000"
|
||||||
<span>站台</span>
|
:modal="false"
|
||||||
</el-col>
|
:close-on-click-modal="false"
|
||||||
</el-row>
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model="stationName" size="small" disabled>
|
<span>车站</span>
|
||||||
</el-input>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="10" :offset="2">
|
||||||
<el-col :span="10" :offset="2">
|
<span>站台</span>
|
||||||
<el-input style="padding: 0 3px;" v-model="standName" size="small" disabled></el-input>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
</el-row>
|
<el-row class="header">
|
||||||
<el-row class="content">
|
<el-col :span="10">
|
||||||
<el-col :span="6">
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
<span>停站时间</span>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="10" :offset="2">
|
||||||
<el-col :span="18">
|
<el-input v-model="standName" style="padding: 0 3px;" size="small" disabled />
|
||||||
<el-input v-model="modelData.stopTime" size="small" disabled></el-input>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
</el-row>
|
<el-row class="content">
|
||||||
<el-row class="content">
|
<el-col :span="6">
|
||||||
<el-col :span="6">
|
<span>停站时间</span>
|
||||||
<span>运行等级</span>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="18">
|
||||||
<el-col :span="18">
|
<el-input v-model="modelData.stopTime" size="small" disabled />
|
||||||
<el-input v-model="modelData.runLevel" size="small" disabled></el-input>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
</el-row>
|
<el-row class="content">
|
||||||
<el-row class="content">
|
<el-col :span="6">
|
||||||
<el-col :span="6">
|
<span>运行等级</span>
|
||||||
<span>扣车</span>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="18">
|
||||||
<el-col :span="18">
|
<el-input v-model="modelData.runLevel" size="small" disabled />
|
||||||
<el-input v-model="modelData.detainCar" size="small" disabled></el-input>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
</el-row>
|
<el-row class="content">
|
||||||
<el-row class="content">
|
<el-col :span="6">
|
||||||
<el-col :span="6">
|
<span>扣车</span>
|
||||||
<span>跳停</span>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="18">
|
||||||
<el-col :span="18">
|
<el-input v-model="modelData.detainCar" size="small" disabled />
|
||||||
<el-input v-model="modelData.jumpStop" size="small" disabled></el-input>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
</el-row>
|
<el-row class="content">
|
||||||
<el-row justify="center" class="button-group">
|
<el-col :span="6">
|
||||||
<el-col :span="18">
|
<span>跳停</span>
|
||||||
<span style="opacity: 0;">1</span>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="18">
|
||||||
<el-col :span="4">
|
<el-input v-model="modelData.jumpStop" size="small" disabled />
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
</el-row>
|
<el-row justify="center" class="button-group">
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<el-col :span="18">
|
||||||
</el-dialog>
|
<span style="opacity: 0;">1</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetail',
|
name: 'StandDetail',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
tempData: [],
|
tempData: [],
|
||||||
stationName: '',
|
stationName: '',
|
||||||
standName: '',
|
standName: '',
|
||||||
strategyMap: {
|
strategyMap: {
|
||||||
'01': '无折返',
|
'01': '无折返',
|
||||||
'02': '无人折返',
|
'02': '无人折返',
|
||||||
'03': '自动换端',
|
'03': '自动换端',
|
||||||
'04': '默认'
|
'04': '默认'
|
||||||
},
|
},
|
||||||
modelData: {
|
modelData: {
|
||||||
stopTime: '自动',
|
stopTime: '自动',
|
||||||
runLevel: '自动',
|
runLevel: '自动',
|
||||||
detainCar: '无扣车',
|
detainCar: '无扣车',
|
||||||
jumpStop: '无跳停',
|
jumpStop: '无跳停'
|
||||||
},
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'stationList',
|
'stationList'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '站台信息';
|
return '站台信息';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(selected, opts) {
|
loadInitData(selected, opts) {
|
||||||
this.tempData = [];
|
this.tempData = [];
|
||||||
|
|
||||||
let stationList = this.stationList.slice();
|
// const stationList = this.stationList.slice();
|
||||||
let index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||||
let stationStand, station;
|
// let stationStand;
|
||||||
if (selected.direction == '01') { // 下行
|
// let station;
|
||||||
//下行时,此站不是最后一站
|
if (selected.direction == '01') { // 下行
|
||||||
if (index != 0) {
|
// 下行时,此站不是最后一站
|
||||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
if (index != 0) {
|
||||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||||
}
|
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||||
} else {
|
}
|
||||||
//上行时,此站不是最后一站
|
} else {
|
||||||
if (index != this.stationList.length - 1) {
|
// 上行时,此站不是最后一站
|
||||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
if (index != this.stationList.length - 1) {
|
||||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||||
}
|
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.modelData = {
|
this.modelData = {
|
||||||
stopTime: opts.parkingTime != -1 ? opts.parkingTime : '自动',
|
stopTime: opts.parkingTime != -1 ? opts.parkingTime : '自动',
|
||||||
runLevel: opts.intervalRunTime > 0 ? '常速': '自动',
|
runLevel: opts.intervalRunTime > 0 ? '常速': '自动',
|
||||||
detainCar: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '无扣车',
|
detainCar: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '无扣车',
|
||||||
jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停',
|
jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
doShow(operate, selected, opts) {
|
doShow(operate, selected, opts) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.standName = '';
|
this.standName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standName = selected.direction == '01' ? '下行' : '上行';
|
this.standName = selected.direction == '01' ? '下行' : '上行';
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loadInitData(selected, opts);
|
this.loadInitData(selected, opts);
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
operation: OperationEvent.Command.close.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.content {
|
.content {
|
||||||
|
@ -1,127 +1,137 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm two-confirmation" title="二次确认" :visible.sync="show" width="360px"
|
<el-dialog
|
||||||
:before-close="doClose" :showClose="false" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
v-dialogDrag
|
||||||
append-to-body v-dialogDrag>
|
class="chengdou-03__systerm two-confirmation"
|
||||||
<div class="context">
|
title="二次确认"
|
||||||
<template v-for="message in messages">
|
:visible.sync="show"
|
||||||
<span> {{message}}</span><br>
|
width="360px"
|
||||||
</template>
|
:before-close="doClose"
|
||||||
</div>
|
:show-close="false"
|
||||||
<el-row class="button-group">
|
:z-index="2000"
|
||||||
<el-col :span="10" :offset="3">
|
:modal="false"
|
||||||
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
append-to-body
|
||||||
<el-col :span="6" :offset="4">
|
>
|
||||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
<div class="context">
|
||||||
</el-col>
|
<template v-for="(message, index) in messages">
|
||||||
</el-row>
|
<span :key="index">{{ message }}</span>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
</template>
|
||||||
</el-dialog>
|
</div>
|
||||||
|
<el-row class="button-group">
|
||||||
|
<el-col :span="10" :offset="3">
|
||||||
|
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" :offset="4">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo'
|
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TwoConfirmation',
|
name: 'TwoConfirmation',
|
||||||
data() {
|
components: {
|
||||||
return {
|
NoticeInfo
|
||||||
dialogShow: false,
|
},
|
||||||
loading: false,
|
data() {
|
||||||
operate: '',
|
return {
|
||||||
timer: null,
|
dialogShow: false,
|
||||||
domIdConfirm: ''
|
loading: false,
|
||||||
}
|
operate: '',
|
||||||
},
|
timer: null,
|
||||||
components: {
|
domIdConfirm: ''
|
||||||
NoticeInfo
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||||
},
|
},
|
||||||
messages() {
|
messages() {
|
||||||
if (this.operate) {
|
if (this.operate) {
|
||||||
return this.operate.messages;
|
return this.operate.messages;
|
||||||
}
|
}
|
||||||
return []
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
this.domIdConfirm = '';
|
this.domIdConfirm = '';
|
||||||
if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||||
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
|
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
|
||||||
} else if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
} else if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||||
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
|
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||||
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.operate = operate || {};
|
this.operate = operate || {};
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
operation: OperationEvent.Command.close.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operate && this.operate.selection) {
|
if (this.operate && this.operate.selection) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
val: this.operate.val,
|
val: this.operate.val,
|
||||||
selection: this.operate.selection
|
selection: this.operate.selection
|
||||||
}
|
};
|
||||||
|
|
||||||
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
||||||
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||||
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}, 1000).catch((error) => {
|
}, 1000).catch(() => {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,126 +1,136 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm user-delete" :title="title" :visible.sync="show" width="260px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
<div style="padding-left: 10px; padding-bottom: 10px">
|
class="chengdou-03__systerm user-delete"
|
||||||
<i class="el-icon-info"></i>
|
:title="title"
|
||||||
<template v-for="message in messages">
|
:visible.sync="show"
|
||||||
<span>{{message}}</span>
|
width="260px"
|
||||||
</template>
|
:before-close="doClose"
|
||||||
</div>
|
:z-index="2000"
|
||||||
<el-row justify="center" class="button-group">
|
:modal="false"
|
||||||
<el-col :span="8" :offset="3">
|
:close-on-click-modal="false"
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
append-to-body
|
||||||
</el-col>
|
>
|
||||||
<el-col :span="8" :offset="2">
|
<span style="padding-left: 10px; padding-bottom: 10px">
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<i class="el-icon-info" />
|
||||||
</el-col>
|
<template v-for="(message, index) in messages">
|
||||||
</el-row>
|
<span :key="index">{{ message }}</span>
|
||||||
</el-dialog>
|
</template>
|
||||||
|
</span>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="8" :offset="3">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="2">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserDelete',
|
name: 'UserDelete',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
operate: {},
|
operate: {},
|
||||||
messages: [],
|
messages: [],
|
||||||
model: {
|
model: {
|
||||||
type: 'DELETE',
|
type: 'DELETE',
|
||||||
jobNumber: '',
|
jobNumber: '',
|
||||||
userName: '',
|
userName: ''
|
||||||
},
|
},
|
||||||
operation: null,
|
operation: null,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'stationStandList'
|
'stationStandList'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '删除用户'
|
return '删除用户';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
//非断电激活时设置初始值
|
// 非断电激活时设置初始值
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.operate = operate || {};
|
this.operate = operate || {};
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
this.messages = operate.messages;
|
this.messages = operate.messages;
|
||||||
this.model.userName = '';
|
this.model.userName = '';
|
||||||
this.model.jobNumber = '';
|
this.model.jobNumber = '';
|
||||||
if (selected) {
|
if (selected) {
|
||||||
this.model.userName = selected.userName;
|
this.model.userName = selected.userName;
|
||||||
this.model.jobNumber = selected.jobNumber;
|
this.model.jobNumber = selected.jobNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.model.userName && this.model.jobNumber) {
|
if (this.model.userName && this.model.jobNumber) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
operation: OperationEvent.Command.close.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$emit('operateUser', this.model);
|
this.$emit('operateUser', this.model);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('选择的用户名或工号为空');
|
this.$messageBox('选择的用户名或工号为空');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
.chengdou-03__systerm .el-dialog .base-label {
|
||||||
|
@ -1,208 +1,204 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px"
|
<el-dialog v-dialogDrag class="chengdou-03__systerm alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
<el-form label-width="80px" size="mini">
|
||||||
<el-form label-width="80px" size="mini">
|
<el-row>
|
||||||
<el-row>
|
<el-col :span="8">
|
||||||
<el-col :span="8">
|
<el-form-item label="线路名称">
|
||||||
<el-form-item label="线路名称">
|
<el-input v-model="model.lineName" disabled />
|
||||||
<el-input v-model="model.lineName" disabled></el-input>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="8">
|
||||||
<el-col :span="8">
|
<el-form-item label="单位名称">
|
||||||
<el-form-item label="单位名称">
|
<el-input v-model="model.unitName" disabled />
|
||||||
<el-input v-model="model.unitName" disabled></el-input>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="8">
|
||||||
<el-col :span="8">
|
<el-form-item label="模块名称">
|
||||||
<el-form-item label="模块名称">
|
<el-input v-model="model.moduleName" disabled />
|
||||||
<el-input v-model="model.moduleName" disabled></el-input>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
</el-row>
|
<el-row>
|
||||||
<el-row>
|
<el-col :span="9">
|
||||||
<el-col :span="9">
|
<el-form-item label="报警时间">
|
||||||
<el-form-item label="报警时间">
|
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
|
||||||
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled>
|
</el-form-item>
|
||||||
</el-date-picker>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="7">
|
||||||
</el-col>
|
<el-form-item>
|
||||||
<el-col :span="7">
|
<span slot="label">等 级</span>
|
||||||
<el-form-item>
|
<el-input v-model="model.level" disabled />
|
||||||
<span slot="label">等 级</span>
|
</el-form-item>
|
||||||
<el-input v-model="model.level" disabled></el-input>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="8">
|
||||||
</el-col>
|
<el-form-item label="确认状态">
|
||||||
<el-col :span="8">
|
<el-input v-model="model.confirm" disabled />
|
||||||
<el-form-item label="确认状态">
|
</el-form-item>
|
||||||
<el-input v-model="model.confirm" disabled></el-input>
|
</el-col>
|
||||||
</el-form-item>
|
</el-row>
|
||||||
</el-col>
|
<el-row>
|
||||||
</el-row>
|
<el-col :span="9" class="alarm-type">
|
||||||
<el-row>
|
<el-form-item>
|
||||||
<el-col :span="9" class="alarm-type">
|
<span slot="label">类  型</span>
|
||||||
<el-form-item>
|
<el-input v-model="model.type" disabled />
|
||||||
<span slot="label">类  型</span>
|
</el-form-item>
|
||||||
<el-input v-model="model.type" disabled></el-input>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="15" class="alarm-child-type">
|
||||||
</el-col>
|
<el-form-item label="子类型">
|
||||||
<el-col :span="15" class="alarm-child-type">
|
<el-input v-model="model.childType" disabled />
|
||||||
<el-form-item label="子类型">
|
</el-form-item>
|
||||||
<el-input v-model="model.childType" disabled></el-input>
|
</el-col>
|
||||||
</el-form-item>
|
</el-row>
|
||||||
</el-col>
|
<el-form-item label="时间摘要">
|
||||||
</el-row>
|
<el-input v-model="model.timeSummary" disabled />
|
||||||
<el-form-item label="时间摘要">
|
</el-form-item>
|
||||||
<el-input v-model="model.timeSummary" disabled></el-input>
|
<el-form-item label="推荐操作">
|
||||||
</el-form-item>
|
<el-input v-model="model.recommendedOperation" disabled />
|
||||||
<el-form-item label="推荐操作">
|
</el-form-item>
|
||||||
<el-input v-model="model.recommendedOperation" disabled></el-input>
|
<div class="alarm-detail-description">
|
||||||
</el-form-item>
|
<span> 报警详细描述</span><br>
|
||||||
<div class="alarm-detail-description">
|
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
|
||||||
<span> 报警详细描述</span><br>
|
</div>
|
||||||
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="model.alarmDetail" disabled>
|
</el-form>
|
||||||
</el-input>
|
<el-row class="button-group">
|
||||||
</div>
|
<el-col :span="3" :offset="9">
|
||||||
</el-form>
|
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
||||||
<el-row class="button-group">
|
</el-col>
|
||||||
<el-col :span="3" :offset="9">
|
<el-col :span="10">
|
||||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
<span style="line-height:26px">未确认{{ level }}级报警数目:1</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
</el-row>
|
||||||
<span style="line-height:26px">未确认{{level}}级报警数目:1</span>
|
<!-- </span> -->
|
||||||
</el-col>
|
</el-dialog>
|
||||||
</el-row>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AlarmDetail',
|
name: 'AlarmDetail',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
level: 0,
|
level: 0,
|
||||||
operate: null,
|
operate: null,
|
||||||
controlProps: {
|
controlProps: {
|
||||||
'01': '中控',
|
'01': '中控',
|
||||||
'02': '站控'
|
'02': '站控'
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
lineName: '',
|
lineName: '',
|
||||||
unitName: '',
|
unitName: '',
|
||||||
moduleName: '',
|
moduleName: '',
|
||||||
level: '',
|
level: '',
|
||||||
confirm: '',
|
confirm: '',
|
||||||
alarmDate: '',
|
alarmDate: '',
|
||||||
type: '',
|
type: '',
|
||||||
childType: '',
|
childType: '',
|
||||||
timeSummary: '',
|
timeSummary: '',
|
||||||
recommendedOperation: '',
|
recommendedOperation: '',
|
||||||
alarmDetail: ''
|
alarmDetail: ''
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'name',
|
'name'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.socket.msgHead': function (elem) {
|
'$store.state.socket.msgHead': function (elem) {
|
||||||
if (elem && elem.hasOwnProperty('success')) {
|
if (elem && elem.hasOwnProperty('success')) {
|
||||||
if (elem.success) {
|
if (elem.success) {
|
||||||
let operate = this.$store.state.training.operate;
|
const operate = this.$store.state.training.operate;
|
||||||
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||||
let newOperate = {
|
const newOperate = {
|
||||||
type: operate.type,
|
type: operate.type,
|
||||||
name: station.name,
|
name: station.name
|
||||||
}
|
};
|
||||||
|
|
||||||
this.doShow(newOperate);
|
this.doShow(newOperate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
this.operate = operate || {};
|
this.operate = operate || {};
|
||||||
this.model = {
|
this.model = {
|
||||||
lineName: this.name,
|
lineName: this.name,
|
||||||
unitName: this.operate.name,
|
unitName: this.operate.name,
|
||||||
moduleName: 'CMM控制模式转换模式',
|
moduleName: 'CMM控制模式转换模式',
|
||||||
level: '0级告警',
|
level: '0级告警',
|
||||||
confirm: '确认状态',
|
confirm: '确认状态',
|
||||||
alarmDate: new Date(),
|
alarmDate: new Date(),
|
||||||
type: '系统事件',
|
type: '系统事件',
|
||||||
childType: '依据信号设备操作命令设置控制模式',
|
childType: '依据信号设备操作命令设置控制模式',
|
||||||
timeSummary: '控制模式摘要',
|
timeSummary: '控制模式摘要',
|
||||||
recommendedOperation: '',
|
recommendedOperation: '',
|
||||||
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
|
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
|
||||||
}
|
};
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
this.$store.dispatch('socket/shiftMsgQueue');
|
this.$store.dispatch('socket/shiftMsgQueue');
|
||||||
}
|
}
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.alarm.operation,
|
operation: OperationEvent.Command.close.alarm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.alarm.operation,
|
operation: OperationEvent.Command.close.alarm.operation
|
||||||
}
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
isClose() {
|
isClose() {
|
||||||
return this.dialogShow;
|
return this.dialogShow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
.alarm-type .el-input {
|
.alarm-type .el-input {
|
||||||
width: 220px;
|
width: 220px;
|
||||||
}
|
}
|
||||||
|
@ -377,9 +377,6 @@ export const MenuDisabledState = {
|
|||||||
// 单操到反位
|
// 单操到反位
|
||||||
reverse() {
|
reverse() {
|
||||||
},
|
},
|
||||||
// 区故解
|
|
||||||
solution() {
|
|
||||||
},
|
|
||||||
// 属性
|
// 属性
|
||||||
property() {
|
property() {
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,6 @@
|
|||||||
import XLSX from 'xlsx';
|
import XLSX from 'xlsx';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { importRunPlan } from '@/api/runplan';
|
import { importRunPlan } from '@/api/runplan';
|
||||||
import { importData } from '../planConvert';
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user