Merge remote-tracking branch 'origin/master'

This commit is contained in:
program-walker 2019-10-15 22:21:47 +08:00
commit 4268c9a17c
360 changed files with 24693 additions and 22891 deletions

View File

@ -17,6 +17,15 @@ export function getLoginUrl(params) {
}); });
} }
// 获取登陆url 小程序二维码
export function getLoginWmurl(params) {
return request({
url: '/api/login/wmurl',
method: 'get',
params: params
});
}
// 获取登录信息 // 获取登录信息
export function getInfo(token) { export function getInfo(token) {
return request({ return request({

View File

@ -131,3 +131,11 @@ export function listCanPackagePermission(params) {
params: params params: params
}); });
} }
// 设置权限分发列表 权限失效
export function setCommodityStatus(id) {
return request({
url: `/api/distribute/${id}/invalid`,
method: 'get'
});
}

View File

@ -125,3 +125,11 @@ export function getOperateTrainingList(data) {
} }
}); });
} }
// 另存为 操作定义
export function postOperateSaveAs(skinCode, other) {
return request({
url: `/api/operate/${skinCode}/saveAs/${other}`,
method: 'post'
});
}

View File

@ -399,3 +399,19 @@ export function postDailyRunPlanLoadGenerate(id) {
method: 'post' method: 'post'
}); });
} }
// 加载通用排班计划
export function postSchedulingCommonGenerate(mapId) {
return request({
url: `/api/scheduling/common/generate?mapId=${mapId}`,
method: 'post'
});
}
// 从加载计划创建每日计划
export function postRunPlanTemplate(data) {
return request({
url: `/api/runPlan/template/${data.id}/copyAs/${data.skinCode}?name=${data.name}`,
method: 'post'
});
}

