Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
program-walker 2019-10-15 10:01:54 +08:00
commit 8a67661639
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) {
return request({

View File

@ -131,3 +131,11 @@ export function listCanPackagePermission(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'
});
}
// 加载通用排班计划
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

@ -107,19 +107,19 @@ export default {
},
computed: {
width() {
let fontNum = 0;
let newLabel="";
let fontNum = 0;
let newLabel='';
this.menu.forEach(elem => {
newLabel=elem.label.replace(/[^\u0000-\u00ff]/g,"aa");
newLabel = elem.label && elem.label.replace(/[^\u0000-\u00ff]/g, 'aa');
if (elem.label && newLabel.length > fontNum) {
fontNum=newLabel.length;
fontNum=newLabel.length;
// fontNum = elem.label.length;
}
});
var width = fontNum/2 * this.defaultFontSize + 60 + 'px';
// if(this.$t('global.lanuage')==='en'){
// width = fontNum/2 * this.defaultFontSize + 40 + 'px';
// }
});
var width = fontNum/2 * this.defaultFontSize + 60 + 'px';
// if(this.$t('global.lanuage')==='en'){
// width = fontNum/2 * this.defaultFontSize + 40 + 'px';
// }
return width;
}
},
@ -193,7 +193,6 @@ export default {
}
},
calculateSubWidth(item) {
// debugger;
const children = item.children;
let width = 0;
let fontNum = 0;
@ -204,7 +203,7 @@ export default {
});
width = fontNum * this.defaultFontSize + 20 + 'px';
return width;
},
},
openLoadFile(item) {
const obj = this.$refs[item.label][0];
if (obj.files) {

View File

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

View File

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

View File

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

62
src/i18n/langs/en/ibp.js Normal file
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 trainRoom from './trainRoom';
import menu from './menu';
import ibp from './ibp';
export default {
...enLocale,
@ -49,5 +50,6 @@ export default {
display,
joinTraining,
trainRoom,
menu
menu,
ibp
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -154,5 +154,10 @@ export default {
no: '否',
details: '详情',
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 trainRoom from './trainRoom';
import menu from './menu';
import ibp from './ibp';
export default {
...cnLocale,
@ -49,5 +50,6 @@ export default {
display,
joinTraining,
trainRoom,
menu
menu,
ibp
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because one or more lines are too long

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,72 +1,81 @@
<template>
<el-dialog class="fuzhou_01 notice-info" :title="title" :visible.sync="show" width="360px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span>{{message}}</span><br>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
<el-dialog
v-dialogDrag
class="fuzhou_01 notice-info"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="message in messages">
<span>{{ message }}</span><br>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'NoticeInfo',
data() {
return {
dialogShow: false,
messages: ['命令下达失败'],
operate: null
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages) {
this.messages = messages;
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
}
export default {
name: 'NoticeInfo',
data() {
return {
dialogShow: false,
messages: ['命令下达失败'],
operate: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages) {
this.messages = messages;
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
};
</script>
<style>
@ -74,4 +83,4 @@
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>
</style>

View File

@ -1,389 +1,392 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
</div>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
export default {
name: 'SectionMenu',
components: {
PopMenu,
},
props: {
selected: {
type: Object
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
// {
// label: '',
// handler: this.fault,
// disabledCallback: MenuDisabledState.Section.fault,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.split,
// disabledCallback: MenuDisabledState.Section.split,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.active,
// disabledCallback: MenuDisabledState.Section.active,
// 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 }
// }
],
central: [
// {
// label: '',
// handler: this.fault,
// disabledCallback: MenuDisabledState.Section.fault,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.split,
// disabledCallback: MenuDisabledState.Section.split,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.active,
// disabledCallback: MenuDisabledState.Section.active,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.axlePreReset,
// disabledCallback: MenuDisabledState.Section.axlePreReset,
// auth: { station: false, center: false }
// },
// {
// label: '',
// handler: this.lock,
// disabledCallback: MenuDisabledState.Section.lock,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.unlock,
// disabledCallback: MenuDisabledState.Section.unlock,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.setSpeed,
// disabledCallback: MenuDisabledState.Section.setSpeed,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.cancelSpeed,
// disabledCallback: MenuDisabledState.Section.cancelSpeed,
// auth: { station: false, center: true }
// }
]
},
menuTrain: [
{
label: '新建列车',
handler: this.newTrain,
disabledCallback: MenuDisabledState.Section.newTrain
},
],
menuForce: [
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Section.setStoppage
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Section.cancelStoppage
}
]
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
let self = this;
window.onclick = function (e) {
self.doClose();
}
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain]
}
export default {
name: 'SectionMenu',
components: {
PopMenu
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
// {
// label: '',
// handler: this.fault,
// disabledCallback: MenuDisabledState.Section.fault,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.split,
// disabledCallback: MenuDisabledState.Section.split,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.active,
// disabledCallback: MenuDisabledState.Section.active,
// 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 }
// }
],
central: [
// {
// label: '',
// handler: this.fault,
// disabledCallback: MenuDisabledState.Section.fault,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.split,
// disabledCallback: MenuDisabledState.Section.split,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.active,
// disabledCallback: MenuDisabledState.Section.active,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.axlePreReset,
// disabledCallback: MenuDisabledState.Section.axlePreReset,
// auth: { station: false, center: false }
// },
// {
// label: '',
// handler: this.lock,
// disabledCallback: MenuDisabledState.Section.lock,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.unlock,
// disabledCallback: MenuDisabledState.Section.unlock,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.setSpeed,
// disabledCallback: MenuDisabledState.Section.setSpeed,
// auth: { station: false, center: true }
// },
// {
// label: '',
// handler: this.cancelSpeed,
// disabledCallback: MenuDisabledState.Section.cancelSpeed,
// auth: { station: false, center: true }
// }
]
},
menuTrain: [
{
label: '新建列车',
handler: this.newTrain,
disabledCallback: MenuDisabledState.Section.newTrain
}
],
menuForce: [
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Section.setStoppage
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Section.cancelStoppage
}
]
};
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
let 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(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
cancelStoppage() {
let 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(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
fault() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.fault.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);
}
});
},
//
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);
}
});
},
//
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.setSpeed.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);
}
});
},
//
newTrain() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.newtrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreate.doShow(operate, this.selected);
}
})
}
}
}
</script>
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
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);
});
},
//
fault() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.fault.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);
}
});
},
//
split() {
const 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);
}
});
},
//
active() {
const 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() {
const 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() {
const 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() {
const 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() {
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.speedCmdControl.doShow(operate, this.selected);
}
});
},
//
cancelSpeed() {
const 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) {
// const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
}
});
},
//
newTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.newtrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreate.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -1,432 +1,439 @@
<template>
<div>
<el-dialog class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<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="signalName" 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>
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate"></confirm-signal-unlock>
</div>
<div>
<el-dialog v-dialogDrag class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span>
<el-form label-position="center" size="mini">
<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-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-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="信号机名称" label-width="100px">
<el-input v-model="signalName" size="small" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<el-table-column prop="order" :width="50" label="序号" />
<el-table-column prop="date" :width="160" label="时间" />
<el-table-column prop="context" :width="180" label="执行过程" />
<el-table-column prop="result" label="执行结果" />
</el-table>
<span class="notice">{{ message }}</span>
<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>
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
export default {
name: 'RouteCmdControl',
components: {
ConfirmSignalUnlock
},
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: '',
signalName: ''
}
},
computed: {
typeList() {
return [
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
]
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.order.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.order.domId;
}
}
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm1.domId;
}
}
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm2.domId;
}
}
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.stop.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.stop.domId;
}
}
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.guide.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.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
export default {
name: 'RouteCmdControl',
components: {
ConfirmSignalUnlock
},
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: '',
signalName: ''
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.order.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.order.domId;
}
}
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm1.domId;
}
}
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm2.domId;
}
}
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.stop.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.stop.domId;
}
}
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
return '办理引导进路';
}
}
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && index >= 1 && 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.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.order = 0;
this.operation = operate.operation;
this.order = 0;
this.operation = operate.operation;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.dialogShow = 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.Signal.unlock.menu.operation) {
/** 第一步带弹框处理*/
this.commandHasPopUp();
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
}
},
commandHasPopUp() {
let operate = {
type: MapDeviceType.Signal.type,
}
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.dialogShow = 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.Signal.unlock.menu.operation) {
/** 第一步带弹框处理*/
this.commandHasPopUp();
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
}
},
commandHasPopUp() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.order.operation
}
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.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 });
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
}
}
})
},
commandNoPopUp() {
let operate = {
type: MapDeviceType.Signal.type
}
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 });
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
}
}
});
},
commandNoPopUp() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.order.operation
}
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.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.Signal.type,
}
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() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm1.operation;
}
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.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.Signal.type
}
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() {
const operate = {
send: true,
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.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.Signal.type,
}
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.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() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.stop.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.stop.operation;
}
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.stop.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
}
}).catch(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
});
},
close() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation
};
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
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.Signal.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) {
/** 弹框返回值处理*/
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
this.backOperate = operate;
this.setButtonEnable(operate);
if (operate.success) {
this.timeCountCommand = 30;
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
}
}
},
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>
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
this.backOperate = operate;
this.setButtonEnable(operate);
if (operate.success) {
this.timeCountCommand = 30;
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
}
}
},
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,287 +1,323 @@
<template>
<el-dialog class="beijing-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col>
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-detain-train"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<div v-if="!earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio"
label="1"
:disabled="radio == 2"
style="display: block; text-align: left;"
>
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio"
label="2"
:disabled="radio == 1"
style="display: block; text-align: left;"
>
本站台上行</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled></el-input>
</el-col>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
label="1"
:disabled="radio1 == '2'"
style="display: block; text-align: left;"
>
扣车</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
label="2"
:disabled="radio1 == '1'"
style="display: block; text-align: left;"
>
取消扣车</el-radio>
</el-col>
</el-row>
<div v-if="!earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio v-model="radio" label="1" :disabled="radio == 2"
style="display: block; text-align: left;">
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="radio" label="2" :disabled="radio == 1"
style="display: block; text-align: left;">
本站台上行</el-radio>
</el-col>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio v-model="radio1" label="1" :disabled="radio1 == '2'"
style="display: block; text-align: left;">
扣车</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="radio1" label="2" :disabled="radio1 == '1'"
style="display: block; text-align: left;">
取消扣车</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio v-model="radio2" label="1" :id="upRadioId"
style="display: block; text-align: left;" @change="changeRadio">
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="radio2" label="2" :id="downRadioId"
style="display: block; text-align: left;" @change="changeRadio">
本站台下行</el-radio>
</el-col>
</el-row>
</div>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</div>
</div>
<div v-if="earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
:id="upRadioId"
v-model="radio2"
label="1"
style="display: block; text-align: left;"
@change="changeRadio"
>
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
:id="downRadioId"
v-model="radio2"
label="2"
style="display: block; text-align: left;"
@change="changeRadio"
>
本站台下行</el-radio>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</div>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
radio: '1',
radio1: '1',
radio2: '1',
earlyDepar: false,
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
upRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
},
downRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
},
title() {
this.earlyDepar = false;
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.radio1 = '1';
return '扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.radio1 = '2';
return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
this.earlyDepar = true;
if (this.selected.direction == '01') {
this.radio2 = '2';
} else {
this.radio2 = '1';
}
return '提前发车'
}
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
radio: '1',
radio1: '1',
radio2: '1',
earlyDepar: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
upRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
},
downRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
},
title() {
this.earlyDepar = false;
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.radio1 = '1';
return '扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.radio1 = '2';
return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
this.earlyDepar = true;
if (this.selected.direction == '01') {
this.radio2 = '2';
} else {
this.radio2 = '1';
}
return '提前发车';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
changeRadio(val) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: '',
val: val
}
if (val == 1) {
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
} else if (val == 2) {
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
}
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
changeRadio(val) {
const operate = {
type: MapDeviceType.StationStand.type,
operation: '',
val: val
};
if (val == 1) {
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
} else if (val == 2) {
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
console.log(error);
})
},
commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
/** 设置扣车*/
this.setDetainTrain();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
/** 取消扣车*/
this.cancelDetainTrain();
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
/** 提前发车*/
this.earlyDeparture();
}
},
//
setDetainTrain() {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
console.log(error);
});
},
commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
/** 设置扣车*/
this.setDetainTrain();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
/** 取消扣车*/
this.cancelDetainTrain();
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
/** 提前发车*/
this.earlyDeparture();
}
},
//
setDetainTrain() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
//
cancelDetainTrain() {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelDetainTrain() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
//
earlyDeparture() {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
earlyDeparture() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.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);
});
},
cancel() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
};
</script>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>
</style>

