调整宁波列车故障右键
This commit is contained in:
parent
fccbc9ecd0
commit
6817323fe1
@ -108,7 +108,11 @@ export default {
|
||||
selected._type = '';
|
||||
}
|
||||
}
|
||||
this.deviceName = deviceType[selected._type] + '-' + selected.name;
|
||||
let name = selected.name;
|
||||
if (selected._type == 'Train') {
|
||||
name = selected.serviceNumber;
|
||||
}
|
||||
this.deviceName = deviceType[selected._type] + '-' + name;
|
||||
this.faultList = deviceFaultType[selected._type];
|
||||
if (this.faultList && this.faultList.length) {
|
||||
this.form.faultType = this.faultList[0].value;
|
||||
|
@ -12,12 +12,14 @@
|
||||
<train-set-head ref="trainSetHead" />
|
||||
<train-set-work ref="trainSetWork" />
|
||||
<trainSetWorkATP ref="trainSetWorkATP" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import TrainDelete from './dialog/trainDelete';
|
||||
import TrainDefine from './dialog/trainDefine';
|
||||
import TrainMove from './dialog/trainMove';
|
||||
@ -31,7 +33,8 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
@ -44,7 +47,8 @@ export default {
|
||||
TrainSetPlan,
|
||||
TrainSetHead,
|
||||
TrainSetWork,
|
||||
trainSetWorkATP
|
||||
trainSetWorkATP,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -199,11 +203,11 @@ export default {
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.undeveloped
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.undeveloped
|
||||
handler: this.cancelStoppage
|
||||
}
|
||||
],
|
||||
menuSpeed: [
|
||||
@ -263,44 +267,60 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.stoppage.menu.operation
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.cancelStoppage.menu.operation
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// // 设置故障
|
||||
// setStoppage() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Train.stoppage.menu.operation
|
||||
// };
|
||||
|
||||
// mouseCancelState(this.selected);
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// } else {
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// });
|
||||
// },
|
||||
// // 取消故障
|
||||
// cancelStoppage() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// send: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Train.cancelStoppage.menu.operation
|
||||
// };
|
||||
|
||||
// mouseCancelState(this.selected);
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// } else {
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// });
|
||||
// },
|
||||
// 限速行驶
|
||||
limitSpeed() {
|
||||
const operate = {
|
||||
|
@ -2,9 +2,9 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
|
@ -230,7 +230,6 @@ export default {
|
||||
},
|
||||
getFailureRulesNew(params) {
|
||||
if (this.dialogShow) {
|
||||
console.log(params, this.dialogShow, '=====');
|
||||
params['lineCode'] = this.$route.query.lineCode;
|
||||
return getFailureRulesNew(params);
|
||||
}
|
||||
|
@ -183,15 +183,15 @@ export default {
|
||||
},
|
||||
'$store.state.training.prdType': function (val) {
|
||||
this.setPosition();
|
||||
if (val === '01' && this.$route.query.lineCode === '06') {
|
||||
if (val == '01' && this.$route.query.lineCode == '06') {
|
||||
this.showSelectStation = true;
|
||||
this.mapViewLoadedOver && this.setShowStation(this.showStation);
|
||||
this.cancelBigScreenMode();
|
||||
} else if (val === '02' && this.$route.query.lineCode === '06') {
|
||||
} else if (val == '02' && this.$route.query.lineCode == '06') {
|
||||
this.showSelectStation = false;
|
||||
this.mapViewLoadedOver && this.setShowStation('');
|
||||
this.cancelBigScreenMode();
|
||||
} else if (val === '07') { // 大屏
|
||||
} else if (val == '07') { // 大屏
|
||||
this.setBigScreenMode();
|
||||
} else {
|
||||
this.cancelBigScreenMode();
|
||||
@ -248,7 +248,7 @@ export default {
|
||||
this.group = this.$route.query.group;
|
||||
this.mapId = this.$route.query.mapId;
|
||||
this.lineCode = this.$route.query.lineCode;
|
||||
this.drawWay = this.$route.query.drawWay;
|
||||
// this.drawWay = this.$route.query.drawWay;
|
||||
Message.closeAll();
|
||||
},
|
||||
async mounted() {
|
||||
@ -458,7 +458,6 @@ export default {
|
||||
resp = await this.getUserRole();
|
||||
}
|
||||
if (resp && resp.code == 200) {
|
||||
this.userRole = resp.data.type || 'AUDIENCE';
|
||||
this.setSimulationPrdType();
|
||||
}
|
||||
await this.getTrainDetail();
|
||||
@ -471,11 +470,33 @@ export default {
|
||||
// Admin 管理员 Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号 IBP:IBP盘
|
||||
switch (this.userRole) {
|
||||
// case 'ADMIN': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'ADMIN'); this.hideIbp(); break;
|
||||
case 'DISPATCHER': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'DISPATCHER'); this.hideIbp(); this.drivingShow = false; break;
|
||||
case 'STATION_SUPERVISOR': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR'); this.hideIbp(); this.drivingShow = false; break;
|
||||
case 'AUDIENCE': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'AUDIENCE'); this.hideIbp(); break;
|
||||
case 'DRIVER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'DRIVER'); break;
|
||||
case 'MAINTAINER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'MAINTAINER'); this.hideIbp(); this.jl3dmaintainershow = true; break;
|
||||
case 'DISPATCHER':
|
||||
this.$store.dispatch('training/setPrdType', '02');
|
||||
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
||||
this.hideIbp();
|
||||
this.drivingShow = false;
|
||||
break;
|
||||
case 'STATION_SUPERVISOR':
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
||||
this.hideIbp();
|
||||
this.drivingShow = false;
|
||||
break;
|
||||
case 'AUDIENCE':
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
||||
this.hideIbp();
|
||||
break;
|
||||
case 'DRIVER':
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
this.$store.dispatch('training/setRoles', 'DRIVER');
|
||||
break;
|
||||
case 'MAINTAINER':
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
this.$store.dispatch('training/setRoles', 'MAINTAINER');
|
||||
this.hideIbp();
|
||||
this.jl3dmaintainershow = true;
|
||||
break;
|
||||
}
|
||||
if (this.isAdmin && this.adminMode) {
|
||||
this.$store.dispatch('training/setPrdType', swch || '02');
|
||||
@ -658,7 +679,7 @@ export default {
|
||||
addSimulationMember() {
|
||||
this.$refs.addMember.doShow();
|
||||
},
|
||||
changeAdminMode(adminMode, swch) {
|
||||
changeAdminMode(adminMode, swch) { // (管理/演练)模式
|
||||
this.adminMode = adminMode;
|
||||
this.setSimulationPrdType(swch);
|
||||
},
|
||||
|
@ -5,7 +5,6 @@
|
||||
v-model="swch"
|
||||
size="small"
|
||||
style="width: 100px;"
|
||||
:placeholder="this.$t('rules.productTypeInput')"
|
||||
@change="switchMode"
|
||||
>
|
||||
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
@ -19,7 +18,7 @@
|
||||
</template>
|
||||
<template v-if="isAdmin && adminMode">
|
||||
<el-button v-if="!runing && !dataError" size="small" type="warning" @click="loadRunPlan">
|
||||
{{ $t('joinTraining.runGraphLoading') }}</el-button>
|
||||
{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
|
||||
</template>
|
||||
<template v-if="isAdmin && adminMode">
|
||||
<el-button v-if="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
|
||||
|
Loading…
Reference in New Issue
Block a user