BIN
src/assets/bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
src/assets/bg1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -108,9 +108,9 @@ export default {
computed: { computed: {
width() { width() {
let fontNum = 0; let fontNum = 0;
let newLabel=""; let newLabel='';
this.menu.forEach(elem => { this.menu.forEach(elem => {
newLabel=elem.label.replace(/[^\u0000-\u00ff]/g,"aa"); newLabel = elem.label && elem.label.replace(/[^\u0000-\u00ff]/g, 'aa');
if (elem.label && newLabel.length > fontNum) { if (elem.label && newLabel.length > fontNum) {
fontNum=newLabel.length; fontNum=newLabel.length;
// fontNum = elem.label.length; // fontNum = elem.label.length;
@ -193,7 +193,6 @@ export default {
} }
}, },
calculateSubWidth(item) { calculateSubWidth(item) {
// debugger;
const children = item.children; const children = item.children;
let width = 0; let width = 0;
let fontNum = 0; let fontNum = 0;

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="35%" :before-close="done => {}" :show-close="false" center> <el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="35%" :before-close="done => {}" :show-close="false" center>
<div style="text-align:center; margin:auto;"> <div style="text-align:center; margin:auto;">
<qrcode-vue v-loading="loading" :value="url" :size="400" /> <qrcode-vue v-loading="loading" :value="url" :size="400" />
</div> </div>

View File

@ -127,7 +127,7 @@
</el-row> </el-row>
</template> </template>
</el-col> </el-col>
<el-col :span="5" :offset="1"> <el-col :span="6" :offset="0">
<el-button type="primary" size="small" :disabled="!canQuery" @click="query">{{ $t('global.query') }}</el-button> <el-button type="primary" size="small" :disabled="!canQuery" @click="query">{{ $t('global.query') }}</el-button>
<el-button v-if="queryForm.reset" type="primary" size="small" :disabled="!canQuery" @click="doClean">{{ $t('global.reset') }}</el-button> <el-button v-if="queryForm.reset" type="primary" size="small" :disabled="!canQuery" @click="doClean">{{ $t('global.reset') }}</el-button>
<el-button v-if="exportFlag" type="primary" size="small" :disabled="!canQuery" @click="doExport">{{ $t('global.export') }}</el-button> <el-button v-if="exportFlag" type="primary" size="small" :disabled="!canQuery" @click="doExport">{{ $t('global.export') }}</el-button>

View File

@ -154,5 +154,9 @@ export default {
no: 'No', no: 'No',
details: 'Details', details: 'Details',
enterNameToFilter: 'Enter a name to filter', enterNameToFilter: 'Enter a name to filter',
colon: ':' colon: ':',
processFailure: 'Process failure',
enterLastStep: 'Please enter a hint and click next',
pleaseOpearte: 'Please proceed',
help: 'help'
}; };

62
src/i18n/langs/en/ibp.js Normal file
View 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'
};

View File

@ -23,6 +23,7 @@ import display from './display';
import joinTraining from './joinTraining'; import joinTraining from './joinTraining';
import trainRoom from './trainRoom'; import trainRoom from './trainRoom';
import menu from './menu'; import menu from './menu';
import ibp from './ibp';
export default { export default {
...enLocale, ...enLocale,
@ -49,5 +50,6 @@ export default {
display, display,
joinTraining, joinTraining,
trainRoom, trainRoom,
menu menu,
ibp
}; };

View File

@ -9,4 +9,11 @@ export default {
confirmSignalOpen: 'Please confirm that the signal ahead is open', confirmSignalOpen: 'Please confirm that the signal ahead is open',
faultInformation: 'Fault information:', faultInformation: 'Fault information:',
vWeek: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], vWeek: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
trackCheck: 'Track check',
signalCheck: 'Signal check',
turnoutCheck: 'Turnout check',
stationInfoDisplay: 'Station information — display',
stationInfoHidden: 'Station information — hidden',
trainInfoDisplay: 'Train information — display',
trainInfoHidden: 'Train information — hidden'
}; };

View File

@ -28,6 +28,10 @@ export default {
stepDetail: 'Detail', stepDetail: 'Detail',
generation: 'Generation', generation: 'Generation',
skinType: 'Skin Type', skinType: 'Skin Type',
saveAs: 'Save As',
skinTypeFrom: 'from',
skinTypeTo: 'to',
copyLesson: 'Duplicate course definition',
minDuration: 'The Best Available', minDuration: 'The Best Available',
maxDuration: 'The Largest Available', maxDuration: 'The Largest Available',
trainingRemark: 'Explain', trainingRemark: 'Explain',
@ -52,6 +56,7 @@ export default {
createChapter: 'Create chapter', createChapter: 'Create chapter',
contentSorting: 'Content sorting', contentSorting: 'Content sorting',
courseList: 'Course list', courseList: 'Course list',
countSkinCode: 'Duplicate skin cannot be the same type as the copied skin',
createNewCoursesFromRelease: 'Create new courses from release', createNewCoursesFromRelease: 'Create new courses from release',
courseName: 'Course name', courseName: 'Course name',
parentChapter: 'Parent chapter', parentChapter: 'Parent chapter',

View File

@ -257,7 +257,7 @@ export default {
acceptConversionResponseTimeout: 'Accept conversion response timeout', acceptConversionResponseTimeout: 'Accept conversion response timeout',
controlModeTransfersuccees: 'Control mode transfer succees', controlModeTransfersuccees: 'Control mode transfer succees',
controlModeTransferFailed: 'Control mode transfer failed', controlModeTransferFailed: 'Control mode transfer failed',
senedMessageOne: 'A transfer request has been sent and timed out after ', senedMessageOne: 'A transfer request has been sent and timed out after, ',
senedMessageTwo: 'seconds.', senedMessageTwo: 'seconds.',
normal: 'Normal', normal: 'Normal',
selectData: 'Please select a piece of data', selectData: 'Please select a piece of data',
@ -359,6 +359,8 @@ export default {
addTask2: 'Add task', addTask2: 'Add task',
deleteTask2: 'Delete task', deleteTask2: 'Delete task',
replace: 'replace', replace: 'replace',
jumpStop: 'Jump stop',
centerDetainTrain: 'Center detain train',
inTheLibrary: 'In the library', inTheLibrary: 'In the library',
outOfTheLibrary: 'Out of the library', outOfTheLibrary: 'Out of the library',
changeTripNumber: 'Change trip number', changeTripNumber: 'Change trip number',

View File

@ -100,11 +100,17 @@ export default {
permission: 'Permission', permission: 'Permission',
orderSelectionItem: 'Order selection item', orderSelectionItem: 'Order selection item',
orderDetails: 'Order details', orderDetails: 'Order details',
universalPackage: '万能权限',
createPackage: '创建权限',
package: '权限包',
basePackage: '基础权限',
statusType: 'Status type', statusType: 'Status type',
private: 'Private', private: 'Private',
public: 'Public', public: 'Public',
pleaseEnterContent: 'Please enter content', pleaseEnterContent: 'Please enter content',
selectGoods: 'Select Goods', selectGoods: 'Select Goods',
month: ' month', month: ' month',
yuan: ' yuan' yuan: ' yuan',
back: '返回',
next: '下一步'
}; };

View File

@ -1,6 +1,233 @@
export default { export default {
updateStation: {
level1: 'level one: ',
level2: 'level two: ',
level3: 'level three: ',
level4: 'level four: ',
level5: 'level five: ',
updateData: 'Update data',
pleaseInputLevel1: 'Please input level one',
pleaseInputLevel2: 'Please input level two',
pleaseInputLevel3: 'Please input level three',
pleaseInputLevel4: 'Please input level four',
pleaseInputLevel5: 'Please input level five',
systemOutPut: 'System output',
selectPrintArea: 'Selec print area',
selectDeleteRoute: 'Select delete route',
routeSelect: 'Route select',
quicklyAddTask: 'Quickly add task',
quicklyAddLoop: 'Quickly add loop',
deletePlanCar: 'Delete plan car'
},
openRunPlan: {
selectRunplan: 'Select run graph',
delete: 'Delete',
modify: 'Modify',
runPlanList: 'Run graph list',
getRunPlanListFail: 'Get run graph list Failed',
confirmDeleteRunPlan: 'Are you sure to delete this run graph?',
deleteSuccess: 'Delete success!',
pleaseSelectRunplan: 'please select run graph'
},
modifying: {
tripNumber: 'Trip number: ',
pleaseSelect: 'Please select',
manual: 'Manual',
defaultStopTime: 'Default stop time',
serviceNumber: 'Service number: ',
clearGuest: 'Clear guest',
continuationPlan: 'Continuation plan',
firstTrain: 'First train',
serialNumber: 'Serial number: ',
defaultRunLevel: 'Default run level: ',
startTime: 'Start Time',
selectTime: 'Select Time',
inStock: 'In Stock',
outStock: 'Out Stock',
lastTrain: 'Last Train',
route: 'Route ',
// 起始站
// 起始区段
// 终到站
// 终到区段
// 描述
detail: 'Detail: ',
station: 'Station',
section: 'Section',
stopTime: 'Stop time',
runLevel: 'Run level',
arrivalTime: 'Arrival time',
departureTime: 'Departure time',
showDefaultTime: 'Show default stop time and run level',
automatic: 'Automatic',
default: 'Default',
modifyTask: 'Modify task',
setMessageTip1: 'Please set the start interval of the start section',
setMessageTip2: 'to the section',
setMessageTip3: '.',
modifyTaskSuccess: 'Modify task success!',
modifyTaskFailed: 'Modify task failed',
startingStation: 'Start station',
startSection: 'Start section',
endStation: 'End station',
endSection: 'End section',
direction: 'Direction',
distance: 'Distance',
operation: 'Operation',
edit: 'Edit',
save: 'Save',
cancelAndQuit: 'Cancel and quit',
modifySuccess: 'Modify Success',
modifyFailed: 'Modify Failed',
modifyRunLevel: 'Modify run level',
startStationTips: 'Start station departure time unchanged',
endStationTips: 'End station departure time unchanged',
startStationTitle: 'Start station',
startedStation: 'Start station',
endStationTitle: 'End station',
endedStation: 'End station',
description: 'Description',
modifyTaskRoute: 'Modify task route',
modifyStartTime: 'Modify start time: ',
modifyStartTimeTitle: 'Modify start time',
search: 'Search',
modifyTwoStationTime: 'Modify the time between the two stations'
},
editSmoothRun: {
trainProportion: 'Train proportion',
allTheLoopTrainProportion: 'Use the same size loop train proportion for all time periods',
sizeOfTheLoopTrainProportion: 'Large loop and small loop train proportion',
pleaseSelect: 'Please select',
startTime: 'Start time',
stopTime: 'Stop time',
runInterval: 'Run interval',
add: 'Add',
delete: 'Delete',
modify: 'Modify',
editSmoothRunTime: 'Edit smooth run time'
},
buy: 'Buy', buy: 'Buy',
offlineMappingSoftware: 'Offline mapping software', offlineMappingSoftware: 'Offline mapping software',
lianPlanSystem: 'Urban rail transit lian planning system', lianPlanSystem: 'Urban rail transit lian planning system',
lianPlanDescription: 'Lian plan is a map compiling test system, can be real simulation to achieve the simulation of running test of new operation diagram, the system can realize editing operation diagram, import operation diagram and according to the standard of operation diagram simulation real driving environment, solve the problem that can not be updated for operation diagram test. It can find out the unreasonable places in the new diagram in time and make real-time adjustment on the diagram, so as to avoid the problem of finding problems in the operation of the new diagram and requiring manual intervention of dispatchers, and minimize the impact of the fault on the normal operation of subway.', lianPlanDescription: 'Lian plan is a map compiling test system, can be real simulation to achieve the simulation of running test of new operation diagram, the system can realize editing operation diagram, import operation diagram and according to the standard of operation diagram simulation real driving environment, solve the problem that can not be updated for operation diagram test. It can find out the unreasonable places in the new diagram in time and make real-time adjustment on the diagram, so as to avoid the problem of finding problems in the operation of the new diagram and requiring manual intervention of dispatchers, and minimize the impact of the fault on the normal operation of subway.',
loopName: 'Loop name',
startingStation: 'Starting station',
terminal: 'Terminal',
planName: 'Plan name',
fuzhouIconDescription: 'Fuzhou icon description',
upBeginTripNumber: 'Up begin trip number',
downBeginTrain: 'Down begin train',
minimumTrainInterval: 'Minimum train interval',
maximumTrainInterval: 'Maximum train interval',
trainGeneratesInitialLabel: 'Train generates initial label',
minimumTurnbackTime: 'Minimum turnback time',
trainDepot: 'Train depot',
startingPlatform: 'Starting Platform',
endingPlatform: 'Ending Platform',
station: 'Station',
modifyAttribute: 'Modify attribute',
generalParameters: 'General parameters',
editingStation: 'Editing station',
editDepot: 'Edit parking lot / depot',
editCrossRailway: 'Edit cross railway',
editLoopRailway: 'Edit loop railway',
application: 'Application (A)',
parameter: 'Parameter',
numberOfTrainsAvailable: 'Number of trains available',
continuousMinimumInterval: 'Continuous minimum interval',
continuousReturnMaximumInterval: 'Continuous return maximum interval',
afterTheTrainHasBackInterval: 'After the train has a back interval',
secondsCanBeRunnedByTrain: 'seconds can be runned by train',
defaultStopTime: 'Default stop time:',
defaultRunLevel: 'Default run level:',
stopTime: 'Stop time',
runLevel: 'Run level',
platform: 'Platform',
modifyPlatformProperties: 'Modify platform properties',
file: 'File',
openRunningDiagram: 'Open run graph',
createRunningDiagram: 'Create run graph',
modifyRunningDiagramName: 'Modify run graph name',
modifyStationIntervalTime: 'Modify station interval time',
deleteRunningDiagram: 'Delete run graph',
view: 'View',
tool: 'Tool',
validityCheck: 'Validity check',
testRunningDiagram: 'Test run graph',
modify: 'Modify',
addPlan: 'Add plan',
deletePlan: 'Delete plan',
duplicatePlan: 'Duplicate plan',
addTask: 'Add task',
deleteTask: 'Delete task',
modifyTask: 'Modify task',
option: 'Option',
help: 'Help',
implemented: 'implementing......',
server1: 'Server 1',
server2: 'Server 2',
frontMachine1: 'Front machine 1',
frontMachine2: 'Front machine 2',
mainDispatcher: 'Main dispatcher',
dispatcher1: 'Dispatcher1',
dispatcher2: 'Dispatcher2',
dispatcher3: 'Dispatcher3',
bigScreen: 'Big screen',
maintenanceWorkstation: 'Maintenance workstation',
runGraphShowManualStation: 'Run graph show manual station',
jumpStop: 'Jump stop',
detainTrain: 'Detain train',
trainAlarm: 'Train alarm',
serviceNumber: 'Service number',
tripNumber: 'Trip number',
stationName: 'Station name:',
stationKilometerMark: 'Station kilometer mark:',
arriveTime: 'Arrive time:',
serviceAndTripNumber: 'Service And trip number',
testRunning: 'Test running',
serviceNumber2: 'Service number',
addPlanTrain: 'Add plan train',
trainRunningTimeInterval: 'Train running time interval',
sizeOfTheLoopTrainProportion: 'The size of the loop car proportion',
applicationRouteSelection: 'Application route selection',
bothway: 'bothway',
up: 'up',
down: 'down',
runningInterval: 'Running interval',
addASmoothRunningTime: 'Add a smooth running time',
addToTheFront: 'Add to the front',
addToTheEnd: 'Add to the end',
crossRailway: 'Cross railway',
startingSection: 'Starting section',
description: 'Description',
section: 'Section',
departureTime: 'departureTime',
showDefaultStopTimeAndRunLevel: 'Show default stop time and run level',
automatic: 'Automatic',
default: 'Default',
addTaskHint1: 'Please set the section running time of the start section ',
addTaskHint2: 'to the section',
addTaskHint3: '',
normalNew: 'Normal new',
createFromTheReleaseRunGraph: 'Create from the release run graph',
releaseRunGraph: 'Release run graph',
newRunGraph: 'New run graph',
deleteAllPreviousTasks: 'Delete all previous tasks (including this task)',
deleteAllSubsequentTasks: 'Delete all subsequent tasks (including this task)',
forward: 'Forward',
backward: 'Backward',
frequency: 'Frequency:',
intervals: 'Intervals:',
duplicateTrain: 'Duplicate train',
commissioningTrain: 'Commissioning train',
task: 'Task',
startTime: 'Start time',
endTime: 'End time',
editPlanningTrain: 'Edit planning train',
runGraphName: 'Run graph name',
tipOperationTime: '请先设置区段站间运行时间, 【文件】-> 【修改站间运行时间】',
serverTrainNum: '表号车次号'
}; };

View File

@ -27,12 +27,14 @@ export default {
createTime: 'Creation Time', createTime: 'Creation Time',
detail: 'Detail', detail: 'Detail',
generateRunPlan: 'Generate Daily Plan', generateRunPlan: 'Generate Daily Plan',
generateRunjihua: 'Generate general shift schedule',
selectTemplateRunPlan: 'Select Template Run Plan', selectTemplateRunPlan: 'Select Template Run Plan',
pleaseSelectTemplate: 'Please Select Template Run Plan', pleaseSelectTemplate: 'Please Select Template Run Plan',
selectMap: 'Select Map', selectMap: 'Select Map',
createCommonRunPlan: 'Create Common Run Plan', createCommonRunPlan: 'Create Common Run Plan',
createCommonSuccess: 'Creation of a common run plan was successful', createCommonSuccess: 'Creation of a common run plan was successful',
wellGenerateEveryRunPlan: 'This operation generates a daily running diagram. Do you want to continue?', wellGenerateEveryRunPlan: 'This operation generates a daily running diagram. Do you want to continue?',
wellGenerateEveryRunjihua: 'This operation will generate a universal shift schedule. Do you want to continue?',
wellDelTemplate: 'This action deletes the diagram template. Do you want to continue?', wellDelTemplate: 'This action deletes the diagram template. Do you want to continue?',
fullMark: 'Full Mark', fullMark: 'Full Mark',
passScore: 'Passing Score', passScore: 'Passing Score',
@ -47,6 +49,7 @@ export default {
deleteGenerateEveryRunPlan: 'This operation will delete the daily running diagram. Do you want to continue?', deleteGenerateEveryRunPlan: 'This operation will delete the daily running diagram. Do you want to continue?',
deleteGenerateRunPlanSuccess: 'Delete load plan successfully!', deleteGenerateRunPlanSuccess: 'Delete load plan successfully!',
addEveryRunPlanSuccess: 'Load plan create daily plan successfully!', addEveryRunPlanSuccess: 'Load plan create daily plan successfully!',
addEveryRunjihuaSuccess: 'Load plan to create universal scheduling plan successful!',
publisherId: 'Publisher Id', publisherId: 'Publisher Id',
publishTime: 'Time', publishTime: 'Time',
publishVersion: 'Version', publishVersion: 'Version',
@ -90,6 +93,7 @@ export default {
addExamRluesError: 'Add rule does not match full score', addExamRluesError: 'Add rule does not match full score',
addExamRules: 'Please add exam rules!', addExamRules: 'Please add exam rules!',
saveRuleFailed: 'Save rules failed: ', saveRuleFailed: 'Save rules failed: ',
selectSkinCode: 'Select the skin',
selectTypeScope: 'Please select type scope', selectTypeScope: 'Please select type scope',
operationType: 'Operation type', operationType: 'Operation type',
@ -104,5 +108,6 @@ export default {
inputNumberError: 'The input value must be greater than the number of questions', inputNumberError: 'The input value must be greater than the number of questions',
inputScorePerQuestion: 'Please input score per question', inputScorePerQuestion: 'Please input score per question',
selectTestType: 'Please select test type', selectTestType: 'Please select test type',
modifyRules: 'Modify Rules' modifyRules: 'Modify Rules',
enterRunPlanName: 'Please enter the name of the diagram'
}; };

View File

@ -275,5 +275,36 @@ export default {
inputMaxDuration: 'Please input max duration', inputMaxDuration: 'Please input max duration',
accessNumber: 'Please input the number of permissions', accessNumber: 'Please input the number of permissions',
courseNameEmpty: 'Course name cannot be empty', courseNameEmpty: 'Course name cannot be empty',
purchaseMonth: 'Please input the number of months to buy' purchaseMonth: 'Please input the number of months to buy',
pleaseEnterGoodPrice: '请输入商品价格',
enterTheNameOfTheRunGraph: 'Please enter the name of the run graph',
chooseToPublishTheRunGraph: 'Please choose to publish the run chart',
enterTheAlarmCode: 'Please enter the alarm code',
enterTheAlarmWidth: 'Please enter the alarm width',
enterTheEscalatorFrameCode: 'Please enter the escalator frame code',
enterTheEscalatorFrameWidth: 'Please enter the escalator frame width',
enterTheEscalatorFrameHeight: 'Please enter the escalator frame height',
enterTheBorderWidth: 'Please enter the border width',
selectTheDirectionOfTheArrow: 'Please select the direction of the arrow',
enterTheArrowCode: 'Please enter the arrow code',
enterTheArrowLength: 'Please enter the arrow length',
enterTheArrowWidth: 'Please enter the arrow width',
enterTheArrowColor: 'Please enter the arrow color',
enterTheBackgroundWidth: 'Please enter the background width',
enterTheBackgroundHeight: 'Please enter the background height',
selectTheButtonColor: 'Please select the button color',
enterTheButtonCode: 'Please enter the button code',
enterTheButtonWidth: 'Please enter the button width',
enterTheDigitalClockCode: 'Please enter the digital clock code',
enterTheDigitalClockWidth: 'Please enter the digital clock width',
selectTheStartingDirection: 'Please select the starting direction',
enterTheElevatorCode: 'Please enter the elevator code',
enterTheElevatorWidth: 'Please enter the elevator width',
enterTheElevatorHeight: 'Please enter the elevator height',
enterTheElevatorColor: 'Please enter the elevator color',
enterTheKeyCode: 'Please enter the key code',
enterTheKeyWidth: 'Please enter the key width',
enterTheKeyDirection: 'Please select the key direction',
enterTheUpperText: 'Please enter the upper text',
enterTheLowerText: 'Please enter the lower text'
}; };

View File

@ -78,5 +78,7 @@ export default {
modifyConversition: 'Modify Conversition', modifyConversition: 'Modify Conversition',
modifyConversitionButton: 'modify', modifyConversitionButton: 'modify',
drivingByPlan: 'Driving By Plan', drivingByPlan: 'Driving By Plan',
scriptBack: 'Back' scriptBack: 'Back',
speakTo: 'to',
executeCommandTips: 'execute command: '
}; };

View File

@ -20,10 +20,10 @@ export default {
operationAbnormal: 'Abnormal operation', operationAbnormal: 'Abnormal operation',
createSuccess: 'Creating a successful', createSuccess: 'Creating a successful',
linkCheckList: '有 link 绘图不规范, 未生成区段', linkCheckList: 'Link drawing is not standard, no section is generated',
allLinkCreate: '所有link都有相关区段所以未生成任何区段', allLinkCreate: 'All links have related extents, so no extents are generated',
incidenceRelation: '可能是多余的,请检查关联关系', incidenceRelation: 'May be redundant, please check the association relationship',
linkNoneSplit: '有问题,没有进行拆分', linkNoneSplit: "There's a problem. There's no split",
cannotCoincide: 'The starting and ending coordinates cannot coincide', cannotCoincide: 'The starting and ending coordinates cannot coincide',
cannotMerged: 'Non-physical extents exist and cannot be merged', cannotMerged: 'Non-physical extents exist and cannot be merged',
@ -170,5 +170,33 @@ export default {
selectAPieceOfData: 'Please select a piece of data', selectAPieceOfData: 'Please select a piece of data',
selectSpeedLimitValueTip: 'Please select the speed limit value, click the "release" button, and issue the command!', selectSpeedLimitValueTip: 'Please select the speed limit value, click the "release" button, and issue the command!',
addTrainIdTip: 'Add train identification number: successful', addTrainIdTip: 'Add train identification number: successful',
editTrainIdTip: 'Modify train identification number: successful' editTrainIdTip: 'Modify train identification number: successful',
enterPrice: 'Please enter the price',
publishMap: 'Get publish map',
addPackage: 'Please add permission',
deletePlanSuccessfully: 'Delete plan successfully',
deletePlanFailed: 'Delete plan failed',
importRunGraphFailed: 'Import the run graph failed:',
parseRunGraphFailed: 'Parsing the run graph failed:',
runGraphVerificationFailed: 'Run graph verification failed',
selectARunGraphFirst: 'Please select a run graph first.',
deleteTrainHint: 'Really want to delete the train',
selectAPlan: 'Please select a plan',
selectATrain: 'Please select a train',
requestingStationDataFailed: 'Requesting station data failed',
serviceNumberExistHint: 'This table number already exists. Is it mandatory to set it? (The forced setup program may be abnormal)',
serviceNumberLengthHint: 'Length should be two digits',
chooseToOpenTheRunGraph: 'Please choose to open the running chart',
addTaskSuccessfully: 'Add task successfully!',
addTaskFailed: 'Add task failed!',
createAnEmptyRunGraphSuccessfully: 'Create an empty run graph successfully!',
createARunGraphSuccessfully: 'Create a running diagram successfully!',
deleteTaskSuccessfully: 'Delete task successfully!',
deleteTaskFailed: 'Delete task failed!',
duplicatePlanSuccessful: 'Duplicate plan successful!',
duplicatePlanFailed: 'Duplicate plan failed!',
runGraphNameModifiedSuccessfully: 'Run graph name modified successfully!',
modifyRunGraphNameFailed: 'Modify run graph name failed!',
planCreationSuccessful: 'Plan creation successful!',
createPlanFailed: 'Failed to create plan!'
}; };

View File

@ -154,5 +154,10 @@ export default {
no: '否', no: '否',
details: '详情', details: '详情',
enterNameToFilter: '输入名称进行过滤', enterNameToFilter: '输入名称进行过滤',
colon: '' colon: '',
processFailure: '处理失败',
enterLastStep: '请输入提示并点击下一步',
pleaseOpearte: '请开始操作',
help: '帮助'
}; };

69
src/i18n/langs/zh/ibp.js Normal file
View 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: '圆形灯半径'
};

View File

@ -23,6 +23,7 @@ import display from './display';
import joinTraining from './joinTraining'; import joinTraining from './joinTraining';
import trainRoom from './trainRoom'; import trainRoom from './trainRoom';
import menu from './menu'; import menu from './menu';
import ibp from './ibp';
export default { export default {
...cnLocale, ...cnLocale,
@ -49,5 +50,6 @@ export default {
display, display,
joinTraining, joinTraining,
trainRoom, trainRoom,
menu menu,
ibp
}; };

View File

@ -9,4 +9,11 @@ export default {
confirmSignalOpen: '请确认前方信号开放', confirmSignalOpen: '请确认前方信号开放',
faultInformation: '故障信息:', faultInformation: '故障信息:',
vWeek: ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], vWeek: ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
trackCheck: '轨道检查',
signalCheck: '信号机检查',
turnoutCheck: '道岔检查',
stationInfoDisplay: '站台信息——显示',
stationInfoHidden: '站台信息——隐藏',
trainInfoDisplay: '列车信息——显示',
trainInfoHidden: '列车信息——隐藏'
}; };

View File

@ -27,6 +27,10 @@ export default {
wellDelTrainingRule: '此操作将删除此实训规则, 是否继续?', wellDelTrainingRule: '此操作将删除此实训规则, 是否继续?',
stepDetail: '步骤明细', stepDetail: '步骤明细',
generation: '自动生成', generation: '自动生成',
saveAs: '另存为',
skinTypeFrom: '从',
skinTypeTo: '到',
copyLesson: '复制课程定义',
skinType: '皮肤类型', skinType: '皮肤类型',
minDuration: '最佳用时', minDuration: '最佳用时',
maxDuration: '最大用时', maxDuration: '最大用时',
@ -96,6 +100,7 @@ export default {
platform: '站台', platform: '站台',
train: '列车', train: '列车',
station: '车站', station: '车站',
trainWindow: '车次窗' trainWindow: '车次窗',
countSkinCode: '复制皮肤与被复制皮肤类型不能一样'
}; };

View File

@ -361,6 +361,7 @@ export default {
lineStartTime: '线路开始时间', lineStartTime: '线路开始时间',
lineEndTime: '线路结束时间', lineEndTime: '线路结束时间',
lineDetails: '线路详细信息', lineDetails: '线路详细信息',
jumpStop: '跳停',
station: '车站', station: '车站',
affectSubsequentTasks: '影响后续任务', affectSubsequentTasks: '影响后续任务',
manual: '手工', manual: '手工',

View File

@ -86,7 +86,7 @@ export default {
select: '选择', select: '选择',
chooseGoods: '选择商品', chooseGoods: '选择商品',
permissionName: '权限名称', permissionName: '权限名称',
permissionGoodName: '权限商品名称', permissionGoodName: '权限名称', // 创建时 商品名称与权限名称一致
receivingPermission: '领取权限', receivingPermission: '领取权限',
isPackage: '是否权限包', isPackage: '是否权限包',
modifyPermissionContent: '修改权限内容', modifyPermissionContent: '修改权限内容',
@ -105,8 +105,11 @@ export default {
createPackage: '创建权限', createPackage: '创建权限',
package: '权限包', package: '权限包',
basePackage: '基础权限', basePackage: '基础权限',
universalPackage: '万能权限',
pleaseEnterContent: '请输入内容', pleaseEnterContent: '请输入内容',
selectGoods: '选择商品', selectGoods: '选择商品',
month: '月', month: '月',
yuan: '元' yuan: '元',
back: '返回',
next: '下一步'
}; };

View File

@ -1,6 +1,236 @@
export default { export default {
updateStation: {
level1: '等级一:',
level2: '等级二:',
level3: '等级三:',
level4: '等级四:',
level5: '等级五:',
updateData: '更新数据',
pleaseInputLevel1: '请输入等级一',
pleaseInputLevel2: '请输入等级二',
pleaseInputLevel3: '请输入等级三',
pleaseInputLevel4: '请输入等级四',
pleaseInputLevel5: '请输入等级五',
systemOutPut: '系统输出框',
selectPrintArea: '选择打印区域',
selectDeleteRoute: '选择删除交路',
routeSelect: '交路选择',
quicklyAddTask: '快速增加任务',
quicklyAddLoop: '快速增加环路',
deletePlanCar: '删除计划车'
},
openRunPlan: {
selectRunplan: '选择运行图',
delete: '删除',
modify: '修改',
runPlanList: '运行图列表',
getRunPlanListFail: '获取运行图列表失败',
confirmDeleteRunPlan: '您确认是否删除此运行图?',
deleteSuccess: '删除成功!',
pleaseSelectRunplan: '请选择运行图'
},
modifying: {
tripNumber: '车次号:',
pleaseSelect: '请选择',
manual: '手工',
defaultStopTime: '缺省停站时间:',
serviceNumber: '表号:',
clearGuest: '清客',
continuationPlan: '延续计划',
firstTrain: '首班车',
serialNumber: '序列号:',
defaultRunLevel: '缺省运行等级:',
startTime: '开始时间',
selectTime: '选择时间',
inStock: '入库',
outStock: '出库',
lastTrain: '末班车',
route: '交路:',
// startingStation 起始站
// startSection 起始区段
// endStationTitle 终到站
// endSection 终到区段
// description 描述
detail: '详情:',
station: '车站',
section: '区段',
stopTime: '停站时间',
runLevel: '运行等级',
arrivalTime: '到点',
departureTime: '发点',
showDefaultTime: '显示默认停站时间和运行等级',
automatic: '自动',
default: '默认',
modifyTask: '修改任务',
setMessageTip1: '请先设置开始区段',
setMessageTip2: '终到区段',
setMessageTip3: '的站间运行时间',
modifyTaskSuccess: '修改任务成功!',
modifyTaskFailed: '修改任务失败',
startingStation: '起始站',
startSection: '起始区段',
endStation: '终点站',
endSection: '终点区段',
direction: '方向',
distance: '距离',
operation: '操作',
edit: '编辑',
save: '保存',
cancelAndQuit: '取消&退出',
modifySuccess: '修改成功!',
modifyFailed: '修改失败',
modifyRunLevel: '修改运行等级',
startStationTips: '起始站发车时间不变',
endStationTips: '终到站到达时间不变',
startStationTitle: '起始站',
startedStation: '起始站台',
endStationTitle: '终到站',
endedStation: '终到站台',
description: '描述',
modifyTaskRoute: '修改任务交路',
time: '时间',
modifyStartTime: '修改开始时间:',
modifyStartTimeTitle: '修改起始时间',
search: '查找',
modifyTwoStationTime: '修改两站之间的时间'
},
editSmoothRun: {
trainProportion: '分车比例',
allTheLoopTrainProportion: '所有时段使用相同大小环路分车比例',
sizeOfTheLoopTrainProportion: '大环路与小环路分车比例:',
pleaseSelect: '请选择',
startTime: '开始时间',
stopTime: '结束时间',
runInterval: '运行间隔',
add: '增加',
delete: '删除',
modify: '修改',
editSmoothRunTime: '编辑平稳运行时段'
},
buy: '购买', buy: '购买',
offlineMappingSoftware: '离线编图软件', offlineMappingSoftware: '离线编图软件',
lianPlanSystem: '城市轨道交通琏计划系统', lianPlanSystem: '城市轨道交通琏计划系统',
lianPlanDescription: '琏计划是一款编图测试系统,能够真实模拟实现对新运行图的仿真运行测试,该系统能够实现编辑运行图、导入运行图并按照运行图标准模拟真实行车环境,解决了无法针对运行图更新进行测试的问题。能够及时找出新图中不合理的地方并且在图上实时作出调整,避免了新运行图在运营过程中发现问题需要调度员人工进行干预的情况,最大程度降低故障对地铁正常运营的影响。' lianPlanDescription: '琏计划是一款编图测试系统,能够真实模拟实现对新运行图的仿真运行测试,该系统能够实现编辑运行图、导入运行图并按照运行图标准模拟真实行车环境,解决了无法针对运行图更新进行测试的问题。能够及时找出新图中不合理的地方并且在图上实时作出调整,避免了新运行图在运营过程中发现问题需要调度员人工进行干预的情况,最大程度降低故障对地铁正常运营的影响。',
loopName: '环路名',
startingStation: '起始站',
terminal: '终点站',
planName: '计划名称',
fuzhouIconDescription: '福州图标说明',
upBeginTripNumber: '上行起始车次号',
downBeginTrain: '下行起始车次',
minimumTrainInterval: '最小列车间隔',
maximumTrainInterval: '最大列车间隔',
trainGeneratesInitialLabel: '列车生成起始标号',
minimumTurnbackTime: '最小折返时间',
trainDepot: '车辆段',
startingPlatform: '起始站台',
endingPlatform: '终点站台',
station: '车站',
modifyAttribute: '修改属性',
generalParameters: '一般参数',
editingStation: '编辑车站',
editDepot: '编辑停车场/车辆段',
editCrossRailway: '编辑交路',
editLoopRailway: '编辑环路',
application: '应 用A',
parameter: '参数',
numberOfTrainsAvailable: '可用列车数',
continuousMinimumInterval: '连续出车最小间隔',
continuousReturnMaximumInterval: '连续回车最大间隔',
afterTheTrainHasBackInterval: '有车回段后间隔',
secondsCanBeRunnedByTrain: '秒才能用列车出段',
defaultStopTime: '省缺停站时间:',
defaultRunLevel: '省缺运行等级:',
stopTime: '停站时间',
runLevel: '运行等级',
platform: '站台',
modifyPlatformProperties: '修改站台属性',
file: '文件',
openRunningDiagram: '打开运行图',
createRunningDiagram: '创建运行图',
modifyRunningDiagramName: '修改运行图名称',
modifyStationIntervalTime: '修改站间运行时间',
deleteRunningDiagram: '删除运行图',
view: '查看',
tool: '工具',
validityCheck: '有效性检查',
testRunningDiagram: '测试运行图',
modify: '修改',
addPlan: '增加计划',
deletePlan: '删除计划',
duplicatePlan: '复制计划',
addTask: '增加任务',
deleteTask: '删除任务',
modifyTask: '修改任务',
option: '选项',
help: '帮助',
implemented: '实现中......',
server1: '服务器1',
server2: '服务器2',
frontMachine1: '前置机1',
frontMachine2: '前置机2',
mainDispatcher: '主调',
dispatcher1: '调度台1',
dispatcher2: '调度台2',
dispatcher3: '调度台3',
bigScreen: '大屏',
maintenanceWorkstation: '维护工作站',
runGraphShowManualStation: '运行图显示人工站',
jumpStop: '跳停',
detainTrain: '扣车',
trainAlarm: '列车报警',
serviceNumber: '表号',
tripNumber: '车次号',
stationName: '车站名称:',
stationKilometerMark: '车站公里标:',
arriveTime: '到站时间:',
serviceAndTripNumber: '表号车次',
testRunning: '测试运行',
serviceNumber2: '服务号',
addPlanTrain: '添加计划车',
trainRunningTimeInterval: '列车运行时间间隔',
sizeOfTheLoopTrainProportion: '大小环路分车比例',
applicationRouteSelection: '应用路线选择',
bothway: '双向',
up: '上行',
down: '下行',
runningInterval: '运行间隔',
distributionRatio: '分车比例',
addASmoothRunningTime: '添加平稳运行时段',
addToTheFront: '加在最前',
addToTheEnd: '加在最后',
crossRailway: '交路',
startingSection: '起始区段',
endingSection: '终到区段',
description: '描述',
section: '区段',
departureTime: '发点',
showDefaultStopTimeAndRunLevel: '显示默认停站时间和运行等级',
automatic: '自动',
default: '默认',
addTaskHint1: '请先设置开始区段',
addTaskHint2: '终到区段',
addTaskHint3: '的站间运行时间',
normalNew: '正常新建',
runGraphName: '运行图名称',
createFromTheReleaseRunGraph: '从发布运行图创建',
releaseRunGraph: '发布运行图',
newRunGraph: '新建运行图',
deleteAllPreviousTasks: '删除以前所有任务(包含本任务)',
deleteAllSubsequentTasks: '删除以后所有任务(包含本任务)',
forward: '向前',
backward: '向后',
frequency: '次数:',
intervals: '间隔时间:',
duplicateTrain: '复制列车',
commissioningTrain: '调试车',
task: '任务',
startTime: '起始时间',
endTime: '终到时间',
editPlanningTrain: '编辑计划车',
tipOperationTime: '请先设置区段站间运行时间, 【文件】-> 【修改站间运行时间】',
serverTrainNum: '表号车次号'
}; };

View File

@ -27,12 +27,17 @@ export default {
createTime: '创建时间', createTime: '创建时间',
detail: '详情', detail: '详情',
generateRunPlan: '生成每日运行图', generateRunPlan: '生成每日运行图',
copyRunPlan: '复制运行图',
generateRunjihua: '生成通用派班计划',
selectTemplateRunPlan: '选择模板运行图', selectTemplateRunPlan: '选择模板运行图',
pleaseSelectTemplate: '请选择模板运行图', pleaseSelectTemplate: '请选择模板运行图',
selectMap: '选择地图', selectMap: '选择地图',
selectSkinCode: '选择皮肤',
createCommonRunPlan: '创建通用运行图', createCommonRunPlan: '创建通用运行图',
createCommonSuccess: '创建通用运行图成功', createCommonSuccess: '创建通用运行图成功',
wellGenerateEveryRunPlan: '此操作将生成每日运行图, 是否继续?', wellGenerateEveryRunPlan: '此操作将生成每日运行图, 是否继续?',
wellGenerateEveryRunjihua: '此操作将生成通用派班计划, 是否继续?',
copyRunPlanContinue: '此操作将复制该运行图, 是否继续?',
wellDelTemplate: '此操作将删除此运行图模板, 是否继续?', wellDelTemplate: '此操作将删除此运行图模板, 是否继续?',
fullMark: '满分', fullMark: '满分',
passScore: '及格分', passScore: '及格分',
@ -47,6 +52,7 @@ export default {
deleteGenerateEveryRunPlan: '此操作将删除此运行图, 是否继续?', deleteGenerateEveryRunPlan: '此操作将删除此运行图, 是否继续?',
deleteGenerateRunPlanSuccess: '删除加载计划成功!', deleteGenerateRunPlanSuccess: '删除加载计划成功!',
addEveryRunPlanSuccess: '加载计划创建每日计划成功!', addEveryRunPlanSuccess: '加载计划创建每日计划成功!',
addEveryRunjihuaSuccess: '加载计划创建通用排班计划成功!',
publisherId: '发布人id', publisherId: '发布人id',
publishTime: '时间', publishTime: '时间',
publishVersion: '版本', publishVersion: '版本',
@ -106,6 +112,7 @@ export default {
// inputNumericType 请输入数字值 // inputNumericType 请输入数字值
// addRules 添加规则 // addRules 添加规则
selectTestType: '请选择试题类型', selectTestType: '请选择试题类型',
modifyRules: '修改规则' modifyRules: '修改规则',
enterRunPlanName: '请输入运行图名称'
// refreshFailed 刷新失败 // refreshFailed 刷新失败
}; };

View File

@ -277,5 +277,36 @@ export default {
enterTheServiceNumber: '请输入表号', enterTheServiceNumber: '请输入表号',
enterTheTripNumber: '请输入车次号', enterTheTripNumber: '请输入车次号',
enterTheTargetCode: '请输入目的地号', enterTheTargetCode: '请输入目的地号',
selectStation: '请选择车站' selectStation: '请选择车站',
pleaseEnterGoodPrice: '请输入商品价格',
enterTheNameOfTheRunGraph: '请输入运行图名称',
chooseToPublishTheRunGraph: '请选择发布运行图',
enterTheAlarmCode: '请输入报警器编号',
enterTheAlarmWidth: '请输入报警器宽度',
enterTheEscalatorFrameCode: '请输入扶梯框编号',
enterTheEscalatorFrameWidth: '请输入扶梯框宽度',
enterTheEscalatorFrameHeight: '请输入扶梯框高度',
enterTheBorderWidth: '请输入边框宽度',
selectTheDirectionOfTheArrow: '请选择箭头方向',
enterTheArrowCode: '请输入箭头编号',
enterTheArrowLength: '请输入箭头长度',
enterTheArrowWidth: '请输入箭头线宽',
enterTheArrowColor: '请输入箭头颜色',
enterTheBackgroundWidth: '请输入背景板宽度',
enterTheBackgroundHeight: '请输入背景板高度',
selectTheButtonColor: '请选择按钮颜色',
enterTheButtonCode: '请输入按钮编号',
enterTheButtonWidth: '请输入按钮宽度',
enterTheDigitalClockCode: '请输入电子表编号',
enterTheDigitalClockWidth: '请输入电子表宽度',
selectTheStartingDirection: '请选择启动方向',
enterTheElevatorCode: '请输入电梯编号',
enterTheElevatorWidth: '请输入电梯宽度',
enterTheElevatorHeight: '请输入电梯高度',
enterTheElevatorColor: '请输入电梯颜色',
enterTheKeyCode: '请输入钥匙编号',
enterTheKeyWidth: '请输入钥匙宽度',
selectTheKeyDirection: '请选择钥匙朝向',
enterTheUpperText: '请输入上侧文字',
enterTheLowerText: '请输入下侧文字'
}; };

View File

@ -79,5 +79,7 @@ export default {
modifyConversitionButton: '修改', modifyConversitionButton: '修改',
drivingByPlan: '按计划行车', drivingByPlan: '按计划行车',
scriptBack: '返回' scriptBack: '返回',
speakTo: '对',
executeCommandTips: '执行指令: '
}; };

View File

@ -170,5 +170,33 @@ export default {
selectAPieceOfData: '请选择一条数据', selectAPieceOfData: '请选择一条数据',
selectSpeedLimitValueTip: '请选择限速值后,点击“下达”按钮,下达命令!', selectSpeedLimitValueTip: '请选择限速值后,点击“下达”按钮,下达命令!',
addTrainIdTip: '添加列车识别号:成功', addTrainIdTip: '添加列车识别号:成功',
editTrainIdTip: '修改列车识别号:成功' editTrainIdTip: '修改列车识别号:成功',
enterPrice: '请输入价格',
publishMap: '获取发布地图',
addPackage: '请添加权限',
deletePlanSuccessfully: '删除计划成功',
deletePlanFailed: '删除计划失败',
importRunGraphFailed: '导入运行图失败:',
parseRunGraphFailed: '解析运行图失败:',
runGraphVerificationFailed: '运行图校验失败',
selectARunGraphFirst: '请先选择一个运行图',
deleteTrainHint: '是否要删除列车',
selectAPlan: '请选择一条计划',
selectATrain: '请选择一个车次',
requestingStationDataFailed: '请求车站数据失败',
serviceNumberExistHint: '本表号已存在,是否强制设置?(强制设置程序可能会出现异常)',
serviceNumberLengthHint: '长度应为两位数',
chooseToOpenTheRunGraph: '请选打开运行图',
addTaskSuccessfully: '添加任务成功!',
addTaskFailed: '添加任务失败!',
createAnEmptyRunGraphSuccessfully: '创建空运行图成功!',
createARunGraphSuccessfully: '创建运行图成功!',
deleteTaskSuccessfully: '删除任务成功!',
deleteTaskFailed: '删除任务失败!',
duplicatePlanSuccessful: '复制计划成功!',
duplicatePlanFailed: '复制计划失败!',
runGraphNameModifiedSuccessfully: '修改运行图名称成功!',
modifyRunGraphNameFailed: '修改运行图名称失败!',
planCreationSuccessful: '创建计划成功!',
createPlanFailed: '创建计划失败!'
}; };

View File

@ -21,7 +21,7 @@ export default {
endSimulation: '结束仿真', endSimulation: '结束仿真',
distributeTheRoomQRCode: '分发房间二维码', distributeTheRoomQRCode: '分发房间二维码',
increaseIbp: '增加IBP', increaseIbp: '增加IBP',
kickOutTheRoom: '出房间', kickOutTheRoom: '出房间',
sending: '发送中...', sending: '发送中...',
holdAndTalk: '按住说话', holdAndTalk: '按住说话',
recording: '录音中...', recording: '录音中...',

File diff suppressed because one or more lines are too long

View File

@ -79,6 +79,8 @@ class MouseController extends Eventful {
if (eventTool.notLeftMouse(e)) { if (eventTool.notLeftMouse(e)) {
return; return;
} }
e.event.preventDefault();
e.event.stopPropagation();
const em = new EventModel(e); const em = new EventModel(e);
this.eventTarget = em.eventTarget; this.eventTarget = em.eventTarget;
if (this.eventTarget && this.eventTarget._type === deviceType.Background) { if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
@ -94,7 +96,7 @@ class MouseController extends Eventful {
mousemove(e) { mousemove(e) {
if (eventTool.notLeftMouse(e) || if (eventTool.notLeftMouse(e) ||
!this._moveOnMouseMove || !this._moveOnMouseMove ||
!this._dragging !this._dragging || !this.isAllowDragging
) { ) {
return; return;
} }
@ -112,7 +114,7 @@ class MouseController extends Eventful {
this._preventDefaultMouseMove && eventTool.stop(e.event); this._preventDefaultMouseMove && eventTool.stop(e.event);
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y }); this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
return true; return true;
} else if (this.isAllowDragging) { } else if (this.isAllowDragging && this.eventTarget) {
this.eventTarget.grouper.drift(dx, dy, e); this.eventTarget.grouper.drift(dx, dy, e);
} }
} else { } else {
@ -122,7 +124,6 @@ class MouseController extends Eventful {
} }
mouseup(e) { mouseup(e) {
console.log('-------', this.eventTarget._type===deviceType.Background);
if (!eventTool.notLeftMouse(e)&&this.isAllowDragging && this.eventTarget) { if (!eventTool.notLeftMouse(e)&&this.isAllowDragging && this.eventTarget) {
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY); this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
this.eventTarget.dirty(); this.eventTarget.dirty();

View File

@ -35,7 +35,6 @@ export default class background extends Group {
}); });
this.add(this.imageBg); this.add(this.imageBg);
}).catch((encodingError) => { }).catch((encodingError) => {
// Do something with the error.
}); });
} }
setModel(dx, dy) { setModel(dx, dy) {

View File

@ -1,4 +1,4 @@
import deviceType from './constant/deviceType';
import {createTransform, createBoundingRect} from './utils/parser'; import {createTransform, createBoundingRect} from './utils/parser';
class TransformHandle { class TransformHandle {
@ -17,7 +17,7 @@ class TransformHandle {
} }
revisibleView(view) { revisibleView(view) {
if (this.checkVisible(view)) { if (this.checkVisible(view)||view._type === deviceType.Background) {
view.show(); view.show();
} else { } else {
view.hide(); view.hide();

View File

@ -153,9 +153,9 @@ export function Jl3dDriving(updatemmi,sound) {
if (trainlisttest.list[code].runMode == '02') { if (trainlisttest.list[code].runMode == '02') {
if (trainlisttest.list[code].isStandTrack == true) { if (trainlisttest.list[code].isStandTrack == true) {
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/19/trainlisttest.list[code].len); trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/19.5/trainlisttest.list[code].len);
} else { } else {
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/19/trainlisttest.list[code].len); trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/20.3/trainlisttest.list[code].len);
} }
} else { } else {

View File

@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号字体 checkColor: '#00FF00' // 信号字体
}, },
lamp: { lamp: {
guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变
borderWidth: 0.5, // 信号灯边框线宽度 borderWidth: 0.5, // 信号灯边框线宽度

View File

@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号字体 checkColor: '#00FF00' // 信号字体
}, },
lamp: { lamp: {
guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变
borderWidth: 0.5, // 信号灯边框线宽度 borderWidth: 0.5, // 信号灯边框线宽度

View File

@ -86,13 +86,13 @@ class SkinCode extends defaultStyle {
width: 5, // 区段宽度 width: 5, // 区段宽度
beyondWidth: 0, // 区段宽超出宽度 beyondWidth: 0, // 区段宽超出宽度
invadeColor: '#FFFFFF', // 区段侵入颜色 invadeColor: '#FFFFFF', // 区段侵入颜色
spareColor: '#5578B6', // 区段空闲颜色 spareColor: '#618cc3', // 区段空闲颜色
communicationOccupiedColor: '#FF00FF', // 区段通信车占用颜色 communicationOccupiedColor: '#FF00FF', // 区段通信车占用颜色
unCommunicationOccupiedColor: '#DE310C', // 区段非通讯车占用颜色 unCommunicationOccupiedColor: '#DE310C', // 区段非通讯车占用颜色
routeLockColor: '#FFFFFF', // 区段路由锁定颜色 routeLockColor: '#3FFD46', // 区段路由锁定颜色
faultLockColor: '#006400', // 区段故障锁定颜色 faultLockColor: '#006400', // 区段故障锁定颜色
undefinedColor: '#0071C1', // 区段未定义颜色 undefinedColor: '#0071C1', // 区段未定义颜色
protectionLockedColor: '#FFFFFF', // 保护区段锁闭 protectionLockedColor: '#3FFD46', // 保护区段锁闭
blockColor: '#00FF00', // 区段封锁颜色 blockColor: '#00FF00', // 区段封锁颜色
atcExcisionColor: '#A0522D', // 区段atc切除颜色 atcExcisionColor: '#A0522D', // 区段atc切除颜色
atsExcisionColor: '#A0522D', // 区段ats切除颜色 atsExcisionColor: '#A0522D', // 区段ats切除颜色
@ -152,6 +152,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号保护区段检查颜色 checkColor: '#00FF00' // 信号保护区段检查颜色
}, },
lamp: { lamp: {
guidName: 'chengdu_03', // 成都三号线引导类型
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderWidth: 2, // 信号灯边框线宽度 borderWidth: 2, // 信号灯边框线宽度
@ -208,7 +209,7 @@ class SkinCode extends defaultStyle {
}, },
stand: { // 站台 stand: { // 站台
headFontSize: 10, // 站台首端字体大小 headFontSize: 10, // 站台首端字体大小
spareColor: '#808080', // 站台空闲颜色 spareColor: '#ffffff', // 站台空闲颜色
stopColor: '#FFF000', // 站台列车停站颜色 stopColor: '#FFF000', // 站台列车停站颜色
jumpStopColor: '#808080', // 站台跳停颜色 jumpStopColor: '#808080', // 站台跳停颜色
designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色 designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色

View File

@ -149,6 +149,7 @@ class SkinCode extends defaultStyle {
checkColor: '#00FF00' // 信号保护区段检查颜色 checkColor: '#00FF00' // 信号保护区段检查颜色
}, },
lamp: { lamp: {
guidName: 'defult', // 默认引导类型
borderVariable: true, // 信号灯边框可变 borderVariable: true, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderWidth: 2, // 信号灯边框线宽度 borderWidth: 2, // 信号灯边框线宽度

View File

@ -143,6 +143,7 @@ class SkinCode extends defaultStyle {
nameBorderShow: true // 信号机名字边框显示 nameBorderShow: true // 信号机名字边框显示
}, },
lamp: { lamp: {
guidName: 'defult', // 默认引导类型
stopWidth: 2, // 禁止线宽度 stopWidth: 2, // 禁止线宽度
borderWidth: 1, // 信号灯边框线宽度 borderWidth: 1, // 信号灯边框线宽度
borderColor: '#3149C3', // 信号灯边框线颜色 borderColor: '#3149C3', // 信号灯边框线颜色

View File

@ -89,6 +89,10 @@ class ESigLamp extends Group {
this.lamp.setStyle({stroke: color}); this.lamp.setStyle({stroke: color});
} }
setStyle(data) {
this.lamp.setStyle(data);
}
setStop(has) { setStop(has) {
if (has) { if (has) {
this.lstop.show(); this.lstop.show();

View File

@ -318,7 +318,7 @@ class Signal extends Group {
// 引导 // 引导
guid() { guid() {
if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯 允许引导信号 if (this.count == 2 && this.model.lightType == '01' && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号
if (this.lamps[0]) { if (this.lamps[0]) {
this.lamps[0].setStop(false); this.lamps[0].setStop(false);
this.lamps[0].setColor(this.style.Signal.lamp.redColor); this.lamps[0].setColor(this.style.Signal.lamp.redColor);
@ -327,6 +327,9 @@ class Signal extends Group {
this.lamps[1].setStop(false); this.lamps[1].setStop(false);
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor); this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
} }
} else if (this.count == 1 && this.model.lightType == '01' && this.style.Signal.lamp.guidName == 'chengdu_03') {
this.lamps[0].setStop(false);
this.lamps[0].setStyle({ fill: this.style.Signal.lamp.yellowColor, stroke: this.style.Signal.lamp.redColor, lineWidth: 2.5 });
} }
} }
@ -433,6 +436,9 @@ class Signal extends Group {
this.sigDelay.hide(); this.sigDelay.hide();
this.sigAuto.animationRecover(); this.sigAuto.animationRecover();
this.sigName.setColor(this.style.Signal.text.defaultColor); this.sigName.setColor(this.style.Signal.text.defaultColor);
if (this.style.Signal.lamp.guidName == 'chengdu_03') {
this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth });
}
} }
setState(model) { setState(model) {

View File

@ -1,5 +1,6 @@
import Group from 'zrender/src/container/Group'; import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text'; import Text from 'zrender/src/graphic/Text';
import LangStorage from '@/utils/lang';
class EMouse extends Group { class EMouse extends Group {
constructor(device) { constructor(device) {
@ -10,19 +11,25 @@ class EMouse extends Group {
create() { create() {
let destinationText = ''; let destinationText = '';
switch (this.device.model.destinationStatus) { switch (this.device.model.destinationStatus) {
case '01': destinationText = '准点'; break; case '01': destinationText = LangStorage.getLang() == 'en' ? 'fiducial point' : '准点'; break;
case '02': destinationText = '早点'; break; case '02': destinationText = LangStorage.getLang() == 'en' ? 'soon' : '早点'; break;
case '03': destinationText = '严重早点'; break; case '03': destinationText = LangStorage.getLang() == 'en' ? 'Severe early' : '严重早点'; break;
case '04': destinationText = '晚点'; break; case '04': destinationText = LangStorage.getLang() == 'en' ? 'behind schedule' : '晚点'; break;
case '05': destinationText = '严重晚点'; break; case '05': destinationText = LangStorage.getLang() == 'en' ? 'Serious delays' : '严重晚点'; break;
default: destinationText = '未知'; break; default: destinationText = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break;
} }
let trainType = ''; let trainType = '';
switch (this.device.model.type) { switch (this.device.model.type) {
case '01': trainType = '计划车'; break; case '01': trainType = LangStorage.getLang() == 'en' ? 'Plan the car' : '计划车'; break;
case '02': trainType = '头码车'; break; case '02': trainType = LangStorage.getLang() == 'en' ? 'Head size car' : '头码车'; break;
case '03': trainType = '人工车'; break; case '03': trainType = LangStorage.getLang() == 'en' ? 'Artificial car' : '人工车'; break;
default: trainType = '未知'; break; default: trainType = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break;
}
let text = '';
if (LangStorage.getLang() == 'en') {
text = ` The train type: ${trainType} \n table number: ${this.device.model.serviceNumber} \n Train no: ${this.device.model.tripNumber}\n Destination: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n The number of: ${this.device.model.groupNumber}\n Point in the morning and evening: ${destinationText}\n moving direction: ${this.device.model.directionType == '02' ? 'up' : 'down'}\n Crew: \n The station name: \n The terminal name: \n Take up the orbit: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n In the station: \n train-ground communication: normal \n Run level: 4 \n Button vehicle state: ${this.device.model.runControlStatus == '01' ? 'normal' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n Stationary state: ${this.device.model.runStatus == '02' ? 'Has not stopped' : 'come to a standstill'}\n blocked state: no \n train speed: ${this.device.model.speed || 0} km/h \n Authorized distance of train movement: ${this.device.model.maLen || 0} m`;
} else {
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n\0\0号: ${this.device.model.groupNumber}\n\0\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
} }
// 文字描述 // 文字描述
this.arrowText = new Text({ this.arrowText = new Text({
@ -31,7 +38,7 @@ class EMouse extends Group {
style: { style: {
x: this.device.model.point.x + 50, x: this.device.model.point.x + 50,
y: this.device.model.point.y + 25, y: this.device.model.point.y + 25,
text: `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n\0\0号: ${this.device.model.groupNumber}\n\0\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`, text: text,
textFill: '#000', textFill: '#000',
textAlign: 'letf', textAlign: 'letf',
textFont: 10 + 'px consolas', textFont: 10 + 'px consolas',

View File

@ -1,9 +1,19 @@
<template> <template>
<el-dialog class="fuzhou_01 notice-info" :title="title" :visible.sync="show" width="360px" :before-close="doClose" <el-dialog
:zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> v-dialogDrag
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"> <div class="context">
<template v-for="message in messages"> <template v-for="message in messages">
<span>{{message}}</span><br> <span>{{ message }}</span><br>
</template> </template>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -11,21 +21,20 @@
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button> <el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col> </el-col>
</el-row> </el-row>
</span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'NoticeInfo', name: 'NoticeInfo',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
messages: ['命令下达失败'], messages: ['命令下达失败'],
operate: null operate: null
} };
}, },
computed: { computed: {
show() { show() {
@ -41,7 +50,7 @@
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, messages) { doShow(operate, messages) {
@ -66,7 +75,7 @@
this.doClose(); this.doClose();
} }
} }
} };
</script> </script>
<style> <style>

View File

@ -1,24 +1,27 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
components: { components: {
PopMenu, PopMenu
}, },
props: { props: {
selected: { selected: {
type: Object type: Object,
default() {
return null;
}
} }
}, },
data() { data() {
@ -131,7 +134,7 @@
label: '新建列车', label: '新建列车',
handler: this.newTrain, handler: this.newTrain,
disabledCallback: MenuDisabledState.Section.newTrain disabledCallback: MenuDisabledState.Section.newTrain
}, }
], ],
menuForce: [ menuForce: [
{ {
@ -145,7 +148,7 @@
disabledCallback: MenuDisabledState.Section.cancelStoppage disabledCallback: MenuDisabledState.Section.cancelStoppage
} }
] ]
} };
}, },
watch: { watch: {
'$store.state.menuOperation.menuCount': function (val) { '$store.state.menuOperation.menuCount': function (val) {
@ -167,21 +170,21 @@
}, },
methods: { methods: {
clickEvent() { clickEvent() {
let self = this; const self = this;
window.onclick = function (e) { window.onclick = function (e) {
self.doClose(); self.doClose();
} };
}, },
initMenu() { initMenu() {
// //
this.menu = menuFiltration(this.menuNormal); this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) { if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain] this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
} }
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce this.menu = this.menuForce;
} }
this.menu = menuConvert(this.menu); this.menu = menuConvert(this.menu);
@ -198,9 +201,9 @@
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
// //
setStoppage() { setStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -214,13 +217,13 @@
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
cancelStoppage() { cancelStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -234,13 +237,13 @@
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
fault() { fault() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
@ -254,9 +257,9 @@
} }
}); });
}, },
// //
split() { split() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
@ -270,9 +273,9 @@
} }
}); });
}, },
// //
active() { active() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
@ -286,9 +289,9 @@
} }
}); });
}, },
// //
axlePreReset() { axlePreReset() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
@ -302,9 +305,9 @@
} }
}); });
}, },
// //
lock() { lock() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
@ -318,9 +321,9 @@
} }
}); });
}, },
// //
unlock() { unlock() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
@ -334,9 +337,9 @@
} }
}); });
}, },
// //
setSpeed() { setSpeed() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
@ -350,9 +353,9 @@
} }
}); });
}, },
// //
cancelSpeed() { cancelSpeed() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -362,15 +365,15 @@
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
let tempData = response.data; // const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData); // this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
} }
}); });
}, },
// //
newTrain() { newTrain() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
@ -382,8 +385,8 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreate.doShow(operate, this.selected); this.$refs.trainCreate.doShow(operate, this.selected);
} }
}) });
}
} }
} }
};
</script> </script>