View File

@ -1,333 +1,359 @@
<template>
<el-dialog class="beijing-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>站台</span></el-col>
</el-row>
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-detain-train"
:title="title"
:visible.sync="show"
width="380px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<el-form label-width="70px" size="mini" style="">
<el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;">
<span class="base-label" style="display:block; padding-left: 20px;">范围</span>
<el-radio-group :id="selfStationStandId" v-model="model.val1" @change="upAndDownStreamChangeVal1">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">本站台下行跳停</el-radio>
</div>
</el-radio-group>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="standName" size="small" disabled></el-input>
</el-col>
<el-col :span="10">
<el-radio-group id="stand_upDown_choose" :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">指定列车下行跳停</el-radio>
</div>
</el-radio-group>
</el-col>
<el-col :span="11" align="top" :offset="2">
<span>车组号</span>
<el-select
:id="selectTrainId"
v-model="model.tripNumber"
style="width: 110px;"
size="mini"
:disabled="!model.val2"
@change="trainNoSelectChange"
>
<el-option
v-for="option in trainList"
:key="option.groupNumber"
:label="option.groupNumber"
:value="option.groupNumber"
/>
</el-select>
</el-col>
</el-row>
<el-form label-width="70px" size="mini" style="">
<el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;">
<span class="base-label" style="display:block; padding-left: 20px;">范围</span>
<el-radio-group v-model="model.val1" :id="selfStationStandId" @change="upAndDownStreamChangeVal1">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">本站台下行跳停</el-radio>
</div>
</el-radio-group>
<el-row>
<el-col :span="10">
<el-radio-group id="stand_upDown_choose" v-model="model.val2" :id="otherStationStandId" @change="upAndDownStreamChange">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">指定列车下行跳停</el-radio>
</div>
</el-radio-group>
</el-col>
<el-col :span="11" align="top" :offset="2">
<span>车组号</span>
<el-select id="stand_trainNo_select" style="width: 110px;" v-model="model.tripNumber"
size="mini" @change="trainNoSelectChange" :disabled="!model.val2" :id="selectTrainId">
<el-option v-for="option in trainList" :key="option.groupNumber" :label="option.groupNumber"
:value="option.groupNumber">
</el-option>
</el-select>
</el-col>
</el-row>
</el-row>
</el-form>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio v-model="radio1" :label="JumpStopSet" :disabled="radio1 == JumpStopCancel"
style="display: block; text-align: left;">
设置</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="radio1" :label="JumpStopCancel" :disabled="radio1 == JumpStopSet"
style="display: block; text-align: left;">
取消</el-radio>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</el-row>
</el-form>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
:label="JumpStopSet"
:disabled="radio1 == JumpStopCancel"
style="display: block; text-align: left;"
>
设置</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
:label="JumpStopCancel"
:disabled="radio1 == JumpStopSet"
style="display: block; text-align: left;"
>
取消</el-radio>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandDetainTrains',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
trainList: [],
radio1: '',
model: {
val1: '',
val2: '',
tripNumber: '',
direction: '',
}
}
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selectTrainId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
}
},
selfStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.selfStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.selfStationStand.domId : '';
}
},
otherStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.otherStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.otherStationStand.domId : '';
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
return '跳停';
},
upstream() {
return '02'; //
},
downstream() {
return '01'; //
},
JumpStopSet() {
return OperationEvent.StationStand.setJumpStop.menu.operation;
},
JumpStopCancel() {
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
},
},
watch: {
'model.val1'(val) {
if (val) this.model.val2 = '';
},
'model.val2'(val) {
if (val) this.model.val1 = '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.radio1 = '',
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.radio1 = operate.operation;
this.model.direction = selected.direction;
this.model.val1 = selected.direction // , 01: /02:
this.model.val2 = '';
this.model.tripNumber = '';
export default {
name: 'StandDetainTrains',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
trainList: [],
radio1: '',
model: {
val1: '',
val2: '',
tripNumber: '',
direction: ''
}
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selectTrainId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
}
},
selfStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.selfStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.selfStationStand.domId : '';
}
},
otherStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.otherStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.otherStationStand.domId : '';
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
return '跳停';
},
upstream() {
return '02'; //
},
downstream() {
return '01'; //
},
JumpStopSet() {
return OperationEvent.StationStand.setJumpStop.menu.operation;
},
JumpStopCancel() {
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
}
},
watch: {
'model.val1'(val) {
if (val) this.model.val2 = '';
},
'model.val2'(val) {
if (val) this.model.val1 = '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.radio1 = '',
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.radio1 = operate.operation;
this.model.direction = selected.direction;
this.model.val1 = selected.direction; // , 01: /02:
this.model.val2 = '';
this.model.tripNumber = '';
/** 加载列车数据*/
this.trainList = this.map.trainList;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
/** 设置跳停*/
this.setJumpStop();
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
/** 取消跳停*/
this.cancelJumpStop();
}
},
//
setJumpStop() {
let val = this.model.val1;
if (this.model.val2) {
val = this.model.val2 + '::' + this.model.tripNumber;
}
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
// val: this.selected.direction //, 01: /02:
val: val,
}
/** 加载列车数据*/
this.trainList = this.map.trainList;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
/** 设置跳停*/
this.setJumpStop();
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
/** 取消跳停*/
this.cancelJumpStop();
}
},
//
setJumpStop() {
let val = this.model.val1;
if (this.model.val2) {
val = this.model.val2 + '::' + this.model.tripNumber;
}
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
// val: this.selected.direction //, 01: /02:
val: val
};
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);
})
},
//
cancelJumpStop() {
let val = this.model.val1;
if (this.model.val2) {
val = this.model.val2 + '::' + this.model.tripNumber;
}
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
val: val //, 01: /02:
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelJumpStop() {
let val = this.model.val1;
if (this.model.val2) {
val = this.model.val2 + '::' + this.model.tripNumber;
}
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
val: val // , 01: /02:
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
},
upAndDownStreamChange(val) {
let operation = this.radio1 == this.JumpStopSet ?
OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
this.model.val1 = '';
let operate = {
type: MapDeviceType.StationStand.type,
operation: operation
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
upAndDownStreamChangeVal1(val) {
let operation = this.radio1 == this.JumpStopSet ?
OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
this.model.val1 = '';
let operate = {
type: MapDeviceType.StationStand.type,
operation: operation
}
this.model.val2 = '';
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
trainNoSelectChange(val) {
let operation = this.radio1 == this.JumpStopSet ?
OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
this.model.val1 = '';
let operate = {
type: MapDeviceType.StationStand.type,
operation: operation,
val: val
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
}
}
this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
upAndDownStreamChange(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
this.model.val1 = '';
const operate = {
type: MapDeviceType.StationStand.type,
operation: operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
upAndDownStreamChangeVal1(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
this.model.val1 = '';
const operate = {
type: MapDeviceType.StationStand.type,
operation: operation
};
this.model.val2 = '';
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainNoSelectChange(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
this.model.val1 = '';
const operate = {
type: MapDeviceType.StationStand.type,
operation: operation,
val: val
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
};
</script>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>
</style>

View File

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

View File

@ -1,10 +1,15 @@
<template>
<el-dialog
class="beijing-01__systerm view-train-id"
title="列车识别号显示设置" :visible.sync="show" width="420px"
:before-close="doClose"
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
>
v-dialogDrag
class="beijing-01__systerm view-train-id"
title="列车识别号显示设置"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
@ -51,7 +56,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"/>
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
@ -66,7 +71,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"/>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
@ -76,20 +81,20 @@ import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16,
}
},
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;

View File

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

View File

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

View File

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

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,196 +1,209 @@
<template>
<el-dialog class="chengdou-03__systerm" :visible.sync="show" width="360px" :before-close="doClose" :zIndex="2000"
:modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-row>
<el-col :span="22" :offset="1">
<el-input placeholder="请使用软键盘输入" v-model="encryptionPassword" size="medium" :disabled="true"></el-input>
</el-col>
</el-row>
<el-row v-if="showMistake">
<el-col :span="22" :offset="1">
<span class="password-error">*密码输入错误请重新输入*</span>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">7</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">8</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">9</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">4</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">5</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">6</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">1</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">2</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">3</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">0</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputClear">C</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="backSpace">&lt-</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="12">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<el-row>
<el-col :span="22" :offset="1">
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
</el-col>
</el-row>
<el-row v-if="showMistake">
<el-col :span="22" :offset="1">
<span class="password-error">*密码输入错误请重新输入*</span>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">7</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">8</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">9</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">4</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">5</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">6</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">1</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">2</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">3</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">0</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputClear">C</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="backSpace"> &lt; </el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="12">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
export default {
name: 'passwordBox',
data() {
return {
/*写死的初始密码*/
correctPassword: '123456',
dialogShow: false,
operation: null,
checkHasInput: false,
/*输入值*/
passwordCheck: '',
/*输入值替换为对应长度的星号*/
encryptionPassword: '',
loading: false,
showMistake: false,
export default {
name: 'PasswordBox',
data() {
return {
/* 写死的初始密码*/
correctPassword: '123456',
dialogShow: false,
operation: null,
checkHasInput: false,
/* 输入值*/
passwordCheck: '',
/* 输入值替换为对应长度的星号*/
encryptionPassword: '',
loading: false,
showMistake: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel: {
get: function () {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
set: function () {
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel: {
get: function () {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
set: function () {
}
},
domIdConfirm: {
get: function () {
return OperationEvent.Command.close.confirm.domId;
},
set: function () {
}
domIdConfirm() {
if (this.operate && this.operate.operateCode) {
return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : '';
} else {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.dialogShow = true;
this.checkHasInput = false;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.showMistake = false;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.dialogShow = true;
this.checkHasInput = false;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
send: false,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
};
if (this.passwordCheck === this.correctPassword) {
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.showMistake = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
send: this.operate.operateCode != null,
type: this.operate.type,
operation: this.operate.operateCode != null ? this.operate.operateCode : OperationEvent.Command.close.confirm.operation
};
if (this.operate.val) {
operate['val'] = this.operate.val;
}
if (valid) {
this.$emit('checkOver', this.operate.operation);
this.doClose();
this.inputClear();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo.doShow(operate);
})
} else {
this.showMistake = true;
}
},
/*软键盘输入*/
inputNum(e) {
this.showMistake = false;
this.passwordCheck += e.path[0].innerText;
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
},
/*软键盘清除*/
inputClear() {
this.showMistake = false;
this.passwordCheck = '';
this.encryptionPassword = '';
},
/*软键盘回退*/
backSpace() {
this.showMistake = false;
let password = this.passwordCheck;
if (password !== '') {
this.passwordCheck = password.substring(0, password.length - 1);
this.encryptionPassword = this.passwordCheck;
}
},
cancel() {
let operate = {
send: false,
type: this.operate.type,
operation: OperationEvent.Command.close.password.operation,
};
if (this.passwordCheck === this.correctPassword) {
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$emit('checkOver');
this.doClose();
this.inputClear();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
});
} else {
this.showMistake = true;
}
},
/* 软键盘输入*/
inputNum(e) {
this.showMistake = false;
this.passwordCheck += e.path[0].innerText;
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
},
/* 软键盘清除*/
inputClear() {
this.showMistake = false;
this.passwordCheck = '';
this.encryptionPassword = '';
},
/* 软键盘回退*/
backSpace() {
this.showMistake = false;
const password = this.passwordCheck;
if (password !== '') {
this.passwordCheck = password.substring(0, password.length - 1);
this.encryptionPassword = this.passwordCheck;
}
},
cancel() {
const operate = {
send: false,
type: this.operate.type,
operation: OperationEvent.Command.close.password.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.inputClear();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>
<style>
@ -203,4 +216,4 @@
color: red;
}
</style>
</style>

View File

@ -1,363 +1,356 @@
<template>
<el-dialog class="chengdou-03__systerm signal-control" :title="title" :visible.sync="show" width="440px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="2"><span>车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="5" :offset="1"><span>始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row justify="center" style="margin-top: 50px">
<el-col :span="11" :offset="13">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<password-box ref="password" @checkOver="confirm"></password-box>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm signal-control"
:title="title"
:visible.sync="show"
width="440px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="2"><span>车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="5" :offset="1"><span>始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<el-row justify="center" style="margin-top: 50px">
<el-col :span="11" :offset="13">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<password-box ref="password" @checkOver="doClose" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
import PasswordBox from './childDialog/passwordInputBox';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
import PasswordBox from './childDialog/passwordInputBox';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteControl',
components: {
ConfirmControl,
PasswordBox,
NoticeInfo,
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempdata: [],
operation: null,
stationName: '',
signalName: ''
export default {
name: 'RouteControl',
components: {
ConfirmControl,
PasswordBox,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempdata: [],
operation: null,
stationName: '',
signalName: '',
operateCode: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return '取消列车进路';
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
return '总人解';
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
return '重开信号';
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
return '信号封锁';
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路收人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控';
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected, tempdata) {
this.selected = selected;
this.tempdata = tempdata;
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
this.operateCode = operate.code;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消列车进路*/
this.cancelTrainRoute();
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
/** 总人解*/
this.humanTrainRoute();
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
this.reopenSignal();
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
/** 信号封锁*/
this.lock();
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
this.unlock();
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路收人工控*/
this.humanControl();
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
this.atsAutoControl();
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
}
},
//
cancelTrainRoute() {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}
},
//
cancelTrainRouteByLocal() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
};
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return '取消列车进路';
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
return '总人解';
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
return '重开信号';
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
return '信号封锁';
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路收人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控';
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected, tempdata) {
this.selected = selected;
this.tempdata = tempdata;
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消列车进路*/
this.cancelTrainRoute();
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
/** 总人解*/
this.humanTrainRoute();
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
this.reopenSignal();
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
/** 信号封锁*/
this.lock();
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
this.unlock();
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路收人工控*/
this.humanControl();
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
this.atsAutoControl();
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
}
},
//
cancelTrainRoute() {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}
},
//
cancelTrainRouteByLocal() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelTrainRouteByCentral() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelTrainRouteByCentral() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
humanTrainRoute() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
operateCode: OperationEvent.Signal.humanTrainRoute.confirm.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);
});
},
//
humanTrainRoute() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
reopenSignal() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.reopenSignal.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$refs.password.doShow();
}
}).catch(error => {
});
},
//
reopenSignal() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.reopenSignal.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
lock() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.lock.menu.operation,
operateCode: OperationEvent.Signal.lock.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
lock() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.lock.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
}
}).catch(() => {
});
},
//
unlock() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.unlock.menu.operation,
operateCode: OperationEvent.Signal.unlock.confirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$refs.password.doShow();
}
}).catch(error => {
});
},
//
unlock() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.unlock.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
}
}).catch(() => {
});
},
//
humanControl() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation,
operateCode: OperationEvent.Signal.humanControl.confirm.operation,
val: this.operateCode
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$refs.password.doShow();
}
}).catch(error => {
});
},
//
humanControl() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation,
val: 'all'
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
}
}).catch(() => {
this.loading = false;
// this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
},
//
atsAutoControl() {
const operate = {
// send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
operateCode: OperationEvent.Signal.atsAutoControl.confirm.operation,
val: this.operateCode
};
this.loading = true;
this.$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);
});
},
//
atsAutoControl() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
val: 'all'
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
}
}).catch(() => {
this.loading = false;
// this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
},
//
signalClose() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.signalClose.menu.operation,
messages: [`信号关灯: ${this.signalName}`]
};
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);
});
},
//
signalClose() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.signalClose.menu.operation,
messages: [`信号关灯: ${this.signalName}`],
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
});
},
//
cancel() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(error => {
this.loading = false;
});
},
//
confirm() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
}
if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
//
operate.operation = OperationEvent.Signal.humanTrainRoute.menu.confirm;
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
//
operate.operation = OperationEvent.Signal.lock.menu.confirm;
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
//
operate.operation = OperationEvent.Signal.unlock.menu.confirm;
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancel() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
}
}
</script>
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>

