Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
8a67661639
@ -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) {
|
||||
return request({
|
||||
|
@ -131,3 +131,11 @@ export function listCanPackagePermission(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'
|
||||
});
|
||||
}
|
||||
|
||||
// 加载通用排班计划
|
||||
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 |
@ -108,9 +108,9 @@ export default {
|
||||
computed: {
|
||||
width() {
|
||||
let fontNum = 0;
|
||||
let newLabel="";
|
||||
let newLabel='';
|
||||
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) {
|
||||
fontNum=newLabel.length;
|
||||
// fontNum = elem.label.length;
|
||||
@ -193,7 +193,6 @@ export default {
|
||||
}
|
||||
},
|
||||
calculateSubWidth(item) {
|
||||
// debugger;
|
||||
const children = item.children;
|
||||
let width = 0;
|
||||
let fontNum = 0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<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;">
|
||||
<qrcode-vue v-loading="loading" :value="url" :size="400" />
|
||||
</div>
|
||||
|
@ -127,7 +127,7 @@
|
||||
</el-row>
|
||||
</template>
|
||||
</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 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>
|
||||
|
@ -154,5 +154,9 @@ export default {
|
||||
no: 'No',
|
||||
details: 'Details',
|
||||
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 trainRoom from './trainRoom';
|
||||
import menu from './menu';
|
||||
import ibp from './ibp';
|
||||
|
||||
export default {
|
||||
...enLocale,
|
||||
@ -49,5 +50,6 @@ export default {
|
||||
display,
|
||||
joinTraining,
|
||||
trainRoom,
|
||||
menu
|
||||
menu,
|
||||
ibp
|
||||
};
|
||||
|
@ -9,4 +9,11 @@ export default {
|
||||
confirmSignalOpen: 'Please confirm that the signal ahead is open',
|
||||
faultInformation: 'Fault information:',
|
||||
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',
|
||||
generation: 'Generation',
|
||||
skinType: 'Skin Type',
|
||||
saveAs: 'Save As',
|
||||
skinTypeFrom: 'from',
|
||||
skinTypeTo: 'to',
|
||||
copyLesson: 'Duplicate course definition',
|
||||
minDuration: 'The Best Available',
|
||||
maxDuration: 'The Largest Available',
|
||||
trainingRemark: 'Explain',
|
||||
@ -52,6 +56,7 @@ export default {
|
||||
createChapter: 'Create chapter',
|
||||
contentSorting: 'Content sorting',
|
||||
courseList: 'Course list',
|
||||
countSkinCode: 'Duplicate skin cannot be the same type as the copied skin',
|
||||
createNewCoursesFromRelease: 'Create new courses from release',
|
||||
courseName: 'Course name:',
|
||||
parentChapter: 'Parent chapter:',
|
||||
|
@ -257,7 +257,7 @@ export default {
|
||||
acceptConversionResponseTimeout: 'Accept conversion response timeout',
|
||||
controlModeTransfersuccees: 'Control mode transfer succees',
|
||||
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.',
|
||||
normal: 'Normal',
|
||||
selectData: 'Please select a piece of data',
|
||||
@ -359,6 +359,8 @@ export default {
|
||||
addTask2: 'Add task',
|
||||
deleteTask2: 'Delete task',
|
||||
replace: 'replace',
|
||||
jumpStop: 'Jump stop',
|
||||
centerDetainTrain: 'Center detain train',
|
||||
inTheLibrary: 'In the library',
|
||||
outOfTheLibrary: 'Out of the library',
|
||||
changeTripNumber: 'Change trip number',
|
||||
|
@ -100,11 +100,17 @@ export default {
|
||||
permission: 'Permission',
|
||||
orderSelectionItem: 'Order selection item',
|
||||
orderDetails: 'Order details',
|
||||
universalPackage: '万能权限',
|
||||
createPackage: '创建权限',
|
||||
package: '权限包',
|
||||
basePackage: '基础权限',
|
||||
statusType: 'Status type',
|
||||
private: 'Private',
|
||||
public: 'Public',
|
||||
pleaseEnterContent: 'Please enter content',
|
||||
selectGoods: 'Select Goods',
|
||||
month: ' month',
|
||||
yuan: ' yuan'
|
||||
yuan: ' yuan',
|
||||
back: '返回',
|
||||
next: '下一步'
|
||||
};
|
||||
|
@ -1,6 +1,233 @@
|
||||
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',
|
||||
offlineMappingSoftware: 'Offline mapping software',
|
||||
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.',
|
||||
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',
|
||||
detail: 'Detail',
|
||||
generateRunPlan: 'Generate Daily Plan',
|
||||
generateRunjihua: 'Generate general shift schedule',
|
||||
selectTemplateRunPlan: 'Select Template Run Plan',
|
||||
pleaseSelectTemplate: 'Please Select Template Run Plan',
|
||||
selectMap: 'Select Map',
|
||||
createCommonRunPlan: 'Create Common Run Plan',
|
||||
createCommonSuccess: 'Creation of a common run plan was successful',
|
||||
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?',
|
||||
fullMark: 'Full Mark',
|
||||
passScore: 'Passing Score',
|
||||
@ -47,6 +49,7 @@ export default {
|
||||
deleteGenerateEveryRunPlan: 'This operation will delete the daily running diagram. Do you want to continue?',
|
||||
deleteGenerateRunPlanSuccess: 'Delete load plan successfully!',
|
||||
addEveryRunPlanSuccess: 'Load plan create daily plan successfully!',
|
||||
addEveryRunjihuaSuccess: 'Load plan to create universal scheduling plan successful!',
|
||||
publisherId: 'Publisher Id',
|
||||
publishTime: 'Time',
|
||||
publishVersion: 'Version',
|
||||
@ -90,6 +93,7 @@ export default {
|
||||
addExamRluesError: 'Add rule does not match full score',
|
||||
addExamRules: 'Please add exam rules!',
|
||||
saveRuleFailed: 'Save rules failed: ',
|
||||
selectSkinCode: 'Select the skin',
|
||||
|
||||
selectTypeScope: 'Please select type scope',
|
||||
operationType: 'Operation type',
|
||||
@ -104,5 +108,6 @@ export default {
|
||||
inputNumberError: 'The input value must be greater than the number of questions',
|
||||
inputScorePerQuestion: 'Please input score per question',
|
||||
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',
|
||||
accessNumber: 'Please input the number of permissions',
|
||||
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',
|
||||
modifyConversitionButton: 'modify',
|
||||
drivingByPlan: 'Driving By Plan',
|
||||
scriptBack: 'Back'
|
||||
scriptBack: 'Back',
|
||||
speakTo: 'to',
|
||||
executeCommandTips: 'execute command: '
|
||||
};
|
||||
|
@ -20,10 +20,10 @@ export default {
|
||||
operationAbnormal: 'Abnormal operation',
|
||||
createSuccess: 'Creating a successful',
|
||||
|
||||
linkCheckList: '有 link 绘图不规范, 未生成区段',
|
||||
allLinkCreate: '所有link都有相关区段,所以未生成任何区段',
|
||||
incidenceRelation: '可能是多余的,请检查关联关系',
|
||||
linkNoneSplit: '有问题,没有进行拆分',
|
||||
linkCheckList: 'Link drawing is not standard, no section is generated',
|
||||
allLinkCreate: 'All links have related extents, so no extents are generated',
|
||||
incidenceRelation: 'May be redundant, please check the association relationship',
|
||||
linkNoneSplit: "There's a problem. There's no split",
|
||||
|
||||
cannotCoincide: 'The starting and ending coordinates cannot coincide',
|
||||
cannotMerged: 'Non-physical extents exist and cannot be merged',
|
||||
@ -170,5 +170,33 @@ export default {
|
||||
selectAPieceOfData: 'Please select a piece of data',
|
||||
selectSpeedLimitValueTip: 'Please select the speed limit value, click the "release" button, and issue the command!',
|
||||
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: '否',
|
||||
details: '详情',
|
||||
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 trainRoom from './trainRoom';
|
||||
import menu from './menu';
|
||||
import ibp from './ibp';
|
||||
|
||||
export default {
|
||||
...cnLocale,
|
||||
@ -49,5 +50,6 @@ export default {
|
||||
display,
|
||||
joinTraining,
|
||||
trainRoom,
|
||||
menu
|
||||
menu,
|
||||
ibp
|
||||
};
|
||||
|
@ -9,4 +9,11 @@ export default {
|
||||
confirmSignalOpen: '请确认前方信号开放',
|
||||
faultInformation: '故障信息:',
|
||||
vWeek: ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
||||
trackCheck: '轨道检查',
|
||||
signalCheck: '信号机检查',
|
||||
turnoutCheck: '道岔检查',
|
||||
stationInfoDisplay: '站台信息——显示',
|
||||
stationInfoHidden: '站台信息——隐藏',
|
||||
trainInfoDisplay: '列车信息——显示',
|
||||
trainInfoHidden: '列车信息——隐藏'
|
||||
};
|
||||
|
@ -27,6 +27,10 @@ export default {
|
||||
wellDelTrainingRule: '此操作将删除此实训规则, 是否继续?',
|
||||
stepDetail: '步骤明细',
|
||||
generation: '自动生成',
|
||||
saveAs: '另存为',
|
||||
skinTypeFrom: '从',
|
||||
skinTypeTo: '到',
|
||||
copyLesson: '复制课程定义',
|
||||
skinType: '皮肤类型',
|
||||
minDuration: '最佳用时',
|
||||
maxDuration: '最大用时',
|
||||
@ -96,6 +100,7 @@ export default {
|
||||
platform: '站台',
|
||||
train: '列车',
|
||||
station: '车站',
|
||||
trainWindow: '车次窗'
|
||||
trainWindow: '车次窗',
|
||||
countSkinCode: '复制皮肤与被复制皮肤类型不能一样'
|
||||
};
|
||||
|
||||
|
@ -361,6 +361,7 @@ export default {
|
||||
lineStartTime: '线路开始时间',
|
||||
lineEndTime: '线路结束时间',
|
||||
lineDetails: '线路详细信息',
|
||||
jumpStop: '跳停',
|
||||
station: '车站',
|
||||
affectSubsequentTasks: '影响后续任务',
|
||||
manual: '手工',
|
||||
|
@ -86,7 +86,7 @@ export default {
|
||||
select: '选择',
|
||||
chooseGoods: '选择商品',
|
||||
permissionName: '权限名称',
|
||||
permissionGoodName: '权限商品名称',
|
||||
permissionGoodName: '权限名称', // 创建时 商品名称与权限名称一致
|
||||
receivingPermission: '领取权限',
|
||||
isPackage: '是否权限包',
|
||||
modifyPermissionContent: '修改权限内容',
|
||||
@ -105,8 +105,11 @@ export default {
|
||||
createPackage: '创建权限',
|
||||
package: '权限包',
|
||||
basePackage: '基础权限',
|
||||
universalPackage: '万能权限',
|
||||
pleaseEnterContent: '请输入内容',
|
||||
selectGoods: '选择商品',
|
||||
month: '月',
|
||||
yuan: '元'
|
||||
yuan: '元',
|
||||
back: '返回',
|
||||
next: '下一步'
|
||||
};
|
||||
|
@ -1,6 +1,236 @@
|
||||
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: '购买',
|
||||
offlineMappingSoftware: '离线编图软件',
|
||||
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: '创建时间',
|
||||
detail: '详情',
|
||||
generateRunPlan: '生成每日运行图',
|
||||
copyRunPlan: '复制运行图',
|
||||
generateRunjihua: '生成通用派班计划',
|
||||
selectTemplateRunPlan: '选择模板运行图',
|
||||
pleaseSelectTemplate: '请选择模板运行图',
|
||||
selectMap: '选择地图',
|
||||
selectSkinCode: '选择皮肤',
|
||||
createCommonRunPlan: '创建通用运行图',
|
||||
createCommonSuccess: '创建通用运行图成功',
|
||||
wellGenerateEveryRunPlan: '此操作将生成每日运行图, 是否继续?',
|
||||
wellGenerateEveryRunjihua: '此操作将生成通用派班计划, 是否继续?',
|
||||
copyRunPlanContinue: '此操作将复制该运行图, 是否继续?',
|
||||
wellDelTemplate: '此操作将删除此运行图模板, 是否继续?',
|
||||
fullMark: '满分',
|
||||
passScore: '及格分',
|
||||
@ -47,6 +52,7 @@ export default {
|
||||
deleteGenerateEveryRunPlan: '此操作将删除此运行图, 是否继续?',
|
||||
deleteGenerateRunPlanSuccess: '删除加载计划成功!',
|
||||
addEveryRunPlanSuccess: '加载计划创建每日计划成功!',
|
||||
addEveryRunjihuaSuccess: '加载计划创建通用排班计划成功!',
|
||||
publisherId: '发布人id',
|
||||
publishTime: '时间',
|
||||
publishVersion: '版本',
|
||||
@ -106,6 +112,7 @@ export default {
|
||||
// inputNumericType 请输入数字值
|
||||
// addRules 添加规则
|
||||
selectTestType: '请选择试题类型',
|
||||
modifyRules: '修改规则'
|
||||
modifyRules: '修改规则',
|
||||
enterRunPlanName: '请输入运行图名称'
|
||||
// refreshFailed 刷新失败
|
||||
};
|
||||
|
@ -277,5 +277,36 @@ export default {
|
||||
enterTheServiceNumber: '请输入表号',
|
||||
enterTheTripNumber: '请输入车次号',
|
||||
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: '修改',
|
||||
|
||||
drivingByPlan: '按计划行车',
|
||||
scriptBack: '返回'
|
||||
scriptBack: '返回',
|
||||
speakTo: '对',
|
||||
executeCommandTips: '执行指令: '
|
||||
};
|
||||
|
@ -170,5 +170,33 @@ export default {
|
||||
selectAPieceOfData: '请选择一条数据',
|
||||
selectSpeedLimitValueTip: '请选择限速值后,点击“下达”按钮,下达命令!',
|
||||
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: '结束仿真',
|
||||
distributeTheRoomQRCode: '分发房间二维码',
|
||||
increaseIbp: '增加IBP',
|
||||
kickOutTheRoom: '提出房间',
|
||||
kickOutTheRoom: '踢出房间',
|
||||
sending: '发送中...',
|
||||
holdAndTalk: '按住说话',
|
||||
recording: '录音中...',
|
||||
|
File diff suppressed because one or more lines are too long
@ -79,6 +79,8 @@ class MouseController extends Eventful {
|
||||
if (eventTool.notLeftMouse(e)) {
|
||||
return;
|
||||
}
|
||||
e.event.preventDefault();
|
||||
e.event.stopPropagation();
|
||||
const em = new EventModel(e);
|
||||
this.eventTarget = em.eventTarget;
|
||||
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
|
||||
@ -94,7 +96,7 @@ class MouseController extends Eventful {
|
||||
mousemove(e) {
|
||||
if (eventTool.notLeftMouse(e) ||
|
||||
!this._moveOnMouseMove ||
|
||||
!this._dragging
|
||||
!this._dragging || !this.isAllowDragging
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@ -112,7 +114,7 @@ class MouseController extends Eventful {
|
||||
this._preventDefaultMouseMove && eventTool.stop(e.event);
|
||||
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
|
||||
return true;
|
||||
} else if (this.isAllowDragging) {
|
||||
} else if (this.isAllowDragging && this.eventTarget) {
|
||||
this.eventTarget.grouper.drift(dx, dy, e);
|
||||
}
|
||||
} else {
|
||||
@ -122,7 +124,6 @@ class MouseController extends Eventful {
|
||||
}
|
||||
|
||||
mouseup(e) {
|
||||
console.log('-------', this.eventTarget._type===deviceType.Background);
|
||||
if (!eventTool.notLeftMouse(e)&&this.isAllowDragging && this.eventTarget) {
|
||||
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
|
||||
this.eventTarget.dirty();
|
||||
|
@ -35,7 +35,6 @@ export default class background extends Group {
|
||||
});
|
||||
this.add(this.imageBg);
|
||||
}).catch((encodingError) => {
|
||||
// Do something with the error.
|
||||
});
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
import deviceType from './constant/deviceType';
|
||||
import {createTransform, createBoundingRect} from './utils/parser';
|
||||
|
||||
class TransformHandle {
|
||||
@ -17,7 +17,7 @@ class TransformHandle {
|
||||
}
|
||||
|
||||
revisibleView(view) {
|
||||
if (this.checkVisible(view)) {
|
||||
if (this.checkVisible(view)||view._type === deviceType.Background) {
|
||||
view.show();
|
||||
} else {
|
||||
view.hide();
|
||||
|
@ -153,9 +153,9 @@ export function Jl3dDriving(updatemmi,sound) {
|
||||
if (trainlisttest.list[code].runMode == '02') {
|
||||
|
||||
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 {
|
||||
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 {
|
||||
|
||||
|
@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号字体
|
||||
},
|
||||
lamp: {
|
||||
guidName: 'defult', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
borderWidth: 0.5, // 信号灯边框线宽度
|
||||
|
@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号字体
|
||||
},
|
||||
lamp: {
|
||||
guidName: 'defult', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
borderWidth: 0.5, // 信号灯边框线宽度
|
||||
|
@ -86,13 +86,13 @@ class SkinCode extends defaultStyle {
|
||||
width: 5, // 区段宽度
|
||||
beyondWidth: 0, // 区段宽超出宽度
|
||||
invadeColor: '#FFFFFF', // 区段侵入颜色
|
||||
spareColor: '#5578B6', // 区段空闲颜色
|
||||
spareColor: '#618cc3', // 区段空闲颜色
|
||||
communicationOccupiedColor: '#FF00FF', // 区段通信车占用颜色
|
||||
unCommunicationOccupiedColor: '#DE310C', // 区段非通讯车占用颜色
|
||||
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
|
||||
routeLockColor: '#3FFD46', // 区段路由锁定颜色
|
||||
faultLockColor: '#006400', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
|
||||
protectionLockedColor: '#3FFD46', // 保护区段锁闭
|
||||
blockColor: '#00FF00', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
@ -152,6 +152,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
guidName: 'chengdu_03', // 成都三号线引导类型
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
@ -208,7 +209,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
stand: { // 站台
|
||||
headFontSize: 10, // 站台首端字体大小
|
||||
spareColor: '#808080', // 站台空闲颜色
|
||||
spareColor: '#ffffff', // 站台空闲颜色
|
||||
stopColor: '#FFF000', // 站台列车停站颜色
|
||||
jumpStopColor: '#808080', // 站台跳停颜色
|
||||
designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色
|
||||
|
@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
guidName: 'defult', // 默认引导类型
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
|
@ -143,6 +143,7 @@ class SkinCode extends defaultStyle {
|
||||
nameBorderShow: true // 信号机名字边框显示
|
||||
},
|
||||
lamp: {
|
||||
guidName: 'defult', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
|
@ -89,6 +89,10 @@ class ESigLamp extends Group {
|
||||
this.lamp.setStyle({stroke: color});
|
||||
}
|
||||
|
||||
setStyle(data) {
|
||||
this.lamp.setStyle(data);
|
||||
}
|
||||
|
||||
setStop(has) {
|
||||
if (has) {
|
||||
this.lstop.show();
|
||||
|
@ -318,7 +318,7 @@ class Signal extends Group {
|
||||
|
||||
// 引导
|
||||
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]) {
|
||||
this.lamps[0].setStop(false);
|
||||
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].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.sigAuto.animationRecover();
|
||||
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) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import LangStorage from '@/utils/lang';
|
||||
|
||||
class EMouse extends Group {
|
||||
constructor(device) {
|
||||
@ -10,19 +11,25 @@ class EMouse extends Group {
|
||||
create() {
|
||||
let destinationText = '';
|
||||
switch (this.device.model.destinationStatus) {
|
||||
case '01': destinationText = '准点'; break;
|
||||
case '02': destinationText = '早点'; break;
|
||||
case '03': destinationText = '严重早点'; break;
|
||||
case '04': destinationText = '晚点'; break;
|
||||
case '05': destinationText = '严重晚点'; break;
|
||||
default: destinationText = '未知'; break;
|
||||
case '01': destinationText = LangStorage.getLang() == 'en' ? 'fiducial point' : '准点'; break;
|
||||
case '02': destinationText = LangStorage.getLang() == 'en' ? 'soon' : '早点'; break;
|
||||
case '03': destinationText = LangStorage.getLang() == 'en' ? 'Severe early' : '严重早点'; break;
|
||||
case '04': destinationText = LangStorage.getLang() == 'en' ? 'behind schedule' : '晚点'; break;
|
||||
case '05': destinationText = LangStorage.getLang() == 'en' ? 'Serious delays' : '严重晚点'; break;
|
||||
default: destinationText = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break;
|
||||
}
|
||||
let trainType = '';
|
||||
switch (this.device.model.type) {
|
||||
case '01': trainType = '计划车'; break;
|
||||
case '02': trainType = '头码车'; break;
|
||||
case '03': trainType = '人工车'; break;
|
||||
default: trainType = '未知'; break;
|
||||
case '01': trainType = LangStorage.getLang() == 'en' ? 'Plan the car' : '计划车'; break;
|
||||
case '02': trainType = LangStorage.getLang() == 'en' ? 'Head size car' : '头码车'; break;
|
||||
case '03': trainType = LangStorage.getLang() == 'en' ? 'Artificial car' : '人工车'; 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({
|
||||
@ -31,7 +38,7 @@ class EMouse extends Group {
|
||||
style: {
|
||||
x: this.device.model.point.x + 50,
|
||||
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',
|
||||
textAlign: 'letf',
|
||||
textFont: 10 + 'px consolas',
|
||||
|
@ -1,9 +1,19 @@
|
||||
<template>
|
||||
<el-dialog class="fuzhou_01 notice-info" :title="title" :visible.sync="show" width="360px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou_01 notice-info"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span><br>
|
||||
<span>{{ message }}</span><br>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -11,21 +21,20 @@
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -41,7 +50,7 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
@ -66,7 +75,7 @@
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
@ -1,24 +1,27 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
PopMenu
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -131,7 +134,7 @@
|
||||
label: '新建列车',
|
||||
handler: this.newTrain,
|
||||
disabledCallback: MenuDisabledState.Section.newTrain
|
||||
},
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
@ -145,7 +148,7 @@
|
||||
disabledCallback: MenuDisabledState.Section.cancelStoppage
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
@ -167,21 +170,21 @@
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
const 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]
|
||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
|
||||
}
|
||||
|
||||
//故障模式菜单列表
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
@ -198,9 +201,9 @@
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -214,13 +217,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//取消故障
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -234,13 +237,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//故障解锁
|
||||
// 故障解锁
|
||||
fault() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -254,9 +257,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//切除
|
||||
// 切除
|
||||
split() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -270,9 +273,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//激活
|
||||
// 激活
|
||||
active() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -286,9 +289,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//区段计轴预复位
|
||||
// 区段计轴预复位
|
||||
axlePreReset() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -302,9 +305,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//区段解锁
|
||||
// 区段解锁
|
||||
lock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -318,9 +321,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//区段封锁
|
||||
// 区段封锁
|
||||
unlock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -334,9 +337,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//设置速度
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -350,9 +353,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//取消速度
|
||||
// 取消速度
|
||||
cancelSpeed() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -362,15 +365,15 @@
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
let tempData = response.data;
|
||||
// const tempData = response.data;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
||||
}
|
||||
});
|
||||
},
|
||||
//新建列车
|
||||
// 新建列车
|
||||
newTrain() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -382,8 +385,8 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainCreate.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<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">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
@ -9,41 +8,49 @@
|
||||
<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-option
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</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-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="信号机名称" label-width="100px">
|
||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</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
|
||||
ref="tempData"
|
||||
class="table"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
height="200"
|
||||
>
|
||||
<el-table-column prop="order" :width="50" label="序号" />
|
||||
<el-table-column prop="date" :width="160" label="时间" />
|
||||
<el-table-column prop="context" :width="180" label="执行过程" />
|
||||
<el-table-column prop="result" label="执行结果" />
|
||||
</el-table>
|
||||
<span class="notice">{{message}}</span>
|
||||
<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>
|
||||
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
|
||||
@ -51,7 +58,8 @@
|
||||
</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>
|
||||
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>
|
||||
@ -61,16 +69,16 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate"></confirm-signal-unlock>
|
||||
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { now } from '@/utils/date';
|
||||
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { now } from '@/utils/date';
|
||||
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'RouteCmdControl',
|
||||
components: {
|
||||
ConfirmSignalUnlock
|
||||
@ -92,14 +100,14 @@
|
||||
timeCountConfirm: -1,
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
|
||||
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
|
||||
]
|
||||
];
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -169,7 +177,7 @@
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && 1 <= index && index <= 2) {
|
||||
if (elem == false && index >= 1 && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
@ -180,7 +188,7 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
@ -196,7 +204,7 @@
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000)
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
@ -209,8 +217,8 @@
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -246,13 +254,13 @@
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
}
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type
|
||||
};
|
||||
|
||||
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”按钮,确认命令!');
|
||||
@ -264,16 +272,16 @@
|
||||
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
commandNoPopUp() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type
|
||||
}
|
||||
};
|
||||
|
||||
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”按钮,确认命令!');
|
||||
@ -288,12 +296,12 @@
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
}
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
@ -317,13 +325,13 @@
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type
|
||||
}
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
@ -349,12 +357,12 @@
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
}
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
@ -364,7 +372,6 @@
|
||||
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) {
|
||||
@ -376,13 +383,13 @@
|
||||
}
|
||||
}).catch(error => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
close() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -425,8 +432,8 @@
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,16 +1,25 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-detain-train"
|
||||
:title="title"
|
||||
: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-input>
|
||||
<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-input>
|
||||
<el-input v-model="standName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="!earlyDepar">
|
||||
@ -18,13 +27,21 @@
|
||||
<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
|
||||
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
|
||||
v-model="radio"
|
||||
label="2"
|
||||
:disabled="radio == 1"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
本站台上行</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -33,13 +50,21 @@
|
||||
<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="1" :disabled="radio1 == '2'"
|
||||
style="display: block; text-align: left;">
|
||||
<el-radio
|
||||
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
|
||||
v-model="radio1"
|
||||
label="2"
|
||||
:disabled="radio1 == '1'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消扣车</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -50,13 +75,23 @@
|
||||
<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
|
||||
:id="upRadioId"
|
||||
v-model="radio2"
|
||||
label="1"
|
||||
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
|
||||
:id="downRadioId"
|
||||
v-model="radio2"
|
||||
label="2"
|
||||
style="display: block; text-align: left;"
|
||||
@change="changeRadio"
|
||||
>
|
||||
本站台下行</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -70,16 +105,16 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
@ -95,8 +130,8 @@
|
||||
radio: '1',
|
||||
radio1: '1',
|
||||
radio2: '1',
|
||||
earlyDepar: false,
|
||||
}
|
||||
earlyDepar: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -129,14 +164,15 @@
|
||||
} else {
|
||||
this.radio2 = '1';
|
||||
}
|
||||
return '提前发车'
|
||||
return '提前发车';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
@ -149,7 +185,7 @@
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -169,11 +205,11 @@
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
changeRadio(val) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: '',
|
||||
val: val
|
||||
}
|
||||
};
|
||||
if (val == 1) {
|
||||
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
|
||||
} else if (val == 2) {
|
||||
@ -186,7 +222,7 @@
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
})
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
@ -200,13 +236,13 @@
|
||||
this.earlyDeparture();
|
||||
}
|
||||
},
|
||||
//设置扣车
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -219,15 +255,15 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//取消扣车
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -240,15 +276,15 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//提前发车
|
||||
// 提前发车
|
||||
earlyDeparture() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -260,13 +296,13 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -278,7 +314,7 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.stand-detain-train .context {
|
||||
|
@ -1,22 +1,31 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-detain-train"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
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-input>
|
||||
<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-input>
|
||||
<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 v-model="model.val1" :id="selfStationStandId" @change="upAndDownStreamChangeVal1">
|
||||
<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>
|
||||
@ -26,7 +35,7 @@
|
||||
</el-radio-group>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-radio-group id="stand_upDown_choose" v-model="model.val2" :id="otherStationStandId" @change="upAndDownStreamChange">
|
||||
<el-radio-group id="stand_upDown_choose" :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange">
|
||||
<div style="margin-bottom: 8px;">
|
||||
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
|
||||
</div>
|
||||
@ -37,11 +46,20 @@
|
||||
</el-col>
|
||||
<el-col :span="11" align="top" :offset="2">
|
||||
<span>车组号</span>
|
||||
<el-select id="stand_trainNo_select" style="width: 110px;" v-model="model.tripNumber"
|
||||
size="mini" @change="trainNoSelectChange" :disabled="!model.val2" :id="selectTrainId">
|
||||
<el-option v-for="option in trainList" :key="option.groupNumber" :label="option.groupNumber"
|
||||
:value="option.groupNumber">
|
||||
</el-option>
|
||||
<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>
|
||||
@ -51,13 +69,21 @@
|
||||
<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
|
||||
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
|
||||
v-model="radio1"
|
||||
:label="JumpStopCancel"
|
||||
:disabled="radio1 == JumpStopSet"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -70,17 +96,17 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</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 { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'StandDetainTrains',
|
||||
components: {
|
||||
NoticeInfo
|
||||
@ -99,9 +125,9 @@
|
||||
val1: '',
|
||||
val2: '',
|
||||
tripNumber: '',
|
||||
direction: '',
|
||||
}
|
||||
direction: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -141,17 +167,17 @@
|
||||
return '跳停';
|
||||
},
|
||||
upstream() {
|
||||
return '02'; //上行
|
||||
return '02'; // 上行
|
||||
},
|
||||
downstream() {
|
||||
return '01'; //下行
|
||||
return '01'; // 下行
|
||||
},
|
||||
JumpStopSet() {
|
||||
return OperationEvent.StationStand.setJumpStop.menu.operation;
|
||||
},
|
||||
JumpStopCancel() {
|
||||
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'model.val1'(val) {
|
||||
@ -164,7 +190,7 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
@ -178,14 +204,14 @@
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.radio1 = operate.operation;
|
||||
this.model.direction = selected.direction;
|
||||
this.model.val1 = selected.direction // 站台的上下行方向, 01:下行 /02:上行
|
||||
this.model.val1 = selected.direction; // 站台的上下行方向, 01:下行 /02:上行
|
||||
this.model.val2 = '';
|
||||
this.model.tripNumber = '';
|
||||
|
||||
@ -213,19 +239,19 @@
|
||||
this.cancelJumpStop();
|
||||
}
|
||||
},
|
||||
//设置跳停
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
let val = this.model.val1;
|
||||
if (this.model.val2) {
|
||||
val = this.model.val2 + '::' + this.model.tripNumber;
|
||||
}
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
// val: this.selected.direction //站台的上下行方向, 01:下行 /02:上行
|
||||
val: val,
|
||||
}
|
||||
val: val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -233,24 +259,24 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//取消跳停
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
let val = this.model.val1;
|
||||
if (this.model.val2) {
|
||||
val = this.model.val2 + '::' + this.model.tripNumber;
|
||||
}
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
val: val //站台的上下行方向, 01:下行 /02:上行
|
||||
}
|
||||
val: val // 站台的上下行方向, 01:下行 /02:上行
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -258,73 +284,73 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
upAndDownStreamChange(val) {
|
||||
let operation = this.radio1 == this.JumpStopSet ?
|
||||
OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
|
||||
const operation = this.radio1 == this.JumpStopSet
|
||||
? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
|
||||
this.model.val1 = '';
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: operation
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
upAndDownStreamChangeVal1(val) {
|
||||
let operation = this.radio1 == this.JumpStopSet ?
|
||||
OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
|
||||
const operation = this.radio1 == this.JumpStopSet
|
||||
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
|
||||
this.model.val1 = '';
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: operation
|
||||
}
|
||||
};
|
||||
this.model.val2 = '';
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
trainNoSelectChange(val) {
|
||||
let operation = this.radio1 == this.JumpStopSet ?
|
||||
OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||
const operation = this.radio1 == this.JumpStopSet
|
||||
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||
this.model.val1 = '';
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: operation,
|
||||
val: val
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.stand-detain-train .context {
|
||||
|
@ -1,13 +1,18 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
class="beijing-01__systerm station-control"
|
||||
:title="title" :visible.sync="show" width="400px"
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:show-close="true" :z-index="2000" :modal="false" v-dialogDrag
|
||||
:show-close="true"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
>
|
||||
<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-row>
|
||||
</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>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"/>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -1,10 +1,15 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
class="beijing-01__systerm view-train-id"
|
||||
title="列车识别号显示设置" :visible.sync="show" width="420px"
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm view-train-id"
|
||||
title="列车识别号显示设置"
|
||||
:visible.sync="show"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
|
||||
>
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
@ -51,7 +56,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<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 :span="10" :offset="1">
|
||||
<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-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"/>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -87,8 +92,8 @@ export default {
|
||||
operation: '',
|
||||
planMode: 5,
|
||||
headMode: 5,
|
||||
fontSize: 16,
|
||||
}
|
||||
fontSize: 16
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
|
@ -1,31 +1,26 @@
|
||||
<template>
|
||||
<div id="statusDownTrainDetail"></div>
|
||||
<div id="statusDownTrainDetail" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
export default {
|
||||
name: 'StatusDownTrainDetail',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
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>
|
@ -137,8 +137,9 @@ export default {
|
||||
lastPoint = train.stationTimeList[idx - 1];
|
||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
|
||||
num = this.computedReentryNumber(train.tripNumber);
|
||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode]);
|
||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode]);
|
||||
const aa = `${train.directionCode}${train.tripNumber}`;
|
||||
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 { mapGetters } from 'vuex';
|
||||
import { importRunPlan } from '@/api/runplan';
|
||||
import { importData } from '../planConvert';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
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,9 +1,18 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm" :visible.sync="show" width="360px" :before-close="doClose" :zIndex="2000"
|
||||
:modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-input placeholder="请使用软键盘输入" v-model="encryptionPassword" size="medium" :disabled="true"></el-input>
|
||||
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="showMistake">
|
||||
@ -52,7 +61,7 @@
|
||||
<el-button @click="inputClear">C</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="backSpace"><-</el-button>
|
||||
<el-button @click="backSpace"> < </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -67,24 +76,24 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'passwordBox',
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
data() {
|
||||
return {
|
||||
/*写死的初始密码*/
|
||||
/* 写死的初始密码*/
|
||||
correctPassword: '123456',
|
||||
dialogShow: false,
|
||||
operation: null,
|
||||
checkHasInput: false,
|
||||
/*输入值*/
|
||||
/* 输入值*/
|
||||
passwordCheck: '',
|
||||
/*输入值替换为对应长度的星号*/
|
||||
/* 输入值替换为对应长度的星号*/
|
||||
encryptionPassword: '',
|
||||
loading: false,
|
||||
showMistake: false,
|
||||
}
|
||||
showMistake: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -97,18 +106,18 @@
|
||||
set: function () {
|
||||
}
|
||||
},
|
||||
domIdConfirm: {
|
||||
get: function () {
|
||||
return OperationEvent.Command.close.confirm.domId;
|
||||
},
|
||||
set: function () {
|
||||
domIdConfirm() {
|
||||
if (this.operate && this.operate.operateCode) {
|
||||
return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : '';
|
||||
} else {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
@ -126,45 +135,49 @@
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: false,
|
||||
const operate = {
|
||||
send: this.operate.operateCode != null,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
operation: this.operate.operateCode != null ? this.operate.operateCode : OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
if (this.operate.val) {
|
||||
operate['val'] = this.operate.val;
|
||||
}
|
||||
|
||||
if (this.passwordCheck === this.correctPassword) {
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
|
||||
if (valid) {
|
||||
this.$emit('checkOver', this.operate.operation);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$emit('checkOver');
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
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;
|
||||
let password = this.passwordCheck;
|
||||
const password = this.passwordCheck;
|
||||
if (password !== '') {
|
||||
this.passwordCheck = password.substring(0, password.length - 1);
|
||||
this.encryptionPassword = this.passwordCheck;
|
||||
@ -172,10 +185,10 @@
|
||||
},
|
||||
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: false,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.password.operation,
|
||||
operation: OperationEvent.Command.close.password.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
@ -186,11 +199,11 @@
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
@ -1,14 +1,23 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm signal-control" :title="title" :visible.sync="show" width="440px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm signal-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="440px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span>车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1"><span>始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" style="margin-top: 50px">
|
||||
@ -17,25 +26,25 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl"></confirm-control>
|
||||
<password-box ref="password" @checkOver="confirm"></password-box>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<password-box ref="password" @checkOver="doClose" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import PasswordBox from './childDialog/passwordInputBox';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import PasswordBox from './childDialog/passwordInputBox';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'RouteControl',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
PasswordBox,
|
||||
NoticeInfo,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -45,9 +54,9 @@
|
||||
tempdata: [],
|
||||
operation: null,
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
|
||||
}
|
||||
signalName: '',
|
||||
operateCode: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -77,12 +86,13 @@
|
||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return '信号关灯';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempdata) {
|
||||
@ -92,13 +102,14 @@
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
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 () {
|
||||
@ -138,7 +149,7 @@
|
||||
this.signalClose();
|
||||
}
|
||||
},
|
||||
//取消列车进路
|
||||
// 取消列车进路
|
||||
cancelTrainRoute() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
/** 现地工作站*/
|
||||
@ -148,13 +159,13 @@
|
||||
this.cancelTrainRouteByCentral();
|
||||
}
|
||||
},
|
||||
//现地工作站取消进路
|
||||
// 现地工作站取消进路
|
||||
cancelTrainRouteByLocal() {
|
||||
let operate = {
|
||||
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 }) => {
|
||||
@ -162,19 +173,19 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//行调工作站取消进路
|
||||
// 行调工作站取消进路
|
||||
cancelTrainRouteByCentral() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -182,33 +193,38 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//总人解
|
||||
// 总人解
|
||||
humanTrainRoute() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
||||
}
|
||||
operateCode: OperationEvent.Signal.humanTrainRoute.confirm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$refs.password.doShow();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//信号重开
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -216,89 +232,96 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//信号解封
|
||||
// 信号封锁
|
||||
lock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.lock.menu.operation,
|
||||
}
|
||||
operateCode: OperationEvent.Signal.lock.confirm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ 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 = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
||||
}
|
||||
operateCode: OperationEvent.Signal.unlock.confirm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$refs.password.doShow();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
//进路收人工控
|
||||
// 进路收人工控
|
||||
humanControl() {
|
||||
let operate = {
|
||||
send: true,
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
val: 'all'
|
||||
}
|
||||
operateCode: OperationEvent.Signal.humanControl.confirm.operation,
|
||||
val: this.operateCode
|
||||
};
|
||||
|
||||
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.password.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
// this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//进路交自动控
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
let operate = {
|
||||
send: true,
|
||||
const operate = {
|
||||
// send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
val: 'all'
|
||||
}
|
||||
operateCode: OperationEvent.Signal.atsAutoControl.confirm.operation,
|
||||
val: this.operateCode
|
||||
};
|
||||
|
||||
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.password.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
// this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//信号关灯
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
messages: [`信号关灯: ${this.signalName}`],
|
||||
}
|
||||
messages: [`信号关灯: ${this.signalName}`]
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -308,56 +331,26 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
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 = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,35 +1,50 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog class="chengdou-03__systerm route-detail" :title="title" :visible.sync="show" width="460px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span>车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1"><span>始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin-top: 20px">
|
||||
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
|
||||
:height="140">
|
||||
<el-table-column type="index" label="Id" width="40">
|
||||
</el-table-column>
|
||||
<el-table
|
||||
ref="tempTable"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
<el-table-column type="index" label="Id" width="40" />
|
||||
<el-table-column label="描述" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.name}}</span>
|
||||
<span>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="方向" width="60">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.name}}</span>
|
||||
<span>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完整性">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.name}}</span>
|
||||
<span>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="控制">
|
||||
@ -45,18 +60,18 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
@ -68,8 +83,8 @@
|
||||
selected: null,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
}
|
||||
signalName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -85,24 +100,24 @@
|
||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '查询进路状态'
|
||||
return '查询进路状态';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
//如果不是因为断点激活则需要,初始化菜单初始值
|
||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
||||
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);
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -122,19 +137,19 @@
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,59 +1,75 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="route-table-box">
|
||||
<span class="route-table-tip">进路列表</span>
|
||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini"
|
||||
@row-click="clickEvent" height="90" highlight-current-row>
|
||||
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px">
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tempData"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 99%;"
|
||||
size="mini"
|
||||
height="90"
|
||||
highlight-current-row
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">{{ controlTypeNameMap[scope.row.controlType] }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
{{ controlTypeNameMap[scope.row.controlType] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="controlType" label="进路描述" :id="domIdChoose" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
无
|
||||
</template>
|
||||
<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="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"></notice-info>
|
||||
<!-- <password ref="password"></password> -->
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
// import Password from './childDialog/childDialog/password';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic.js';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import PasswordBox from './childDialog/passwordInputBox.vue';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo,
|
||||
// Password
|
||||
PasswordBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -68,13 +84,13 @@
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none',
|
||||
'border-bottom': 'none'
|
||||
},
|
||||
controlTypeNameMap: {
|
||||
'01': '折返',
|
||||
'02': '直通',
|
||||
}
|
||||
'02': '直通'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -87,15 +103,15 @@
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : ''
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理引导进路'
|
||||
return '办理引导进路';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
disabled = !this.row.canSetting
|
||||
disabled = !this.row.canSetting;
|
||||
}
|
||||
return disabled;
|
||||
}
|
||||
@ -103,7 +119,7 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
@ -113,24 +129,24 @@
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
let protect = row.overlapSectionList[0];
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
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);
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -168,8 +184,7 @@
|
||||
if (row) {
|
||||
// 恢复进路区段的切除状态
|
||||
this.guide();
|
||||
|
||||
if (row.canSetting) {
|
||||
row.canSetting = true;
|
||||
// 设置选中区段为切除状态
|
||||
if (row.containSectionList && row.containSectionList.length) {
|
||||
// 设置新选的进路区段为切除状态
|
||||
@ -182,7 +197,7 @@
|
||||
this.beforeSectionList = row.containSectionList || [];
|
||||
|
||||
// 设置选中指令
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.guide.choose.operation,
|
||||
val: row.code
|
||||
@ -194,54 +209,49 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 办理引导进路
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.guide.menu.operation,
|
||||
}
|
||||
operateCode: OperationEvent.Signal.guide.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).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.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
} else {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.route-table-tip {
|
||||
|
@ -1,55 +1,73 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="route-table-box">
|
||||
<span class="route-table-tip">进路列表</span>
|
||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini"
|
||||
@row-click="clickEvent" height="150" highlight-current-row>
|
||||
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px">
|
||||
</el-table-column>
|
||||
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px">
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tempData"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 99%;"
|
||||
size="mini"
|
||||
height="150"
|
||||
highlight-current-row
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
{{ controlTypeNameMap[scope.row.controlType] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="controlType" label="进路描述" :id="domIdChoose" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
无
|
||||
</template>
|
||||
<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="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"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
@ -65,13 +83,13 @@
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none',
|
||||
'border-bottom': 'none'
|
||||
},
|
||||
controlTypeNameMap: {
|
||||
'01': '折返',
|
||||
'02': '直通',
|
||||
}
|
||||
'02': '直通'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -84,15 +102,15 @@
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理进路'
|
||||
return '办理进路';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
disabled = !this.row.canSetting
|
||||
disabled = !this.row.canSetting;
|
||||
}
|
||||
return disabled;
|
||||
}
|
||||
@ -100,7 +118,7 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
@ -110,24 +128,24 @@
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
let protect = row.overlapSectionList[0];
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
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);
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -165,8 +183,7 @@
|
||||
if (row) {
|
||||
// 恢复进路区段的切除状态
|
||||
this.restoreBeforeDevices();
|
||||
|
||||
if (row.canSetting) {
|
||||
row.canSetting = true;
|
||||
// 设置选中区段为切除状态
|
||||
if (row.containSectionList && row.containSectionList.length) {
|
||||
// 设置新选的进路区段为切除状态
|
||||
@ -179,7 +196,7 @@
|
||||
this.beforeSectionList = row.containSectionList || [];
|
||||
|
||||
// 设置选中指令
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code
|
||||
@ -191,15 +208,14 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -207,29 +223,29 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.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,14 +1,23 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm section-control" :title="title" :visible.sync="show" width="440px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm section-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="440px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="3"><span>车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="2"><span>区段</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="sectionName" size="small" disabled></el-input>
|
||||
<el-input v-model="sectionName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -17,19 +26,22 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import PasswordBox from './childDialog/passwordInputBox';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
PasswordBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -38,8 +50,8 @@
|
||||
selected: null,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
sectionName: '',
|
||||
}
|
||||
sectionName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -59,14 +71,15 @@
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
return '区段控制';
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return '区故解'
|
||||
return '区故解';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
@ -76,14 +89,14 @@
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.sectionName += section.name
|
||||
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) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -116,13 +129,13 @@
|
||||
this.fault();
|
||||
}
|
||||
},
|
||||
//道岔单锁
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Section.lock.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -130,19 +143,19 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//轨道区段切除
|
||||
// 轨道区段切除
|
||||
split() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Section.split.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -150,19 +163,19 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//轨道区段激活
|
||||
// 轨道区段激活
|
||||
active() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Section.active.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -170,46 +183,48 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//区故解
|
||||
// 区故解
|
||||
fault() {
|
||||
let operate = {
|
||||
send: true,
|
||||
const operate = {
|
||||
// send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
}
|
||||
operateCode: OperationEvent.Section.fault.confirm.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 => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</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>
|
@ -1,32 +1,49 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm stand-detain-train" :title="title" :visible.sync="show" width="400px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-detain-train"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11">
|
||||
<span>车站</span>
|
||||
<el-input style="width: 110px; margin-left: 10px;" v-model="stationName" size="small" disabled>
|
||||
</el-input>
|
||||
<el-input v-model="stationName" style="width: 110px; margin-left: 10px;" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<span>站台</span>
|
||||
<el-input style="width: 110px; margin-left: 10px;" v-model="standName" size="small" disabled></el-input>
|
||||
<el-input v-model="standName" style="width: 110px; margin-left: 10px;" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="DetainTrain">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 90px;">
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 90px;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="radio" @change="choose" :id="domIdDetainCar">
|
||||
<el-radio-group :id="domIdDetainCar" v-model="radio" @change="choose">
|
||||
<el-col :span="24">
|
||||
<el-radio label="01"
|
||||
style="display: block; text-align: left; float: left; margin-right: 10px;">本站台
|
||||
<el-radio
|
||||
label="01"
|
||||
style="display: block; text-align: left; float: left; margin-right: 10px;"
|
||||
>本站台
|
||||
</el-radio>
|
||||
<el-radio label="02" v-if="radio1 == 2"
|
||||
style="display: block; text-align: left; float: left; margin-right: 10px;">上行全线
|
||||
<el-radio
|
||||
v-if="radio1 == 2"
|
||||
label="02"
|
||||
style="display: block; text-align: left; float: left; margin-right: 10px;"
|
||||
>上行全线
|
||||
</el-radio>
|
||||
<el-radio label="03" v-if="radio1 == 2"
|
||||
style="display: block; text-align: left; float: left;">下行全线</el-radio>
|
||||
<el-radio
|
||||
v-if="radio1 == 2"
|
||||
label="03"
|
||||
style="display: block; text-align: left; float: left;"
|
||||
>下行全线</el-radio>
|
||||
</el-col>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
@ -35,13 +52,21 @@
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="radio1" label="1" :disabled="radio1 == '2'"
|
||||
style="display: block; text-align: left;">
|
||||
<el-radio
|
||||
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
|
||||
v-model="radio1"
|
||||
label="2"
|
||||
:disabled="radio1 == '1'"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消扣车</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -49,30 +74,51 @@
|
||||
</div>
|
||||
<div v-if="JumpStop">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;">
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="24">
|
||||
<el-radio-group v-model="radio" @change="chooseJumpStop">
|
||||
<el-radio label="01" :id="radio == '02' ? domIdChoose : ''"
|
||||
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 80px;">
|
||||
<el-radio
|
||||
:id="radio == '02' ? domIdChoose : ''"
|
||||
label="01"
|
||||
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 80px;"
|
||||
>
|
||||
站台跳停
|
||||
</el-radio>
|
||||
<el-radio label="02" :id="radio == '01' ? domIdChoose : ''"
|
||||
style="display: block; text-align: left; margin-left: 0; float: left;">
|
||||
<el-radio
|
||||
:id="radio == '01' ? domIdChoose : ''"
|
||||
label="02"
|
||||
style="display: block; text-align: left; margin-left: 0; float: left;"
|
||||
>
|
||||
指定列车跳停</el-radio>
|
||||
<div style="float: left; margin-left: 20px;">
|
||||
<div style="float: left;">
|
||||
<span>车组号</span>
|
||||
<el-input v-if="radio1 != 2" style="width: 120px; margin-left: 20px;"
|
||||
v-model="tripNumber" size="small" :id="domIdJumpStop" @blur="handleTrainNoBlur"
|
||||
:disabled="radio == '01'">
|
||||
</el-input>
|
||||
<el-select v-if="radio1 == 2" style="width: 120px; margin-left: 20px;"
|
||||
v-model="tripNumber" size="mini" @change="trainNoSelectChange"
|
||||
:id="domIdCancelJumpStop" :disabled="radio == '01'">
|
||||
<el-option v-for="option in trainList" :key="option.groupNumber"
|
||||
:label="option.groupNumber" :value="option.groupNumber">
|
||||
</el-option>
|
||||
<el-input
|
||||
v-if="radio1 != 2"
|
||||
:id="domIdJumpStop"
|
||||
v-model="tripNumber"
|
||||
style="width: 120px; margin-left: 20px;"
|
||||
size="small"
|
||||
:disabled="radio == '01'"
|
||||
@blur="handleTrainNoBlur"
|
||||
/>
|
||||
<el-select
|
||||
v-if="radio1 == 2"
|
||||
:id="domIdCancelJumpStop"
|
||||
v-model="tripNumber"
|
||||
style="width: 120px; margin-left: 20px;"
|
||||
size="mini"
|
||||
:disabled="radio == '01'"
|
||||
@change="trainNoSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in trainList"
|
||||
:key="option.groupNumber"
|
||||
:label="option.groupNumber"
|
||||
:value="option.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
@ -83,13 +129,21 @@
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="radio1" label="1" :disabled="radio1 == 2"
|
||||
style="display: block; text-align: left;">
|
||||
<el-radio
|
||||
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
|
||||
v-model="radio1"
|
||||
label="2"
|
||||
:disabled="radio1 == 1"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
取消跳停</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -97,31 +151,52 @@
|
||||
</div>
|
||||
<div v-if="RunLevel">
|
||||
<div
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;">
|
||||
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;"
|
||||
>
|
||||
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="radio" @change="chooseStopTime">
|
||||
<el-col :span="24">
|
||||
<el-radio label="01" :id="radio == '02' ? domIdChoose1 : ''"
|
||||
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 60px;">
|
||||
<el-radio
|
||||
:id="radio == '02' ? domIdChoose1 : ''"
|
||||
label="01"
|
||||
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 60px;"
|
||||
>
|
||||
自动
|
||||
</el-radio>
|
||||
<el-radio label="02" :id="radio == '01' ? domIdChoose1 : ''"
|
||||
style="display: block; text-align: left; margin-left: 0; float: left;">
|
||||
<el-radio
|
||||
:id="radio == '01' ? domIdChoose1 : ''"
|
||||
label="02"
|
||||
style="display: block; text-align: left; margin-left: 0; float: left;"
|
||||
>
|
||||
人工</el-radio>
|
||||
<div style="float: left; margin-left: 20px;">
|
||||
<span v-if="radio2 != 2">站停时间</span>
|
||||
<span v-if="radio2 == 2">运行等级</span>
|
||||
<el-input v-if="radio2 != 2" style="width: 120px; margin-left: 20px;"
|
||||
v-model="trainStopTime" size="small" :id="domIdStopTime" :disabled="radio == '01'"
|
||||
@blur="stopTimeBlur">
|
||||
</el-input>
|
||||
<el-select v-if="radio2 == 2" style="width: 120px; margin-left: 20px;"
|
||||
v-model="trainRunlevel" size="mini" @change="trainNoSelectLevel" :id="domIdRunLevel"
|
||||
:disabled="radio == '01'">
|
||||
<el-option v-for="option in trainList" :key="option.groupNumber"
|
||||
:label="option.groupNumber" :value="option.groupNumber">
|
||||
</el-option>
|
||||
<el-input
|
||||
v-if="radio2 != 2"
|
||||
:id="domIdStopTime"
|
||||
v-model="trainStopTime"
|
||||
style="width: 120px; margin-left: 20px;"
|
||||
size="small"
|
||||
:disabled="radio == '01'"
|
||||
@blur="stopTimeBlur"
|
||||
/>
|
||||
<el-select
|
||||
v-if="radio2 == 2"
|
||||
:id="domIdRunLevel"
|
||||
v-model="trainRunlevel"
|
||||
style="width: 120px; margin-left: 20px;"
|
||||
size="mini"
|
||||
:disabled="radio == '01'"
|
||||
@change="trainNoSelectLevel"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in runLevelList"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-col>
|
||||
@ -133,13 +208,19 @@
|
||||
<el-row style="margin-top: -13px;">
|
||||
<el-radio-group v-model="effective" @change="chooseEffective">
|
||||
<el-col :span="11">
|
||||
<el-radio label="01" style="display: block; text-align: left;"
|
||||
:id="effective == '02' ? '': domIdChoose2">
|
||||
<el-radio
|
||||
:id="effective == '02' ? '': domIdChoose2"
|
||||
label="01"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
一次有效</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio label="02" style="display: block; text-align: left;"
|
||||
:id="effective == '01' ? '': domIdChoose2">
|
||||
<el-radio
|
||||
:id="effective == '01' ? '': domIdChoose2"
|
||||
label="02"
|
||||
style="display: block; text-align: left;"
|
||||
>
|
||||
一直有效</el-radio>
|
||||
</el-col>
|
||||
</el-radio-group>
|
||||
@ -154,17 +235,17 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</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 { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
@ -184,11 +265,16 @@
|
||||
JumpStop: false,
|
||||
RunLevel: false,
|
||||
trainList: [],
|
||||
runLevelList: [
|
||||
{ value: '01', label: '常速' },
|
||||
{ value: '02', label: '低速' },
|
||||
{ value: '03', label: '高速' }
|
||||
],
|
||||
tripNumber: '',
|
||||
effective: '01',
|
||||
trainStopTime: 0,
|
||||
trainRunlevel: '01',
|
||||
}
|
||||
trainRunlevel: '01'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -240,42 +326,59 @@
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
return '扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
return '取消扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
return '设置跳停';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
return '取消跳停';
|
||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
return '设置停站时间';
|
||||
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
return '设置站间运行等级';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
operation(data) {
|
||||
this.JumpStop = false;
|
||||
this.RunLevel = false;
|
||||
this.DetainTrain = false;
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
this.radio = '01';
|
||||
this.radio1 = '1';
|
||||
this.radio2 = '1';
|
||||
this.trainStopTime = 0;
|
||||
this.effective = '01';
|
||||
if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
this.radio1 = '1';
|
||||
this.radio = '01';
|
||||
this.DetainTrain = true;
|
||||
return '扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
} else if (data == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.radio1 = '2';
|
||||
this.radio = '01';
|
||||
this.DetainTrain = true;
|
||||
return '取消扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
} else if (data == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
this.JumpStop = true;
|
||||
this.radio1 = '1'
|
||||
return '设置跳停';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
this.radio1 = '1';
|
||||
} else if (data == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
this.JumpStop = true;
|
||||
this.radio1 = '2';
|
||||
return '取消跳停';
|
||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
} else if (data == OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
this.RunLevel = true;
|
||||
this.radio2 = '1';
|
||||
return '设置停站时间';
|
||||
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
} else if (data == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
this.RunLevel = true;
|
||||
this.radio2 = '2';
|
||||
return '设置站间运行等级';
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempDate = null) {
|
||||
@ -289,7 +392,7 @@
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
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) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -313,54 +416,55 @@
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.operation = '';
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
choose(upDown) {
|
||||
// 取消扣车 请求code码
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation,
|
||||
val: `${upDown}`,
|
||||
}
|
||||
val: `${upDown}`
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
handleTrainNoBlur() { // 设置跳停 填写车组号
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation,
|
||||
val: `${this.tripNumber}`,
|
||||
}
|
||||
val: `${this.tripNumber}`
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
trainNoSelectChange(upDown) { // 取消跳停 选择车组号
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation,
|
||||
val: `${upDown}`,
|
||||
}
|
||||
val: `${upDown}`
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
chooseJumpStop(upDown) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: '',
|
||||
val: `${upDown}`,
|
||||
}
|
||||
val: `${upDown}`
|
||||
};
|
||||
if (this.radio1 == '1') { // 跳停选择
|
||||
operate.operation = OperationEvent.StationStand.setJumpStop.select.operation;
|
||||
} else { // 取消跳停选择
|
||||
@ -371,14 +475,14 @@
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
chooseEffective(effective) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: '',
|
||||
val: `${effective}`
|
||||
}
|
||||
};
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation;
|
||||
} else { // 设置站间运行等级
|
||||
@ -389,14 +493,14 @@
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
chooseStopTime(upDown) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: '',
|
||||
val: `${upDown}`,
|
||||
}
|
||||
val: `${upDown}`
|
||||
};
|
||||
if (this.radio2 == '1') { // 设置停站时间
|
||||
operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation;
|
||||
} else { // 设置站间运行等级
|
||||
@ -407,33 +511,33 @@
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
stopTimeBlur() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
||||
val: `${this.trainStopTime}`,
|
||||
}
|
||||
val: `${this.trainStopTime}`
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
trainNoSelectLevel(upDown) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation,
|
||||
val: `${upDown}`,
|
||||
}
|
||||
val: `${upDown}`
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
@ -450,13 +554,13 @@
|
||||
this.setRunLevel(); /** 设置站间运行等级*/
|
||||
}
|
||||
},
|
||||
//设置扣车
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -465,26 +569,25 @@
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//取消扣车
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
val: '',
|
||||
}
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
||||
};
|
||||
if (this.radio == '02') {
|
||||
operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
|
||||
operate.val = '02';
|
||||
} else if (this.radio == '03'){
|
||||
operate['val'] = '02';
|
||||
} else if (this.radio == '03') {
|
||||
operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
|
||||
operate.val = '01';
|
||||
operate['val'] = '01';
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
@ -494,11 +597,11 @@
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
@ -506,12 +609,12 @@
|
||||
if (this.radio == '02') {
|
||||
val = this.radio + '::' + this.tripNumber;
|
||||
}
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
val: val,
|
||||
}
|
||||
val: val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -519,11 +622,11 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
@ -531,12 +634,12 @@
|
||||
if (this.radio == '02') {
|
||||
val = this.radio + '::' + this.tripNumber;
|
||||
}
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
val: val //站台的上下行方向, 01:下行 /02:上行
|
||||
}
|
||||
val: val // 站台的上下行方向, 01:下行 /02:上行
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -544,21 +647,21 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 设置停站时间
|
||||
setStopTime() {
|
||||
let forver = this.effective == '02' ? true : false;
|
||||
let operate = {
|
||||
const forver = this.effective == '02';
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
val: [`${this.radio}`, this.trainStopTime, forver].join('::'),
|
||||
}
|
||||
val: [`${this.radio}`, this.trainStopTime, forver].join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -566,24 +669,26 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
})
|
||||
});
|
||||
},
|
||||
// 设置运行速度
|
||||
setRunLevel() {
|
||||
let forver = this.effective == '02' ? true : false;
|
||||
const forver = this.effective == '02';
|
||||
let val = this.radio;
|
||||
if (this.radio == '02') {
|
||||
val = `${this.radio}::${this.trainRunlevel}::${forver}`;
|
||||
} else {
|
||||
val = `${this.radio}::01::${forver}`;
|
||||
}
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
val: val,
|
||||
}
|
||||
val: val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -591,28 +696,28 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
})
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.stand-detain-train .context {
|
||||
|
@ -1,16 +1,25 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm switch-control" :title="title" :visible.sync="show" width="300px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm switch-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
: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-input>
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="switchName" size="small" disabled></el-input>
|
||||
<el-input v-model="switchName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -21,22 +30,22 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<password-box ref="passwordBox" @checkOver="toSwitchControl"></password-box>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import PasswordBox from './childDialog/passwordInputBox';
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import PasswordBox from './childDialog/passwordInputBox';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'SwitchControl',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PasswordBox,
|
||||
PasswordBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -45,8 +54,8 @@
|
||||
selected: null,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
switchName: '',
|
||||
}
|
||||
switchName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -82,12 +91,13 @@
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
return '道岔解封';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
@ -96,8 +106,8 @@
|
||||
this.switchName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
this.switchName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
this.switchName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -116,48 +126,39 @@
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
//debugger;
|
||||
// debugger;
|
||||
if (this.operation == OperationEvent.Switch.lock.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.turnout(this.operation);
|
||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
||||
/** 道岔强扳*/
|
||||
this.turnoutForce();
|
||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||
/** 区段激活*/
|
||||
this.split();
|
||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
||||
/** 区段激活*/
|
||||
this.active();
|
||||
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
||||
/*单操到正位*/
|
||||
/* 单操到正位*/
|
||||
this.locate();
|
||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||
/*单操到反位*/
|
||||
/* 单操到反位*/
|
||||
this.reverse();
|
||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||
/** 道岔封锁*/
|
||||
this.openPasswordBox(this.operation);
|
||||
this.openPasswordBox(this.operation, OperationEvent.Switch.block.confirm.operation);
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/*道岔解封*/
|
||||
this.openPasswordBox(this.operation);
|
||||
/* 道岔解封*/
|
||||
this.openPasswordBox(this.operation, OperationEvent.Switch.unblock.confirm.operation);
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/*区故解*/
|
||||
this.openPasswordBox(this.operation);
|
||||
/* 区故解*/
|
||||
this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation);
|
||||
}
|
||||
},
|
||||
//道岔单锁
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
operation: OperationEvent.Switch.lock.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -166,18 +167,18 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//道岔解锁
|
||||
// 道岔解锁
|
||||
unlock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -186,19 +187,19 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
|
||||
},
|
||||
//道岔封锁
|
||||
// 道岔封锁
|
||||
block() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
operation: OperationEvent.Switch.block.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -207,18 +208,18 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//道岔解封
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
operation: OperationEvent.Switch.unblock.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -227,76 +228,18 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//道岔转动
|
||||
turnout(operation) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.turnout.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);
|
||||
});
|
||||
},
|
||||
//道岔强扮
|
||||
// 道岔强扮
|
||||
turnoutForce() {
|
||||
let operate = {
|
||||
const 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,
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -304,18 +247,18 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//单操到正位
|
||||
// 单操到正位
|
||||
locate() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
operation: OperationEvent.Switch.locate.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -323,18 +266,18 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//单操到反位
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
operation: OperationEvent.Switch.reverse.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -342,18 +285,18 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//区故解
|
||||
// 区故解
|
||||
fault() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Switch.fault.menu.operation,
|
||||
operation: OperationEvent.Switch.fault.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -361,17 +304,18 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//打开密码输入框
|
||||
openPasswordBox(operation) {
|
||||
let 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 }) => {
|
||||
@ -381,13 +325,13 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//密码输入正确会回调
|
||||
// 密码输入正确会回调
|
||||
toSwitchControl(operation) {
|
||||
if (operation === OperationEvent.Switch.fault.menu.operation) {
|
||||
this.fault();
|
||||
@ -398,19 +342,19 @@
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -5,6 +5,7 @@
|
||||
<template v-show="isShowBar">
|
||||
<menu-bar ref="menuBar" :selected="selected" />
|
||||
</template>
|
||||
<menu-button ref="menuButton" />
|
||||
<menu-station-control ref="menuStationControl" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
@ -12,7 +13,7 @@
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :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-contorl ref="passiveControl" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
@ -24,6 +25,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuStationControl from './menuStationControl';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
@ -31,7 +33,7 @@ import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuLimit from './menuLimit';
|
||||
// import MenuLimit from './menuLimit';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from './passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
@ -40,6 +42,7 @@ export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuButton,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
@ -48,7 +51,7 @@ export default {
|
||||
MenuStationStand,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
MenuLimit,
|
||||
// MenuLimit,
|
||||
PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
|
@ -8,13 +8,7 @@
|
||||
</li>
|
||||
</template>
|
||||
<template v-else>
|
||||
<li
|
||||
v-if="handleShow(item)"
|
||||
:id="getDomId(item)"
|
||||
:key="i"
|
||||
class="nav-li"
|
||||
@click.stop="selectedClassA(item, i)"
|
||||
>
|
||||
<li 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>
|
||||
<ul class="nav-ul" :class="{'active' :i==classA}">
|
||||
<template v-for="(child,j) in item.children">
|
||||
@ -23,13 +17,7 @@
|
||||
<span class="status"> </span>
|
||||
<span class="separator"> </span>
|
||||
</li>
|
||||
<li
|
||||
v-else
|
||||
:id="getDomId(child)"
|
||||
:key="j"
|
||||
class="menu-li"
|
||||
@click.stop="selectedClassB(child, j)"
|
||||
>
|
||||
<li v-else :id="getDomId(child)" :key="j" class="menu-li" @click.stop="selectedClassB(child, j)">
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
@ -42,13 +30,7 @@
|
||||
<span class="status"> </span>
|
||||
<span class="separator"> </span>
|
||||
</li>
|
||||
<li
|
||||
v-else-if="grandchild.show"
|
||||
:id="getDomId(grandchild)"
|
||||
:key="k"
|
||||
class="menu-li"
|
||||
@click.stop="hookClick(grandchild)"
|
||||
>
|
||||
<li v-else-if="grandchild.show" :id="getDomId(grandchild)" :key="k" class="menu-li" @click.stop="hookClick(grandchild)">
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
@ -65,13 +47,7 @@
|
||||
<span class="status"> </span>
|
||||
<span class="separator"> </span>
|
||||
</li>
|
||||
<li
|
||||
v-else-if="child.show"
|
||||
:id="getDomId(child)"
|
||||
:key="j"
|
||||
class="menu-li"
|
||||
@click.stop="hookClick(child)"
|
||||
>
|
||||
<li v-else-if="child.show" :id="getDomId(child)" :key="j" class="menu-li" @click.stop="hookClick(child)">
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
@ -812,7 +788,7 @@ export default {
|
||||
this.clickEvent();
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: item.operate.operation
|
||||
operation: item.operate
|
||||
};
|
||||
this.tempClassA = index;
|
||||
this.tempClassB = -1;
|
||||
@ -834,7 +810,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: item.operate.operation
|
||||
operation: item.operate
|
||||
};
|
||||
this.tempClassB = index;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -850,151 +826,11 @@ export default {
|
||||
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) {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: order.operation
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -1021,7 +857,7 @@ export default {
|
||||
setLimitSpeed(order) {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: order.operation
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -1034,7 +870,7 @@ export default {
|
||||
cancleLimitSpeed(order) {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: order.operation
|
||||
operation: order.operate
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ 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() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: '放大地图',
|
||||
@ -53,12 +52,6 @@ export default {
|
||||
}
|
||||
},
|
||||
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) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
@ -75,41 +68,9 @@ export default {
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
// this.stationList.forEach(station => {
|
||||
// if (station.code === station.concentrateStationCode) {
|
||||
// let node = {
|
||||
// label: station.name,
|
||||
// children: []
|
||||
// }
|
||||
//
|
||||
// this.stationList.forEach(elem => {
|
||||
// if (elem.visible) {
|
||||
// let next = elem;
|
||||
// while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||
// next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
||||
// }
|
||||
//
|
||||
// if (station.code == next.code) {
|
||||
// node.children.push({
|
||||
// code: elem.code,
|
||||
// label: elem.name,
|
||||
// handler: this.mapLocation,
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
//
|
||||
// this.menuNormal.push(node);
|
||||
// }
|
||||
// });
|
||||
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menuScreen];
|
||||
}
|
||||
// else {
|
||||
// this.menu = [...this.menuNormal];
|
||||
// }
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -123,13 +84,6 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
|
@ -1,10 +1,15 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
class="chengdou-03__systerm view-train-id"
|
||||
title="列车识别号显示设置" :visible.sync="show" width="420px"
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm view-train-id"
|
||||
title="列车识别号显示设置"
|
||||
:visible.sync="show"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
|
||||
>
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
@ -51,7 +56,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<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 :span="10" :offset="1">
|
||||
<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-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"/>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -87,8 +92,8 @@ export default {
|
||||
operation: '',
|
||||
planMode: 5,
|
||||
headMode: 5,
|
||||
fontSize: 16,
|
||||
}
|
||||
fontSize: 16
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
|
@ -1,28 +1,30 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<cancel-all-limit ref="cancelAllLimit"></cancel-all-limit>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<cancel-all-limit ref="cancelAllLimit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import CancelAllLimit from './dialog/cancelAllLimit';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import CancelAllLimit from './dialog/cancelAllLimit';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
CancelAllLimit,
|
||||
CancelAllLimit
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -50,17 +52,8 @@
|
||||
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);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
@ -71,17 +64,26 @@
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
//编辑模式菜单列表
|
||||
// 编辑模式菜单列表
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu]
|
||||
this.menu = [...this.menu];
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
@ -96,9 +98,9 @@
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//取消速度
|
||||
// 取消速度
|
||||
cancelSpeed() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -112,7 +114,7 @@
|
||||
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,46 +1,40 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<section-control ref="sectionControl"></section-control>
|
||||
<section-cmd-control ref="sectionCmdControl"></section-cmd-control>
|
||||
<speed-cmd-control ref="speedCmdControl"></speed-cmd-control>
|
||||
<train-create ref="trainCreate"></train-create>
|
||||
<alxe-effective ref="alxeEffective"></alxe-effective>
|
||||
<section-detail ref="sectionDetail"></section-detail>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" />
|
||||
<train-create ref="trainCreate" />
|
||||
<section-detail ref="sectionDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from './dialog/sectionControl';
|
||||
import SectionCmdControl from './dialog/sectionCmdControl';
|
||||
import SectionDetail from './dialog/sectionDetail';
|
||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||
import TrainCreate from './dialog/trainCreate';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from './dialog/sectionControl';
|
||||
import SectionDetail from './dialog/sectionDetail';
|
||||
import TrainCreate from './dialog/trainCreate';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
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',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SectionCmdControl,
|
||||
SectionDetail,
|
||||
SpeedCmdControl,
|
||||
TrainCreate,
|
||||
AlxeEffective,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -48,66 +42,12 @@
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '区故解',
|
||||
handler: this.fault,
|
||||
disabledCallback: MenuDisabledState.Section.fault,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
// {
|
||||
// label: '区段激活',
|
||||
// handler: this.active,
|
||||
// disabledCallback: MenuDisabledState.Section.active,
|
||||
// label: '区故解',
|
||||
// handler: this.fault,
|
||||
// disabledCallback: MenuDisabledState.Section.fault,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '区段切除',
|
||||
// handler: this.split,
|
||||
// disabledCallback: MenuDisabledState.Section.split,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '区段计轴预复位',
|
||||
// handler: this.axlePreReset,
|
||||
// disabledCallback: MenuDisabledState.Section.axlePreReset,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '区段封锁',
|
||||
// handler: this.lock,
|
||||
// disabledCallback: MenuDisabledState.Section.lock,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '区段解封',
|
||||
// handler: this.unlock,
|
||||
// disabledCallback: MenuDisabledState.Section.unlock,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '区段设置限速',
|
||||
// handler: this.setSpeed,
|
||||
// disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '区段取消限速',
|
||||
// handler: this.cancelSpeed,
|
||||
// disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '确认计轴有效',
|
||||
// handler: this.alxeEffective,
|
||||
// disabledCallback: MenuDisabledState.Section.alxeEffective,
|
||||
// auth: { station: false, center: true }
|
||||
// },
|
||||
// }
|
||||
],
|
||||
central: [
|
||||
{
|
||||
@ -116,12 +56,18 @@
|
||||
disabledCallback: MenuDisabledState.Section.fault,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
menuTrain: [
|
||||
@ -129,25 +75,26 @@
|
||||
label: '新建列车',
|
||||
handler: this.newTrain,
|
||||
disabledCallback: MenuDisabledState.Section.newTrain
|
||||
},
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置计轴失效',
|
||||
handler: this.alxeFailure,
|
||||
disabledCallback: MenuDisabledState.Section.alxeFailure
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.setFault'),
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledState.Section.setStoppage
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
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);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
@ -158,23 +105,32 @@
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
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();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const 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]
|
||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
|
||||
}
|
||||
|
||||
//故障模式菜单列表
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
@ -191,9 +147,9 @@
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置计轴失效
|
||||
// 设置计轴失效
|
||||
alxeFailure() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -209,13 +165,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//新建列车
|
||||
// 新建列车
|
||||
newTrain() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -227,11 +183,11 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainCreate.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//故障解锁
|
||||
// 故障解锁
|
||||
fault() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -247,7 +203,7 @@
|
||||
});
|
||||
},
|
||||
detail() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -259,7 +215,63 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionDetail.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.stoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
label: MapDeviceType.Section.label,
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
@ -268,136 +280,7 @@
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
// //切除
|
||||
// split() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Section.type,
|
||||
// label: MapDeviceType.Section.label,
|
||||
// operation: OperationEvent.Section.split.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);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// alxeEffective() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Section.type,
|
||||
// label: MapDeviceType.Section.label,
|
||||
// operation: OperationEvent.Section.alxeEffective.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// //激活
|
||||
// active() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Section.type,
|
||||
// label: MapDeviceType.Section.label,
|
||||
// operation: OperationEvent.Section.active.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);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// //区段计轴预复位
|
||||
// axlePreReset() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Section.type,
|
||||
// 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>
|
@ -1,28 +1,28 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<route-selection ref="routeSelection"></route-selection>
|
||||
<route-control ref="routeControl"></route-control>
|
||||
<route-detail ref="routeDetail"></route-detail>
|
||||
<route-guide ref="routeGuide"></route-guide>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<route-selection ref="routeSelection" />
|
||||
<route-control ref="routeControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<route-guide ref="routeGuide" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import RouteControl from './dialog/routeControl';
|
||||
import RouteSelection from './dialog/routeSelection';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import RouteGuide from './dialog/routeGuide';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import RouteControl from './dialog/routeControl';
|
||||
import RouteSelection from './dialog/routeSelection';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import RouteGuide from './dialog/routeGuide';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
@ -34,7 +34,10 @@
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -46,161 +49,125 @@
|
||||
label: '办理进路',
|
||||
handler: this.arrangementRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||
auth: { station: true, center: false },
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '办理引导进路',
|
||||
handler: this.guide,
|
||||
disabledCallback: MenuDisabledState.Signal.guide,
|
||||
auth: { station: true, center: false },
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '取消进路',
|
||||
handler: this.cancelTrainRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||
auth: { station: true, center: false },
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '总人解',
|
||||
label: '总人解', // 取消引导进路
|
||||
handler: this.humanTrainRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.humanTrainRoute,
|
||||
auth: { station: true, center: false },
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||
auth: { station: true, center: false },
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledState.Signal.lock,
|
||||
auth: { station: true, center: false },
|
||||
},
|
||||
{
|
||||
label: '信号解封',
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledState.Signal.unlock,
|
||||
auth: { station: true, center: false },
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
// {
|
||||
// label: '信号重开',
|
||||
// handler: this.reopenSignal,
|
||||
// disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '信号封锁',
|
||||
// handler: this.lock,
|
||||
// disabledCallback: MenuDisabledState.Signal.lock,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '信号解封',
|
||||
// handler: this.unlock,
|
||||
// disabledCallback: MenuDisabledState.Signal.unlock,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
{
|
||||
label: '进路收人工控',
|
||||
handler: this.humanControl,
|
||||
disabledCallback: MenuDisabledState.Signal.humanControl,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '进路交自动控',
|
||||
handler: this.atsAutoControl,
|
||||
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
||||
auth: { station: false, center: true },
|
||||
},
|
||||
{
|
||||
label: '查询进路控制状态',
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.Signal.detail,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: false, center: true }
|
||||
}
|
||||
// {
|
||||
// label: '设置联锁自动进路',
|
||||
// handler: this.setAutoInterlock,
|
||||
// disabledCallback: MenuDisabledState.Signal.setAutoInterlock,
|
||||
// auth: { station: true, center: false },
|
||||
// },
|
||||
// {
|
||||
// label: '取消联锁自动进路',
|
||||
// handler: this.cancelAutoInterlock,
|
||||
// disabledCallback: MenuDisabledState.Signal.cancelAutoInterlock,
|
||||
// auth: { station: true, center: false },
|
||||
// },
|
||||
// {
|
||||
// label: '设置联锁自动触发',
|
||||
// handler: this.setAutoTrigger,
|
||||
// disabledCallback: MenuDisabledState.Signal.setAutoTrigger,
|
||||
// auth: { station: true, center: false },
|
||||
// },
|
||||
// {
|
||||
// label: '取消联锁自动触发',
|
||||
// handler: this.cancelAutoTrigger,
|
||||
// disabledCallback: MenuDisabledState.Signal.cancelAutoTrigger,
|
||||
// auth: { station: true, center: false },
|
||||
// },
|
||||
// {
|
||||
// label: '信号关灯',
|
||||
// handler: this.signalClose,
|
||||
// disabledCallback: MenuDisabledState.Signal.signalClose,
|
||||
// auth: { station: true, center: false },
|
||||
// }
|
||||
],
|
||||
central: [
|
||||
{
|
||||
label: '办理进路',
|
||||
handler: this.arrangementRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||
auth: { station: true, center: false },
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '办理引导进路',
|
||||
handler: this.guide,
|
||||
disabledCallback: MenuDisabledState.Signal.guide,
|
||||
auth: { station: true, center: false },
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '取消进路',
|
||||
handler: this.cancelTrainRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||
auth: { station: true, center: false },
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '总人解',
|
||||
handler: this.humanTrainRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.humanTrainRoute,
|
||||
auth: { station: true, center: false },
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||
auth: { station: true, center: false },
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledState.Signal.lock,
|
||||
auth: { station: true, center: false },
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '信号解封',
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledState.Signal.unlock,
|
||||
auth: { station: true, center: false },
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '进路收人工控',
|
||||
handler: this.humanControl,
|
||||
disabledCallback: MenuDisabledState.Signal.humanControl,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '进路交自动控',
|
||||
handler: this.atsAutoControl,
|
||||
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '查询进路控制状态',
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.Signal.detail,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
}
|
||||
],
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
disabledCallback: '',
|
||||
disabledCallback: ''
|
||||
},
|
||||
{
|
||||
label: '设置故障',
|
||||
@ -213,16 +180,7 @@
|
||||
disabledCallback: MenuDisabledState.Signal.cancelStoppage
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
@ -233,23 +191,32 @@
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const 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.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
||||
//故障模式菜单列表
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
@ -267,9 +234,27 @@
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -285,13 +270,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//取消故障
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -307,20 +292,20 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 设置进路
|
||||
arrangementRoute() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
@ -331,13 +316,13 @@
|
||||
}
|
||||
this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//进路引导
|
||||
// 进路引导
|
||||
guide() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -356,9 +341,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//取消进路
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -372,9 +357,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//总人解
|
||||
// 总人解
|
||||
humanTrainRoute() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -388,9 +373,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//信号重开
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -404,9 +389,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//信号封锁
|
||||
// 信号封锁
|
||||
lock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -419,13 +404,13 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//信号解封
|
||||
// 信号解封
|
||||
unlock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -439,9 +424,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//进路交人工控
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -460,9 +445,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//进路交自动控
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -481,89 +466,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
// //设置联锁自动进路
|
||||
// setAutoInterlock() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
// operation: OperationEvent.Signal.setAutoInterlock.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.routeControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// //取消联锁自动进路
|
||||
// cancelAutoInterlock() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
// operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.routeControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// //设置联锁自动触发
|
||||
// setAutoTrigger() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
// operation: OperationEvent.Signal.setAutoTrigger.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.routeControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// //取消联锁自动触发
|
||||
// cancelAutoTrigger() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
// operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.routeControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// //信号关灯
|
||||
// signalClose() {
|
||||
// let operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
// operation: OperationEvent.Signal.signalClose.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.routeControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
//查询进路状态
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -579,5 +484,5 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
@ -22,7 +22,10 @@
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -32,7 +35,7 @@
|
||||
local: [
|
||||
],
|
||||
central: [
|
||||
],
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
@ -46,16 +49,7 @@
|
||||
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);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
@ -66,27 +60,36 @@
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menu = [];
|
||||
if (this.selected.concentrateStationCode == this.selected.code) {
|
||||
//编辑模式菜单列表
|
||||
// 编辑模式菜单列表
|
||||
this.menu = menuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce]
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
}
|
||||
|
||||
if (this.selected.centralized) {
|
||||
//故障模式菜单列表
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce]
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,9 +107,9 @@
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -122,13 +125,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//取消故障
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -144,10 +147,10 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,25 +1,25 @@
|
||||
<template>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'StationControlMenu',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
@ -27,16 +27,7 @@
|
||||
],
|
||||
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);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
@ -47,12 +38,21 @@
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
};
|
||||
},
|
||||
doShow(point) {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
@ -65,5 +65,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,34 +1,37 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<stand-control ref="standControl"></stand-control>
|
||||
<stand-detail ref="standDetail"></stand-detail>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<stand-control ref="standControl" />
|
||||
<stand-detail ref="standDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandControl from './dialog/standControl';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandControl from './dialog/standControl';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
StandControl,
|
||||
StandDetail,
|
||||
NoticeInfo,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -36,47 +39,17 @@
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '设置扣车',
|
||||
handler: this.setDetainTrain,
|
||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
||||
auth: { station: true, center: true },
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
||||
auth: { station: true, center: true },
|
||||
},
|
||||
{
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '取消跳停',
|
||||
handler: this.cancelJumpStop,
|
||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
||||
auth: { station: true, center: true },
|
||||
},
|
||||
{
|
||||
label: '设置停站时间',
|
||||
handler: this.setStopTime,
|
||||
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
||||
auth: { station: true, center: true },
|
||||
},
|
||||
{
|
||||
label: '设置站间运行等级',
|
||||
handler: this.setRunLevel,
|
||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
||||
auth: { station: true, center: true },
|
||||
},
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
}
|
||||
],
|
||||
central: [
|
||||
@ -84,43 +57,43 @@
|
||||
label: '设置扣车',
|
||||
handler: this.setDetainTrain,
|
||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '取消跳停',
|
||||
handler: this.cancelJumpStop,
|
||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '设置停站时间',
|
||||
handler: this.setStopTime,
|
||||
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '设置站间运行等级',
|
||||
handler: this.setRunLevel,
|
||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -136,7 +109,7 @@
|
||||
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
@ -158,21 +131,21 @@
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
const 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.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
||||
//故障模式菜单列表
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
@ -189,9 +162,9 @@
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -207,13 +180,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//取消故障
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -229,13 +202,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//设置扣车
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
@ -248,11 +221,11 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//取消扣车
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
@ -264,11 +237,11 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//设置跳停
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
@ -280,11 +253,11 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//取消跳停
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
@ -296,11 +269,11 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//停站时间控制
|
||||
// 停站时间控制
|
||||
setStopTime() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -317,13 +290,13 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(operate, this.selected, tempDate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -340,13 +313,13 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(operate, this.selected, tempDate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//查询站台状态
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -363,10 +336,10 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,24 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<section-control ref="sectionControl"></section-control>
|
||||
<switch-control ref="switchControl"></switch-control>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" />
|
||||
<switch-control ref="switchControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from './dialog/sectionControl';
|
||||
import SwitchControl from './dialog/switchControl';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from './dialog/sectionControl';
|
||||
import SwitchControl from './dialog/switchControl';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
@ -28,7 +28,10 @@
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -36,54 +39,42 @@
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '单操到定位',
|
||||
handler: this.locate,
|
||||
disabledCallback: MenuDisabledState.Switch.locate,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '单操到反位',
|
||||
handler: this.reverse,
|
||||
disabledCallback: MenuDisabledState.Switch.reverse,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledState.Switch.lock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '道岔解锁',
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledState.Switch.unlock,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
disabledCallback: MenuDisabledState.Switch.block,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
disabledCallback: MenuDisabledState.Switch.unblock,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '区故解',
|
||||
handler: this.fault,
|
||||
disabledCallback: MenuDisabledState.Switch.fault,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.undeveloped,
|
||||
disabledCallback: MenuDisabledState.Switch.property,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
// {
|
||||
// label: '单操到定位',
|
||||
// handler: this.locate,
|
||||
// disabledCallback: MenuDisabledState.Switch.locate,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '单操到反位',
|
||||
// handler: this.reverse,
|
||||
// disabledCallback: MenuDisabledState.Switch.reverse,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '道岔单锁',
|
||||
// handler: this.lock,
|
||||
// disabledCallback: MenuDisabledState.Switch.lock,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '道岔解锁',
|
||||
// handler: this.unlock,
|
||||
// disabledCallback: MenuDisabledState.Switch.unlock,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '道岔封锁',
|
||||
// handler: this.block,
|
||||
// disabledCallback: MenuDisabledState.Switch.block,
|
||||
// auth: { station: true, center: true }
|
||||
// },
|
||||
// {
|
||||
// label: '道岔解封',
|
||||
// handler: this.unblock,
|
||||
// disabledCallback: MenuDisabledState.Switch.unblock,
|
||||
// auth: { station: true, center: true }
|
||||
// }
|
||||
],
|
||||
central: [
|
||||
{
|
||||
@ -127,13 +118,13 @@
|
||||
handler: this.fault,
|
||||
disabledCallback: MenuDisabledState.Switch.fault,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.undeveloped,
|
||||
disabledCallback: MenuDisabledState.Switch.property,
|
||||
auth: { station: true, center: true }
|
||||
}
|
||||
// {
|
||||
// label: '属性',
|
||||
// handler: this.undeveloped,
|
||||
// disabledCallback: MenuDisabledState.Switch.property,
|
||||
// auth: { station: true, center: true }
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -154,16 +145,7 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
@ -174,23 +156,32 @@
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const 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.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
||||
//故障模式菜单列表
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
@ -207,9 +198,9 @@
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -225,13 +216,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//取消故障
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -247,13 +238,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//道岔单锁
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -267,9 +258,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//道岔解封
|
||||
// 道岔解封
|
||||
unlock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -283,9 +274,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//道岔封锁
|
||||
// 道岔封锁
|
||||
block() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -299,9 +290,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//道岔解封
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -315,9 +306,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//道岔强扳
|
||||
// 道岔强扳
|
||||
switchTurnoutForce() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -331,9 +322,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//道岔转动
|
||||
// 道岔转动
|
||||
switchTurnout() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -350,9 +341,9 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
//道岔故障解锁
|
||||
// 道岔故障解锁/ 区故解
|
||||
fault() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -366,9 +357,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//道岔取消速度
|
||||
// 道岔取消速度
|
||||
cancelSpeed() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -378,16 +369,16 @@
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
let tempData = response.data;
|
||||
const tempData = response.data;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//区段切除
|
||||
// 区段切除
|
||||
split() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -401,9 +392,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//区段激活
|
||||
// 区段激活
|
||||
active() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -417,9 +408,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//单操到定位
|
||||
// 单操到定位
|
||||
locate() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -433,9 +424,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//单操到反位
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -458,5 +449,5 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,34 +1,44 @@
|
||||
<template>
|
||||
<div id="menuTool">
|
||||
<div class="nav">
|
||||
<div class="tool" v-for="(item,index) in tools" :key="index">
|
||||
<img :src="item.src" :alt="item.title" />
|
||||
<div v-for="(item,index) in tools" :key="index" class="tool">
|
||||
<img :src="item.src" :alt="item.title">
|
||||
</div>
|
||||
<img class="logo" :src="logoImg" />
|
||||
<system-time class="time" v-if="isShowSystemTime" :time="time" :zoom="2" :width="180" :height="48" :fine="2"
|
||||
:top="6"></system-time>
|
||||
<img class="logo" :src="logoImg">
|
||||
<system-time
|
||||
v-if="isShowSystemTime"
|
||||
class="time"
|
||||
:time="time"
|
||||
:zoom="2"
|
||||
:width="180"
|
||||
:height="48"
|
||||
:fine="2"
|
||||
:top="6"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
// import { mapGetters } from 'vuex';
|
||||
// import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
// import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'MenuTool',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
components: {
|
||||
SystemTime
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logoImg: logo_,
|
||||
@ -38,100 +48,100 @@
|
||||
title: '服务器1',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '服务器2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '主调',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台3',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '大屏',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '维护工作站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '运行图显示人工站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '扣车',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车报警',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
let date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShowSystemTime() {
|
||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$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();
|
||||
},
|
||||
@ -140,10 +150,10 @@
|
||||
this.tools = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$top: 30px;
|
||||
$width: 50px;
|
||||
@ -187,7 +197,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.time {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
@ -3,9 +3,6 @@
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<train-control ref="trainControl" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<train-move ref="trainMove" />
|
||||
<train-switch ref="trainSwitch" />
|
||||
<train-edit-number ref="trainEditNumber" />
|
||||
<train-create-number ref="trainCreateNumber" />
|
||||
<train-move-number ref="trainMoveNumber" />
|
||||
@ -22,9 +19,9 @@ import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
|
||||
import TrainControl from './dialog/trainControl';
|
||||
import TrainDelete from './dialog/trainDelete';
|
||||
import TrainMove from './dialog/trainMove';
|
||||
import TrainSwitch from './dialog/trainSwitch';
|
||||
// import TrainDelete from './dialog/trainDelete';
|
||||
// import TrainMove from './dialog/trainMove';
|
||||
// import TrainSwitch from './dialog/trainSwitch';
|
||||
import TrainEditNumber from './dialog/trainEditNumber';
|
||||
import TrainMoveNumber from './dialog/trainMoveNumber';
|
||||
import TrainCreateNumber from './dialog/trainCreateNumber';
|
||||
@ -38,9 +35,6 @@ export default {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
TrainControl,
|
||||
TrainDelete,
|
||||
TrainMove,
|
||||
TrainSwitch,
|
||||
TrainEditNumber,
|
||||
TrainMoveNumber,
|
||||
TrainCreateNumber,
|
||||
@ -195,7 +189,6 @@ export default {
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
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() {
|
||||
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() {
|
||||
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() {
|
||||
const operate = {
|
||||
@ -454,35 +391,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 移动列车识别号
|
||||
moveTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
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);
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -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) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && device.fault) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const device = getCurrentStateObject();
|
||||
if (device && !device.fault) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
Signal: {
|
||||
@ -377,9 +391,6 @@ export const MenuDisabledState = {
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
},
|
||||
// 区故解
|
||||
solution() {
|
||||
},
|
||||
// 属性
|
||||
property() {
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ export default {
|
||||
importData(Sheet, JsonData) {
|
||||
var dataList = convertSheetToList(Sheet, false);
|
||||
var needList = Object.keys(this.ExcelConfig.columns);
|
||||
|
||||
if (dataList && dataList.length) {
|
||||
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) {
|
||||
@ -118,8 +117,9 @@ export default {
|
||||
lastPoint = train.stationTimeList[idx - 1];
|
||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
|
||||
num = this.computedReentryNumber(train.tripNumber);
|
||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode]);
|
||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode]);
|
||||
const aa = `${train.directionCode}${train.tripNumber}`;
|
||||
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 { mapGetters } from 'vuex';
|
||||
import { importRunPlan } from '@/api/runplan';
|
||||
import { importData } from '../planConvert';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
|
@ -1,31 +1,40 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm notice-info" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span><br>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm notice-info"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<span class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
</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>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -41,7 +50,7 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
@ -66,7 +75,7 @@
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
@ -1,9 +1,19 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span>
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -14,16 +24,19 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/noticeInfo'
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -31,10 +44,7 @@
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -52,40 +62,40 @@
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
return '交换列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
return '修改车组号'
|
||||
return '修改车组号';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
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) {
|
||||
/** 修改列车识别号*/
|
||||
return OperationEvent.Train.editTrainId.confirm.domId
|
||||
return OperationEvent.Train.editTrainId.confirm.domId;
|
||||
} 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) {
|
||||
/** 移动列车识别号*/
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId;
|
||||
} 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) {
|
||||
/** 修改车组号*/
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
@ -122,13 +132,13 @@
|
||||
this.routeSetting();
|
||||
}
|
||||
},
|
||||
//进路设置
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation,
|
||||
}
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -136,28 +146,28 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
@ -1,32 +1,41 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm popup-alarm" :title="title" :visible.sync="show" width="500px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm popup-alarm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :offset="2">
|
||||
<span v-for="message in messages">{{message}}</span><br>
|
||||
<span v-for="(message, index) in messages" :key="index">{{ message }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<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-row>
|
||||
</span>
|
||||
</el-button>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'Popup-Alarm',
|
||||
export default {
|
||||
name: 'PopupAlarm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: [],
|
||||
operate: null,
|
||||
operation: '',
|
||||
}
|
||||
operation: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -42,7 +51,7 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
@ -66,20 +75,20 @@
|
||||
|
||||
},
|
||||
alxeEffective() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
@ -1,58 +1,72 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-col>
|
||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="route-table-box">
|
||||
<span class="route-table-tip">进路列表</span>
|
||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini"
|
||||
@row-click="clickEvent" height="90" highlight-current-row>
|
||||
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px">
|
||||
</el-table-column>
|
||||
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px">
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tempData"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 99%;"
|
||||
size="mini"
|
||||
height="90"
|
||||
highlight-current-row
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
{{ controlTypeNameMap[scope.row.controlType] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="controlType" label="进路描述" :id="domIdChoose" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
无
|
||||
</template>
|
||||
<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="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"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<!-- <password ref="password"></password> -->
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
// import Password from './childDialog/childDialog/password';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
// import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
// import Password from './childDialog/childDialog/password';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo,
|
||||
// ConfirmControl,
|
||||
NoticeInfo
|
||||
// Password
|
||||
},
|
||||
data() {
|
||||
@ -68,13 +82,13 @@
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none',
|
||||
'border-bottom': 'none'
|
||||
},
|
||||
controlTypeNameMap: {
|
||||
'01': '折返',
|
||||
'02': '直通',
|
||||
}
|
||||
'02': '直通'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -87,15 +101,15 @@
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : ''
|
||||
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理引导进路'
|
||||
return '办理引导进路';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
disabled = !this.row.canSetting
|
||||
disabled = !this.row.canSetting;
|
||||
}
|
||||
return disabled;
|
||||
}
|
||||
@ -103,7 +117,7 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
@ -113,24 +127,24 @@
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
let protect = row.overlapSectionList[0];
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
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);
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -182,7 +196,7 @@
|
||||
this.beforeSectionList = row.containSectionList || [];
|
||||
|
||||
// 设置选中指令
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.guide.choose.operation,
|
||||
val: row.code
|
||||
@ -198,10 +212,10 @@
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.guide.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Signal.guide.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -209,39 +223,39 @@
|
||||
if (valid) {
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.guide.confirm.operation,
|
||||
}
|
||||
operation: OperationEvent.Signal.guide.confirm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.route-table-tip {
|
||||
|
@ -1,55 +1,69 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="2"><span class="item-lable">车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="route-table-box">
|
||||
<span class="route-table-tip">进路列表</span>
|
||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini"
|
||||
@row-click="clickEvent" height="150" highlight-current-row>
|
||||
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px">
|
||||
</el-table-column>
|
||||
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px">
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tempData"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 99%;"
|
||||
size="mini"
|
||||
height="150"
|
||||
highlight-current-row
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
{{ controlTypeNameMap[scope.row.controlType] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="controlType" label="进路描述" :id="domIdChoose" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
无
|
||||
</template>
|
||||
<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="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"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
// import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
// ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
@ -65,13 +79,13 @@
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none',
|
||||
'border-bottom': 'none'
|
||||
},
|
||||
controlTypeNameMap: {
|
||||
'01': '折返',
|
||||
'02': '直通',
|
||||
}
|
||||
'02': '直通'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -84,15 +98,15 @@
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理进路'
|
||||
return '办理进路';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
disabled = !this.row.canSetting
|
||||
disabled = !this.row.canSetting;
|
||||
}
|
||||
return disabled;
|
||||
}
|
||||
@ -100,7 +114,7 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
@ -110,24 +124,24 @@
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
let protect = row.overlapSectionList[0];
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
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);
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -179,7 +193,7 @@
|
||||
this.beforeSectionList = row.containSectionList || [];
|
||||
|
||||
// 设置选中指令
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code
|
||||
@ -195,11 +209,11 @@
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -207,29 +221,29 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.route-table-tip {
|
||||
|
@ -1,7 +1,16 @@
|
||||
<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>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm section-cmd-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<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;">
|
||||
@ -11,16 +20,26 @@
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="dialogueStatus" size="mini" disabled></el-input>
|
||||
<el-input v-model="dialogueStatus" size="mini" disabled />
|
||||
</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
|
||||
:id="openConversationId"
|
||||
type="primary"
|
||||
style="width: 110px; line-height: 26px;"
|
||||
:disabled="!isOpenMessage"
|
||||
@click="openMessage('open')"
|
||||
>打开会话
|
||||
</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
|
||||
:id="closeConversationId"
|
||||
type="primary"
|
||||
style="width: 110px; line-height: 26px;"
|
||||
:disabled="isOpenMessage"
|
||||
@click="openMessage('close')"
|
||||
>关闭会话
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -32,51 +51,98 @@
|
||||
<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
|
||||
:id="firstLimitSpeedId"
|
||||
v-model="firstScetion.speed"
|
||||
size="mini"
|
||||
:disabled="spdDisabled"
|
||||
placeholder=""
|
||||
@change="changeSelect(firstScetion.speed, '1')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div
|
||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;">
|
||||
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
|
||||
:id="firstStartSectionId"
|
||||
v-model="firstScetion.startSection"
|
||||
size="mini"
|
||||
:disabled="spdDisabled"
|
||||
placeholder=""
|
||||
@change="changeSelect(firstScetion.startSection, '2')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in regionList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</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>
|
||||
<el-input
|
||||
:id="firstStartvalueId"
|
||||
v-model="firstScetion.startValue"
|
||||
:min="0"
|
||||
size="mini"
|
||||
:disabled="spdDisabled"
|
||||
@blur="changeSelect(firstScetion.startValue, '3')"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;">
|
||||
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
|
||||
:id="firstEndSectionId"
|
||||
v-model="firstScetion.endSection"
|
||||
size="mini"
|
||||
:disabled="spdDisabled"
|
||||
placeholder=""
|
||||
@change="changeSelect(firstScetion.endSection, '4')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in regionList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</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>
|
||||
<el-input
|
||||
:id="firstEndvalueId"
|
||||
v-model="firstScetion.endValue"
|
||||
:min="0"
|
||||
size="mini"
|
||||
:disabled="spdDisabled"
|
||||
@blur="changeSelect(firstScetion.endValue, '5')"
|
||||
/>
|
||||
</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
|
||||
:id="firstCheckId"
|
||||
type="primary"
|
||||
style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
|
||||
:disabled="spdDisabled"
|
||||
@click="CheckEquipment"
|
||||
>查看设备
|
||||
</el-button>
|
||||
<el-button type="primary" style="width: 90px; margin: 0; line-height: 26px;"
|
||||
@click="Confirmed" :disabled="firstDisabled" :id="firstComfirmId">首次确认
|
||||
<el-button
|
||||
:id="firstComfirmId"
|
||||
type="primary"
|
||||
style="width: 90px; margin: 0; line-height: 26px;"
|
||||
:disabled="firstDisabled"
|
||||
@click="Confirmed"
|
||||
>首次确认
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@ -85,8 +151,8 @@
|
||||
<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 v-for="(item, index) in equipmentText" :key="index">
|
||||
{{ item.name }}: {{ item.text }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -99,59 +165,111 @@
|
||||
<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
|
||||
:id="secondLimitSpeedId"
|
||||
v-model="secondScetion.speed"
|
||||
size="mini"
|
||||
:disabled="stpDisabled"
|
||||
placeholder=""
|
||||
@change="changeSelect(secondScetion.speed, '6')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div
|
||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;">
|
||||
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
|
||||
:id="secondStartSectionId"
|
||||
v-model="secondScetion.startSection"
|
||||
size="mini"
|
||||
:disabled="stpDisabled"
|
||||
placeholder=""
|
||||
@change="changeSelect(secondScetion.startSection, '7')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in regionList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</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
|
||||
:id="secondStartvalueId"
|
||||
v-model="secondScetion.startValue"
|
||||
size="mini"
|
||||
:disabled="stpDisabled"
|
||||
placeholder=""
|
||||
@change="changeSelect(secondScetion.startValue, '8')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in startSectionList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div
|
||||
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;">
|
||||
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
|
||||
:id="secondEndSectionId"
|
||||
v-model="secondScetion.endSection"
|
||||
size="mini"
|
||||
:disabled="stpDisabled"
|
||||
placeholder=""
|
||||
@change="changeSelect(secondScetion.endSection, '9')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in regionList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</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
|
||||
:id="secondEndvalueId"
|
||||
v-model="secondScetion.endValue"
|
||||
size="mini"
|
||||
:disabled="stpDisabled"
|
||||
placeholder=""
|
||||
@change="changeSelect(secondScetion.endValue, '10')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in endSectionList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</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
|
||||
:id="secondCheckId"
|
||||
type="primary"
|
||||
style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
|
||||
@click="CheckSecondEquipment"
|
||||
>查看设备
|
||||
</el-button>
|
||||
<el-button type="primary" style="width: 90px; margin: 0; line-height: 26px;"
|
||||
@click="confirm" :disabled="secondDisabled" :id="secondComfirmId">确认发送
|
||||
<el-button
|
||||
:id="secondComfirmId"
|
||||
type="primary"
|
||||
style="width: 90px; margin: 0; line-height: 26px;"
|
||||
:disabled="secondDisabled"
|
||||
@click="confirm"
|
||||
>确认发送
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@ -160,8 +278,8 @@
|
||||
<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 v-for="(item, index) in equipmentText1" :key="index">
|
||||
{{ item.name }}: {{ item.text }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -172,30 +290,30 @@
|
||||
<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>
|
||||
{{ 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>
|
||||
{{ 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>
|
||||
<confirm-tip ref="ConfirmTip" @close="closeMessage" />
|
||||
</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';
|
||||
import { 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 {
|
||||
export default {
|
||||
name: 'SectionCmdSpeed',
|
||||
components: {
|
||||
ConfirmTip
|
||||
@ -245,7 +363,7 @@
|
||||
startSection: '',
|
||||
endSection: '',
|
||||
startValue: '',
|
||||
endValue: '',
|
||||
endValue: ''
|
||||
},
|
||||
firstShow: false,
|
||||
copyScetion: {
|
||||
@ -253,20 +371,20 @@
|
||||
startSection: '',
|
||||
endSection: '',
|
||||
startValue: '',
|
||||
endValue: '',
|
||||
endValue: ''
|
||||
},
|
||||
secondScetion: {
|
||||
speed: '',
|
||||
startSection: '',
|
||||
endSection: '',
|
||||
startValue: '',
|
||||
endValue: '',
|
||||
}
|
||||
endValue: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
speedList() {
|
||||
let list = [{ value: -1, name: '无限速' }];
|
||||
const 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) });
|
||||
}
|
||||
@ -276,6 +394,7 @@
|
||||
if (this.dialogShow) {
|
||||
return '公里标输入临时限速';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -330,7 +449,7 @@
|
||||
},
|
||||
domIdClose() {
|
||||
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.domIdClose.domId : '';
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'timeCountCommand': function (val) {
|
||||
@ -353,14 +472,14 @@
|
||||
startSection: '',
|
||||
endSection: '',
|
||||
startValue: '',
|
||||
endValue: '',
|
||||
endValue: ''
|
||||
};
|
||||
this.secondScetion = {
|
||||
speed: '',
|
||||
startSection: '',
|
||||
endSection: '',
|
||||
startValue: '',
|
||||
endValue: '',
|
||||
endValue: ''
|
||||
};
|
||||
} else {
|
||||
this.dialogueStatus = `会话打开,剩余时间${val}秒`;
|
||||
@ -375,12 +494,12 @@
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
this.regionList = this.$ConstSelect.RegionTypeList;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.timeCountCommand > 0) {
|
||||
@ -394,7 +513,7 @@
|
||||
} else if (this.timeCountConfirm == 0) { // 关闭会话
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}, 1000)
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
@ -424,15 +543,15 @@
|
||||
startSection: '',
|
||||
endSection: '',
|
||||
startValue: '',
|
||||
endValue: '',
|
||||
}
|
||||
endValue: ''
|
||||
};
|
||||
this.firstScetion = {
|
||||
speed: '',
|
||||
startSection: '',
|
||||
endSection: '',
|
||||
startValue: '',
|
||||
endValue: '',
|
||||
}
|
||||
endValue: ''
|
||||
};
|
||||
this.speed = 0;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -440,15 +559,15 @@
|
||||
},
|
||||
openMessage(state) {
|
||||
if (state == 'open') { // 打开会话
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Section.setLimitSpeed.openConversation.operation,
|
||||
}
|
||||
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.spdDisabled = false;
|
||||
this.messageStatus = '会话打开成功';
|
||||
this.speed = 1;
|
||||
this.timeCountCommand = 120;
|
||||
@ -457,10 +576,10 @@
|
||||
console.log(error);
|
||||
});
|
||||
} else { // 关闭会话
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Section.setLimitSpeed.closeConversation.operation,
|
||||
}
|
||||
operation: OperationEvent.Section.setLimitSpeed.closeConversation.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
@ -483,13 +602,13 @@
|
||||
},
|
||||
CheckEquipment() { // 第一次确认设备
|
||||
if (this.firstShow) {
|
||||
let value = `${this.firstScetion.speed}::${this.firstScetion.startSection}::${this.firstScetion.startValue}::${this.firstScetion.endSection}::${this.firstScetion.endValue}`;
|
||||
let operate = {
|
||||
const value = `${this.firstScetion.speed}::${this.firstScetion.startSection}::${this.firstScetion.startValue}::${this.firstScetion.endSection}::${this.firstScetion.endValue}`;
|
||||
const operate = {
|
||||
send: true,
|
||||
val: value,
|
||||
type: this.type,
|
||||
operation: OperationEvent.Section.setLimitSpeed.firstCheck.operation,
|
||||
}
|
||||
operation: OperationEvent.Section.setLimitSpeed.firstCheck.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
@ -501,20 +620,20 @@
|
||||
startSection: this.firstScetion.startSection,
|
||||
endSection: this.firstScetion.endSection,
|
||||
startValue: this.firstScetion.startValue,
|
||||
endValue: this.firstScetion.endValue,
|
||||
}
|
||||
endValue: this.firstScetion.endValue
|
||||
};
|
||||
this.startSectionList = [];
|
||||
this.endSectionList = [];
|
||||
for (let index = 0; index < 4; index++) {
|
||||
let starData = {
|
||||
const starData = {
|
||||
value: Number(this.firstScetion.startValue) + index,
|
||||
label: Number(this.firstScetion.startValue) + index,
|
||||
}
|
||||
label: Number(this.firstScetion.startValue) + index
|
||||
};
|
||||
this.startSectionList.push(starData);
|
||||
let endData = {
|
||||
const endData = {
|
||||
value: Number(this.firstScetion.endValue) + index,
|
||||
label: Number(this.firstScetion.endValue) + index,
|
||||
}
|
||||
label: Number(this.firstScetion.endValue) + index
|
||||
};
|
||||
this.endSectionList.push(endData);
|
||||
}
|
||||
}
|
||||
@ -525,28 +644,28 @@
|
||||
},
|
||||
getEquipmentList(list) {
|
||||
this.equipmentText = [];
|
||||
let stationStand = [];
|
||||
let stationText = [];
|
||||
const stationStand = [];
|
||||
const stationText = [];
|
||||
this.codeText = '';
|
||||
let arr = [];
|
||||
const arr = [];
|
||||
list.forEach(ele => {
|
||||
if (stationStand.indexOf(ele.stationCode) == -1) {
|
||||
stationStand.push(ele.stationCode);
|
||||
let text = this.getTextName(ele);
|
||||
stationText.push(text)
|
||||
const text = this.getTextName(ele);
|
||||
stationText.push(text);
|
||||
} else {
|
||||
let index = stationStand.indexOf(ele.stationCode)
|
||||
let text = this.getTextName(ele);
|
||||
const index = stationStand.indexOf(ele.stationCode);
|
||||
const 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 = {
|
||||
const stationStandName = this.$store.getters['map/getDeviceByCode'](item);
|
||||
const data = {
|
||||
text: stationText[index],
|
||||
name: stationStandName.name,
|
||||
name: stationStandName.name
|
||||
};
|
||||
this.equipmentText.push(data);
|
||||
});
|
||||
@ -554,28 +673,28 @@
|
||||
getTextName(ele) {
|
||||
if (ele.switchSectionType) {
|
||||
switch (ele.switchSectionType) {
|
||||
case '01': {
|
||||
case '01':
|
||||
return `${ele.name}(主), `;
|
||||
} break;
|
||||
case '02': {
|
||||
break;
|
||||
case '02':
|
||||
return `${ele.name}(定), `;
|
||||
} break;
|
||||
case '03': {
|
||||
break;
|
||||
case '03':
|
||||
return `${ele.name}(反), `;
|
||||
} break;
|
||||
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 = {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Section.setLimitSpeed.secondCheck.operation,
|
||||
}
|
||||
operation: OperationEvent.Section.setLimitSpeed.secondCheck.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
@ -591,8 +710,8 @@
|
||||
startSection: this.copyScetion.startSection,
|
||||
endSection: this.copyScetion.endSection,
|
||||
startValue: this.copyScetion.startValue,
|
||||
endValue: this.copyScetion.endValue,
|
||||
}
|
||||
endValue: this.copyScetion.endValue
|
||||
};
|
||||
this.firstDisabled = true;
|
||||
this.secondScetion = {
|
||||
speed: '',
|
||||
@ -605,18 +724,18 @@
|
||||
this.equipmentText = [];
|
||||
this.stpDisabled = true;
|
||||
this.timeCountConfirm = -1;
|
||||
let operate = {
|
||||
const operate = {
|
||||
message: `两次值不一致`
|
||||
}
|
||||
};
|
||||
this.$refs.ConfirmTip.doShow(operate);
|
||||
}
|
||||
},
|
||||
changeSelect(value, val) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: '',
|
||||
val: value
|
||||
}
|
||||
};
|
||||
|
||||
switch (val) {
|
||||
case '1': {
|
||||
@ -661,10 +780,10 @@
|
||||
},
|
||||
|
||||
Confirmed() { // 第一次确认
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Section.setLimitSpeed.firstComfirm.operation,
|
||||
}
|
||||
operation: OperationEvent.Section.setLimitSpeed.firstComfirm.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
@ -678,8 +797,8 @@
|
||||
startSection: '',
|
||||
endSection: '',
|
||||
startValue: '***',
|
||||
endValue: '***',
|
||||
}
|
||||
endValue: '***'
|
||||
};
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
@ -688,59 +807,59 @@
|
||||
|
||||
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 = {
|
||||
const value = `${this.secondScetion.speed}::${this.secondScetion.startSection}::${this.secondScetion.startValue}::${this.secondScetion.endSection}::${this.secondScetion.endValue}`;
|
||||
const operate = {
|
||||
send: true,
|
||||
val: value,
|
||||
type: this.type,
|
||||
code: this.code,
|
||||
operation: OperationEvent.Section.confirmLimit.menu.operation,
|
||||
}
|
||||
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);
|
||||
const group = router.currentRoute.query.group;
|
||||
const 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 = {
|
||||
const operate = {
|
||||
message: error.message
|
||||
}
|
||||
};
|
||||
this.$refs.ConfirmTip.doShow(operate);
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
}).catch(error => {
|
||||
let operate = {
|
||||
const operate = {
|
||||
message: error.message
|
||||
}
|
||||
};
|
||||
this.$refs.ConfirmTip.doShow(operate);
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
|
||||
close() { // 设置成功 关闭弹窗
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Section.setLimitSpeed.domIdClose.operation,
|
||||
}
|
||||
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 = {
|
||||
const operate = {
|
||||
message: `是否关闭会话,并关闭窗口`,
|
||||
confirmId: OperationEvent.Section.setLimitSpeed.close.domId,
|
||||
}
|
||||
confirmId: OperationEvent.Section.setLimitSpeed.close.domId
|
||||
};
|
||||
this.$refs.ConfirmTip.doShow(operate);
|
||||
}
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
@ -748,10 +867,10 @@
|
||||
|
||||
},
|
||||
closeMessage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Section.setLimitSpeed.close.operation,
|
||||
}
|
||||
operation: OperationEvent.Section.setLimitSpeed.close.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
@ -766,7 +885,7 @@
|
||||
this.doClose();
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 处理右键菜单 确认临时限速
|
||||
handleMenuConfirmLimit(operate) {
|
||||
@ -779,5 +898,5 @@
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,10 +1,18 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm stand-detail" :title="title" :visible.sync="show" width="380px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<span>车站</span>
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<span>站台</span>
|
||||
@ -12,11 +20,10 @@
|
||||
</el-row>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled>
|
||||
</el-input>
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input style="padding: 0 3px;" v-model="standName" size="small" disabled></el-input>
|
||||
<el-input v-model="standName" style="padding: 0 3px;" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
@ -24,7 +31,7 @@
|
||||
<span>停站时间</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.stopTime" size="small" disabled></el-input>
|
||||
<el-input v-model="modelData.stopTime" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
@ -32,7 +39,7 @@
|
||||
<span>运行等级</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.runLevel" size="small" disabled></el-input>
|
||||
<el-input v-model="modelData.runLevel" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
@ -40,7 +47,7 @@
|
||||
<span>扣车</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.detainCar" size="small" disabled></el-input>
|
||||
<el-input v-model="modelData.detainCar" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
@ -48,7 +55,7 @@
|
||||
<span>跳停</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.jumpStop" size="small" disabled></el-input>
|
||||
<el-input v-model="modelData.jumpStop" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -59,17 +66,17 @@
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'StandDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
@ -91,13 +98,13 @@
|
||||
stopTime: '自动',
|
||||
runLevel: '自动',
|
||||
detainCar: '无扣车',
|
||||
jumpStop: '无跳停',
|
||||
},
|
||||
jumpStop: '无跳停'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -115,26 +122,27 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
|
||||
let stationList = this.stationList.slice();
|
||||
let index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
let stationStand, station;
|
||||
// const stationList = this.stationList.slice();
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
// let stationStand;
|
||||
// let station;
|
||||
if (selected.direction == '01') { // 下行
|
||||
//下行时,此站不是最后一站
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
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 {
|
||||
//上行时,此站不是最后一站
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length - 1) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,7 +150,7 @@
|
||||
stopTime: opts.parkingTime != -1 ? opts.parkingTime : '自动',
|
||||
runLevel: opts.intervalRunTime > 0 ? '常速': '自动',
|
||||
detainCar: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '无扣车',
|
||||
jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停',
|
||||
jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停'
|
||||
};
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
@ -152,7 +160,7 @@
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
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) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -171,10 +179,10 @@
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -182,27 +190,27 @@
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
})
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.content {
|
||||
|
@ -1,10 +1,20 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm two-confirmation" title="二次确认" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :showClose="false" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
append-to-body v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm two-confirmation"
|
||||
title="二次确认"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:show-close="false"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span> {{message}}</span><br>
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
@ -15,16 +25,19 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo'
|
||||
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -32,10 +45,7 @@
|
||||
operate: '',
|
||||
timer: null,
|
||||
domIdConfirm: ''
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -48,13 +58,13 @@
|
||||
if (this.operate) {
|
||||
return this.operate.messages;
|
||||
}
|
||||
return []
|
||||
return [];
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
@ -78,10 +88,10 @@
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
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.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -89,16 +99,16 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operate && this.operate.selection) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
val: this.operate.val,
|
||||
selection: this.operate.selection
|
||||
}
|
||||
};
|
||||
|
||||
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
||||
@ -116,12 +126,12 @@
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}, 1000).catch((error) => {
|
||||
}, 1000).catch(() => {
|
||||
this.loading = true;
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,12 +1,22 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm user-delete" :title="title" :visible.sync="show" width="260px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding-left: 10px; padding-bottom: 10px">
|
||||
<i class="el-icon-info"></i>
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm user-delete"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="260px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<span style="padding-left: 10px; padding-bottom: 10px">
|
||||
<i class="el-icon-info" />
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
</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>
|
||||
@ -19,10 +29,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'UserDelete',
|
||||
components: {
|
||||
},
|
||||
@ -33,12 +43,12 @@
|
||||
model: {
|
||||
type: 'DELETE',
|
||||
jobNumber: '',
|
||||
userName: '',
|
||||
userName: ''
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -54,17 +64,17 @@
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除用户'
|
||||
return '删除用户';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
//非断电激活时设置初始值
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
@ -90,10 +100,10 @@
|
||||
},
|
||||
commit() {
|
||||
if (this.model.userName && this.model.jobNumber) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -102,25 +112,25 @@
|
||||
this.doClose();
|
||||
this.$emit('operateUser', this.model);
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('选择的用户名或工号为空');
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
|
@ -1,40 +1,38 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<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">
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="线路名称">
|
||||
<el-input v-model="model.lineName" disabled></el-input>
|
||||
<el-input v-model="model.lineName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位名称">
|
||||
<el-input v-model="model.unitName" disabled></el-input>
|
||||
<el-input v-model="model.unitName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="模块名称">
|
||||
<el-input v-model="model.moduleName" disabled></el-input>
|
||||
<el-input v-model="model.moduleName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="报警时间">
|
||||
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled>
|
||||
</el-date-picker>
|
||||
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item>
|
||||
<span slot="label">等 级</span>
|
||||
<el-input v-model="model.level" disabled></el-input>
|
||||
<el-input v-model="model.level" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="确认状态">
|
||||
<el-input v-model="model.confirm" disabled></el-input>
|
||||
<el-input v-model="model.confirm" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -42,25 +40,24 @@
|
||||
<el-col :span="9" class="alarm-type">
|
||||
<el-form-item>
|
||||
<span slot="label">类  型</span>
|
||||
<el-input v-model="model.type" disabled></el-input>
|
||||
<el-input v-model="model.type" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="15" class="alarm-child-type">
|
||||
<el-form-item label="子类型">
|
||||
<el-input v-model="model.childType" disabled></el-input>
|
||||
<el-input v-model="model.childType" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="时间摘要">
|
||||
<el-input v-model="model.timeSummary" disabled></el-input>
|
||||
<el-input v-model="model.timeSummary" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="推荐操作">
|
||||
<el-input v-model="model.recommendedOperation" disabled></el-input>
|
||||
<el-input v-model="model.recommendedOperation" disabled />
|
||||
</el-form-item>
|
||||
<div class="alarm-detail-description">
|
||||
<span> 报警详细描述</span><br>
|
||||
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="model.alarmDetail" disabled>
|
||||
</el-input>
|
||||
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row class="button-group">
|
||||
@ -68,18 +65,18 @@
|
||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<span style="line-height:26px">未确认{{level}}级报警数目:1</span>
|
||||
<span style="line-height:26px">未确认{{ level }}级报警数目:1</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
<!-- </span> -->
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'AlarmDetail',
|
||||
data() {
|
||||
return {
|
||||
@ -104,40 +101,40 @@
|
||||
recommendedOperation: '',
|
||||
alarmDetail: ''
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'name',
|
||||
'name'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && elem.hasOwnProperty('success')) {
|
||||
if (elem.success) {
|
||||
let operate = this.$store.state.training.operate;
|
||||
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
let newOperate = {
|
||||
const operate = this.$store.state.training.operate;
|
||||
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
const newOperate = {
|
||||
type: operate.type,
|
||||
name: station.name,
|
||||
}
|
||||
name: station.name
|
||||
};
|
||||
|
||||
this.doShow(newOperate);
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
@ -154,7 +151,7 @@
|
||||
timeSummary: '控制模式摘要',
|
||||
recommendedOperation: '',
|
||||
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
|
||||
}
|
||||
};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -168,41 +165,40 @@
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
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('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
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('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
isClose() {
|
||||
return this.dialogShow;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
|
||||
.alarm-type .el-input {
|
||||
width: 220px;
|
||||
}
|
||||
|
@ -377,9 +377,6 @@ export const MenuDisabledState = {
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
},
|
||||
// 区故解
|
||||
solution() {
|
||||
},
|
||||
// 属性
|
||||
property() {
|
||||
}
|
||||
|
@ -122,7 +122,6 @@
|
||||
import XLSX from 'xlsx';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { importRunPlan } from '@/api/runplan';
|
||||
import { importData } from '../planConvert';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
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