View File

@ -1,7 +1,6 @@
<template> <template>
<div> <div>
<el-dialog class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px" <el-dialog v-dialogDrag class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px solid lightgray;"> <div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span> <span class="base-label">命令信息</span>
<el-form label-position="center" size="mini"> <el-form label-position="center" size="mini">
@ -9,41 +8,49 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="类型" label-width="40px"> <el-form-item label="类型" label-width="40px">
<el-select v-model="operation" size="small" disabled> <el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name" <el-option
:value="option.code"> v-for="option in typeList"
</el-option> :key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="车站名称" label-width="80px"> <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-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="信号机名称" label-width="100px"> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini" <el-table
highlight-current-row height="200"> ref="tempData"
<el-table-column prop="order" :width="50" label="序号"> class="table"
</el-table-column> :data="tempData"
<el-table-column prop="date" :width="160" label="时间"> border
</el-table-column> style="width: 100%"
<el-table-column prop="context" :width="180" label="执行过程"> size="mini"
</el-table-column> highlight-current-row
<el-table-column prop="result" label="执行结果"> height="200"
</el-table-column> >
<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> </el-table>
<span class="notice">{{message}}</span> <span class="notice">{{ message }}</span>
<el-row class="button-group"> <el-row class="button-group">
<el-col :span="2" :offset="2"> <el-col :span="2" :offset="2">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span <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>
<el-col :span="2" :offset="2"> <el-col :span="2" :offset="2">
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1 <el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
@ -51,7 +58,8 @@
</el-col> </el-col>
<el-col :span="2" :offset="2"> <el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span <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>
<el-col :span="2" :offset="2"> <el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button> <el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
@ -61,16 +69,16 @@
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate"></confirm-signal-unlock> <confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
</div> </div>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date'; import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock'; import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
export default { export default {
name: 'RouteCmdControl', name: 'RouteCmdControl',
components: { components: {
ConfirmSignalUnlock ConfirmSignalUnlock
@ -92,14 +100,14 @@
timeCountConfirm: -1, timeCountConfirm: -1,
stationName: '', stationName: '',
signalName: '' signalName: ''
} };
}, },
computed: { computed: {
typeList() { typeList() {
return [ return [
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' }, { code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' } { code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
] ];
}, },
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
@ -169,7 +177,7 @@
this.stpDisabled = true; this.stpDisabled = true;
val.forEach((elem, index) => { val.forEach((elem, index) => {
// 1 // 1
if (elem == false && 1 <= index && index <= 2) { if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false; this.stpDisabled = false;
} }
}); });
@ -180,7 +188,7 @@
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) { if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) { if (this.timeCountCommand > 0) {
@ -196,7 +204,7 @@
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
} }
} }
}, 1000) }, 1000);
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer); clearInterval(this.timer);
@ -209,8 +217,8 @@
this.signalName = ''; this.signalName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name this.signalName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -246,13 +254,13 @@
} }
}, },
commandHasPopUp() { commandHasPopUp() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type
} };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.order.operation operate.operation = OperationEvent.Signal.unlock.order.operation;
} }
this.setMessage('请点击“确认1”按钮确认命令'); this.setMessage('请点击“确认1”按钮确认命令');
@ -264,16 +272,16 @@
this.$refs.confirmSignalUnlock.doShow(operate, this.selected); this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
} }
} }
}) });
}, },
commandNoPopUp() { commandNoPopUp() {
let operate = { const operate = {
type: MapDeviceType.Signal.type type: MapDeviceType.Signal.type
} };
if (this.operation == OperationEvent.Signal.guide.menu.operation) { if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.order.operation operate.operation = OperationEvent.Signal.guide.order.operation;
} }
this.setMessage('请点击“确认1”按钮确认命令'); this.setMessage('请点击“确认1”按钮确认命令');
@ -288,12 +296,12 @@
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
}) });
}, },
confirm1() { confirm1() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type
} };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
@ -317,13 +325,13 @@
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
}) });
}, },
confirm2() { confirm2() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type type: MapDeviceType.Signal.type
} };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
@ -349,12 +357,12 @@
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 }); this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
}) });
}, },
stop() { stop() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type
} };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
@ -364,7 +372,6 @@
operate.operation = OperationEvent.Signal.guide.stop.operation; operate.operation = OperationEvent.Signal.guide.stop.operation;
} }
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -376,13 +383,13 @@
} }
}).catch(error => { }).catch(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
}) });
}, },
close() { close() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation, operation: OperationEvent.Command.close.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -425,8 +432,8 @@
elem[prop] = param[prop]; elem[prop] = param[prop];
} }
} }
}) });
}
} }
} }
};
</script> </script>

View File

@ -1,16 +1,25 @@
<template> <template>
<el-dialog class="beijing-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="320px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
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-row class="header">
<el-col :span="10"><span>集中站</span></el-col> <el-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col> <el-col :span="10" :offset="2"><span>站台</span></el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10"> <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>
<el-col :span="10" :offset="2"> <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-col>
</el-row> </el-row>
<div v-if="!earlyDepar"> <div v-if="!earlyDepar">
@ -18,13 +27,21 @@
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span> <span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;"> <el-row style="margin-top: -13px;">
<el-col :span="11"> <el-col :span="11">
<el-radio v-model="radio" label="1" :disabled="radio == 2" <el-radio
style="display: block; text-align: left;"> v-model="radio"
label="1"
:disabled="radio == 2"
style="display: block; text-align: left;"
>
本站台上行</el-radio> 本站台上行</el-radio>
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-radio v-model="radio" label="2" :disabled="radio == 1" <el-radio
style="display: block; text-align: left;"> v-model="radio"
label="2"
:disabled="radio == 1"
style="display: block; text-align: left;"
>
本站台上行</el-radio> 本站台上行</el-radio>
</el-col> </el-col>
</el-row> </el-row>
@ -33,13 +50,21 @@
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span> <span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;"> <el-row style="margin-top: -13px;">
<el-col :span="11"> <el-col :span="11">
<el-radio v-model="radio1" label="1" :disabled="radio1 == '2'" <el-radio
style="display: block; text-align: left;"> v-model="radio1"
label="1"
:disabled="radio1 == '2'"
style="display: block; text-align: left;"
>
扣车</el-radio> 扣车</el-radio>
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-radio v-model="radio1" label="2" :disabled="radio1 == '1'" <el-radio
style="display: block; text-align: left;"> v-model="radio1"
label="2"
:disabled="radio1 == '1'"
style="display: block; text-align: left;"
>
取消扣车</el-radio> 取消扣车</el-radio>
</el-col> </el-col>
</el-row> </el-row>
@ -50,13 +75,23 @@
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span> <span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;"> <el-row style="margin-top: -13px;">
<el-col :span="11"> <el-col :span="11">
<el-radio v-model="radio2" label="1" :id="upRadioId" <el-radio
style="display: block; text-align: left;" @change="changeRadio"> :id="upRadioId"
v-model="radio2"
label="1"
style="display: block; text-align: left;"
@change="changeRadio"
>
本站台上行</el-radio> 本站台上行</el-radio>
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-radio v-model="radio2" label="2" :id="downRadioId" <el-radio
style="display: block; text-align: left;" @change="changeRadio"> :id="downRadioId"
v-model="radio2"
label="2"
style="display: block; text-align: left;"
@change="changeRadio"
>
本站台下行</el-radio> 本站台下行</el-radio>
</el-col> </el-col>
</el-row> </el-row>
@ -70,16 +105,16 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo' import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'StandDetainTrain', name: 'StandDetainTrain',
components: { components: {
NoticeInfo NoticeInfo
@ -95,8 +130,8 @@
radio: '1', radio: '1',
radio1: '1', radio1: '1',
radio2: '1', radio2: '1',
earlyDepar: false, earlyDepar: false
} };
}, },
computed: { computed: {
show() { show() {
@ -129,14 +164,15 @@
} else { } else {
this.radio2 = '1'; this.radio2 = '1';
} }
return '提前发车' return '提前发车';
}
return '';
} }
},
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, selected) { doShow(operate, selected) {
@ -149,7 +185,7 @@
} }
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name; this.standName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -169,11 +205,11 @@
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
changeRadio(val) { changeRadio(val) {
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: '', operation: '',
val: val val: val
} };
if (val == 1) { if (val == 1) {
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation; operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
} else if (val == 2) { } else if (val == 2) {
@ -186,7 +222,7 @@
} }
}).catch(error => { }).catch(error => {
console.log(error); console.log(error);
}) });
}, },
commit() { commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) { if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
@ -200,13 +236,13 @@
this.earlyDeparture(); this.earlyDeparture();
} }
}, },
// //
setDetainTrain() { setDetainTrain() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation, operation: OperationEvent.StationStand.setDetainTrain.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -219,15 +255,15 @@
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
cancelDetainTrain() { cancelDetainTrain() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -240,15 +276,15 @@
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
earlyDeparture() { earlyDeparture() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation operation: OperationEvent.StationStand.earlyDeparture.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -260,13 +296,13 @@
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.loading = false; this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -278,7 +314,7 @@
}); });
} }
} }
} };
</script> </script>
<style> <style>
.stand-detain-train .context { .stand-detain-train .context {

View File

@ -1,22 +1,31 @@
<template> <template>
<el-dialog class="beijing-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
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-row class="header">
<el-col :span="11"><span>集中站</span></el-col> <el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>站台</span></el-col> <el-col :span="11" :offset="2"><span>站台</span></el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <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>
<el-col :span="11" :offset="2"> <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-col>
</el-row> </el-row>
<el-form label-width="70px" size="mini" style=""> <el-form label-width="70px" size="mini" style="">
<el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;"> <el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;">
<span class="base-label" style="display:block; padding-left: 20px;">范围</span> <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;"> <div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio> <el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
</div> </div>
@ -26,7 +35,7 @@
</el-radio-group> </el-radio-group>
<el-row> <el-row>
<el-col :span="10"> <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;"> <div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio> <el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
</div> </div>
@ -37,11 +46,20 @@
</el-col> </el-col>
<el-col :span="11" align="top" :offset="2"> <el-col :span="11" align="top" :offset="2">
<span>车组号</span> <span>车组号</span>
<el-select id="stand_trainNo_select" style="width: 110px;" v-model="model.tripNumber" <el-select
size="mini" @change="trainNoSelectChange" :disabled="!model.val2" :id="selectTrainId"> :id="selectTrainId"
<el-option v-for="option in trainList" :key="option.groupNumber" :label="option.groupNumber" v-model="model.tripNumber"
:value="option.groupNumber"> style="width: 110px;"
</el-option> 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-select>
</el-col> </el-col>
</el-row> </el-row>
@ -51,13 +69,21 @@
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span> <span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;"> <el-row style="margin-top: -13px;">
<el-col :span="11"> <el-col :span="11">
<el-radio v-model="radio1" :label="JumpStopSet" :disabled="radio1 == JumpStopCancel" <el-radio
style="display: block; text-align: left;"> v-model="radio1"
:label="JumpStopSet"
:disabled="radio1 == JumpStopCancel"
style="display: block; text-align: left;"
>
设置</el-radio> 设置</el-radio>
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-radio v-model="radio1" :label="JumpStopCancel" :disabled="radio1 == JumpStopSet" <el-radio
style="display: block; text-align: left;"> v-model="radio1"
:label="JumpStopCancel"
:disabled="radio1 == JumpStopSet"
style="display: block; text-align: left;"
>
取消</el-radio> 取消</el-radio>
</el-col> </el-col>
</el-row> </el-row>
@ -70,17 +96,17 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'StandDetainTrains', name: 'StandDetainTrains',
components: { components: {
NoticeInfo NoticeInfo
@ -99,9 +125,9 @@
val1: '', val1: '',
val2: '', val2: '',
tripNumber: '', tripNumber: '',
direction: '', direction: ''
}
} }
};
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
@ -141,17 +167,17 @@
return '跳停'; return '跳停';
}, },
upstream() { upstream() {
return '02'; // return '02'; //
}, },
downstream() { downstream() {
return '01'; // return '01'; //
}, },
JumpStopSet() { JumpStopSet() {
return OperationEvent.StationStand.setJumpStop.menu.operation; return OperationEvent.StationStand.setJumpStop.menu.operation;
}, },
JumpStopCancel() { JumpStopCancel() {
return OperationEvent.StationStand.cancelJumpStop.menu.operation; return OperationEvent.StationStand.cancelJumpStop.menu.operation;
}, }
}, },
watch: { watch: {
'model.val1'(val) { 'model.val1'(val) {
@ -164,7 +190,7 @@
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, selected) { doShow(operate, selected) {
@ -178,14 +204,14 @@
} }
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name; this.standName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
} }
this.radio1 = operate.operation; this.radio1 = operate.operation;
this.model.direction = selected.direction; this.model.direction = selected.direction;
this.model.val1 = selected.direction // , 01: /02: this.model.val1 = selected.direction; // , 01: /02:
this.model.val2 = ''; this.model.val2 = '';
this.model.tripNumber = ''; this.model.tripNumber = '';
@ -213,19 +239,19 @@
this.cancelJumpStop(); this.cancelJumpStop();
} }
}, },
// //
setJumpStop() { setJumpStop() {
let val = this.model.val1; let val = this.model.val1;
if (this.model.val2) { if (this.model.val2) {
val = this.model.val2 + '::' + this.model.tripNumber; val = this.model.val2 + '::' + this.model.tripNumber;
} }
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setJumpStop.menu.operation, operation: OperationEvent.StationStand.setJumpStop.menu.operation,
// val: this.selected.direction //, 01: /02: // val: this.selected.direction //, 01: /02:
val: val, val: val
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -233,24 +259,24 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
cancelJumpStop() { cancelJumpStop() {
let val = this.model.val1; let val = this.model.val1;
if (this.model.val2) { if (this.model.val2) {
val = this.model.val2 + '::' + this.model.tripNumber; val = this.model.val2 + '::' + this.model.tripNumber;
} }
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
val: val //, 01: /02: val: val // , 01: /02:
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -258,73 +284,73 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.loading = false; this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
}, },
upAndDownStreamChange(val) { upAndDownStreamChange(val) {
let operation = this.radio1 == this.JumpStopSet ? const operation = this.radio1 == this.JumpStopSet
OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation; ? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
this.model.val1 = ''; this.model.val1 = '';
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: operation operation: operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}) });
}, },
upAndDownStreamChangeVal1(val) { upAndDownStreamChangeVal1(val) {
let operation = this.radio1 == this.JumpStopSet ? const operation = this.radio1 == this.JumpStopSet
OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation; ? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
this.model.val1 = ''; this.model.val1 = '';
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: operation operation: operation
} };
this.model.val2 = ''; this.model.val2 = '';
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}) });
}, },
trainNoSelectChange(val) { trainNoSelectChange(val) {
let operation = this.radio1 == this.JumpStopSet ? const operation = this.radio1 == this.JumpStopSet
OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation; ? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
this.model.val1 = ''; this.model.val1 = '';
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: operation, operation: operation,
val: val val: val
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}) });
},
} }
} }
};
</script> </script>
<style> <style>
.stand-detain-train .context { .stand-detain-train .context {

View File

@ -1,13 +1,18 @@
<template> <template>
<el-dialog <el-dialog
class="beijing-01__systerm station-control" v-dialogDrag
:title="title" :visible.sync="show" width="400px" class="beijing-01__systerm station-control"
:title="title"
:visible.sync="show"
width="400px"
:before-close="doClose" :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" :close-on-click-modal="false"
> >
<el-radio-group v-model="control" :disabled="true"> <el-radio-group v-model="control" :disabled="true">
<el-row v-for="item in Object.keys(controlProps)" style="padding-bottom: 10px;padding-top:10px" :key="item"> <el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
<el-radio :label="item" disabled="false">{{ controlProps[item] }}</el-radio> <el-radio :label="item" disabled="false">{{ controlProps[item] }}</el-radio>
</el-row> </el-row>
</el-radio-group> </el-radio-group>
@ -16,7 +21,7 @@ class="beijing-01__systerm station-control"
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出 <el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
</el-button> </el-button>
</el-row> </el-row>
<notice-info ref="noticeInfo"/> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>

View File

@ -1,10 +1,15 @@
<template> <template>
<el-dialog <el-dialog
class="beijing-01__systerm view-train-id" v-dialogDrag
title="列车识别号显示设置" :visible.sync="show" width="420px" class="beijing-01__systerm view-train-id"
title="列车识别号显示设置"
:visible.sync="show"
width="420px"
:before-close="doClose" :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;"> <div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span> <span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode"> <el-radio-group v-model="planMode">
@ -51,7 +56,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<span class="base-label">字体大小</span> <span class="base-label">字体大小</span>
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"/> <el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span> <span style="height:32px; line-height:32px;">范围16-99</span>
@ -66,7 +71,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"/> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
@ -87,8 +92,8 @@ export default {
operation: '', operation: '',
planMode: 5, planMode: 5,
headMode: 5, headMode: 5,
fontSize: 16, fontSize: 16
} };
}, },
computed: { computed: {
show() { show() {

View File

@ -1,31 +1,26 @@
<template> <template>
<div id="statusDownTrainDetail"></div> <div id="statusDownTrainDetail" />
</template> </template>
<script> <script>
export default { export default {
name: 'StatusDownTrainDetail', name: 'StatusDownTrainDetail',
props: { props: {
selected: { selected: {
type: Object type: Object,
default() {
return null;
}
} }
}, },
data() { data() {
return { return {
} };
}, },
mounted() { mounted() {
} }
} };
</script> </script>
<style> <style>
#statusDownTrainDetail {
z-index: 1000;
position: absolute;
height: $height;
line-height: $height;
border-radius: 0px !important;
top: 0px;
left: 0px;
}
</style> </style>

View File

@ -137,8 +137,9 @@ export default {
lastPoint = train.stationTimeList[idx - 1]; lastPoint = train.stationTimeList[idx - 1];
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber); num = this.computedReentryNumber(train.tripNumber);
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode]); const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode]); opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
} }
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/