View File

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

View File

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

View File

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

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,215 +1,230 @@
<template>
<el-dialog class="chengdou-03__systerm section-control" :title="title" :visible.sync="show" width="440px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="3"><span>车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="3" :offset="2"><span>区段</span></el-col>
<el-col :span="6">
<el-input v-model="sectionName" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="11" :offset="13">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm section-control"
:title="title"
:visible.sync="show"
width="440px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="3"><span>车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="3" :offset="2"><span>区段</span></el-col>
<el-col :span="6">
<el-input v-model="sectionName" size="small" disabled />
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="11" :offset="13">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="doClose" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PasswordBox from './childDialog/passwordInputBox';
export default {
name: 'SectionControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: '',
stationName: '',
sectionName: '',
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Section.lock.menu.operation) {
return '区段封锁';
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
return '区段控制';
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
return '区段控制';
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return '区故解'
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
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
export default {
name: 'SectionControl',
components: {
NoticeInfo,
PasswordBox
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: '',
stationName: '',
sectionName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Section.lock.menu.operation) {
return '区段封锁';
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
return '区段控制';
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
return '区段控制';
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return '区故解';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
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') {
const 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.operation = operate.operation || '';
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.Section.lock.menu.operation) {
/** 区段封锁*/
this.lock();
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
/** 轨道区段切除*/
this.split();
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
/** 轨道区段激活*/
this.active();
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区故解*/
this.fault();
}
},
//
lock() {
let operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.lock.menu.operation,
}
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation || '';
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.Section.lock.menu.operation) {
/** 区段封锁*/
this.lock();
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
/** 轨道区段切除*/
this.split();
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
/** 轨道区段激活*/
this.active();
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区故解*/
this.fault();
}
},
//
lock() {
const operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.lock.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.Section.type,
operation: OperationEvent.Section.split.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
split() {
const operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.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.Section.type,
operation: OperationEvent.Section.active.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
active() {
const operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.active.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
fault() {
let operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.fault.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
fault() {
const operate = {
// send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.fault.menu.operation,
operateCode: OperationEvent.Section.fault.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</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>

File diff suppressed because it is too large Load Diff

View File

@ -1,416 +1,360 @@
<template>
<el-dialog class="chengdou-03__systerm switch-control" :title="title" :visible.sync="show" width="300px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="11"><span>车站名称</span></el-col>
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="switchName" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<password-box ref="passwordBox" @checkOver="toSwitchControl"></password-box>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm switch-control"
:title="title"
:visible.sync="show"
width="300px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11"><span>车站名称</span></el-col>
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="switchName" size="small" disabled />
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="doClose" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PasswordBox from './childDialog/passwordInputBox';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PasswordBox from './childDialog/passwordInputBox';
export default {
name: 'SwitchControl',
components: {
NoticeInfo,
PasswordBox,
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: '',
stationName: '',
switchName: '',
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
return '道岔单锁';
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
return '道岔封锁';
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
return '道岔转动';
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
return '道岔强扳';
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
return '区段切除';
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
return '区段激活';
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
return '单操到定位';
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
return '单操到反位';
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
return '区故解';
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
return '道岔解锁';
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
return '道岔解封';
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.switchName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
//debugger;
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
/** 道岔单锁*/
this.lock();
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/* 道岔解锁*/
this.unlock();
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
/** 道岔转动*/
this.turnout(this.operation);
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
/** 道岔强扳*/
this.turnoutForce();
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
/** 区段激活*/
this.split();
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
/** 区段激活*/
this.active();
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
/*单操到正位*/
this.locate();
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
/*单操到反位*/
this.reverse();
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
/** 道岔封锁*/
this.openPasswordBox(this.operation);
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/*道岔解封*/
this.openPasswordBox(this.operation);
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/*区故解*/
this.openPasswordBox(this.operation);
}
},
//
lock() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.lock.menu.operation,
};
export default {
name: 'SwitchControl',
components: {
NoticeInfo,
PasswordBox
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: '',
stationName: '',
switchName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
return '道岔单锁';
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
return '道岔封锁';
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
return '道岔转动';
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
return '道岔强扳';
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
return '区段切除';
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
return '区段激活';
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
return '单操到定位';
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
return '单操到反位';
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
return '区故解';
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
return '道岔解锁';
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
return '道岔解封';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.switchName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
// debugger;
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
/** 道岔单锁*/
this.lock();
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/* 道岔解锁*/
this.unlock();
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
/** 道岔强扳*/
this.turnoutForce();
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
/* 单操到正位*/
this.locate();
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
/* 单操到反位*/
this.reverse();
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
/** 道岔封锁*/
this.openPasswordBox(this.operation, OperationEvent.Switch.block.confirm.operation);
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/* 道岔解封*/
this.openPasswordBox(this.operation, OperationEvent.Switch.unblock.confirm.operation);
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/* 区故解*/
this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation);
}
},
//
lock() {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.lock.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);
});
},
//
unlock() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.unlock.menu.operation,
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
unlock() {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.unlock.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);
});
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
block() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.block.menu.operation,
};
},
//
block() {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.block.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);
});
},
//
unblock() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.unblock.menu.operation,
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
unblock() {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.unblock.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);
});
},
//
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(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
turnoutForce() {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.turnoutForce.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
locate() {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.locate.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = true;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
reverse() {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.reverse.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = true;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
fault() {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.fault.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
openPasswordBox(operation, code) {
const operate = {
type: MapDeviceType.Switch.type,
operation: operation,
operateCode: code
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
toSwitchControl(operation) {
if (operation === OperationEvent.Switch.fault.menu.operation) {
this.fault();
} else if (operation === OperationEvent.Switch.block.menu.operation) {
this.block();
} else if (operation === OperationEvent.Switch.unblock.menu.operation) {
this.unblock();
}
},
cancel() {
const operate = {
type: MapDeviceType.Switch.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
turnoutForce() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.turnoutForce.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
split() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.split.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
active() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.active.menu.operation,
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
locate() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.locate.menu.operation,
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = true;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
reverse() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.reverse.menu.operation,
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = true;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
fault() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.fault.menu.operation,
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
openPasswordBox(operation) {
let operate = {
type: MapDeviceType.Switch.type,
operation: operation,
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
toSwitchControl(operation) {
if (operation === OperationEvent.Switch.fault.menu.operation) {
this.fault();
} else if (operation === OperationEvent.Switch.block.menu.operation) {
this.block();
} else if (operation === OperationEvent.Switch.unblock.menu.operation) {
this.unblock();
}
},
cancel() {
let operate = {
type: MapDeviceType.Switch.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

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

View File

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

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

View File

@ -1,10 +1,15 @@
<template>
<el-dialog
class="chengdou-03__systerm view-train-id"
title="列车识别号显示设置" :visible.sync="show" width="420px"
:before-close="doClose"
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
>
v-dialogDrag
class="chengdou-03__systerm view-train-id"
title="列车识别号显示设置"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
@ -51,7 +56,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"/>
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
@ -66,7 +71,7 @@ title="列车识别号显示设置" :visible.sync="show" width="420px"
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"/>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
@ -76,20 +81,20 @@ import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16,
}
},
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;

View File

@ -1,118 +1,120 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
<cancel-all-limit ref="cancelAllLimit"></cancel-all-limit>
</div>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<cancel-all-limit ref="cancelAllLimit" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import CancelAllLimit from './dialog/cancelAllLimit';
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
import PopMenu from '@/components/PopMenu';
import CancelAllLimit from './dialog/cancelAllLimit';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState } from './utils/menuItemStatus';
export default {
name: 'MenuLimit',
components: {
PopMenu,
CancelAllLimit,
},
props: {
selected: {
type: Object
}
},
data() {
return {
menu: [{
label: '取消全线临时限速',
handler: this.cancelSpeed,
disabledCallback: '',
auth: { station: true, center: false }
}],
menuNormal: {
local: [
{
label: '取消全线临时限速',
handler: this.cancelSpeed,
disabledCallback: MenuDisabledState.Section.cancelSpeed,
auth: { station: true, center: false }
}
],
central: [
{
label: '取消全线临时限速',
handler: this.cancelSpeed,
disabledCallback: MenuDisabledState.Section.cancelSpeed,
auth: { station: false, center: true }
}
]
},
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
let self = this;
window.onclick = function (e) {
self.doClose();
}
},
initMenu() {
//
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu]
}
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
cancelSpeed() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.LimitControl.type,
label: MapDeviceType.LimitControl.label,
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.cancelAllLimit.doShow(operate, this.selected);
}
});
},
}
}
</script>
export default {
name: 'MenuLimit',
components: {
PopMenu,
CancelAllLimit
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [{
label: '取消全线临时限速',
handler: this.cancelSpeed,
disabledCallback: '',
auth: { station: true, center: false }
}],
menuNormal: {
local: [
{
label: '取消全线临时限速',
handler: this.cancelSpeed,
disabledCallback: MenuDisabledState.Section.cancelSpeed,
auth: { station: true, center: false }
}
],
central: [
{
label: '取消全线临时限速',
handler: this.cancelSpeed,
disabledCallback: MenuDisabledState.Section.cancelSpeed,
auth: { station: false, center: true }
}
]
}
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu];
}
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
cancelSpeed() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.LimitControl.type,
label: MapDeviceType.LimitControl.label,
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.cancelAllLimit.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -1,403 +1,286 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
<section-control ref="sectionControl"></section-control>
<section-cmd-control ref="sectionCmdControl"></section-cmd-control>
<speed-cmd-control ref="speedCmdControl"></speed-cmd-control>
<train-create ref="trainCreate"></train-create>
<alxe-effective ref="alxeEffective"></alxe-effective>
<section-detail ref="sectionDetail"></section-detail>
<notice-info ref="noticeInfo"></notice-info>
</div>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<train-create ref="trainCreate" />
<section-detail ref="sectionDetail" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SectionCmdControl from './dialog/sectionCmdControl';
import SectionDetail from './dialog/sectionDetail';
import SpeedCmdControl from './dialog/speedCmdControl';
import TrainCreate from './dialog/trainCreate';
import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SectionDetail from './dialog/sectionDetail';
import TrainCreate from './dialog/trainCreate';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default {
name: 'SectionMenu',
components: {
PopMenu,
SectionControl,
SectionCmdControl,
SectionDetail,
SpeedCmdControl,
TrainCreate,
AlxeEffective,
NoticeInfo
},
props: {
selected: {
type: Object
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: '区故解',
handler: this.fault,
disabledCallback: MenuDisabledState.Section.fault,
auth: { station: true, center: false }
},
{
label: '属性',
handler: this.detail,
disabledCallback: MenuDisabledState.Section.setSpeed,
auth: { station: false, center: true }
},
// {
// label: '',
// handler: this.active,
// disabledCallback: MenuDisabledState.Section.active,
// 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: [
{
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 }
},
]
},
menuTrain: [
{
label: '新建列车',
handler: this.newTrain,
disabledCallback: MenuDisabledState.Section.newTrain
},
],
menuForce: [
{
label: '设置计轴失效',
handler: this.alxeFailure,
disabledCallback: MenuDisabledState.Section.alxeFailure
}
]
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
let self = this;
window.onclick = function (e) {
self.doClose();
}
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain]
}
export default {
name: 'SectionMenu',
components: {
PopMenu,
SectionControl,
SectionDetail,
TrainCreate,
NoticeInfo
},
props: {
selected: {
type: Object,
default: () => {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
// {
// label: '',
// handler: this.fault,
// disabledCallback: MenuDisabledState.Section.fault,
// auth: { station: true, center: false }
// }
],
central: [
{
label: '区故解',
handler: this.fault,
disabledCallback: MenuDisabledState.Section.fault,
auth: { station: true, center: false }
},
{
label: '设置临时限速',
handler: this.setSpeed,
disabledCallback: MenuDisabledState.Section.setSpeed,
auth: { station: false, center: true }
},
{
label: '属性',
handler: this.detail,
disabledCallback: MenuDisabledState.Section.setSpeed,
auth: { station: false, center: true }
}
]
},
menuTrain: [
{
label: '新建列车',
handler: this.newTrain,
disabledCallback: MenuDisabledState.Section.newTrain
}
],
menuForce: [
{
label: '设置计轴失效',
handler: this.alxeFailure,
disabledCallback: MenuDisabledState.Section.alxeFailure
},
{
label: this.$t('menu.menuSection.setFault'),
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Section.setStoppage
},
{
label: this.$t('menu.menuSection.cancelFault'),
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Section.cancelStoppage
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
alxeFailure() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.alxeFailure.menu.operation
};
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
alxeFailure() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.alxeFailure.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
newTrain() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.newtrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreate.doShow(operate, this.selected);
}
})
},
//
fault() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.fault.menu.operation
};
mouseCancelState(this.selected);
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);
});
},
//
newTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.newtrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreate.doShow(operate, this.selected);
}
});
},
//
fault() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.fault.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);
}
});
},
detail() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.detail.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionDetail.doShow(operate, this.selected);
}
})
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
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>
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionControl.doShow(operate, this.selected);
}
});
},
detail() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.detail.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionDetail.doShow(operate, this.selected);
}
});
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.stoppage.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.cancelStoppage.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
setSpeed() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.setSpeed.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.speedLimitControl.doShow(operate, this.selected);
}
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
}
}
};
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,153 +1,156 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
<notice-info ref="noticeInfo"></notice-info>
</div>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default {
name: 'StationMenu',
components: {
PopMenu,
NoticeInfo
},
props: {
selected: {
type: Object
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
],
central: [
],
},
menuForce: [
{
label: '设置ZC故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Station.setStoppage
},
{
label: '取消ZC故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Station.cancelStoppage
}
]
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
let self = this;
window.onclick = function (e) {
self.doClose();
}
},
initMenu() {
this.menu = [];
if (this.selected.concentrateStationCode == this.selected.code) {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce]
}
}
export default {
name: 'StationMenu',
components: {
PopMenu,
NoticeInfo
},
props: {
selected: {
type: Object,
default: () => {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
],
central: [
]
},
menuForce: [
{
label: '设置ZC故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Station.setStoppage
},
{
label: '取消ZC故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Station.cancelStoppage
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menu = [];
if (this.selected.concentrateStationCode == this.selected.code) {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
}
if (this.selected.centralized) {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce]
}
}
if (this.selected.centralized) {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
}
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.stoppage.menu.operation
};
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
cancelStoppage() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
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.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
}
}
}
</script>
mouseCancelState(this.selected);
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);
});
}
}
};
</script>

