调整西安二号线车站操作

This commit is contained in:
zyy 2020-04-26 14:47:43 +08:00
parent 2210965709
commit ecd361ddbe
5 changed files with 42 additions and 71 deletions

View File

@ -24,8 +24,8 @@
</el-row> </el-row>
<div v-if="passModel"> <div v-if="passModel">
<div style="height: 12px" /> <div style="height: 12px" />
<el-radio :id="upRadioId" v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'" @change="changeRadio">设置自动通过</el-radio> <el-radio v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'" @change="changeRadio">设置自动通过</el-radio>
<el-radio :id="upRadioId" v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'" @change="changeRadio">取消自动通过</el-radio> <el-radio v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'" @change="changeRadio">取消自动通过</el-radio>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">

View File

@ -63,6 +63,7 @@ export default {
selected: null, selected: null,
row: null, row: null,
operation: '', operation: '',
checked2: '',
stationLists: [], stationLists: [],
disabledAll: false disabledAll: false
}; };

View File

@ -24,10 +24,10 @@
</el-row> </el-row>
<el-row style="margin: 12px 0;"> <el-row style="margin: 12px 0;">
<el-col :span="11"> <el-col :span="11">
<el-radio :id="upRadioId" v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'">设置</el-radio> <el-radiov-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'">设置</el-radiov-model="passRadio">
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-radio :id="upRadioId" v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'">取消</el-radio> <el-radio v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'">取消</el-radio>
</el-col> </el-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -45,7 +45,7 @@
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; // import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '../utils/menuOperate'; import {menuOperate, commitOperate} from '../utils/menuOperate';

View File

@ -40,50 +40,39 @@ export default {
return { return {
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [ Local: [],
{
label: '全站设置联锁自动触发',
handler: this.setAutoTrigger,
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
auth: { station: true, center: false }
},
{
label: '全站取消联锁自动触发',
handler: this.cancelAutoTrigger,
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
auth: { station: true, center: false }
},
{
label: '上电解锁',
handler: this.powerUnLock,
disabledCallback: MenuDisabledState.Station.powerUnLock,
auth: { station: true, center: false }
},
{
label: '执行关键操作测试',
handler: this.execKeyOperationTest,
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
auth: { station: true, center: false }
}
],
Center: [ Center: [
{ {
label: '所有进路自排关', label: '本地控制许可',
handler: this.humanControlALL, handler: this.humanControlALL,
disabledCallback: MenuDisabledState.Station.humanControlALL, disabledCallback: MenuDisabledState.Station.humanControlALL,
auth: { station: false, center: true } auth: { station: false, center: true },
}, children: [
{ {
label: '所有进路自排开', label: '请求',
handler: this.atsAutoControlALL, handler: this.atsAutoControlALL,
disabledCallback: MenuDisabledState.Station.atsAutoControlALL, disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
auth: { station: false, center: true } auth: { station: false, center: true }
}, },
{ {
label: '执行关键操作测试', label: '授权',
handler: this.execKeyOperationTest, handler: this.atsAutoControlALL,
disabledCallback: MenuDisabledState.Station.execKeyOperationTest, disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
auth: { station: false, center: true } auth: { station: false, center: true }
},
{
label: '取消',
handler: this.atsAutoControlALL,
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
auth: { station: false, center: true }
},
{
label: '紧急本地控制',
handler: this.atsAutoControlALL,
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
auth: { station: false, center: true }
}
]
} }
] ]
}, },
@ -128,9 +117,11 @@ export default {
}, },
initMenu() { initMenu() {
this.menu = []; this.menu = [];
debugger;
if (this.selected.concentrateStationCode == this.selected.code) { if (this.selected.concentrateStationCode == this.selected.code) {
// //
this.menu = menuFiltration(this.menuNormal); // this.menu = menuFiltration(this.menuNormal);
this.menu = [...this.menuNormal.Center];
if (this.operatemode === OperateMode.ADMIN) { if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce]; this.menu = [...this.menu, ...this.menuForce];
} }
@ -144,6 +135,7 @@ export default {
} }
this.menu = menuConvert(this.menu); this.menu = menuConvert(this.menu);
console.log(this.menu, 'menu');
}, },
doShow(point) { doShow(point) {
this.clickEvent(); this.clickEvent();

View File

@ -11,7 +11,7 @@ import StationControl from './dialog/stationControl';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; // import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default { export default {
@ -32,30 +32,8 @@ export default {
return { return {
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [ Local: [],
{ Center: []
label: '请求站控',
handler: this.setStationControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
},
{
label: '请求遥控',
handler: this.setCenterControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
}
],
Center: [
{
label: '请求站控',
handler: this.setStationControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
},
{
label: '请求遥控',
handler: this.setCenterControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
}
]
}, },
menuForce: [ menuForce: [
] ]