View File

@ -122,7 +122,6 @@
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { importRunPlan } from '@/api/runplan'; import { importRunPlan } from '@/api/runplan';
import { importData } from '../planConvert';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';

View File

@ -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>

View File

@ -1,9 +1,18 @@
<template> <template>
<el-dialog class="chengdou-03__systerm" :visible.sync="show" width="360px" :before-close="doClose" :zIndex="2000" <el-dialog
:modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> v-dialogDrag
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-row>
<el-col :span="22" :offset="1"> <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-col>
</el-row> </el-row>
<el-row v-if="showMistake"> <el-row v-if="showMistake">
@ -52,7 +61,7 @@
<el-button @click="inputClear">C</el-button> <el-button @click="inputClear">C</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="4"> <el-col :span="4" :offset="4">
<el-button @click="backSpace">&lt-</el-button> <el-button @click="backSpace"> &lt; </el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -67,24 +76,24 @@
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
export default { export default {
name: 'passwordBox', name: 'PasswordBox',
data() { data() {
return { return {
/*写死的初始密码*/ /* 写死的初始密码*/
correctPassword: '123456', correctPassword: '123456',
dialogShow: false, dialogShow: false,
operation: null, operation: null,
checkHasInput: false, checkHasInput: false,
/*输入值*/ /* 输入值*/
passwordCheck: '', passwordCheck: '',
/*输入值替换为对应长度的星号*/ /* 输入值替换为对应长度的星号*/
encryptionPassword: '', encryptionPassword: '',
loading: false, loading: false,
showMistake: false, showMistake: false
} };
}, },
computed: { computed: {
show() { show() {
@ -97,18 +106,18 @@
set: function () { set: function () {
} }
}, },
domIdConfirm: { domIdConfirm() {
get: function () { if (this.operate && this.operate.operateCode) {
return OperationEvent.Command.close.confirm.domId; return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : '';
}, } else {
set: function () { return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
} }
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate) { doShow(operate) {
@ -126,45 +135,49 @@
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit() {
let operate = { const operate = {
send: false, send: this.operate.operateCode != null,
type: this.operate.type, 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) { if (this.passwordCheck === this.correctPassword) {
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.$emit('checkOver', this.operate.operation); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$emit('checkOver');
this.doClose(); this.doClose();
this.inputClear(); this.inputClear();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
}) });
} else { } else {
this.showMistake = true; this.showMistake = true;
} }
}, },
/*软键盘输入*/ /* 软键盘输入*/
inputNum(e) { inputNum(e) {
this.showMistake = false; this.showMistake = false;
this.passwordCheck += e.path[0].innerText; this.passwordCheck += e.path[0].innerText;
this.encryptionPassword = this.passwordCheck.replace(/./g, '*'); this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
}, },
/*软键盘清除*/ /* 软键盘清除*/
inputClear() { inputClear() {
this.showMistake = false; this.showMistake = false;
this.passwordCheck = ''; this.passwordCheck = '';
this.encryptionPassword = ''; this.encryptionPassword = '';
}, },
/*软键盘回退*/ /* 软键盘回退*/
backSpace() { backSpace() {
this.showMistake = false; this.showMistake = false;
let password = this.passwordCheck; const password = this.passwordCheck;
if (password !== '') { if (password !== '') {
this.passwordCheck = password.substring(0, password.length - 1); this.passwordCheck = password.substring(0, password.length - 1);
this.encryptionPassword = this.passwordCheck; this.encryptionPassword = this.passwordCheck;
@ -172,10 +185,10 @@
}, },
cancel() { cancel() {
let operate = { const operate = {
send: false, send: false,
type: this.operate.type, 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.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
@ -186,11 +199,11 @@
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
}); });
} }
} }
} };
</script> </script>
<style> <style>

View File

@ -1,14 +1,23 @@
<template> <template>
<el-dialog class="chengdou-03__systerm signal-control" :title="title" :visible.sync="show" width="440px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
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-row>
<el-col :span="2"><span>车站</span></el-col> <el-col :span="2"><span>车站</span></el-col>
<el-col :span="6"> <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>
<el-col :span="5" :offset="1"><span>始端信号机</span></el-col> <el-col :span="5" :offset="1"><span>始端信号机</span></el-col>
<el-col :span="6"> <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> </el-row>
<el-row justify="center" style="margin-top: 50px"> <el-row justify="center" style="margin-top: 50px">
@ -17,25 +26,25 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<confirm-control ref="confirmControl"></confirm-control> <confirm-control ref="confirmControl" />
<password-box ref="password" @checkOver="confirm"></password-box> <password-box ref="password" @checkOver="doClose" />
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import PasswordBox from './childDialog/passwordInputBox'; import PasswordBox from './childDialog/passwordInputBox';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'RouteControl', name: 'RouteControl',
components: { components: {
ConfirmControl, ConfirmControl,
PasswordBox, PasswordBox,
NoticeInfo, NoticeInfo
}, },
data() { data() {
return { return {
@ -45,9 +54,9 @@
tempdata: [], tempdata: [],
operation: null, operation: null,
stationName: '', stationName: '',
signalName: '' signalName: '',
operateCode: ''
} };
}, },
computed: { computed: {
show() { show() {
@ -77,12 +86,13 @@
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) { } else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯'; return '信号关灯';
} }
return '';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, selected, tempdata) { doShow(operate, selected, tempdata) {
@ -92,13 +102,14 @@
this.signalName = ''; this.signalName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name this.signalName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
} }
this.operation = operate.operation; this.operation = operate.operation;
this.operateCode = operate.code;
} }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
@ -138,7 +149,7 @@
this.signalClose(); this.signalClose();
} }
}, },
// //
cancelTrainRoute() { cancelTrainRoute() {
if (this.$store.state.training.prdType == '01') { if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/ /** 现地工作站*/
@ -148,13 +159,13 @@
this.cancelTrainRouteByCentral(); this.cancelTrainRouteByCentral();
} }
}, },
// //
cancelTrainRouteByLocal() { cancelTrainRouteByLocal() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -162,19 +173,19 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
cancelTrainRouteByCentral() { cancelTrainRouteByCentral() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation, operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -182,33 +193,38 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
humanTrainRoute() { humanTrainRoute() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanTrainRoute.menu.operation, operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
} operateCode: OperationEvent.Signal.humanTrainRoute.confirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$refs.password.doShow(); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
reopenSignal() { reopenSignal() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.reopenSignal.menu.operation, operation: OperationEvent.Signal.reopenSignal.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -216,89 +232,96 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
lock() { lock() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.lock.menu.operation, operation: OperationEvent.Signal.lock.menu.operation,
} operateCode: OperationEvent.Signal.lock.confirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$refs.password.doShow(); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
} }
}).catch(error => { }).catch(() => {
}); });
}, },
// //
unlock() { unlock() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.unlock.menu.operation, operation: OperationEvent.Signal.unlock.menu.operation,
} operateCode: OperationEvent.Signal.unlock.confirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$refs.password.doShow(); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
} }
}).catch(error => { }).catch(() => {
}); });
}, },
// //
humanControl() { humanControl() {
let operate = { const operate = {
send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation, operation: OperationEvent.Signal.humanControl.menu.operation,
val: 'all' operateCode: OperationEvent.Signal.humanControl.confirm.operation,
} val: this.operateCode
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); // this.doClose();
this.$refs.noticeInfo.doShow(operate); // this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
atsAutoControl() { atsAutoControl() {
let operate = { const operate = {
send: true, // send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation, operation: OperationEvent.Signal.atsAutoControl.menu.operation,
val: 'all' operateCode: OperationEvent.Signal.atsAutoControl.confirm.operation,
} val: this.operateCode
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); // this.doClose();
this.$refs.noticeInfo.doShow(operate); // this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
signalClose() { signalClose() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.signalClose.menu.operation, operation: OperationEvent.Signal.signalClose.menu.operation,
messages: [`信号关灯: ${this.signalName}`], messages: [`信号关灯: ${this.signalName}`]
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -308,56 +331,26 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate); this.$refs.confirmControl.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; 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() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation, operation: OperationEvent.Command.close.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
} }
} }
} };
</script> </script>

View File