View File

@ -1,69 +1,69 @@
<template>
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
<pop-menu ref="popMenu" :menu="menu" />
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
export default {
name: 'StationControlMenu',
props: {
selected: {
type: Object
}
},
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [
],
menuForce: [
]
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
let self = this;
window.onclick = function (e) {
self.doClose();
}
},
doShow(point) {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
}
}
}
</script>
export default {
name: 'StationControlMenu',
components: {
PopMenu
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: [
],
menuForce: [
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
}
}
};
</script>

View File

@ -1,372 +1,345 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
<stand-control ref="standControl"></stand-control>
<stand-detail ref="standDetail"></stand-detail>
<notice-info ref="noticeInfo"></notice-info>
</div>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" />
<stand-detail ref="standDetail" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import StandControl from './dialog/standControl';
import StandDetail from './dialog/standDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
import PopMenu from '@/components/PopMenu';
import StandControl from './dialog/standControl';
import StandDetail from './dialog/standDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default {
name: 'StationStandMenu',
components: {
PopMenu,
StandControl,
StandDetail,
NoticeInfo,
},
props: {
selected: {
type: Object
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: '设置扣车',
handler: this.setDetainTrain,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: true },
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true },
},
{
label: '设置跳停',
handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: true },
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true },
},
{
label: '设置停站时间',
handler: this.setStopTime,
disabledCallback: MenuDisabledState.StationStand.setStopTime,
auth: { station: true, center: true },
},
{
label: '设置站间运行等级',
handler: this.setRunLevel,
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
auth: { station: true, center: true },
},
{
label: '属性',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: true, center: true },
}
],
central: [
{
label: '设置扣车',
handler: this.setDetainTrain,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: true },
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true },
},
{
label: '设置跳停',
handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: true },
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true },
},
{
label: '设置停站时间',
handler: this.setStopTime,
disabledCallback: MenuDisabledState.StationStand.setStopTime,
auth: { station: true, center: true },
},
{
label: '设置站间运行等级',
handler: this.setRunLevel,
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
auth: { station: true, center: true },
},
{
label: '属性',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: true, center: true },
}
]
},
menuForce: [
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.StationStand.setStoppage
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
}
]
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
let self = this;
window.onclick = function (e) {
self.doClose();
}
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce]
}
export default {
name: 'StationStandMenu',
components: {
PopMenu,
StandControl,
StandDetail,
NoticeInfo
},
props: {
selected: {
type: Object,
default: () => {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: '设置跳停',
handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: true }
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true }
}
],
central: [
{
label: '设置扣车',
handler: this.setDetainTrain,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: true }
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true }
},
{
label: '设置跳停',
handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: true }
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true }
},
{
label: '设置停站时间',
handler: this.setStopTime,
disabledCallback: MenuDisabledState.StationStand.setStopTime,
auth: { station: true, center: true }
},
{
label: '设置站间运行等级',
handler: this.setRunLevel,
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
auth: { station: true, center: true }
},
{
label: '属性',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: true, center: true }
}
]
},
menuForce: [
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.StationStand.setStoppage
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.stoppage.menu.operation
};
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
cancelStoppage() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
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.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
setDetainTrain() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
};
mouseCancelState(this.selected);
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);
});
},
//
setDetainTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
})
},
//
cancelDetainTrain() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
})
},
//
setJumpStop() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setJumpStop.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
})
},
//
cancelJumpStop() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
})
},
//
setStopTime() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setStopTime.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected, tempDate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
setRunLevel() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setRunLevel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected, tempDate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
detail() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.detail.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
}
}
}
</script>
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelDetainTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
setJumpStop() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setJumpStop.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelJumpStop() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
setStopTime() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setStopTime.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected, tempDate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
setRunLevel() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setRunLevel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected, tempDate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
detail() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.detail.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>