@ -1,35 +1,50 @@
<template> <template>
<div> <div>
<el-dialog class="chengdou-03__systerm route-detail" :title="title" :visible.sync="show" width="460px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
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-row>
<el-col :span="2"><span>车站</span></el-col> <el-col :span="2"><span>车站</span></el-col>
<el-col :span="6"> <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>
<el-col :span="6" :offset="1"><span>始端信号机</span></el-col> <el-col :span="6" :offset="1"><span>始端信号机</span></el-col>
<el-col :span="6"> <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> </el-row>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row <el-table
:height="140"> ref="tempTable"
<el-table-column type="index" label="Id" width="40"> :data="tempData"
</el-table-column> 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"> <el-table-column label="描述" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.name}}</span> <span>{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="方向" width="60"> <el-table-column label="方向" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.name}}</span> <span>{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="完整性"> <el-table-column label="完整性">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.name}}</span> <span>{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" label="控制"> <el-table-column prop="status" label="控制">
@ -45,18 +60,18 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo' import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'RouteDetail', name: 'RouteDetail',
components: { components: {
NoticeInfo NoticeInfo
@ -68,8 +83,8 @@
selected: null, selected: null,
tempData: [], tempData: [],
stationName: '', stationName: '',
signalName: '', signalName: ''
} };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
@ -85,24 +100,24 @@
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : ''; return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
}, },
title() { title() {
return '查询进路状态' return '查询进路状态';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, selected, tempData) { doShow(operate, selected, tempData) {
this.selected = selected; this.selected = selected;
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.signalName = ''; this.signalName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name this.signalName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -122,19 +137,19 @@
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
} };
</script> </script>

View File

@ -1,59 +1,75 @@
<template> <template>
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
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-row>
<el-col :span="2"><span class="item-lable">车站</span></el-col> <el-col :span="2"><span class="item-lable">车站</span></el-col>
<el-col :span="6"> <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>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col> <el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
<el-col :span="6"> <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> </el-row>
<div class="route-table-box"> <div class="route-table-box">
<span class="route-table-tip">进路列表</span> <span class="route-table-tip">进路列表</span>
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" <el-table
@row-click="clickEvent" height="90" highlight-current-row> ref="table"
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px"> :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>
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px"> <el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
<template slot-scope="scope"> <template></template>
{{ 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> </el-table-column>
</el-table> </el-table>
</div> </div>
<el-row justify="center" style="margin-top: 40px"> <el-row justify="center" style="margin-top: 40px">
<el-col :span="12" :offset="12"> <el-col :span="12" :offset="12">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" <el-button
@click="commit">执行</el-button> :id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
<!-- <password ref="password"></password> --> <password-box ref="passwordBox" @checkOver="doClose" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic.js';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import PasswordBox from './childDialog/passwordInputBox.vue';
// import Password from './childDialog/childDialog/password';
export default { export default {
name: 'RouteSelection', name: 'RouteSelection',
components: { components: {
ConfirmControl,
NoticeInfo, NoticeInfo,
// Password PasswordBox
}, },
data() { data() {
return { return {
@ -68,13 +84,13 @@
stationName: '', stationName: '',
signalName: '', signalName: '',
tableStyle: { tableStyle: {
'border-bottom': 'none', 'border-bottom': 'none'
}, },
controlTypeNameMap: { controlTypeNameMap: {
'01': '折返', '01': '折返',
'02': '直通', '02': '直通'
}
} }
};
}, },
computed: { computed: {
show() { show() {
@ -87,15 +103,15 @@
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : ''; return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : '' return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : '';
}, },
title() { title() {
return '办理引导进路' return '办理引导进路';
}, },
commitDisabled() { commitDisabled() {
let disabled = true; let disabled = true;
if (this.row) { if (this.row) {
disabled = !this.row.canSetting disabled = !this.row.canSetting;
} }
return disabled; return disabled;
} }
@ -103,7 +119,7 @@
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
getProtectedSectionName(row) { getProtectedSectionName(row) {
@ -113,24 +129,24 @@
row.overlapSectionList && row.overlapSectionList &&
row.overlapSectionList.length > 0) { row.overlapSectionList.length > 0) {
let protect = row.overlapSectionList[0]; const protect = row.overlapSectionList[0];
name = `${protect.name}`; name = `${protect.name}`;
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode); const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) { if (station) {
name = `${name}(${station.name})` name = `${name}(${station.name})`;
} }
} }
return name; return name;
}, },
doShow(operate, selected, tempData) { doShow(operate, selected, tempData) {
this.selected = selected; this.selected = selected;
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.signalName = ''; this.signalName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name this.signalName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -168,8 +184,7 @@
if (row) { if (row) {
// //
this.guide(); this.guide();
row.canSetting = true;
if (row.canSetting) {
// //
if (row.containSectionList && row.containSectionList.length) { if (row.containSectionList && row.containSectionList.length) {
// //
@ -182,7 +197,7 @@
this.beforeSectionList = row.containSectionList || []; this.beforeSectionList = row.containSectionList || [];
// //
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.guide.choose.operation, operation: OperationEvent.Signal.guide.choose.operation,
val: row.code val: row.code
@ -194,54 +209,49 @@
} }
}); });
} }
}
}, },
//
commit() { commit() {
if (this.row && this.row.canSetting) { if (this.row && this.row.canSetting) {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.guide.menu.operation, operation: OperationEvent.Signal.guide.menu.operation,
} operateCode: OperationEvent.Signal.guide.confirm.operation
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.$refs.password.doShow(operate); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} this.$refs.passwordBox.doShow(operate);
}).catch((error) => { } else {
this.loading = false; this.doClose();
})
}
},
confirm() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.guide.confirm.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) }
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
} };
</script> </script>
<style scoped> <style scoped>
.route-table-tip { .route-table-tip {

View File

@ -1,55 +1,73 @@
<template> <template>
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
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-row>
<el-col :span="2"><span class="item-lable">车站</span></el-col> <el-col :span="2"><span class="item-lable">车站</span></el-col>
<el-col :span="6"> <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>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col> <el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
<el-col :span="6"> <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> </el-row>
<div class="route-table-box"> <div class="route-table-box">
<span class="route-table-tip">进路列表</span> <span class="route-table-tip">进路列表</span>
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" <el-table
@row-click="clickEvent" height="150" highlight-current-row> ref="table"
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px"> :data="tempData"
</el-table-column> border
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px"> :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"> <template slot-scope="scope">
{{ controlTypeNameMap[scope.row.controlType] }} {{ controlTypeNameMap[scope.row.controlType] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="controlType" label="进路描述" :id="domIdChoose" style="margin-left:30px"> <el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
<template slot-scope="scope"> <template></template>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<el-row justify="center" style="margin-top: 70px"> <el-row justify="center" style="margin-top: 70px">
<el-col :span="12" :offset="12"> <el-col :span="12" :offset="12">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" <el-button
@click="commit">执行</el-button> :id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'RouteSelection', name: 'RouteSelection',
components: { components: {
ConfirmControl,
NoticeInfo NoticeInfo
}, },
data() { data() {
@ -65,13 +83,13 @@
stationName: '', stationName: '',
signalName: '', signalName: '',
tableStyle: { tableStyle: {
'border-bottom': 'none', 'border-bottom': 'none'
}, },
controlTypeNameMap: { controlTypeNameMap: {
'01': '折返', '01': '折返',
'02': '直通', '02': '直通'
}
} }
};
}, },
computed: { computed: {
show() { show() {
@ -84,15 +102,15 @@
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : ''; return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '' return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
}, },
title() { title() {
return '办理进路' return '办理进路';
}, },
commitDisabled() { commitDisabled() {
let disabled = true; let disabled = true;
if (this.row) { if (this.row) {
disabled = !this.row.canSetting disabled = !this.row.canSetting;
} }
return disabled; return disabled;
} }
@ -100,7 +118,7 @@
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
getProtectedSectionName(row) { getProtectedSectionName(row) {
@ -110,24 +128,24 @@
row.overlapSectionList && row.overlapSectionList &&
row.overlapSectionList.length > 0) { row.overlapSectionList.length > 0) {
let protect = row.overlapSectionList[0]; const protect = row.overlapSectionList[0];
name = `${protect.name}`; name = `${protect.name}`;
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode); const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) { if (station) {
name = `${name}(${station.name})` name = `${name}(${station.name})`;
} }
} }
return name; return name;
}, },
doShow(operate, selected, tempData) { doShow(operate, selected, tempData) {
this.selected = selected; this.selected = selected;
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.signalName = ''; this.signalName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name this.signalName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -165,8 +183,7 @@
if (row) { if (row) {
// //
this.restoreBeforeDevices(); this.restoreBeforeDevices();
row.canSetting = true;
if (row.canSetting) {
// //
if (row.containSectionList && row.containSectionList.length) { if (row.containSectionList && row.containSectionList.length) {
// //
@ -179,7 +196,7 @@
this.beforeSectionList = row.containSectionList || []; this.beforeSectionList = row.containSectionList || [];
// //
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.choose.operation, operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: row.code val: row.code
@ -191,15 +208,14 @@
} }
}); });
} }
}
}, },
commit() { commit() {
if (this.row && this.row.canSetting) { if (this.row && this.row.canSetting) {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.menu.operation, operation: OperationEvent.Signal.arrangementRoute.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -207,29 +223,29 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
} }
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
} };
</script> </script>
<style scoped> <style scoped>
.route-table-tip { .route-table-tip {

View File

@ -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>

View File

@ -1,14 +1,23 @@
<template> <template>
<el-dialog class="chengdou-03__systerm section-control" :title="title" :visible.sync="show" width="440px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
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-row>
<el-col :span="3"><span>车站</span></el-col> <el-col :span="3"><span>车站</span></el-col>
<el-col :span="6"> <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>
<el-col :span="3" :offset="2"><span>区段</span></el-col> <el-col :span="3" :offset="2"><span>区段</span></el-col>
<el-col :span="6"> <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-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -17,19 +26,22 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="doClose" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo' import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PasswordBox from './childDialog/passwordInputBox';
export default { export default {
name: 'SectionControl', name: 'SectionControl',
components: { components: {
NoticeInfo NoticeInfo,
PasswordBox
}, },
data() { data() {
return { return {
@ -38,8 +50,8 @@
selected: null, selected: null,
operation: '', operation: '',
stationName: '', stationName: '',
sectionName: '', sectionName: ''
} };
}, },
computed: { computed: {
show() { show() {
@ -59,14 +71,15 @@
} else if (this.operation == OperationEvent.Section.active.menu.operation) { } else if (this.operation == OperationEvent.Section.active.menu.operation) {
return '区段控制'; return '区段控制';
} else if (this.operation == OperationEvent.Section.fault.menu.operation) { } else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return '区故解' return '区故解';
} }
return '';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, selected) { doShow(operate, selected) {
@ -76,14 +89,14 @@
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') { if (selected.type === '02') {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode); const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) { 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) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -116,13 +129,13 @@
this.fault(); this.fault();
} }
}, },
// //
lock() { lock() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
operation: OperationEvent.Section.lock.menu.operation, operation: OperationEvent.Section.lock.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -130,19 +143,19 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
split() { split() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
operation: OperationEvent.Section.split.menu.operation, operation: OperationEvent.Section.split.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -150,19 +163,19 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
active() { active() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
operation: OperationEvent.Section.active.menu.operation, operation: OperationEvent.Section.active.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -170,46 +183,48 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
fault() { fault() {
let operate = { const operate = {
send: true, // send: true,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
operation: OperationEvent.Section.fault.menu.operation, operation: OperationEvent.Section.fault.menu.operation,
} operateCode: OperationEvent.Section.fault.confirm.operation
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
} };
</script> </script>

View File

@ -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>

View File

@ -1,32 +1,49 @@
<template> <template>
<el-dialog class="chengdou-03__systerm stand-detain-train" :title="title" :visible.sync="show" width="400px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> 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-row class="header">
<el-col :span="11"> <el-col :span="11">
<span>车站</span> <span>车站</span>
<el-input style="width: 110px; margin-left: 10px;" v-model="stationName" size="small" disabled> <el-input v-model="stationName" style="width: 110px; margin-left: 10px;" size="small" disabled />
</el-input>
</el-col> </el-col>
<el-col :span="11" :offset="1"> <el-col :span="11" :offset="1">
<span>站台</span> <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-col>
</el-row> </el-row>
<div v-if="DetainTrain"> <div v-if="DetainTrain">
<div <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> <span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;"> <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-col :span="24">
<el-radio label="01" <el-radio
style="display: block; text-align: left; float: left; margin-right: 10px;">本站台 label="01"
style="display: block; text-align: left; float: left; margin-right: 10px;"
>本站台
</el-radio> </el-radio>
<el-radio label="02" v-if="radio1 == 2" <el-radio
style="display: block; text-align: left; float: left; margin-right: 10px;">上行全线 v-if="radio1 == 2"
label="02"
style="display: block; text-align: left; float: left; margin-right: 10px;"
>上行全线
</el-radio> </el-radio>
<el-radio label="03" v-if="radio1 == 2" <el-radio
style="display: block; text-align: left; float: left;">下行全线</el-radio> v-if="radio1 == 2"
label="03"
style="display: block; text-align: left; float: left;"
>下行全线</el-radio>
</el-col> </el-col>
</el-radio-group> </el-radio-group>
</el-row> </el-row>
@ -35,13 +52,21 @@
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span> <span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;"> <el-row style="margin-top: -13px;">
<el-col :span="11"> <el-col :span="11">
<el-radio v-model="radio1" label="1" :disabled="radio1 == '2'" <el-radio
style="display: block; text-align: left;"> v-model="radio1"
label="1"
:disabled="radio1 == '2'"
style="display: block; text-align: left;"
>
扣车</el-radio> 扣车</el-radio>
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-radio v-model="radio1" label="2" :disabled="radio1 == '1'" <el-radio
style="display: block; text-align: left;"> v-model="radio1"
label="2"
:disabled="radio1 == '1'"
style="display: block; text-align: left;"
>
取消扣车</el-radio> 取消扣车</el-radio>
</el-col> </el-col>
</el-row> </el-row>
@ -49,30 +74,51 @@
</div> </div>
<div v-if="JumpStop"> <div v-if="JumpStop">
<div <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> <span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;"> <el-row style="margin-top: -13px;">
<el-col :span="24"> <el-col :span="24">
<el-radio-group v-model="radio" @change="chooseJumpStop"> <el-radio-group v-model="radio" @change="chooseJumpStop">
<el-radio label="01" :id="radio == '02' ? domIdChoose : ''" <el-radio
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 80px;"> :id="radio == '02' ? domIdChoose : ''"
label="01"
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 80px;"
>
站台跳停 站台跳停
</el-radio> </el-radio>
<el-radio label="02" :id="radio == '01' ? domIdChoose : ''" <el-radio
style="display: block; text-align: left; margin-left: 0; float: left;"> :id="radio == '01' ? domIdChoose : ''"
label="02"
style="display: block; text-align: left; margin-left: 0; float: left;"
>
指定列车跳停</el-radio> 指定列车跳停</el-radio>
<div style="float: left; margin-left: 20px;"> <div style="float: left;">
<span>车组号</span> <span>车组号</span>
<el-input v-if="radio1 != 2" style="width: 120px; margin-left: 20px;" <el-input
v-model="tripNumber" size="small" :id="domIdJumpStop" @blur="handleTrainNoBlur" v-if="radio1 != 2"
:disabled="radio == '01'"> :id="domIdJumpStop"
</el-input> v-model="tripNumber"
<el-select v-if="radio1 == 2" style="width: 120px; margin-left: 20px;" style="width: 120px; margin-left: 20px;"
v-model="tripNumber" size="mini" @change="trainNoSelectChange" size="small"
:id="domIdCancelJumpStop" :disabled="radio == '01'"> :disabled="radio == '01'"
<el-option v-for="option in trainList" :key="option.groupNumber" @blur="handleTrainNoBlur"
:label="option.groupNumber" :value="option.groupNumber"> />
</el-option> <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> </el-select>
</div> </div>
</el-radio-group> </el-radio-group>
@ -83,13 +129,21 @@
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span> <span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;"> <el-row style="margin-top: -13px;">
<el-col :span="11"> <el-col :span="11">
<el-radio v-model="radio1" label="1" :disabled="radio1 == 2" <el-radio
style="display: block; text-align: left;"> v-model="radio1"
label="1"
:disabled="radio1 == 2"
style="display: block; text-align: left;"
>
跳停</el-radio> 跳停</el-radio>
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-radio v-model="radio1" label="2" :disabled="radio1 == 1" <el-radio
style="display: block; text-align: left;"> v-model="radio1"
label="2"
:disabled="radio1 == 1"
style="display: block; text-align: left;"
>
取消跳停</el-radio> 取消跳停</el-radio>
</el-col> </el-col>
</el-row> </el-row>
@ -97,31 +151,52 @@
</div> </div>
<div v-if="RunLevel"> <div v-if="RunLevel">
<div <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> <span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;"> <el-row style="margin-top: -13px;">
<el-radio-group v-model="radio" @change="chooseStopTime"> <el-radio-group v-model="radio" @change="chooseStopTime">
<el-col :span="24"> <el-col :span="24">
<el-radio label="01" :id="radio == '02' ? domIdChoose1 : ''" <el-radio
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 60px;"> :id="radio == '02' ? domIdChoose1 : ''"
label="01"
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 60px;"
>
自动 自动
</el-radio> </el-radio>
<el-radio label="02" :id="radio == '01' ? domIdChoose1 : ''" <el-radio
style="display: block; text-align: left; margin-left: 0; float: left;"> :id="radio == '01' ? domIdChoose1 : ''"
label="02"
style="display: block; text-align: left; margin-left: 0; float: left;"
>
人工</el-radio> 人工</el-radio>
<div style="float: left; margin-left: 20px;"> <div style="float: left; margin-left: 20px;">
<span v-if="radio2 != 2">站停时间</span> <span v-if="radio2 != 2">站停时间</span>
<span v-if="radio2 == 2">运行等级</span> <span v-if="radio2 == 2">运行等级</span>
<el-input v-if="radio2 != 2" style="width: 120px; margin-left: 20px;" <el-input
v-model="trainStopTime" size="small" :id="domIdStopTime" :disabled="radio == '01'" v-if="radio2 != 2"
@blur="stopTimeBlur"> :id="domIdStopTime"
</el-input> v-model="trainStopTime"
<el-select v-if="radio2 == 2" style="width: 120px; margin-left: 20px;" style="width: 120px; margin-left: 20px;"
v-model="trainRunlevel" size="mini" @change="trainNoSelectLevel" :id="domIdRunLevel" size="small"
:disabled="radio == '01'"> :disabled="radio == '01'"
<el-option v-for="option in trainList" :key="option.groupNumber" @blur="stopTimeBlur"
:label="option.groupNumber" :value="option.groupNumber"> />
</el-option> <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> </el-select>
</div> </div>
</el-col> </el-col>
@ -133,13 +208,19 @@
<el-row style="margin-top: -13px;"> <el-row style="margin-top: -13px;">
<el-radio-group v-model="effective" @change="chooseEffective"> <el-radio-group v-model="effective" @change="chooseEffective">
<el-col :span="11"> <el-col :span="11">
<el-radio label="01" style="display: block; text-align: left;" <el-radio
:id="effective == '02' ? '': domIdChoose2"> :id="effective == '02' ? '': domIdChoose2"
label="01"
style="display: block; text-align: left;"
>
一次有效</el-radio> 一次有效</el-radio>
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-radio label="02" style="display: block; text-align: left;" <el-radio
:id="effective == '01' ? '': domIdChoose2"> :id="effective == '01' ? '': domIdChoose2"
label="02"
style="display: block; text-align: left;"
>
一直有效</el-radio> 一直有效</el-radio>
</el-col> </el-col>
</el-radio-group> </el-radio-group>
@ -154,17 +235,17 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo' import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'StandDetainTrain', name: 'StandDetainTrain',
components: { components: {
NoticeInfo NoticeInfo
@ -184,11 +265,16 @@
JumpStop: false, JumpStop: false,
RunLevel: false, RunLevel: false,
trainList: [], trainList: [],
runLevelList: [
{ value: '01', label: '常速' },
{ value: '02', label: '低速' },
{ value: '03', label: '高速' }
],
tripNumber: '', tripNumber: '',
effective: '01', effective: '01',
trainStopTime: 0, trainStopTime: 0,
trainRunlevel: '01', trainRunlevel: '01'
} };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
@ -240,42 +326,59 @@
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseTrain.domId : ''; return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseTrain.domId : '';
}, },
title() { 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.JumpStop = false;
this.RunLevel = false; this.RunLevel = false;
this.DetainTrain = 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.radio1 = '1';
this.radio = '01'; this.radio = '01';
this.DetainTrain = true; this.DetainTrain = true;
return '扣车'; } else if (data == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.radio1 = '2'; this.radio1 = '2';
this.radio = '01'; this.radio = '01';
this.DetainTrain = true; this.DetainTrain = true;
return '取消扣车'; } else if (data == OperationEvent.StationStand.setJumpStop.menu.operation) {
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.JumpStop = true; this.JumpStop = true;
this.radio1 = '1' this.radio1 = '1';
return '设置跳停'; } else if (data == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
this.JumpStop = true; this.JumpStop = true;
this.radio1 = '2'; this.radio1 = '2';
return '取消跳停'; } else if (data == OperationEvent.StationStand.setStopTime.menu.operation) {
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
this.RunLevel = true; this.RunLevel = true;
this.radio2 = '1'; this.radio2 = '1';
return '设置停站时间'; } else if (data == OperationEvent.StationStand.setRunLevel.menu.operation) {
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
this.RunLevel = true; this.RunLevel = true;
this.radio2 = '2'; this.radio2 = '2';
return '设置站间运行等级';
} }
}, }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, selected, tempDate = null) { doShow(operate, selected, tempDate = null) {
@ -289,7 +392,7 @@
} }
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.direction == '01' ? '下行' : '上行'; this.standName = selected.direction == '01' ? '下行' : '上行';
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -313,54 +416,55 @@
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.operation = '';
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
choose(upDown) { choose(upDown) {
// code // code
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation, operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation,
val: `${upDown}`, val: `${upDown}`
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}) });
}, },
handleTrainNoBlur() { // handleTrainNoBlur() { //
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation, operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation,
val: `${this.tripNumber}`, val: `${this.tripNumber}`
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}) });
}, },
trainNoSelectChange(upDown) { // trainNoSelectChange(upDown) { //
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation, operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation,
val: `${upDown}`, val: `${upDown}`
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}) });
}, },
chooseJumpStop(upDown) { chooseJumpStop(upDown) {
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: '', operation: '',
val: `${upDown}`, val: `${upDown}`
} };
if (this.radio1 == '1') { // if (this.radio1 == '1') { //
operate.operation = OperationEvent.StationStand.setJumpStop.select.operation; operate.operation = OperationEvent.StationStand.setJumpStop.select.operation;
} else { // } else { //
@ -371,14 +475,14 @@
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}) });
}, },
chooseEffective(effective) { chooseEffective(effective) {
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: '', operation: '',
val: `${effective}` val: `${effective}`
} };
if (this.radio2 == '1') { // if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation; operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation;
} else { // } else { //
@ -389,14 +493,14 @@
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}) });
}, },
chooseStopTime(upDown) { chooseStopTime(upDown) {
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: '', operation: '',
val: `${upDown}`, val: `${upDown}`
} };
if (this.radio2 == '1') { // if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation; operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation;
} else { // } else { //
@ -407,33 +511,33 @@
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}) });
}, },
stopTimeBlur() { stopTimeBlur() {
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.input.operation, operation: OperationEvent.StationStand.setStopTime.input.operation,
val: `${this.trainStopTime}`, val: `${this.trainStopTime}`
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}) });
}, },
trainNoSelectLevel(upDown) { trainNoSelectLevel(upDown) {
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation, operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation,
val: `${upDown}`, val: `${upDown}`
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}) });
}, },
commit() { commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) { if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
@ -450,13 +554,13 @@
this.setRunLevel(); /** 设置站间运行等级*/ this.setRunLevel(); /** 设置站间运行等级*/
} }
}, },
// //
setDetainTrain() { setDetainTrain() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation, operation: OperationEvent.StationStand.setDetainTrain.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -465,26 +569,25 @@
if (!valid) { if (!valid) {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
cancelDetainTrain() { cancelDetainTrain() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
val: '', };
}
if (this.radio == '02') { if (this.radio == '02') {
operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation; operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
operate.val = '02'; operate['val'] = '02';
} else if (this.radio == '03'){ } else if (this.radio == '03') {
operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation; operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
operate.val = '01'; operate['val'] = '01';
} }
this.loading = true; this.loading = true;
@ -494,11 +597,11 @@
if (!valid) { if (!valid) {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
setJumpStop() { setJumpStop() {
@ -506,12 +609,12 @@
if (this.radio == '02') { if (this.radio == '02') {
val = this.radio + '::' + this.tripNumber; val = this.radio + '::' + this.tripNumber;
} }
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setJumpStop.menu.operation, operation: OperationEvent.StationStand.setJumpStop.menu.operation,
val: val, val: val
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -519,11 +622,11 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
cancelJumpStop() { cancelJumpStop() {
@ -531,12 +634,12 @@
if (this.radio == '02') { if (this.radio == '02') {
val = this.radio + '::' + this.tripNumber; val = this.radio + '::' + this.tripNumber;
} }
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
val: val //, 01: /02: val: val // , 01: /02:
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -544,21 +647,21 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
setStopTime() { setStopTime() {
let forver = this.effective == '02' ? true : false; const forver = this.effective == '02';
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.menu.operation, operation: OperationEvent.StationStand.setStopTime.menu.operation,
val: [`${this.radio}`, this.trainStopTime, forver].join('::'), val: [`${this.radio}`, this.trainStopTime, forver].join('::')
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -566,24 +669,26 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
}) });
}, },
// //
setRunLevel() { setRunLevel() {
let forver = this.effective == '02' ? true : false; const forver = this.effective == '02';
let val = this.radio; let val = this.radio;
if (this.radio == '02') { if (this.radio == '02') {
val = `${this.radio}::${this.trainRunlevel}::${forver}`; val = `${this.radio}::${this.trainRunlevel}::${forver}`;
} else {
val = `${this.radio}::01::${forver}`;
} }
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.menu.operation, operation: OperationEvent.StationStand.setRunLevel.menu.operation,
val: val, val: val
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -591,28 +696,28 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
}) });
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.loading = false; this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
} };
</script> </script>
<style> <style>
.stand-detain-train .context { .stand-detain-train .context {

View File

@ -1,16 +1,25 @@
<template> <template>
<el-dialog class="chengdou-03__systerm switch-control" :title="title" :visible.sync="show" width="300px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
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-row class="header">
<el-col :span="11"><span>车站名称</span></el-col> <el-col :span="11"><span>车站名称</span></el-col>
<el-col :span="11" :offset="2"><span>道岔</span></el-col> <el-col :span="11" :offset="2"><span>道岔</span></el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <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>
<el-col :span="11" :offset="2"> <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-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -21,22 +30,22 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="toSwitchControl"></password-box> <password-box ref="passwordBox" @checkOver="doClose" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PasswordBox from './childDialog/passwordInputBox'; import PasswordBox from './childDialog/passwordInputBox';
export default { export default {
name: 'SwitchControl', name: 'SwitchControl',
components: { components: {
NoticeInfo, NoticeInfo,
PasswordBox, PasswordBox
}, },
data() { data() {
return { return {
@ -45,8 +54,8 @@
selected: null, selected: null,
operation: '', operation: '',
stationName: '', stationName: '',
switchName: '', switchName: ''
} };
}, },
computed: { computed: {
show() { show() {
@ -82,12 +91,13 @@
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) { } else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
return '道岔解封'; return '道岔解封';
} }
return '';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, selected) { doShow(operate, selected) {
@ -96,8 +106,8 @@
this.switchName = ''; this.switchName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name this.switchName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -116,48 +126,39 @@
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
commit() { commit() {
//debugger; // debugger;
if (this.operation == OperationEvent.Switch.lock.menu.operation) { if (this.operation == OperationEvent.Switch.lock.menu.operation) {
/** 道岔单锁*/ /** 道岔单锁*/
this.lock(); this.lock();
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) { } else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/* 道岔解锁*/ /* 道岔解锁*/
this.unlock(); this.unlock();
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
/** 道岔转动*/
this.turnout(this.operation);
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) { } else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
/** 道岔强扳*/ /** 道岔强扳*/
this.turnoutForce(); 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) { } else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
/*单操到正位*/ /* 单操到正位*/
this.locate(); this.locate();
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) { } else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
/*单操到反位*/ /* 单操到反位*/
this.reverse(); this.reverse();
} else if (this.operation == OperationEvent.Switch.block.menu.operation) { } 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) { } 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) { } else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/*区故解*/ /* 区故解*/
this.openPasswordBox(this.operation); this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation);
} }
}, },
// //
lock() { lock() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.lock.menu.operation, operation: OperationEvent.Switch.lock.menu.operation
}; };
this.loading = true; this.loading = true;
@ -166,18 +167,18 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
unlock() { unlock() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.unlock.menu.operation, operation: OperationEvent.Switch.unlock.menu.operation
}; };
this.loading = true; this.loading = true;
@ -186,19 +187,19 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
block() { block() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.block.menu.operation, operation: OperationEvent.Switch.block.menu.operation
}; };
this.loading = true; this.loading = true;
@ -207,18 +208,18 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
unblock() { unblock() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.unblock.menu.operation, operation: OperationEvent.Switch.unblock.menu.operation
}; };
this.loading = true; this.loading = true;
@ -227,76 +228,18 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
turnout(operation) {
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() { turnoutForce() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.turnoutForce.menu.operation, operation: OperationEvent.Switch.turnoutForce.menu.operation
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
split() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.split.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
active() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.active.menu.operation,
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -304,18 +247,18 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
locate() { locate() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.locate.menu.operation, operation: OperationEvent.Switch.locate.menu.operation
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -323,18 +266,18 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
reverse() { reverse() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.reverse.menu.operation, operation: OperationEvent.Switch.reverse.menu.operation
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -342,18 +285,18 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
fault() { fault() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.fault.menu.operation, operation: OperationEvent.Switch.fault.menu.operation
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -361,17 +304,18 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
openPasswordBox(operation) { openPasswordBox(operation, code) {
let operate = { const operate = {
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: operation, operation: operation,
operateCode: code
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -381,13 +325,13 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate); this.$refs.passwordBox.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
toSwitchControl(operation) { toSwitchControl(operation) {
if (operation === OperationEvent.Switch.fault.menu.operation) { if (operation === OperationEvent.Switch.fault.menu.operation) {
this.fault(); this.fault();
@ -398,19 +342,19 @@
} }
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
} };
</script> </script>

View File

@ -5,6 +5,7 @@
<template v-show="isShowBar"> <template v-show="isShowBar">
<menu-bar ref="menuBar" :selected="selected" /> <menu-bar ref="menuBar" :selected="selected" />
</template> </template>
<menu-button ref="menuButton" />
<menu-station-control ref="menuStationControl" :selected="selected" /> <menu-station-control ref="menuStationControl" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-switch ref="menuSwitch" :selected="selected" />
@ -12,7 +13,7 @@
<menu-section ref="menuSection" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" /> <!-- <menu-limit ref="menuLimit" :selected="selected" /> -->
<passive-alarm ref="passiveAlarm" /> <passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" /> <passive-contorl ref="passiveControl" />
<passive-Timeout ref="passiveTimeout" /> <passive-Timeout ref="passiveTimeout" />
@ -24,6 +25,7 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel'; import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal'; import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationControl from './menuStationControl'; import MenuStationControl from './menuStationControl';
import MenuStationStand from './menuStationStand'; import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch'; import MenuSwitch from './menuSwitch';
@ -31,7 +33,7 @@ import MenuSection from './menuSection';
import MenuTrain from './menuTrain'; import MenuTrain from './menuTrain';
import MenuStation from './menuStation'; import MenuStation from './menuStation';
import MenuBar from './menuBar'; import MenuBar from './menuBar';
import MenuLimit from './menuLimit'; // import MenuLimit from './menuLimit';
import PassiveAlarm from './passiveDialog/alarm'; import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from './passiveDialog/control'; import PassiveContorl from './passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout'; import PassiveTimeout from './passiveDialog/timeout';
@ -40,6 +42,7 @@ export default {
name: 'Menus', name: 'Menus',
components: { components: {
MenuBar, MenuBar,
MenuButton,
MenuCancel, MenuCancel,
MenuSignal, MenuSignal,
MenuSwitch, MenuSwitch,
@ -48,7 +51,7 @@ export default {
MenuStationStand, MenuStationStand,
MenuStation, MenuStation,
MenuTrain, MenuTrain,
MenuLimit, // MenuLimit,
PassiveAlarm, PassiveAlarm,
PassiveContorl, PassiveContorl,
PassiveTimeout PassiveTimeout

View File

@ -8,13 +8,7 @@
</li> </li>
</template> </template>
<template v-else> <template v-else>
<li <li v-if="handleShow(item)" :id="getDomId(item)" :key="i" class="nav-li" @click.stop="selectedClassA(item, i)">
v-if="handleShow(item)"
:id="getDomId(item)"
:key="i"
class="nav-li"
@click.stop="selectedClassA(item, i)"
>
<span class="nav-li-text">{{ item.title }}</span> <span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}"> <ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children"> <template v-for="(child,j) in item.children">
@ -23,13 +17,7 @@
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
<span class="separator">&ensp;</span> <span class="separator">&ensp;</span>
</li> </li>
<li <li v-else :id="getDomId(child)" :key="j" class="menu-li" @click.stop="selectedClassB(child, j)">
v-else
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="selectedClassB(child, j)"
>
<div class="menu-li-block"> <div class="menu-li-block">
<span class="menu-li-text"> <span class="menu-li-text">
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
@ -42,13 +30,7 @@
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
<span class="separator">&ensp;</span> <span class="separator">&ensp;</span>
</li> </li>
<li <li v-else-if="grandchild.show" :id="getDomId(grandchild)" :key="k" class="menu-li" @click.stop="hookClick(grandchild)">
v-else-if="grandchild.show"
:id="getDomId(grandchild)"
:key="k"
class="menu-li"
@click.stop="hookClick(grandchild)"
>
<div class="menu-li-block"> <div class="menu-li-block">
<span class="menu-li-text"> <span class="menu-li-text">
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
@ -65,13 +47,7 @@
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
<span class="separator">&ensp;</span> <span class="separator">&ensp;</span>
</li> </li>
<li <li v-else-if="child.show" :id="getDomId(child)" :key="j" class="menu-li" @click.stop="hookClick(child)">
v-else-if="child.show"
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="hookClick(child)"
>
<div class="menu-li-block"> <div class="menu-li-block">
<span class="menu-li-text"> <span class="menu-li-text">
<span class="status">&ensp;</span> <span class="status">&ensp;</span>
@ -812,7 +788,7 @@ export default {
this.clickEvent(); this.clickEvent();
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: item.operate.operation operation: item.operate
}; };
this.tempClassA = index; this.tempClassA = index;
this.tempClassB = -1; this.tempClassB = -1;
@ -834,7 +810,7 @@ export default {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null }); this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: item.operate.operation operation: item.operate
}; };
this.tempClassB = index; this.tempClassB = index;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -850,151 +826,11 @@ export default {
this.closeMenu(true); this.closeMenu(true);
} }
}, },
//
turnToStationControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
mandatoryStationControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate);
}
});
},
//
conterStationControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
setTrainIdDisplay(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewTrainId.doShow(operate);
}
});
},
//
setNameDisplay(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewName.doShow(operate);
}
});
},
//
setDeviceDisplay(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewDevice.doShow(operate);
}
});
},
//
addPlanTrain(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAdd.doShow(operate);
}
});
},
//
translatPlanTrain(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainTranstalet.doShow(operate);
}
});
},
//
delPlanTrain(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(operate);
}
});
},
//
userManage(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.manageUser.doShow(operate);
}
});
},
// //
about(order) { about(order) {
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operate
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -1021,7 +857,7 @@ export default {
setLimitSpeed(order) { setLimitSpeed(order) {
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operate
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -1034,7 +870,7 @@ export default {
cancleLimitSpeed(order) { cancleLimitSpeed(order) {
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operate
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {

View 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>

View File

@ -20,7 +20,6 @@ export default {
data() { data() {
return { return {
menu: [], menu: [],
menuNormal: [],
menuScreen: [ menuScreen: [
{ {
label: '放大地图', label: '放大地图',
@ -53,12 +52,6 @@ export default {
} }
}, },
watch: { watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
if (!this.isScreen && this.menu && this.menu.length > 1) {
// this.menu[0].disabled = (this.menu[0] && val) ? true : true;
// this.menu[1].disabled = !((this.menu[1] && val));
}
},
'$store.state.menuOperation.menuCount': function (val) { '$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) { if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition); this.doShow(this.$store.state.menuOperation.menuPosition);
@ -75,41 +68,9 @@ export default {
}; };
}, },
initMenu() { initMenu() {
this.menuNormal = [];
// this.stationList.forEach(station => {
// if (station.code === station.concentrateStationCode) {
// let node = {
// label: station.name,
// children: []
// }
//
// this.stationList.forEach(elem => {
// if (elem.visible) {
// let next = elem;
// while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
// next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
// }
//
// if (station.code == next.code) {
// node.children.push({
// code: elem.code,
// label: elem.name,
// handler: this.mapLocation,
// });
// }
// }
// })
//
// this.menuNormal.push(node);
// }
// });
if (this.isScreen) { if (this.isScreen) {
this.menu = [...this.menuScreen]; this.menu = [...this.menuScreen];
} }
// else {
// this.menu = [...this.menuNormal];
// }
}, },
doShow(point) { doShow(point) {
this.clickEvent(); this.clickEvent();
@ -123,13 +84,6 @@ export default {
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
// //
magnifyMap() { magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount'); this.$store.dispatch('menuOperation/handleMagnifyCount');

View File

@ -1,10 +1,15 @@
<template> <template>
<el-dialog <el-dialog
class="chengdou-03__systerm view-train-id" v-dialogDrag
title="列车识别号显示设置" :visible.sync="show" width="420px" class="chengdou-03__systerm view-train-id"
title="列车识别号显示设置"
:visible.sync="show"
width="420px"
:before-close="doClose" :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;"> <div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span> <span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode"> <el-radio-group v-model="planMode">
@ -51,7 +56,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<span class="base-label">字体大小</span> <span class="base-label">字体大小</span>
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"/> <el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col> </el-col>
<el-col :span="10" :offset="1"> <el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span> <span style="height:32px; line-height:32px;">范围16-99</span>
@ -66,7 +71,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"/> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
@ -87,8 +92,8 @@ export default {
operation: '', operation: '',
planMode: 5, planMode: 5,
headMode: 5, headMode: 5,
fontSize: 16, fontSize: 16
} };
}, },
computed: { computed: {
show() { show() {

View File

@ -1,28 +1,30 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
<cancel-all-limit ref="cancelAllLimit"></cancel-all-limit> <cancel-all-limit ref="cancelAllLimit" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import CancelAllLimit from './dialog/cancelAllLimit'; import CancelAllLimit from './dialog/cancelAllLimit';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'MenuLimit', name: 'MenuLimit',
components: { components: {
PopMenu, PopMenu,
CancelAllLimit, CancelAllLimit
}, },
props: { props: {
selected: { selected: {
type: Object type: Object,
default() {
return null;
}
} }
}, },
data() { data() {
@ -50,17 +52,8 @@
auth: { station: false, center: true } 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: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
@ -71,17 +64,26 @@
'buttonOperation' 'buttonOperation'
]) ])
}, },
methods: { watch: {
clickEvent() { '$store.state.menuOperation.menuCount': function (val) {
let self = this; if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
window.onclick = function (e) { this.doShow(this.$store.state.menuOperation.menuPosition);
self.doClose(); } else {
this.doClose();
}
} }
}, },
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() { initMenu() {
// //
if (this.operatemode === OperateMode.ADMIN) { if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu] this.menu = [...this.menu];
} }
}, },
doShow(point) { doShow(point) {
@ -96,9 +98,9 @@
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
// //
cancelSpeed() { cancelSpeed() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -112,7 +114,7 @@
this.$refs.cancelAllLimit.doShow(operate, this.selected); this.$refs.cancelAllLimit.doShow(operate, this.selected);
} }
}); });
},
} }
} }
};
</script> </script>

View File

@ -1,46 +1,40 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl"></section-control> <section-control ref="sectionControl" />
<section-cmd-control ref="sectionCmdControl"></section-cmd-control> <train-create ref="trainCreate" />
<speed-cmd-control ref="speedCmdControl"></speed-cmd-control> <section-detail ref="sectionDetail" />
<train-create ref="trainCreate"></train-create> <notice-info ref="noticeInfo" />
<alxe-effective ref="alxeEffective"></alxe-effective>
<section-detail ref="sectionDetail"></section-detail>
<notice-info ref="noticeInfo"></notice-info>
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl'; import SectionControl from './dialog/sectionControl';
import SectionCmdControl from './dialog/sectionCmdControl'; import SectionDetail from './dialog/sectionDetail';
import SectionDetail from './dialog/sectionDetail'; import TrainCreate from './dialog/trainCreate';
import SpeedCmdControl from './dialog/speedCmdControl'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import TrainCreate from './dialog/trainCreate'; import { mapGetters } from 'vuex';
import AlxeEffective from './dialog/alxeEffective'; import { OperateMode } from '@/scripts/ConstDic';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo' import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { mouseCancelState } from './utils/menuItemStatus';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
components: { components: {
PopMenu, PopMenu,
SectionControl, SectionControl,
SectionCmdControl,
SectionDetail, SectionDetail,
SpeedCmdControl,
TrainCreate, TrainCreate,
AlxeEffective,
NoticeInfo NoticeInfo
}, },
props: { props: {
selected: { selected: {
type: Object type: Object,
default: () => {
return null;
}
} }
}, },
data() { data() {
@ -48,66 +42,12 @@
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [ 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: '', // label: '',
// handler: this.active, // handler: this.fault,
// disabledCallback: MenuDisabledState.Section.active, // disabledCallback: MenuDisabledState.Section.fault,
// auth: { station: true, center: false } // 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: [ central: [
{ {
@ -116,12 +56,18 @@
disabledCallback: MenuDisabledState.Section.fault, disabledCallback: MenuDisabledState.Section.fault,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{
label: '设置临时限速',
handler: this.setSpeed,
disabledCallback: MenuDisabledState.Section.setSpeed,
auth: { station: false, center: true }
},
{ {
label: '属性', label: '属性',
handler: this.detail, handler: this.detail,
disabledCallback: MenuDisabledState.Section.setSpeed, disabledCallback: MenuDisabledState.Section.setSpeed,
auth: { station: false, center: true } auth: { station: false, center: true }
}, }
] ]
}, },
menuTrain: [ menuTrain: [
@ -129,25 +75,26 @@
label: '新建列车', label: '新建列车',
handler: this.newTrain, handler: this.newTrain,
disabledCallback: MenuDisabledState.Section.newTrain disabledCallback: MenuDisabledState.Section.newTrain
}, }
], ],
menuForce: [ menuForce: [
{ {
label: '设置计轴失效', label: '设置计轴失效',
handler: this.alxeFailure, handler: this.alxeFailure,
disabledCallback: MenuDisabledState.Section.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: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
@ -158,23 +105,32 @@
'buttonOperation' 'buttonOperation'
]) ])
}, },
methods: { watch: {
clickEvent() { '$store.state.menuOperation.menuCount': function (val) {
let self = this; if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
window.onclick = function (e) { this.doShow(this.$store.state.menuOperation.menuPosition);
self.doClose(); } else {
this.doClose();
}
} }
}, },
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() { initMenu() {
// //
this.menu = menuFiltration(this.menuNormal); this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) { if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain] this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
} }
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce this.menu = this.menuForce;
} }
this.menu = menuConvert(this.menu); this.menu = menuConvert(this.menu);
@ -191,9 +147,9 @@
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
// //
alxeFailure() { alxeFailure() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -209,13 +165,13 @@
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
newTrain() { newTrain() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
@ -227,11 +183,11 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreate.doShow(operate, this.selected); this.$refs.trainCreate.doShow(operate, this.selected);
} }
}) });
}, },
// //
fault() { fault() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
@ -247,7 +203,7 @@
}); });
}, },
detail() { detail() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
@ -259,7 +215,63 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionDetail.doShow(operate, this.selected); this.$refs.sectionDetail.doShow(operate, this.selected);
} }
}) });
},
//
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() { undeveloped() {
this.doClose(); this.doClose();
@ -268,136 +280,7 @@
callback: action => { 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> </script>

View File

@ -1,28 +1,28 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection"></route-selection> <route-selection ref="routeSelection" />
<route-control ref="routeControl"></route-control> <route-control ref="routeControl" />
<route-detail ref="routeDetail"></route-detail> <route-detail ref="routeDetail" />
<route-guide ref="routeGuide"></route-guide> <route-guide ref="routeGuide" />
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import RouteControl from './dialog/routeControl'; import RouteControl from './dialog/routeControl';
import RouteSelection from './dialog/routeSelection'; import RouteSelection from './dialog/routeSelection';
import RouteDetail from './dialog/routeDetail'; import RouteDetail from './dialog/routeDetail';
import RouteGuide from './dialog/routeGuide'; import RouteGuide from './dialog/routeGuide';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo' import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus'; import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'SignalMenu', name: 'SignalMenu',
components: { components: {
PopMenu, PopMenu,
@ -34,7 +34,10 @@
}, },
props: { props: {
selected: { selected: {
type: Object type: Object,
default: () => {
return null;
}
} }
}, },
data() { data() {
@ -46,161 +49,125 @@
label: '办理进路', label: '办理进路',
handler: this.arrangementRoute, handler: this.arrangementRoute,
disabledCallback: MenuDisabledState.Signal.arrangementRoute, disabledCallback: MenuDisabledState.Signal.arrangementRoute,
auth: { station: true, center: false }, auth: { station: true, center: false }
}, },
{ {
label: '办理引导进路', label: '办理引导进路',
handler: this.guide, handler: this.guide,
disabledCallback: MenuDisabledState.Signal.guide, disabledCallback: MenuDisabledState.Signal.guide,
auth: { station: true, center: false }, auth: { station: true, center: false }
}, },
{ {
label: '取消进路', label: '取消进路',
handler: this.cancelTrainRoute, handler: this.cancelTrainRoute,
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute, disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
auth: { station: true, center: false }, auth: { station: true, center: false }
}, },
{ {
label: '总人解', label: '总人解', //
handler: this.humanTrainRoute, handler: this.humanTrainRoute,
disabledCallback: MenuDisabledState.Signal.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 },
},
{
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.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: '进路收人工控', label: '进路收人工控',
handler: this.humanControl, handler: this.humanControl,
disabledCallback: MenuDisabledState.Signal.humanControl, disabledCallback: MenuDisabledState.Signal.humanControl,
auth: { station: false, center: true }, auth: { station: false, center: true }
}, },
{ {
label: '进路交自动控', label: '进路交自动控',
handler: this.atsAutoControl, handler: this.atsAutoControl,
disabledCallback: MenuDisabledState.Signal.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 },
} }
// {
// 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: [ central: [
{ {
label: '办理进路', label: '办理进路',
handler: this.arrangementRoute, handler: this.arrangementRoute,
disabledCallback: MenuDisabledState.Signal.arrangementRoute, disabledCallback: MenuDisabledState.Signal.arrangementRoute,
auth: { station: true, center: false }, auth: { station: true, center: false }
}, },
{ {
label: '办理引导进路', label: '办理引导进路',
handler: this.guide, handler: this.guide,
disabledCallback: MenuDisabledState.Signal.guide, disabledCallback: MenuDisabledState.Signal.guide,
auth: { station: true, center: false }, auth: { station: true, center: false }
}, },
{ {
label: '取消进路', label: '取消进路',
handler: this.cancelTrainRoute, handler: this.cancelTrainRoute,
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute, disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
auth: { station: true, center: false }, auth: { station: true, center: false }
}, },
{ {
label: '总人解', label: '总人解',
handler: this.humanTrainRoute, handler: this.humanTrainRoute,
disabledCallback: MenuDisabledState.Signal.humanTrainRoute, disabledCallback: MenuDisabledState.Signal.humanTrainRoute,
auth: { station: true, center: false }, auth: { station: true, center: false }
}, },
{ {
label: '信号重开', label: '信号重开',
handler: this.reopenSignal, handler: this.reopenSignal,
disabledCallback: MenuDisabledState.Signal.reopenSignal, disabledCallback: MenuDisabledState.Signal.reopenSignal,
auth: { station: true, center: false }, auth: { station: true, center: false }
}, },
{ {
label: '信号封锁', label: '信号封锁',
handler: this.lock, handler: this.lock,
disabledCallback: MenuDisabledState.Signal.lock, disabledCallback: MenuDisabledState.Signal.lock,
auth: { station: true, center: false }, auth: { station: true, center: false }
}, },
{ {
label: '信号解封', label: '信号解封',
handler: this.unlock, handler: this.unlock,
disabledCallback: MenuDisabledState.Signal.unlock, disabledCallback: MenuDisabledState.Signal.unlock,
auth: { station: true, center: false }, auth: { station: true, center: false }
}, },
{ {
label: '进路收人工控', label: '进路收人工控',
handler: this.humanControl, handler: this.humanControl,
disabledCallback: MenuDisabledState.Signal.humanControl, disabledCallback: MenuDisabledState.Signal.humanControl,
auth: { station: false, center: true }, auth: { station: false, center: true }
}, },
{ {
label: '进路交自动控', label: '进路交自动控',
handler: this.atsAutoControl, handler: this.atsAutoControl,
disabledCallback: MenuDisabledState.Signal.atsAutoControl, disabledCallback: MenuDisabledState.Signal.atsAutoControl,
auth: { station: false, center: true }, auth: { station: false, center: true }
}, },
{ {
label: '查询进路控制状态', label: '查询进路控制状态',
handler: this.detail, handler: this.detail,
disabledCallback: MenuDisabledState.Signal.detail, disabledCallback: MenuDisabledState.Signal.detail,
auth: { station: true, center: true }, auth: { station: true, center: true }
} }
], ]
}, },
menuForce: [ menuForce: [
{ {
label: '信号关灯', label: '信号关灯',
handler: this.signalClose, handler: this.signalClose,
disabledCallback: '', disabledCallback: ''
}, },
{ {
label: '设置故障', label: '设置故障',
@ -213,16 +180,7 @@
disabledCallback: MenuDisabledState.Signal.cancelStoppage 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: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
@ -233,23 +191,32 @@
'buttonOperation' 'buttonOperation'
]) ])
}, },
methods: { watch: {
clickEvent() { '$store.state.menuOperation.menuCount': function (val) {
let self = this; if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
window.onclick = function (e) { this.doShow(this.$store.state.menuOperation.menuPosition);
self.doClose(); } else {
this.doClose();
}
} }
}, },
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() { initMenu() {
// //
this.menu = menuFiltration(this.menuNormal); this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) { if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce] this.menu = [...this.menu, ...this.menuForce];
} }
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce this.menu = this.menuForce;
} }
this.menu = menuConvert(this.menu); this.menu = menuConvert(this.menu);
@ -267,9 +234,27 @@
this.$refs.popMenu.close(); 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() { setStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -285,13 +270,13 @@
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
cancelStoppage() { cancelStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -307,20 +292,20 @@
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
arrangementRoute() { arrangementRoute() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label, label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.arrangementRoute.menu.operation operation: OperationEvent.Signal.arrangementRoute.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -331,13 +316,13 @@
} }
this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData); this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
guide() { guide() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -356,9 +341,9 @@
} }
}); });
}, },
// //
cancelTrainRoute() { cancelTrainRoute() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
@ -372,9 +357,9 @@
} }
}); });
}, },
// //
humanTrainRoute() { humanTrainRoute() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
@ -388,9 +373,9 @@
} }
}); });
}, },
// //
reopenSignal() { reopenSignal() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
@ -404,9 +389,9 @@
} }
}); });
}, },
// //
lock() { lock() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
@ -419,13 +404,13 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected); this.$refs.routeControl.doShow(operate, this.selected);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
unlock() { unlock() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
@ -439,9 +424,9 @@
} }
}); });
}, },
// //
humanControl() { humanControl() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -460,9 +445,9 @@
} }
}); });
}, },
// //
atsAutoControl() { atsAutoControl() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, 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() { detail() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -579,5 +484,5 @@
}); });
} }
} }
} };
</script> </script>

View File

@ -1,20 +1,20 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo' import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus'; import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'StationMenu', name: 'StationMenu',
components: { components: {
PopMenu, PopMenu,
@ -22,7 +22,10 @@
}, },
props: { props: {
selected: { selected: {
type: Object type: Object,
default: () => {
return null;
}
} }
}, },
data() { data() {
@ -32,7 +35,7 @@
local: [ local: [
], ],
central: [ central: [
], ]
}, },
menuForce: [ menuForce: [
{ {
@ -46,16 +49,7 @@
disabledCallback: MenuDisabledState.Station.cancelStoppage disabledCallback: MenuDisabledState.Station.cancelStoppage
} }
] ]
} };
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
}, },
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
@ -66,27 +60,36 @@
'buttonOperation' '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: { methods: {
clickEvent() { clickEvent() {
let self = this; const self = this;
window.onclick = function (e) { window.onclick = function (e) {
self.doClose(); self.doClose();
} };
}, },
initMenu() { initMenu() {
this.menu = []; this.menu = [];
if (this.selected.concentrateStationCode == this.selected.code) { if (this.selected.concentrateStationCode == this.selected.code) {
// //
this.menu = menuFiltration(this.menuNormal); this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) { if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce] this.menu = [...this.menu, ...this.menuForce];
} }
} }
if (this.selected.centralized) { if (this.selected.centralized) {
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce] this.menu = [...this.menuForce];
} }
} }
@ -104,9 +107,9 @@
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
// //
setStoppage() { setStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -122,13 +125,13 @@
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
cancelStoppage() { cancelStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -144,10 +147,10 @@
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}
} }
} }
};
</script> </script>

View File

@ -1,25 +1,25 @@
<template> <template>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'StationControlMenu', name: 'StationControlMenu',
props: {
selected: {
type: Object
}
},
components: { components: {
PopMenu PopMenu
}, },
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() { data() {
return { return {
menu: [], menu: [],
@ -27,16 +27,7 @@
], ],
menuForce: [ 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: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
@ -47,12 +38,21 @@
'buttonOperation' '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: { methods: {
clickEvent() { clickEvent() {
let self = this; const self = this;
window.onclick = function (e) { window.onclick = function (e) {
self.doClose(); self.doClose();
} };
}, },
doShow(point) { doShow(point) {
if (this.$refs && this.$refs.popMenu) { if (this.$refs && this.$refs.popMenu) {
@ -65,5 +65,5 @@
} }
} }
} }
} };
</script> </script>

View File

@ -1,34 +1,37 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl"></stand-control> <stand-control ref="standControl" />
<stand-detail ref="standDetail"></stand-detail> <stand-detail ref="standDetail" />
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import StandControl from './dialog/standControl'; import StandControl from './dialog/standControl';
import StandDetail from './dialog/standDetail'; import StandDetail from './dialog/standDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus'; import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'StationStandMenu', name: 'StationStandMenu',
components: { components: {
PopMenu, PopMenu,
StandControl, StandControl,
StandDetail, StandDetail,
NoticeInfo, NoticeInfo
}, },
props: { props: {
selected: { selected: {
type: Object type: Object,
default: () => {
return null;
}
} }
}, },
data() { data() {
@ -36,47 +39,17 @@
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [ 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: '设置跳停', label: '设置跳停',
handler: this.setJumpStop, handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop, disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: true }, auth: { station: true, center: true }
}, },
{ {
label: '取消跳停', label: '取消跳停',
handler: this.cancelJumpStop, handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.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 },
},
{
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 },
} }
], ],
central: [ central: [
@ -84,43 +57,43 @@
label: '设置扣车', label: '设置扣车',
handler: this.setDetainTrain, handler: this.setDetainTrain,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain, disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: true }, auth: { station: true, center: true }
}, },
{ {
label: '取消扣车', label: '取消扣车',
handler: this.cancelDetainTrain, handler: this.cancelDetainTrain,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain, disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true }, auth: { station: true, center: true }
}, },
{ {
label: '设置跳停', label: '设置跳停',
handler: this.setJumpStop, handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop, disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: true }, auth: { station: true, center: true }
}, },
{ {
label: '取消跳停', label: '取消跳停',
handler: this.cancelJumpStop, handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop, disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true }, auth: { station: true, center: true }
}, },
{ {
label: '设置停站时间', label: '设置停站时间',
handler: this.setStopTime, handler: this.setStopTime,
disabledCallback: MenuDisabledState.StationStand.setStopTime, disabledCallback: MenuDisabledState.StationStand.setStopTime,
auth: { station: true, center: true }, auth: { station: true, center: true }
}, },
{ {
label: '设置站间运行等级', label: '设置站间运行等级',
handler: this.setRunLevel, handler: this.setRunLevel,
disabledCallback: MenuDisabledState.StationStand.setRunLevel, disabledCallback: MenuDisabledState.StationStand.setRunLevel,
auth: { station: true, center: true }, auth: { station: true, center: true }
}, },
{ {
label: '属性', label: '属性',
handler: this.detail, handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail, disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: true, center: true }, auth: { station: true, center: true }
} }
] ]
}, },
@ -136,7 +109,7 @@
disabledCallback: MenuDisabledState.StationStand.cancelStoppage disabledCallback: MenuDisabledState.StationStand.cancelStoppage
} }
] ]
} };
}, },
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
@ -158,21 +131,21 @@
}, },
methods: { methods: {
clickEvent() { clickEvent() {
let self = this; const self = this;
window.onclick = function (e) { window.onclick = function (e) {
self.doClose(); self.doClose();
} };
}, },
initMenu() { initMenu() {
// //
this.menu = menuFiltration(this.menuNormal); this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) { if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce] this.menu = [...this.menu, ...this.menuForce];
} }
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce this.menu = this.menuForce;
} }
this.menu = menuConvert(this.menu); this.menu = menuConvert(this.menu);
@ -189,9 +162,9 @@
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
// //
setStoppage() { setStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -207,13 +180,13 @@
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
cancelStoppage() { cancelStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -229,13 +202,13 @@
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
setDetainTrain() { setDetainTrain() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
@ -248,11 +221,11 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected); this.$refs.standControl.doShow(operate, this.selected);
} }
}) });
}, },
// //
cancelDetainTrain() { cancelDetainTrain() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
@ -264,11 +237,11 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected); this.$refs.standControl.doShow(operate, this.selected);
} }
}) });
}, },
// //
setJumpStop() { setJumpStop() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
@ -280,11 +253,11 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected); this.$refs.standControl.doShow(operate, this.selected);
} }
}) });
}, },
// //
cancelJumpStop() { cancelJumpStop() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
@ -296,11 +269,11 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected); this.$refs.standControl.doShow(operate, this.selected);
} }
}) });
}, },
// //
setStopTime() { setStopTime() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -317,13 +290,13 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected, tempDate); this.$refs.standControl.doShow(operate, this.selected, tempDate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
setRunLevel() { setRunLevel() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -340,13 +313,13 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected, tempDate); this.$refs.standControl.doShow(operate, this.selected, tempDate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
detail() { detail() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -363,10 +336,10 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetail.doShow(operate, this.selected, tempDate); this.$refs.standDetail.doShow(operate, this.selected, tempDate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}
} }
} }
};
</script> </script>

View File

@ -1,24 +1,24 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl"></section-control> <section-control ref="sectionControl" />
<switch-control ref="switchControl"></switch-control> <switch-control ref="switchControl" />
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl'; import SectionControl from './dialog/sectionControl';
import SwitchControl from './dialog/switchControl'; import SwitchControl from './dialog/switchControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus'; import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'SwitchMenu', name: 'SwitchMenu',
components: { components: {
PopMenu, PopMenu,
@ -28,7 +28,10 @@
}, },
props: { props: {
selected: { selected: {
type: Object type: Object,
default: () => {
return null;
}
} }
}, },
data() { data() {
@ -36,54 +39,42 @@
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [ local: [
{ // {
label: '单操到定位', // label: '',
handler: this.locate, // handler: this.locate,
disabledCallback: MenuDisabledState.Switch.locate, // disabledCallback: MenuDisabledState.Switch.locate,
auth: { station: true, center: true } // auth: { station: true, center: true }
}, // },
{ // {
label: '单操到反位', // label: '',
handler: this.reverse, // handler: this.reverse,
disabledCallback: MenuDisabledState.Switch.reverse, // disabledCallback: MenuDisabledState.Switch.reverse,
auth: { station: true, center: true } // auth: { station: true, center: true }
}, // },
{ // {
label: '道岔单锁', // label: '',
handler: this.lock, // handler: this.lock,
disabledCallback: MenuDisabledState.Switch.lock, // disabledCallback: MenuDisabledState.Switch.lock,
auth: { station: true, center: false } // auth: { station: true, center: false }
}, // },
{ // {
label: '道岔解锁', // label: '',
handler: this.unlock, // handler: this.unlock,
disabledCallback: MenuDisabledState.Switch.unlock, // disabledCallback: MenuDisabledState.Switch.unlock,
auth: { station: true, center: true } // auth: { station: true, center: true }
}, // },
{ // {
label: '道岔封锁', // label: '',
handler: this.block, // handler: this.block,
disabledCallback: MenuDisabledState.Switch.block, // disabledCallback: MenuDisabledState.Switch.block,
auth: { station: true, center: true } // auth: { station: true, center: true }
}, // },
{ // {
label: '道岔解封', // label: '',
handler: this.unblock, // handler: this.unblock,
disabledCallback: MenuDisabledState.Switch.unblock, // disabledCallback: MenuDisabledState.Switch.unblock,
auth: { station: true, center: true } // 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 }
},
], ],
central: [ central: [
{ {
@ -127,13 +118,13 @@
handler: this.fault, handler: this.fault,
disabledCallback: MenuDisabledState.Switch.fault, disabledCallback: MenuDisabledState.Switch.fault,
auth: { station: true, center: true } 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: [ 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: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
@ -174,23 +156,32 @@
'buttonOperation' 'buttonOperation'
]) ])
}, },
methods: { watch: {
clickEvent() { '$store.state.menuOperation.menuCount': function (val) {
let self = this; if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
window.onclick = function (e) { this.doShow(this.$store.state.menuOperation.menuPosition);
self.doClose(); } else {
this.doClose();
}
} }
}, },
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() { initMenu() {
// //
this.menu = menuFiltration(this.menuNormal); this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) { if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce] this.menu = [...this.menu, ...this.menuForce];
} }
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce this.menu = this.menuForce;
} }
this.menu = menuConvert(this.menu); this.menu = menuConvert(this.menu);
@ -207,9 +198,9 @@
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
// //
setStoppage() { setStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -225,13 +216,13 @@
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
cancelStoppage() { cancelStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -247,13 +238,13 @@
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
lock() { lock() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
@ -267,9 +258,9 @@
} }
}); });
}, },
// //
unlock() { unlock() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
@ -283,9 +274,9 @@
} }
}); });
}, },
// //
block() { block() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
@ -299,9 +290,9 @@
} }
}); });
}, },
// //
unblock() { unblock() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
@ -315,9 +306,9 @@
} }
}); });
}, },
// //
switchTurnoutForce() { switchTurnoutForce() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
@ -331,9 +322,9 @@
} }
}); });
}, },
// //
switchTurnout() { switchTurnout() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
@ -350,9 +341,9 @@
}); });
} }
}, },
// // /
fault() { fault() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
@ -366,9 +357,9 @@
} }
}); });
}, },
// //
cancelSpeed() { cancelSpeed() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
@ -378,16 +369,16 @@
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
let tempData = response.data; const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData); this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
} }
}); });
}, },
// //
split() { split() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
@ -401,9 +392,9 @@
} }
}); });
}, },
// //
active() { active() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
@ -417,9 +408,9 @@
} }
}); });
}, },
// //
locate() { locate() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
@ -433,9 +424,9 @@
} }
}); });
}, },
// //
reverse() { reverse() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
@ -458,5 +449,5 @@
}); });
} }
} }
} };
</script> </script>

View File