View File

@ -1,462 +1,453 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
<section-control ref="sectionControl"></section-control>
<switch-control ref="switchControl"></switch-control>
<notice-info ref="noticeInfo"></notice-info>
</div>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<switch-control ref="switchControl" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SwitchControl from './dialog/switchControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SwitchControl from './dialog/switchControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default {
name: 'SwitchMenu',
components: {
PopMenu,
SectionControl,
SwitchControl,
NoticeInfo
},
props: {
selected: {
type: Object
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: '单操到定位',
handler: this.locate,
disabledCallback: MenuDisabledState.Switch.locate,
auth: { station: true, center: true }
},
{
label: '单操到反位',
handler: this.reverse,
disabledCallback: MenuDisabledState.Switch.reverse,
auth: { station: true, center: true }
},
{
label: '道岔单锁',
handler: this.lock,
disabledCallback: MenuDisabledState.Switch.lock,
auth: { station: true, center: false }
},
{
label: '道岔解锁',
handler: this.unlock,
disabledCallback: MenuDisabledState.Switch.unlock,
auth: { station: true, center: true }
},
{
label: '道岔封锁',
handler: this.block,
disabledCallback: MenuDisabledState.Switch.block,
auth: { station: true, center: true }
},
{
label: '道岔解封',
handler: this.unblock,
disabledCallback: MenuDisabledState.Switch.unblock,
auth: { station: true, center: true }
},
{
label: '区故解',
handler: this.fault,
disabledCallback: MenuDisabledState.Switch.fault,
auth: { station: true, center: true }
},
{
label: '属性',
handler: this.undeveloped,
disabledCallback: MenuDisabledState.Switch.property,
auth: { station: true, center: true }
},
],
central: [
{
label: '单操到定位',
handler: this.locate,
disabledCallback: MenuDisabledState.Switch.locate,
auth: { station: true, center: true }
},
{
label: '单操到反位',
handler: this.reverse,
disabledCallback: MenuDisabledState.Switch.reverse,
auth: { station: true, center: true }
},
{
label: '道岔单锁',
handler: this.lock,
disabledCallback: MenuDisabledState.Switch.lock,
auth: { station: true, center: false }
},
{
label: '道岔解锁',
handler: this.unlock,
disabledCallback: MenuDisabledState.Switch.unlock,
auth: { station: true, center: true }
},
{
label: '道岔封锁',
handler: this.block,
disabledCallback: MenuDisabledState.Switch.block,
auth: { station: true, center: true }
},
{
label: '道岔解封',
handler: this.unblock,
disabledCallback: MenuDisabledState.Switch.unblock,
auth: { station: true, center: true }
},
{
label: '区故解',
handler: this.fault,
disabledCallback: MenuDisabledState.Switch.fault,
auth: { station: true, center: true }
},
{
label: '属性',
handler: this.undeveloped,
disabledCallback: MenuDisabledState.Switch.property,
auth: { station: true, center: true }
}
]
},
menuForce: [
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Switch.setStoppage,
auth: {
export default {
name: 'SwitchMenu',
components: {
PopMenu,
SectionControl,
SwitchControl,
NoticeInfo
},
props: {
selected: {
type: Object,
default: () => {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
// {
// label: '',
// handler: this.locate,
// disabledCallback: MenuDisabledState.Switch.locate,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.reverse,
// disabledCallback: MenuDisabledState.Switch.reverse,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.lock,
// disabledCallback: MenuDisabledState.Switch.lock,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.unlock,
// disabledCallback: MenuDisabledState.Switch.unlock,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.block,
// disabledCallback: MenuDisabledState.Switch.block,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.unblock,
// disabledCallback: MenuDisabledState.Switch.unblock,
// auth: { station: true, center: true }
// }
],
central: [
{
label: '单操到定位',
handler: this.locate,
disabledCallback: MenuDisabledState.Switch.locate,
auth: { station: true, center: true }
},
{
label: '单操到反位',
handler: this.reverse,
disabledCallback: MenuDisabledState.Switch.reverse,
auth: { station: true, center: true }
},
{
label: '道岔单锁',
handler: this.lock,
disabledCallback: MenuDisabledState.Switch.lock,
auth: { station: true, center: false }
},
{
label: '道岔解锁',
handler: this.unlock,
disabledCallback: MenuDisabledState.Switch.unlock,
auth: { station: true, center: true }
},
{
label: '道岔封锁',
handler: this.block,
disabledCallback: MenuDisabledState.Switch.block,
auth: { station: true, center: true }
},
{
label: '道岔解封',
handler: this.unblock,
disabledCallback: MenuDisabledState.Switch.unblock,
auth: { station: true, center: true }
},
{
label: '区故解',
handler: this.fault,
disabledCallback: MenuDisabledState.Switch.fault,
auth: { station: true, center: true }
}
// {
// label: '',
// handler: this.undeveloped,
// disabledCallback: MenuDisabledState.Switch.property,
// auth: { station: true, center: true }
// }
]
},
menuForce: [
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Switch.setStoppage,
auth: {
}
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Switch.cancelStoppage,
auth: {
}
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Switch.cancelStoppage,
auth: {
}
}
]
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
let self = this;
window.onclick = function (e) {
self.doClose();
}
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce]
}
}
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.stoppage.menu.operation
};
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
cancelStoppage() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
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.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
lock() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.lock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unlock() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.unlock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
block() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.block.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unblock() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.unblock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
switchTurnoutForce() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.turnoutForce.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
switchTurnout() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.turnout.menu.operation
};
mouseCancelState(this.selected);
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);
});
},
//
lock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.lock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unlock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.unlock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
block() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.block.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unblock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.unblock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
switchTurnoutForce() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.turnoutForce.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
switchTurnout() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.turnout.menu.operation
};
if (operate.operation) {
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
}
},
//
fault() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.fault.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
cancelSpeed() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.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);
}
});
},
if (operate.operation) {
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
}
},
// /
fault() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.fault.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
cancelSpeed() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.cancelSpeed.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
}
});
},
//
split() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.split.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
active() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.active.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
locate() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.locate.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
reverse() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.reverse.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
}
}
}
</script>
//
split() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.split.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
active() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.active.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
locate() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.locate.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
reverse() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.reverse.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
}
}
};
</script>

View File

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

View File

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

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) {
return true;
}
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Signal: {
@ -377,9 +391,6 @@ export const MenuDisabledState = {
// 单操到反位
reverse() {
},
// 区故解
solution() {
},
// 属性
property() {
}

View File

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

View File

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

View File

@ -1,72 +1,81 @@
<template>
<el-dialog class="chengdou-03__systerm notice-info" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span>{{message}}</span><br>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm notice-info"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<span class="context">
<template v-for="(message, index) in messages">
<span :key="index">{{ message }}</span>
</template>
</span>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'NoticeInfo',
data() {
return {
dialogShow: false,
messages: ['命令下达失败'],
operate: null
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages) {
this.messages = messages;
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
}
export default {
name: 'NoticeInfo',
data() {
return {
dialogShow: false,
messages: ['命令下达失败'],
operate: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages) {
this.messages = messages;
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
};
</script>
<style>
@ -74,4 +83,4 @@
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>
</style>

View File

@ -1,163 +1,173 @@
<template>
<el-dialog class="chengdou-03__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span>{{message}}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message, index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo'
import { OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo';
export default {
name: 'ConfirmTrain',
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
return '添加列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
return '修改列车识别号';
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
return '删除列车识别号';
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
return '移动列车识别号';
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
return '交换列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return '修改车组号'
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
/** 删除列车识别号*/
return OperationEvent.Train.delTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
/** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
/** 交换列车识别号*/
return OperationEvent.Train.switchTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
/** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId
}
}
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
this.operation = operate.operation;
}
export default {
name: 'ConfirmTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
return '添加列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
return '修改列车识别号';
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
return '删除列车识别号';
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
return '移动列车识别号';
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
return '交换列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return '修改车组号';
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
/** 删除列车识别号*/
return OperationEvent.Train.delTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
/** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
/** 交换列车识别号*/
return OperationEvent.Train.switchTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
/** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId;
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('map/setTrainWindowShow', false);
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
this.routeSetting();
}
},
//
routeSetting() {
let operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Train.addTrainId.confirm.operation,
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('map/setTrainWindowShow', false);
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
this.routeSetting();
}
},
//
routeSetting() {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Train.addTrainId.confirm.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);
})
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const 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();
});
}
}
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
@ -165,4 +175,4 @@
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>
</style>

View File

@ -1,85 +1,94 @@
<template>
<el-dialog class="chengdou-03__systerm popup-alarm" :title="title" :visible.sync="show" width="500px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-row>
<el-col :offset="2">
<span v-for="message in messages">{{message}}</span><br>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm popup-alarm"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<el-row>
<el-col :offset="2">
<span v-for="(message, index) in messages" :key="index">{{ message }}</span>
</el-col>
</el-row>
<el-button justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-button>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'Popup-Alarm',
data() {
return {
dialogShow: false,
messages: [],
operate: null,
operation: '',
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '弹出式告警';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.operation = operate.operation;
this.dialogShow = true;
this.messages = messages || [];
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
//
this.alxeEffective();
}
export default {
name: 'PopupAlarm',
data() {
return {
dialogShow: false,
messages: [],
operate: null,
operation: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '弹出式告警';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.operation = operate.operation;
this.dialogShow = true;
this.messages = messages || [];
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
//
this.alxeEffective();
}
},
alxeEffective() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation,
}
},
alxeEffective() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
})
}
}
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
}
}
};
</script>
<style>
@ -87,4 +96,4 @@
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>
</style>

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -1,211 +1,219 @@
<template>
<el-dialog class="chengdou-03__systerm stand-detail" :title="title" :visible.sync="show" width="380px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="10">
<span>车站</span>
</el-input>
</el-col>
<el-col :span="10" :offset="2">
<span>站台</span>
</el-col>
</el-row>
<el-row class="header">
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled>
</el-input>
</el-col>
<el-col :span="10" :offset="2">
<el-input style="padding: 0 3px;" v-model="standName" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>停站时间</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.stopTime" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>运行等级</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.runLevel" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>扣车</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.detainCar" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>跳停</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.jumpStop" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="18">
<span style="opacity: 0;">1</span>
</el-col>
<el-col :span="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-detail"
:title="title"
:visible.sync="show"
width="380px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10">
<span>车站</span>
</el-col>
<el-col :span="10" :offset="2">
<span>站台</span>
</el-col>
</el-row>
<el-row class="header">
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" style="padding: 0 3px;" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>停站时间</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.stopTime" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>运行等级</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.runLevel" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>扣车</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.detainCar" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>跳停</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.jumpStop" size="small" disabled />
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="18">
<span style="opacity: 0;">1</span>
</el-col>
<el-col :span="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
stationName: '',
standName: '',
strategyMap: {
'01': '无折返',
'02': '无人折返',
'03': '自动换端',
'04': '默认'
},
modelData: {
stopTime: '自动',
runLevel: '自动',
detainCar: '无扣车',
jumpStop: '无跳停',
},
}
},
computed: {
...mapGetters('map', [
'stationList',
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return '站台信息';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
export default {
name: 'StandDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
stationName: '',
standName: '',
strategyMap: {
'01': '无折返',
'02': '无人折返',
'03': '自动换端',
'04': '默认'
},
modelData: {
stopTime: '自动',
runLevel: '自动',
detainCar: '无扣车',
jumpStop: '无跳停'
}
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return '站台信息';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
let stationList = this.stationList.slice();
let index = this.stationList.findIndex(n => n.code == selected.stationCode);
let stationStand, station;
if (selected.direction == '01') { //
//
if (index != 0) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
} else {
//
if (index != this.stationList.length - 1) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
}
// const stationList = this.stationList.slice();
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
// let stationStand;
// let station;
if (selected.direction == '01') { //
//
if (index != 0) {
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
} else {
//
if (index != this.stationList.length - 1) {
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
}
this.modelData = {
stopTime: opts.parkingTime != -1 ? opts.parkingTime : '自动',
runLevel: opts.intervalRunTime > 0 ? '常速': '自动',
detainCar: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '无扣车',
jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停',
};
},
doShow(operate, selected, opts) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.direction == '01' ? '下行' : '上行';
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.modelData = {
stopTime: opts.parkingTime != -1 ? opts.parkingTime : '自动',
runLevel: opts.intervalRunTime > 0 ? '常速': '自动',
detainCar: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '无扣车',
jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停'
};
},
doShow(operate, selected, opts) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.direction == '01' ? '下行' : '上行';
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.close.confirm.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();
})
},
cancel() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.content {
margin-top: 20px;
}
</style>
</style>

View File

@ -1,127 +1,137 @@
<template>
<el-dialog class="chengdou-03__systerm two-confirmation" title="二次确认" :visible.sync="show" width="360px"
:before-close="doClose" :showClose="false" :zIndex="2000" :modal="false" :close-on-click-modal="false"
append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span> {{message}}</span><br>
</template>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm two-confirmation"
title="二次确认"
:visible.sync="show"
width="360px"
:before-close="doClose"
:show-close="false"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message, index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo'
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'TwoConfirmation',
data() {
return {
dialogShow: false,
loading: false,
operate: '',
timer: null,
domIdConfirm: ''
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
messages() {
if (this.operate) {
return this.operate.messages;
}
return []
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.domIdConfirm = '';
if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
} else if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
}
export default {
name: 'TwoConfirmation',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: '',
timer: null,
domIdConfirm: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
messages() {
if (this.operate) {
return this.operate.messages;
}
return [];
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.domIdConfirm = '';
if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
} else if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
}
this.operate = operate || {};
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.operate = operate || {};
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
})
},
commit() {
if (this.operate && this.operate.selection) {
let operate = {
send: true,
type: this.operate.type,
val: this.operate.val,
selection: this.operate.selection
}
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
},
commit() {
if (this.operate && this.operate.selection) {
const operate = {
send: true,
type: this.operate.type,
val: this.operate.val,
selection: this.operate.selection
};
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
}
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
}
this.loading = true;
this.doClose();
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}, 1000).catch((error) => {
this.loading = true;
this.$refs.noticeInfo.doShow(operate);
});
}
}
}
}
</script>
this.loading = true;
this.doClose();
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}, 1000).catch(() => {
this.loading = true;
this.$refs.noticeInfo.doShow(operate);
});
}
}
}
};
</script>

View File

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

View File

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

View File

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

View File

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

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