@ -1,34 +1,44 @@
<template> <template>
<div id="menuTool"> <div id="menuTool">
<div class="nav"> <div class="nav">
<div class="tool" v-for="(item,index) in tools" :key="index"> <div v-for="(item,index) in tools" :key="index" class="tool">
<img :src="item.src" :alt="item.title" /> <img :src="item.src" :alt="item.title">
</div> </div>
<img class="logo" :src="logoImg" /> <img class="logo" :src="logoImg">
<system-time class="time" v-if="isShowSystemTime" :time="time" :zoom="2" :width="180" :height="48" :fine="2" <system-time
:top="6"></system-time> v-if="isShowSystemTime"
class="time"
:time="time"
:zoom="2"
:width="180"
:height="48"
:fine="2"
:top="6"
/>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; // import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; // import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { OperateMode } from '@/scripts/ConstDic'; // import { OperateMode } from '@/scripts/ConstDic';
import { prefixIntrger } from '@/utils/date'; import { prefixIntrger } from '@/utils/date';
import SystemTime from '@/views/components/systemTime/index'; import SystemTime from '@/views/components/systemTime/index';
import logo_ from '@/assets/logo_.png'; import logo_ from '@/assets/logo_.png';
export default {
export default {
name: 'MenuTool', name: 'MenuTool',
props: {
selected: {
type: Object
}
},
components: { components: {
SystemTime SystemTime
}, },
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() { data() {
return { return {
logoImg: logo_, logoImg: logo_,
@ -38,100 +48,100 @@
title: '服务器1', title: '服务器1',
operate: '', operate: '',
src: logo_, src: logo_,
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '服务器2', title: '服务器2',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '前置机1', title: '前置机1',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '前置机2', title: '前置机2',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '主调', title: '主调',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '调度台1', title: '调度台1',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '调度台2', title: '调度台2',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '调度台3', title: '调度台3',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '大屏', title: '大屏',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '维护工作站', title: '维护工作站',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '运行图显示人工站', title: '运行图显示人工站',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '跳停', title: '跳停',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '扣车', title: '扣车',
operate: '', operate: '',
src: '', src: '',
click: this.undeveloped, click: this.undeveloped
}, },
{ {
title: '列车报警', title: '列车报警',
operate: '', operate: '',
src: logo_, 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: { computed: {
isShowSystemTime() { isShowSystemTime() {
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode; 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() { mounted() {
this.initTools(); this.initTools();
}, },
@ -140,10 +150,10 @@
this.tools = []; this.tools = [];
} }
} }
} };
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
$top: 30px; $top: 30px;
$width: 50px; $width: 50px;
@ -187,7 +197,6 @@
} }
} }
.time { .time {
position: relative; position: relative;
float: right; float: right;

View File

@ -3,9 +3,6 @@
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<train-control ref="trainControl" /> <train-control ref="trainControl" />
<train-delete ref="trainDelete" />
<train-move ref="trainMove" />
<train-switch ref="trainSwitch" />
<train-edit-number ref="trainEditNumber" /> <train-edit-number ref="trainEditNumber" />
<train-create-number ref="trainCreateNumber" /> <train-create-number ref="trainCreateNumber" />
<train-move-number ref="trainMoveNumber" /> <train-move-number ref="trainMoveNumber" />
@ -22,9 +19,9 @@ import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
import TrainControl from './dialog/trainControl'; import TrainControl from './dialog/trainControl';
import TrainDelete from './dialog/trainDelete'; // import TrainDelete from './dialog/trainDelete';
import TrainMove from './dialog/trainMove'; // import TrainMove from './dialog/trainMove';
import TrainSwitch from './dialog/trainSwitch'; // import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber'; import TrainEditNumber from './dialog/trainEditNumber';
import TrainMoveNumber from './dialog/trainMoveNumber'; import TrainMoveNumber from './dialog/trainMoveNumber';
import TrainCreateNumber from './dialog/trainCreateNumber'; import TrainCreateNumber from './dialog/trainCreateNumber';
@ -38,9 +35,6 @@ export default {
PopMenu, PopMenu,
NoticeInfo, NoticeInfo,
TrainControl, TrainControl,
TrainDelete,
TrainMove,
TrainSwitch,
TrainEditNumber, TrainEditNumber,
TrainMoveNumber, TrainMoveNumber,
TrainCreateNumber, TrainCreateNumber,
@ -195,7 +189,6 @@ export default {
doClose() { doClose() {
if (this.$refs && this.$refs.popMenu) { if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close(); this.$refs.popMenu.close();
// this.$store.dispatch('map/setTrainWindowShow', false);
} }
}, },
// //
@ -334,30 +327,6 @@ export default {
} }
}); });
}, },
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
//
addTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.addTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(operate, this.selected);
}
});
},
// //
createTrainNo() { createTrainNo() {
const operate = { const operate = {
@ -374,22 +343,6 @@ export default {
} }
}); });
}, },
//
delTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.delTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(operate, this.selected);
}
});
},
// //
deleteTrainNo() { deleteTrainNo() {
const operate = { const operate = {
@ -406,22 +359,6 @@ export default {
} }
}); });
}, },
//
editTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(operate, this.selected);
}
});
},
// //
editTrainNo() { editTrainNo() {
const operate = { const operate = {
@ -454,35 +391,11 @@ export default {
} }
}); });
}, },
// undeveloped() {
moveTrainId() { this.doClose();
const operate = { this.$alert('实现中......', '提示', {
start: true, confirmButtonText: '确定',
code: this.selected.code, callback: action => {
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.moveTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainMove.doShow(operate, this.selected);
}
});
},
//
switchTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.switchTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainSwitch.doShow(operate, this.selected);
} }
}); });
} }

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -77,6 +77,20 @@ export const MenuDisabledState = {
if (device && device.status == deviceState.Section.status.State13) { if (device && device.status == deviceState.Section.status.State13) {
return true; return true;
} }
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
} }
}, },
Signal: { Signal: {
@ -377,9 +391,6 @@ export const MenuDisabledState = {
// 单操到反位 // 单操到反位
reverse() { reverse() {
}, },
// 区故解
solution() {
},
// 属性 // 属性
property() { property() {
} }

View File

@ -27,7 +27,6 @@ export default {
importData(Sheet, JsonData) { importData(Sheet, JsonData) {
var dataList = convertSheetToList(Sheet, false); var dataList = convertSheetToList(Sheet, false);
var needList = Object.keys(this.ExcelConfig.columns); var needList = Object.keys(this.ExcelConfig.columns);
if (dataList && dataList.length) { if (dataList && dataList.length) {
for (var rowIndex = this.ExcelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) { for (var rowIndex = this.ExcelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) {
for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList[this.ExcelConfig.beginCol].length; colIndex += this.ExcelConfig.fieldNum + 1) { for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList[this.ExcelConfig.beginCol].length; colIndex += this.ExcelConfig.fieldNum + 1) {
@ -118,8 +117,9 @@ export default {
lastPoint = train.stationTimeList[idx - 1]; lastPoint = train.stationTimeList[idx - 1];
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber); num = this.computedReentryNumber(train.tripNumber);
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode]); const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode]); opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
} }
/** 如果是备用车,按车次添加线*/ /** 如果是备用车,按车次添加线*/

View File

@ -122,7 +122,6 @@
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { importRunPlan } from '@/api/runplan'; import { importRunPlan } from '@/api/runplan';
import { importData } from '../planConvert';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';

View File

@ -1,31 +1,40 @@
<template> <template>
<el-dialog class="chengdou-03__systerm notice-info" :title="title" :visible.sync="show" width="360px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> v-dialogDrag
<div class="context"> class="chengdou-03__systerm notice-info"
<template v-for="message in messages"> :title="title"
<span>{{message}}</span><br> :visible.sync="show"
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> </template>
</div> </span>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10" :offset="8"> <el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button> <el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col> </el-col>
</el-row> </el-row>
</span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'NoticeInfo', name: 'NoticeInfo',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
messages: ['命令下达失败'], messages: ['命令下达失败'],
operate: null operate: null
} };
}, },
computed: { computed: {
show() { show() {
@ -41,7 +50,7 @@
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, messages) { doShow(operate, messages) {
@ -66,7 +75,7 @@
this.doClose(); this.doClose();
} }
} }
} };
</script> </script>
<style> <style>

View File

@ -1,9 +1,19 @@
<template> <template>
<el-dialog class="chengdou-03__systerm confirm-control" :title="title" :visible.sync="show" width="360px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> v-dialogDrag
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"> <div class="context">
<template v-for="message in messages"> <template v-for="(message, index) in messages">
<span>{{message}}</span> <span :key="index">{{ message }}</span>
</template> </template>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -14,16 +24,19 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo' import NoticeInfo from './childDialog/noticeInfo';
export default { export default {
name: 'ConfirmTrain', name: 'ConfirmTrain',
components: {
NoticeInfo
},
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
@ -31,10 +44,7 @@
operate: {}, operate: {},
messages: '', messages: '',
operation: null operation: null
} };
},
components: {
NoticeInfo
}, },
computed: { computed: {
show() { show() {
@ -52,40 +62,40 @@
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) { } else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
return '交换列车识别号'; return '交换列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) { } else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return '修改车组号' return '修改车组号';
} }
return '';
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) { if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/ /** 添加列车识别号*/
return OperationEvent.Train.addTrainId.confirm.domId return OperationEvent.Train.addTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) { } else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/ /** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId return OperationEvent.Train.editTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) { } else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
/** 删除列车识别号*/ /** 删除列车识别号*/
return OperationEvent.Train.delTrainId.confirm.domId return OperationEvent.Train.delTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) { } else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
/** 移动列车识别号*/ /** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId return OperationEvent.Train.moveTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) { } else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
/** 交换列车识别号*/ /** 交换列车识别号*/
return OperationEvent.Train.switchTrainId.confirm.domId return OperationEvent.Train.switchTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) { } else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
/** 修改车组号*/ /** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId return OperationEvent.Train.editTrainNo.confirm.domId;
} }
return '';
} }
}, },
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate) { doShow(operate) {
@ -122,13 +132,13 @@
this.routeSetting(); this.routeSetting();
} }
}, },
// //
routeSetting() { routeSetting() {
let operate = { const operate = {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Train.addTrainId.confirm.operation, operation: OperationEvent.Train.addTrainId.confirm.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -136,28 +146,28 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
cancel() { cancel() {
let operate = { const operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
} };
</script> </script>
<style> <style>

View File

@ -1,32 +1,41 @@
<template> <template>
<el-dialog class="chengdou-03__systerm popup-alarm" :title="title" :visible.sync="show" width="500px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> v-dialogDrag
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-row>
<el-col :offset="2"> <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-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-button justify="center" class="button-group">
<el-col :span="10" :offset="8"> <el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button> <el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col> </el-col>
</el-row> </el-button>
</span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'Popup-Alarm', name: 'PopupAlarm',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
messages: [], messages: [],
operate: null, operate: null,
operation: '', operation: ''
} };
}, },
computed: { computed: {
show() { show() {
@ -42,7 +51,7 @@
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, messages) { doShow(operate, messages) {
@ -66,20 +75,20 @@
}, },
alxeEffective() { alxeEffective() {
let operate = { const operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation, operation: OperationEvent.Command.close.alarm.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose(); this.doClose();
} }
}) });
}
} }
} }
};
</script> </script>
<style> <style>

View File

@ -1,58 +1,72 @@
<template> <template>
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-row> class="chengdou-03__systerm route-setting"
: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="2"><span class="item-lable">车站</span></el-col>
<el-col :span="6"> <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>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col> <el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
<el-col :span="6"> <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-col>
</el-row>
<div class="route-table-box"> <div class="route-table-box">
<span class="route-table-tip">进路列表</span> <span class="route-table-tip">进路列表</span>
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" <el-table
@row-click="clickEvent" height="90" highlight-current-row> ref="table"
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px"> :data="tempData"
</el-table-column> border
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px"> :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"> <template slot-scope="scope">
{{ controlTypeNameMap[scope.row.controlType] }} {{ controlTypeNameMap[scope.row.controlType] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="controlType" label="进路描述" :id="domIdChoose" style="margin-left:30px"> <el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
<template slot-scope="scope"> <template></template>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<el-row justify="center" style="margin-top: 40px"> <el-row justify="center" style="margin-top: 40px">
<el-col :span="12" :offset="12"> <el-col :span="12" :offset="12">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">执行</el-button>
@click="commit">执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
<!-- <password ref="password"></password> --> <!-- <password ref="password"></password> -->
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl'; // import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
// import Password from './childDialog/childDialog/password'; // import Password from './childDialog/childDialog/password';
export default { export default {
name: 'RouteSelection', name: 'RouteSelection',
components: { components: {
ConfirmControl, // ConfirmControl,
NoticeInfo, NoticeInfo
// Password // Password
}, },
data() { data() {
@ -68,13 +82,13 @@
stationName: '', stationName: '',
signalName: '', signalName: '',
tableStyle: { tableStyle: {
'border-bottom': 'none', 'border-bottom': 'none'
}, },
controlTypeNameMap: { controlTypeNameMap: {
'01': '折返', '01': '折返',
'02': '直通', '02': '直通'
}
} }
};
}, },
computed: { computed: {
show() { show() {
@ -87,15 +101,15 @@
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : ''; return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : '' return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : '';
}, },
title() { title() {
return '办理引导进路' return '办理引导进路';
}, },
commitDisabled() { commitDisabled() {
let disabled = true; let disabled = true;
if (this.row) { if (this.row) {
disabled = !this.row.canSetting disabled = !this.row.canSetting;
} }
return disabled; return disabled;
} }
@ -103,7 +117,7 @@
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
getProtectedSectionName(row) { getProtectedSectionName(row) {
@ -113,24 +127,24 @@
row.overlapSectionList && row.overlapSectionList &&
row.overlapSectionList.length > 0) { row.overlapSectionList.length > 0) {
let protect = row.overlapSectionList[0]; const protect = row.overlapSectionList[0];
name = `${protect.name}`; name = `${protect.name}`;
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode); const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) { if (station) {
name = `${name}(${station.name})` name = `${name}(${station.name})`;
} }
} }
return name; return name;
}, },
doShow(operate, selected, tempData) { doShow(operate, selected, tempData) {
this.selected = selected; this.selected = selected;
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.signalName = ''; this.signalName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name this.signalName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -182,7 +196,7 @@
this.beforeSectionList = row.containSectionList || []; this.beforeSectionList = row.containSectionList || [];
// //
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.guide.choose.operation, operation: OperationEvent.Signal.guide.choose.operation,
val: row.code val: row.code
@ -198,10 +212,10 @@
}, },
commit() { commit() {
if (this.row && this.row.canSetting) { if (this.row && this.row.canSetting) {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.guide.menu.operation, operation: OperationEvent.Signal.guide.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -209,39 +223,39 @@
if (valid) { if (valid) {
this.$refs.password.doShow(operate); this.$refs.password.doShow(operate);
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
}) });
} }
}, },
confirm() { confirm() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.guide.confirm.operation, operation: OperationEvent.Signal.guide.confirm.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
}).catch((error) => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
} };
</script> </script>
<style scoped> <style scoped>
.route-table-tip { .route-table-tip {

View File

@ -1,55 +1,69 @@
<template> <template>
<el-dialog class="chengdou-03__systerm route-setting" :title="title" :visible.sync="show" width="460px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
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-row>
<el-col :span="2"><span class="item-lable">车站</span></el-col> <el-col :span="2"><span class="item-lable">车站</span></el-col>
<el-col :span="6"> <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>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col> <el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
<el-col :span="6"> <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> </el-row>
<div class="route-table-box"> <div class="route-table-box">
<span class="route-table-tip">进路列表</span> <span class="route-table-tip">进路列表</span>
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" <el-table
@row-click="clickEvent" height="150" highlight-current-row> ref="table"
<el-table-column prop="name" label="进路" :id="domIdChoose" style="margin-left:30px"> :data="tempData"
</el-table-column> border
<el-table-column prop="controlType" label="进路属性" :id="domIdChoose" style="margin-left:30px"> :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"> <template slot-scope="scope">
{{ controlTypeNameMap[scope.row.controlType] }} {{ controlTypeNameMap[scope.row.controlType] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="controlType" label="进路描述" :id="domIdChoose" style="margin-left:30px"> <el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
<template slot-scope="scope"> <template></template>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<el-row justify="center" style="margin-top: 70px"> <el-row justify="center" style="margin-top: 70px">
<el-col :span="12" :offset="12"> <el-col :span="12" :offset="12">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">执行</el-button>
@click="commit">执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl'; // import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo' import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'RouteSelection', name: 'RouteSelection',
components: { components: {
ConfirmControl, // ConfirmControl,
NoticeInfo NoticeInfo
}, },
data() { data() {
@ -65,13 +79,13 @@
stationName: '', stationName: '',
signalName: '', signalName: '',
tableStyle: { tableStyle: {
'border-bottom': 'none', 'border-bottom': 'none'
}, },
controlTypeNameMap: { controlTypeNameMap: {
'01': '折返', '01': '折返',
'02': '直通', '02': '直通'
}
} }
};
}, },
computed: { computed: {
show() { show() {
@ -84,15 +98,15 @@
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : ''; return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '' return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
}, },
title() { title() {
return '办理进路' return '办理进路';
}, },
commitDisabled() { commitDisabled() {
let disabled = true; let disabled = true;
if (this.row) { if (this.row) {
disabled = !this.row.canSetting disabled = !this.row.canSetting;
} }
return disabled; return disabled;
} }
@ -100,7 +114,7 @@
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
getProtectedSectionName(row) { getProtectedSectionName(row) {
@ -110,24 +124,24 @@
row.overlapSectionList && row.overlapSectionList &&
row.overlapSectionList.length > 0) { row.overlapSectionList.length > 0) {
let protect = row.overlapSectionList[0]; const protect = row.overlapSectionList[0];
name = `${protect.name}`; name = `${protect.name}`;
let station = this.$store.getters['map/getDeviceByCode'](protect.stationCode); const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) { if (station) {
name = `${name}(${station.name})` name = `${name}(${station.name})`;
} }
} }
return name; return name;
}, },
doShow(operate, selected, tempData) { doShow(operate, selected, tempData) {
this.selected = selected; this.selected = selected;
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.signalName = ''; this.signalName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name this.signalName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -179,7 +193,7 @@
this.beforeSectionList = row.containSectionList || []; this.beforeSectionList = row.containSectionList || [];
// //
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.choose.operation, operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: row.code val: row.code
@ -195,11 +209,11 @@
}, },
commit() { commit() {
if (this.row && this.row.canSetting) { if (this.row && this.row.canSetting) {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.menu.operation, operation: OperationEvent.Signal.arrangementRoute.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -207,29 +221,29 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
} }
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
} };
</script> </script>
<style scoped> <style scoped>
.route-table-tip { .route-table-tip {

View File

@ -1,7 +1,16 @@
<template> <template>
<div> <div>
<el-dialog class="chengdou-03__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> 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;"> <div style="padding: 10px 20px 2px; margin-bottom: 25px; border: 1px solid lightgray;">
<span class="base-label">会话管理</span> <span class="base-label">会话管理</span>
<el-form label-position="center" size="mini" style="margin-top: -15px;"> <el-form label-position="center" size="mini" style="margin-top: -15px;">
@ -11,16 +20,26 @@
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="11" :offset="1"> <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>
<el-col :span="3" :offset="1"> <el-col :span="3" :offset="1">
<el-button type="primary" style="width: 110px; line-height: 26px;" :id="openConversationId" <el-button
@click="openMessage('open')" :disabled="!isOpenMessage">打开会话 :id="openConversationId"
type="primary"
style="width: 110px; line-height: 26px;"
:disabled="!isOpenMessage"
@click="openMessage('open')"
>打开会话
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="3" :offset="1"> <el-col :span="3" :offset="1">
<el-button type="primary" style="width: 110px; line-height: 26px;" :id="closeConversationId" <el-button
@click="openMessage('close')" :disabled="isOpenMessage">关闭会话 :id="closeConversationId"
type="primary"
style="width: 110px; line-height: 26px;"
:disabled="isOpenMessage"
@click="openMessage('close')"
>关闭会话
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -32,51 +51,98 @@
<div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;"> <div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;">
<div style="float: left; width: 20%; padding: 25px 8px 0;"> <div style="float: left; width: 20%; padding: 25px 8px 0;">
<div style="margin-bottom: 5px;">限速数值</div> <div style="margin-bottom: 5px;">限速数值</div>
<el-select v-model="firstScetion.speed" size="mini" :disabled="spdDisabled" <el-select
placeholder="" :id="firstLimitSpeedId" :id="firstLimitSpeedId"
@change="changeSelect(firstScetion.speed, '1')"> v-model="firstScetion.speed"
<el-option v-for="item in speedList" :key="item.value" :label="item.name" size="mini"
:value="item.value"> :disabled="spdDisabled"
</el-option> placeholder=""
@change="changeSelect(firstScetion.speed, '1')"
>
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
<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> <span class="base-label" style="left: 0px;">起点</span>
<div style="margin-bottom: 5px;">区间选择</div> <div style="margin-bottom: 5px;">区间选择</div>
<el-select v-model="firstScetion.startSection" size="mini" :disabled="spdDisabled" <el-select
placeholder="" @change="changeSelect(firstScetion.startSection, '2')" :id="firstStartSectionId"
:id="firstStartSectionId"> v-model="firstScetion.startSection"
<el-option v-for="item in regionList" :key="item.value" :label="item.label" size="mini"
:value="item.value"></el-option> :disabled="spdDisabled"
</el-option> placeholder=""
@change="changeSelect(firstScetion.startSection, '2')"
>
<el-option
v-for="item in regionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
<div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div> <div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div>
<el-input v-model="firstScetion.startValue" :min="0" size="mini" :disabled="spdDisabled" <el-input
:id="firstStartvalueId" @blur="changeSelect(firstScetion.startValue, '3')"> :id="firstStartvalueId"
</el-input> v-model="firstScetion.startValue"
:min="0"
size="mini"
:disabled="spdDisabled"
@blur="changeSelect(firstScetion.startValue, '3')"
/>
</div> </div>
<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> <span class="base-label" style="left: 0px;">终点</span>
<div style="margin-bottom: 5px;">区间选择</div> <div style="margin-bottom: 5px;">区间选择</div>
<el-select v-model="firstScetion.endSection" size="mini" :disabled="spdDisabled" <el-select
placeholder="" @change="changeSelect(firstScetion.endSection, '4')" :id="firstEndSectionId"
:id="firstEndSectionId"> v-model="firstScetion.endSection"
<el-option v-for="item in regionList" :key="item.value" :label="item.label" size="mini"
:value="item.value"></el-option> :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> </el-select>
<div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div> <div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div>
<el-input v-model="firstScetion.endValue" :min="0" size="mini" :disabled="spdDisabled" <el-input
:id="firstEndvalueId" @blur="changeSelect(firstScetion.endValue, '5')"> :id="firstEndvalueId"
</el-input> v-model="firstScetion.endValue"
:min="0"
size="mini"
:disabled="spdDisabled"
@blur="changeSelect(firstScetion.endValue, '5')"
/>
</div> </div>
<div style="float: left; width: 20%; padding:8px;"> <div style="float: left; width: 20%; padding:8px;">
<el-button type="primary" style="width: 90px; margin: 18px 0 20px; line-height: 26px;" <el-button
@click="CheckEquipment" :disabled="spdDisabled" :id="firstCheckId">查看设备 :id="firstCheckId"
type="primary"
style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
:disabled="spdDisabled"
@click="CheckEquipment"
>查看设备
</el-button> </el-button>
<el-button type="primary" style="width: 90px; margin: 0; line-height: 26px;" <el-button
@click="Confirmed" :disabled="firstDisabled" :id="firstComfirmId">首次确认 :id="firstComfirmId"
type="primary"
style="width: 90px; margin: 0; line-height: 26px;"
:disabled="firstDisabled"
@click="Confirmed"
>首次确认
</el-button> </el-button>
</div> </div>
</div> </div>
@ -85,8 +151,8 @@
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;"> <div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表</span> <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 style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
<div v-for="item in equipmentText"> <div v-for="(item, index) in equipmentText" :key="index">
{{item.name}}: {{item.text}} {{ item.name }}: {{ item.text }}
</div> </div>
</div> </div>
</div> </div>
@ -99,59 +165,111 @@
<div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;"> <div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;">
<div style="float: left; width: 20%; padding: 25px 8px 0;"> <div style="float: left; width: 20%; padding: 25px 8px 0;">
<div style="margin-bottom: 5px;">限速数值</div> <div style="margin-bottom: 5px;">限速数值</div>
<el-select v-model="secondScetion.speed" size="mini" :disabled="stpDisabled" <el-select
placeholder="" @change="changeSelect(secondScetion.speed, '6')" :id="secondLimitSpeedId"
:id="secondLimitSpeedId"> v-model="secondScetion.speed"
<el-option v-for="item in speedList" :key="item.value" :label="item.name" size="mini"
:value="item.value"> :disabled="stpDisabled"
</el-option> placeholder=""
@change="changeSelect(secondScetion.speed, '6')"
>
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
<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> <span class="base-label" style="left: 0px;">起点</span>
<div style="margin-bottom: 5px;">区间选择</div> <div style="margin-bottom: 5px;">区间选择</div>
<el-select v-model="secondScetion.startSection" size="mini" :disabled="stpDisabled" <el-select
placeholder="" @change="changeSelect(secondScetion.startSection, '7')" :id="secondStartSectionId"
:id="secondStartSectionId"> v-model="secondScetion.startSection"
<el-option v-for="item in regionList" :key="item.value" :label="item.label" size="mini"
:value="item.value"></el-option> :disabled="stpDisabled"
</el-option> placeholder=""
@change="changeSelect(secondScetion.startSection, '7')"
>
<el-option
v-for="item in regionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
<div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div> <div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div>
<el-select v-model="secondScetion.startValue" size="mini" :disabled="stpDisabled" <el-select
placeholder="" @change="changeSelect(secondScetion.startValue, '8')" :id="secondStartvalueId"
:id="secondStartvalueId"> v-model="secondScetion.startValue"
<el-option v-for="item in startSectionList" :key="item.value" :label="item.label" size="mini"
:value="item.value"></el-option> :disabled="stpDisabled"
</el-option> placeholder=""
@change="changeSelect(secondScetion.startValue, '8')"
>
<el-option
v-for="item in startSectionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
<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> <span class="base-label" style="left: 0px;">终点</span>
<div style="margin-bottom: 5px;">区间选择</div> <div style="margin-bottom: 5px;">区间选择</div>
<el-select v-model="secondScetion.endSection" size="mini" :disabled="stpDisabled" <el-select
placeholder="" @change="changeSelect(secondScetion.endSection, '9')" :id="secondEndSectionId"
:id="secondEndSectionId"> v-model="secondScetion.endSection"
<el-option v-for="item in regionList" :key="item.value" :label="item.label" size="mini"
:value="item.value"></el-option> :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> </el-select>
<div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div> <div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div>
<el-select v-model="secondScetion.endValue" size="mini" :disabled="stpDisabled" <el-select
placeholder="" @change="changeSelect(secondScetion.endValue, '10')" :id="secondEndvalueId"
:id="secondEndvalueId"> v-model="secondScetion.endValue"
<el-option v-for="item in endSectionList" :key="item.value" :label="item.label" size="mini"
:value="item.value"></el-option> :disabled="stpDisabled"
</el-option> placeholder=""
@change="changeSelect(secondScetion.endValue, '10')"
>
<el-option
v-for="item in endSectionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
<div style="float: left; width: 20%; padding:8px;"> <div style="float: left; width: 20%; padding:8px;">
<el-button type="primary" style="width: 90px; margin: 18px 0 20px; line-height: 26px;" <el-button
@click="CheckSecondEquipment" :id="secondCheckId">查看设备 :id="secondCheckId"
type="primary"
style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
@click="CheckSecondEquipment"
>查看设备
</el-button> </el-button>
<el-button type="primary" style="width: 90px; margin: 0; line-height: 26px;" <el-button
@click="confirm" :disabled="secondDisabled" :id="secondComfirmId">确认发送 :id="secondComfirmId"
type="primary"
style="width: 90px; margin: 0; line-height: 26px;"
:disabled="secondDisabled"
@click="confirm"
>确认发送
</el-button> </el-button>
</div> </div>
</div> </div>
@ -160,8 +278,8 @@
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;"> <div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表</span> <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 style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
<div v-for="item in equipmentText1"> <div v-for="(item, index) in equipmentText1" :key="index">
{{item.name}}: {{item.text}} {{ item.name }}: {{ item.text }}
</div> </div>
</div> </div>
</div> </div>
@ -172,30 +290,30 @@
<el-col :span="5"> <el-col :span="5">
<div style="float: left; height: 30px; line-height: 30px; margin-right:10px;">操作倒计时</div> <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;"> <div style="border: 2px inset #E9E9E9; height: 30px; width: 45px;float: left;">
{{timeCountConfirm == -1 ? '' : timeCountConfirm}}</div> {{ timeCountConfirm == -1 ? '' : timeCountConfirm }}</div>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
<div style="float: left; height: 30px; line-height: 30px; margin-right:10px;">状态</div> <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;"> <div style="border: 2px inset #E9E9E9; height: 30px; width: calc(100% - 38px);float: left;">
{{messageStatus}}</div> {{ messageStatus }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="button-group"> <el-row class="button-group">
<el-button :id="domIdClose" style="margin: 0px auto; display: block;" @click="close">关闭</el-button> <el-button :id="domIdClose" style="margin: 0px auto; display: block;" @click="close">关闭</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
<confirm-tip ref='ConfirmTip' @close="closeMessage"></confirm-tip> <confirm-tip ref="ConfirmTip" @close="closeMessage" />
</div> </div>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; // import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date'; // import { now } from '@/utils/date';
import ConfirmTip from './childDialog/confirmTip'; import ConfirmTip from './childDialog/confirmTip';
import { sendCommand } from '@/api/jmap/training'; import { sendCommand } from '@/api/jmap/training';
import router from '@/router'; import router from '@/router';
export default { export default {
name: 'SectionCmdSpeed', name: 'SectionCmdSpeed',
components: { components: {
ConfirmTip ConfirmTip
@ -245,7 +363,7 @@
startSection: '', startSection: '',
endSection: '', endSection: '',
startValue: '', startValue: '',
endValue: '', endValue: ''
}, },
firstShow: false, firstShow: false,
copyScetion: { copyScetion: {
@ -253,20 +371,20 @@
startSection: '', startSection: '',
endSection: '', endSection: '',
startValue: '', startValue: '',
endValue: '', endValue: ''
}, },
secondScetion: { secondScetion: {
speed: '', speed: '',
startSection: '', startSection: '',
endSection: '', endSection: '',
startValue: '', startValue: '',
endValue: '', endValue: ''
}
} }
};
}, },
computed: { computed: {
speedList() { speedList() {
let list = [{ value: -1, name: '无限速' }]; const list = [{ value: -1, name: '无限速' }];
for (var i = 5; i * this.speedSpace <= this.maxSpeed; i++) { for (var i = 5; i * this.speedSpace <= this.maxSpeed; i++) {
list.push({ value: String(i * this.speedSpace), name: String(i * this.speedSpace) }); list.push({ value: String(i * this.speedSpace), name: String(i * this.speedSpace) });
} }
@ -276,6 +394,7 @@
if (this.dialogShow) { if (this.dialogShow) {
return '公里标输入临时限速'; return '公里标输入临时限速';
} }
return '';
}, },
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
@ -330,7 +449,7 @@
}, },
domIdClose() { domIdClose() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.domIdClose.domId : ''; return this.dialogShow ? OperationEvent.Section.setLimitSpeed.domIdClose.domId : '';
}, }
}, },
watch: { watch: {
'timeCountCommand': function (val) { 'timeCountCommand': function (val) {
@ -353,14 +472,14 @@
startSection: '', startSection: '',
endSection: '', endSection: '',
startValue: '', startValue: '',
endValue: '', endValue: ''
}; };
this.secondScetion = { this.secondScetion = {
speed: '', speed: '',
startSection: '', startSection: '',
endSection: '', endSection: '',
startValue: '', startValue: '',
endValue: '', endValue: ''
}; };
} else { } else {
this.dialogueStatus = `会话打开,剩余时间${val}`; this.dialogueStatus = `会话打开,剩余时间${val}`;
@ -375,12 +494,12 @@
} }
}, },
deep: true deep: true
}, }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
this.regionList = this.$ConstSelect.RegionTypeList; this.regionList = this.$ConstSelect.RegionTypeList;
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (this.timeCountCommand > 0) { if (this.timeCountCommand > 0) {
@ -394,7 +513,7 @@
} else if (this.timeCountConfirm == 0) { // } else if (this.timeCountConfirm == 0) { //
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
} }
}, 1000) }, 1000);
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer); clearInterval(this.timer);
@ -424,15 +543,15 @@
startSection: '', startSection: '',
endSection: '', endSection: '',
startValue: '', startValue: '',
endValue: '', endValue: ''
} };
this.firstScetion = { this.firstScetion = {
speed: '', speed: '',
startSection: '', startSection: '',
endSection: '', endSection: '',
startValue: '', startValue: '',
endValue: '', endValue: ''
} };
this.speed = 0; this.speed = 0;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
@ -440,15 +559,15 @@
}, },
openMessage(state) { openMessage(state) {
if (state == 'open') { // if (state == 'open') { //
let operate = { const operate = {
type: this.type, type: this.type,
operation: OperationEvent.Section.setLimitSpeed.openConversation.operation, operation: OperationEvent.Section.setLimitSpeed.openConversation.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.isOpenMessage = false; this.isOpenMessage = false;
this.spdDisabled = false this.spdDisabled = false;
this.messageStatus = '会话打开成功'; this.messageStatus = '会话打开成功';
this.speed = 1; this.speed = 1;
this.timeCountCommand = 120; this.timeCountCommand = 120;
@ -457,10 +576,10 @@
console.log(error); console.log(error);
}); });
} else { // } else { //
let operate = { const operate = {
type: this.type, type: this.type,
operation: OperationEvent.Section.setLimitSpeed.closeConversation.operation, operation: OperationEvent.Section.setLimitSpeed.closeConversation.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -483,13 +602,13 @@
}, },
CheckEquipment() { // CheckEquipment() { //
if (this.firstShow) { if (this.firstShow) {
let value = `${this.firstScetion.speed}::${this.firstScetion.startSection}::${this.firstScetion.startValue}::${this.firstScetion.endSection}::${this.firstScetion.endValue}`; const value = `${this.firstScetion.speed}::${this.firstScetion.startSection}::${this.firstScetion.startValue}::${this.firstScetion.endSection}::${this.firstScetion.endValue}`;
let operate = { const operate = {
send: true, send: true,
val: value, val: value,
type: this.type, type: this.type,
operation: OperationEvent.Section.setLimitSpeed.firstCheck.operation, operation: OperationEvent.Section.setLimitSpeed.firstCheck.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
@ -501,20 +620,20 @@
startSection: this.firstScetion.startSection, startSection: this.firstScetion.startSection,
endSection: this.firstScetion.endSection, endSection: this.firstScetion.endSection,
startValue: this.firstScetion.startValue, startValue: this.firstScetion.startValue,
endValue: this.firstScetion.endValue, endValue: this.firstScetion.endValue
} };
this.startSectionList = []; this.startSectionList = [];
this.endSectionList = []; this.endSectionList = [];
for (let index = 0; index < 4; index++) { for (let index = 0; index < 4; index++) {
let starData = { const starData = {
value: Number(this.firstScetion.startValue) + index, value: Number(this.firstScetion.startValue) + index,
label: Number(this.firstScetion.startValue) + index, label: Number(this.firstScetion.startValue) + index
} };
this.startSectionList.push(starData); this.startSectionList.push(starData);
let endData = { const endData = {
value: Number(this.firstScetion.endValue) + index, value: Number(this.firstScetion.endValue) + index,
label: Number(this.firstScetion.endValue) + index, label: Number(this.firstScetion.endValue) + index
} };
this.endSectionList.push(endData); this.endSectionList.push(endData);
} }
} }
@ -525,28 +644,28 @@
}, },
getEquipmentList(list) { getEquipmentList(list) {
this.equipmentText = []; this.equipmentText = [];
let stationStand = []; const stationStand = [];
let stationText = []; const stationText = [];
this.codeText = ''; this.codeText = '';
let arr = []; const arr = [];
list.forEach(ele => { list.forEach(ele => {
if (stationStand.indexOf(ele.stationCode) == -1) { if (stationStand.indexOf(ele.stationCode) == -1) {
stationStand.push(ele.stationCode); stationStand.push(ele.stationCode);
let text = this.getTextName(ele); const text = this.getTextName(ele);
stationText.push(text) stationText.push(text);
} else { } else {
let index = stationStand.indexOf(ele.stationCode) const index = stationStand.indexOf(ele.stationCode);
let text = this.getTextName(ele); const text = this.getTextName(ele);
stationText[index] += text; stationText[index] += text;
} }
arr.push(ele.code); arr.push(ele.code);
}); });
this.codeText = arr.join('::'); this.codeText = arr.join('::');
stationStand.forEach((item, index) => { stationStand.forEach((item, index) => {
let stationStandName = this.$store.getters['map/getDeviceByCode'](item); const stationStandName = this.$store.getters['map/getDeviceByCode'](item);
let data = { const data = {
text: stationText[index], text: stationText[index],
name: stationStandName.name, name: stationStandName.name
}; };
this.equipmentText.push(data); this.equipmentText.push(data);
}); });
@ -554,28 +673,28 @@
getTextName(ele) { getTextName(ele) {
if (ele.switchSectionType) { if (ele.switchSectionType) {
switch (ele.switchSectionType) { switch (ele.switchSectionType) {
case '01': { case '01':
return `${ele.name}(主), `; return `${ele.name}(主), `;
} break; break;
case '02': { case '02':
return `${ele.name}(定), `; return `${ele.name}(定), `;
} break; break;
case '03': { case '03':
return `${ele.name}(反), `; return `${ele.name}(反), `;
} break; break;
} }
} else if (ele.parentName) { } else if (ele.parentName) {
return `${ele.parentName}-${ele.name}, `; return `${ele.parentName}-${ele.name}, `;
} else { } else {
return `${ele.name}, `; return `${ele.name}, `;
}; }
}, },
CheckSecondEquipment() { // 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) { 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, type: this.type,
operation: OperationEvent.Section.setLimitSpeed.secondCheck.operation, operation: OperationEvent.Section.setLimitSpeed.secondCheck.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -591,8 +710,8 @@
startSection: this.copyScetion.startSection, startSection: this.copyScetion.startSection,
endSection: this.copyScetion.endSection, endSection: this.copyScetion.endSection,
startValue: this.copyScetion.startValue, startValue: this.copyScetion.startValue,
endValue: this.copyScetion.endValue, endValue: this.copyScetion.endValue
} };
this.firstDisabled = true; this.firstDisabled = true;
this.secondScetion = { this.secondScetion = {
speed: '', speed: '',
@ -605,18 +724,18 @@
this.equipmentText = []; this.equipmentText = [];
this.stpDisabled = true; this.stpDisabled = true;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
let operate = { const operate = {
message: `两次值不一致` message: `两次值不一致`
} };
this.$refs.ConfirmTip.doShow(operate); this.$refs.ConfirmTip.doShow(operate);
} }
}, },
changeSelect(value, val) { changeSelect(value, val) {
let operate = { const operate = {
type: this.type, type: this.type,
operation: '', operation: '',
val: value val: value
} };
switch (val) { switch (val) {
case '1': { case '1': {
@ -661,10 +780,10 @@
}, },
Confirmed() { // Confirmed() { //
let operate = { const operate = {
type: this.type, type: this.type,
operation: OperationEvent.Section.setLimitSpeed.firstComfirm.operation, operation: OperationEvent.Section.setLimitSpeed.firstComfirm.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -678,8 +797,8 @@
startSection: '', startSection: '',
endSection: '', endSection: '',
startValue: '***', startValue: '***',
endValue: '***', endValue: '***'
} };
} }
}).catch(error => { }).catch(error => {
console.log(error); console.log(error);
@ -688,59 +807,59 @@
confirm() { // confirm() { //
// let value = `${this.secondScetion.speed}::${this.codeText}`; // let value = `${this.secondScetion.speed}::${this.codeText}`;
let value = `${this.secondScetion.speed}::${this.secondScetion.startSection}::${this.secondScetion.startValue}::${this.secondScetion.endSection}::${this.secondScetion.endValue}`; const value = `${this.secondScetion.speed}::${this.secondScetion.startSection}::${this.secondScetion.startValue}::${this.secondScetion.endSection}::${this.secondScetion.endValue}`;
let operate = { const operate = {
send: true, send: true,
val: value, val: value,
type: this.type, type: this.type,
code: this.code, code: this.code,
operation: OperationEvent.Section.confirmLimit.menu.operation, operation: OperationEvent.Section.confirmLimit.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
let group = router.currentRoute.query.group; const group = router.currentRoute.query.group;
let command = this.handleMenuConfirmLimit(operate); const command = this.handleMenuConfirmLimit(operate);
sendCommand(group, command).then((response) => { sendCommand(group, command).then((response) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.stpDisabled = true; this.stpDisabled = true;
this.messageStatus = '临时限速设置成功'; this.messageStatus = '临时限速设置成功';
}).catch(error => { }).catch(error => {
let operate = { const operate = {
message: error.message message: error.message
} };
this.$refs.ConfirmTip.doShow(operate); this.$refs.ConfirmTip.doShow(operate);
console.log(error); console.log(error);
}); });
} }
}).catch(error => { }).catch(error => {
let operate = { const operate = {
message: error.message message: error.message
} };
this.$refs.ConfirmTip.doShow(operate); this.$refs.ConfirmTip.doShow(operate);
console.log(error); console.log(error);
}); });
}, },
close() { // close() { //
let operate = { const operate = {
type: this.type, type: this.type,
operation: OperationEvent.Section.setLimitSpeed.domIdClose.operation, operation: OperationEvent.Section.setLimitSpeed.domIdClose.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (this.isOpenMessage) { if (this.isOpenMessage) {
this.doClose(); this.doClose();
} else { } else {
let operate = { const operate = {
message: `是否关闭会话,并关闭窗口`, message: `是否关闭会话,并关闭窗口`,
confirmId: OperationEvent.Section.setLimitSpeed.close.domId, confirmId: OperationEvent.Section.setLimitSpeed.close.domId
} };
this.$refs.ConfirmTip.doShow(operate); this.$refs.ConfirmTip.doShow(operate);
} }
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
}, },
@ -748,10 +867,10 @@
}, },
closeMessage() { closeMessage() {
let operate = { const operate = {
type: this.type, 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('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -766,7 +885,7 @@
this.doClose(); this.doClose();
}).catch(error => { }).catch(error => {
console.log(error); console.log(error);
}) });
}, },
// //
handleMenuConfirmLimit(operate) { handleMenuConfirmLimit(operate) {
@ -779,5 +898,5 @@
}; };
} }
} }
} };
</script> </script>

View File

@ -1,10 +1,18 @@
<template> <template>
<el-dialog class="chengdou-03__systerm stand-detail" :title="title" :visible.sync="show" width="380px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
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-row class="header">
<el-col :span="10"> <el-col :span="10">
<span>车站</span> <span>车站</span>
</el-input>
</el-col> </el-col>
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<span>站台</span> <span>站台</span>
@ -12,11 +20,10 @@
</el-row> </el-row>
<el-row class="header"> <el-row class="header">
<el-col :span="10"> <el-col :span="10">
<el-input v-model="stationName" size="small" disabled> <el-input v-model="stationName" size="small" disabled />
</el-input>
</el-col> </el-col>
<el-col :span="10" :offset="2"> <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-col>
</el-row> </el-row>
<el-row class="content"> <el-row class="content">
@ -24,7 +31,7 @@
<span>停站时间</span> <span>停站时间</span>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-input v-model="modelData.stopTime" size="small" disabled></el-input> <el-input v-model="modelData.stopTime" size="small" disabled />
</el-col> </el-col>
</el-row> </el-row>
<el-row class="content"> <el-row class="content">
@ -32,7 +39,7 @@
<span>运行等级</span> <span>运行等级</span>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-input v-model="modelData.runLevel" size="small" disabled></el-input> <el-input v-model="modelData.runLevel" size="small" disabled />
</el-col> </el-col>
</el-row> </el-row>
<el-row class="content"> <el-row class="content">
@ -40,7 +47,7 @@
<span>扣车</span> <span>扣车</span>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-input v-model="modelData.detainCar" size="small" disabled></el-input> <el-input v-model="modelData.detainCar" size="small" disabled />
</el-col> </el-col>
</el-row> </el-row>
<el-row class="content"> <el-row class="content">
@ -48,7 +55,7 @@
<span>跳停</span> <span>跳停</span>
</el-col> </el-col>
<el-col :span="18"> <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-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -59,17 +66,17 @@
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'StandDetail', name: 'StandDetail',
components: { components: {
NoticeInfo NoticeInfo
@ -91,13 +98,13 @@
stopTime: '自动', stopTime: '自动',
runLevel: '自动', runLevel: '自动',
detainCar: '无扣车', detainCar: '无扣车',
jumpStop: '无跳停', jumpStop: '无跳停'
},
} }
};
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'stationList', 'stationList'
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
@ -115,26 +122,27 @@
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
loadInitData(selected, opts) { loadInitData(selected, opts) {
this.tempData = []; this.tempData = [];
let stationList = this.stationList.slice(); // const stationList = this.stationList.slice();
let index = this.stationList.findIndex(n => n.code == selected.stationCode); const index = this.stationList.findIndex(n => n.code == selected.stationCode);
let stationStand, station; // let stationStand;
// let station;
if (selected.direction == '01') { // if (selected.direction == '01') { //
// //
if (index != 0) { if (index != 0) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code); // stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); // station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
} }
} else { } else {
// //
if (index != this.stationList.length - 1) { if (index != this.stationList.length - 1) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code); // stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); // station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
} }
} }
@ -142,7 +150,7 @@
stopTime: opts.parkingTime != -1 ? opts.parkingTime : '自动', stopTime: opts.parkingTime != -1 ? opts.parkingTime : '自动',
runLevel: opts.intervalRunTime > 0 ? '常速': '自动', runLevel: opts.intervalRunTime > 0 ? '常速': '自动',
detainCar: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '无扣车', detainCar: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '无扣车',
jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停', jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停'
}; };
}, },
doShow(operate, selected, opts) { doShow(operate, selected, opts) {
@ -152,7 +160,7 @@
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.direction == '01' ? '下行' : '上行'; this.standName = selected.direction == '01' ? '下行' : '上行';
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -171,10 +179,10 @@
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
commit() { commit() {
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.close.confirm.operation, operation: OperationEvent.Command.close.confirm.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -182,27 +190,27 @@
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
}) });
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
} };
</script> </script>
<style> <style>
.content { .content {

View File

@ -1,10 +1,20 @@
<template> <template>
<el-dialog class="chengdou-03__systerm two-confirmation" title="二次确认" :visible.sync="show" width="360px" <el-dialog
:before-close="doClose" :showClose="false" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag
append-to-body v-dialogDrag> class="chengdou-03__systerm two-confirmation"
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"> <div class="context">
<template v-for="message in messages"> <template v-for="(message, index) in messages">
<span> {{message}}</span><br> <span :key="index">{{ message }}</span>
</template> </template>
</div> </div>
<el-row class="button-group"> <el-row class="button-group">
@ -15,16 +25,19 @@
<el-button :id="domIdCancel" @click="cancel">关闭</el-button> <el-button :id="domIdCancel" @click="cancel">关闭</el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic'; import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo' import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
export default { export default {
name: 'TwoConfirmation', name: 'TwoConfirmation',
components: {
NoticeInfo
},
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
@ -32,10 +45,7 @@
operate: '', operate: '',
timer: null, timer: null,
domIdConfirm: '' domIdConfirm: ''
} };
},
components: {
NoticeInfo
}, },
computed: { computed: {
show() { show() {
@ -48,13 +58,13 @@
if (this.operate) { if (this.operate) {
return this.operate.messages; return this.operate.messages;
} }
return [] return [];
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate) { doShow(operate) {
@ -78,10 +88,10 @@
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
cancel() { cancel() {
let operate = { const operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation, operation: OperationEvent.Command.close.confirm.operation
} };
this.$emit('setOperate', { selection: this.operate.selection, cancel: true }); this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -89,16 +99,16 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose(); this.doClose();
} }
}) });
}, },
commit() { commit() {
if (this.operate && this.operate.selection) { if (this.operate && this.operate.selection) {
let operate = { const operate = {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
val: this.operate.val, val: this.operate.val,
selection: this.operate.selection selection: this.operate.selection
} };
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) { if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation; operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
@ -116,12 +126,12 @@
this.loading = false; this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}, 1000).catch((error) => { }, 1000).catch(() => {
this.loading = true; this.loading = true;
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
} }
} }
} }
} };
</script> </script>

View File

@ -1,12 +1,22 @@
<template> <template>
<el-dialog class="chengdou-03__systerm user-delete" :title="title" :visible.sync="show" width="260px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> v-dialogDrag
<div style="padding-left: 10px; padding-bottom: 10px"> class="chengdou-03__systerm user-delete"
<i class="el-icon-info"></i> :title="title"
<template v-for="message in messages"> :visible.sync="show"
<span>{{message}}</span> width="260px"
: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> </template>
</div> </span>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="8" :offset="3"> <el-col :span="8" :offset="3">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
@ -19,10 +29,10 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'UserDelete', name: 'UserDelete',
components: { components: {
}, },
@ -33,12 +43,12 @@
model: { model: {
type: 'DELETE', type: 'DELETE',
jobNumber: '', jobNumber: '',
userName: '', userName: ''
}, },
operation: null, operation: null,
dialogShow: false, dialogShow: false,
loading: false, loading: false
} };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
@ -54,17 +64,17 @@
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : ''; return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}, },
title() { title() {
return '删除用户' return '删除用户';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, selected) { doShow(operate, selected) {
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.loading = false; this.loading = false;
this.operate = operate || {}; this.operate = operate || {};
@ -90,10 +100,10 @@
}, },
commit() { commit() {
if (this.model.userName && this.model.jobNumber) { if (this.model.userName && this.model.jobNumber) {
let operate = { const operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation, operation: OperationEvent.Command.close.confirm.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -102,25 +112,25 @@
this.doClose(); this.doClose();
this.$emit('operateUser', this.model); this.$emit('operateUser', this.model);
} }
}) });
} else { } else {
this.$messageBox('选择的用户名或工号为空'); this.$messageBox('选择的用户名或工号为空');
} }
}, },
cancel() { cancel() {
let operate = { const operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}
} }
} }
};
</script> </script>
<style scoped> <style scoped>
.chengdou-03__systerm .el-dialog .base-label { .chengdou-03__systerm .el-dialog .base-label {

View File

@ -1,40 +1,38 @@
<template> <template>
<el-dialog class="chengdou-03__systerm alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px" <el-dialog v-dialogDrag class="chengdou-03__systerm alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form label-width="80px" size="mini"> <el-form label-width="80px" size="mini">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="线路名称"> <el-form-item label="线路名称">
<el-input v-model="model.lineName" disabled></el-input> <el-input v-model="model.lineName" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位名称"> <el-form-item label="单位名称">
<el-input v-model="model.unitName" disabled></el-input> <el-input v-model="model.unitName" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="模块名称"> <el-form-item label="模块名称">
<el-input v-model="model.moduleName" disabled></el-input> <el-input v-model="model.moduleName" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="9"> <el-col :span="9">
<el-form-item label="报警时间"> <el-form-item label="报警时间">
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled> <el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item> <el-form-item>
<span slot="label">&emsp;</span> <span slot="label">&emsp;</span>
<el-input v-model="model.level" disabled></el-input> <el-input v-model="model.level" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="确认状态"> <el-form-item label="确认状态">
<el-input v-model="model.confirm" disabled></el-input> <el-input v-model="model.confirm" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -42,25 +40,24 @@
<el-col :span="9" class="alarm-type"> <el-col :span="9" class="alarm-type">
<el-form-item> <el-form-item>
<span slot="label">&emsp;&emsp;</span> <span slot="label">&emsp;&emsp;</span>
<el-input v-model="model.type" disabled></el-input> <el-input v-model="model.type" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="15" class="alarm-child-type"> <el-col :span="15" class="alarm-child-type">
<el-form-item label="子类型"> <el-form-item label="子类型">
<el-input v-model="model.childType" disabled></el-input> <el-input v-model="model.childType" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="时间摘要"> <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>
<el-form-item label="推荐操作"> <el-form-item label="推荐操作">
<el-input v-model="model.recommendedOperation" disabled></el-input> <el-input v-model="model.recommendedOperation" disabled />
</el-form-item> </el-form-item>
<div class="alarm-detail-description"> <div class="alarm-detail-description">
<span> 报警详细描述</span><br> <span> 报警详细描述</span><br>
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="model.alarmDetail" disabled> <el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
</el-input>
</div> </div>
</el-form> </el-form>
<el-row class="button-group"> <el-row class="button-group">
@ -68,18 +65,18 @@
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit"> </el-button> <el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit"> </el-button>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<span style="line-height:26px">未确认{{level}}级报警数目1</span> <span style="line-height:26px">未确认{{ level }}级报警数目1</span>
</el-col> </el-col>
</el-row> </el-row>
</span> <!-- </span> -->
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'AlarmDetail', name: 'AlarmDetail',
data() { data() {
return { return {
@ -104,40 +101,40 @@
recommendedOperation: '', recommendedOperation: '',
alarmDetail: '' alarmDetail: ''
} }
} };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'name', 'name'
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : ''; return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}, }
}, },
watch: { watch: {
'$store.state.socket.msgHead': function (elem) { '$store.state.socket.msgHead': function (elem) {
if (elem && elem.hasOwnProperty('success')) { if (elem && elem.hasOwnProperty('success')) {
if (elem.success) { if (elem.success) {
let operate = this.$store.state.training.operate; const operate = this.$store.state.training.operate;
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode); const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode); const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
let newOperate = { const newOperate = {
type: operate.type, type: operate.type,
name: station.name, name: station.name
} };
this.doShow(newOperate); this.doShow(newOperate);
} }
} }
}, }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate) { doShow(operate) {
@ -154,7 +151,7 @@
timeSummary: '控制模式摘要', timeSummary: '控制模式摘要',
recommendedOperation: '', recommendedOperation: '',
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!` alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
} };
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
@ -168,41 +165,40 @@
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
cancel() { cancel() {
let operate = { const operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation, operation: OperationEvent.Command.close.alarm.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}) });
}, },
commit() { commit() {
let operate = { const operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation, operation: OperationEvent.Command.close.alarm.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}) });
}, },
isClose() { isClose() {
return this.dialogShow; return this.dialogShow;
} }
} }
} };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.alarm-type .el-input { .alarm-type .el-input {
width: 220px; width: 220px;
} }

View File

@ -377,9 +377,6 @@ export const MenuDisabledState = {
// 单操到反位 // 单操到反位
reverse() { reverse() {
}, },
// 区故解
solution() {
},
// 属性 // 属性
property() { property() {
} }

View File

@ -122,7 +122,6 @@
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { importRunPlan } from '@/api/runplan'; import { importRunPlan } from '@/api/runplan';
import { importData } from '../planConvert';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';

Some files were not shown because too many files have changed in this diff Show More