宁波三号线menubar样式调整
This commit is contained in:
parent
af132ae2dd
commit
3f67544296
@ -3,6 +3,7 @@ class Theme {
|
||||
this._code = '02';
|
||||
this._mapMenu = {
|
||||
'01': 'chengdu_01',
|
||||
// '01': 'ningbo_03',
|
||||
'02': 'fuzhou_01',
|
||||
'03': 'beijing_01',
|
||||
'04': 'chengdu_03',
|
||||
|
@ -95,6 +95,7 @@
|
||||
<train-delete ref="trainDelete" />
|
||||
<manage-user ref="manageUser" />
|
||||
<help-about ref="helpAbout" />
|
||||
<arrange-route ref="arrangeRoute" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -108,6 +109,7 @@ import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import ArrangeRoute from './menuDialog/arrangeRoute';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config';
|
||||
@ -124,7 +126,8 @@ export default {
|
||||
TrainTranstalet,
|
||||
TrainDelete,
|
||||
ManageUser,
|
||||
HelpAbout
|
||||
HelpAbout,
|
||||
ArrangeRoute
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -155,7 +158,7 @@ export default {
|
||||
children: [
|
||||
{
|
||||
title: '排列进路',
|
||||
click: this.undeveloped
|
||||
click: this.handleArrangeRoute
|
||||
},
|
||||
{
|
||||
title: '分配',
|
||||
@ -569,7 +572,7 @@ export default {
|
||||
children: [
|
||||
{
|
||||
title: '排列进路',
|
||||
click: this.undeveloped
|
||||
click: this.handleArrangeRoute
|
||||
},
|
||||
{
|
||||
title: '分配',
|
||||
@ -1307,6 +1310,9 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
EventBus.$emit('closeMenu');
|
||||
});
|
||||
},
|
||||
handleArrangeRoute() {
|
||||
this.$refs.arrangeRoute.doShow();
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -1371,7 +1377,6 @@ export default {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
max-height: 550px;
|
||||
overflow-y: scroll;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
@ -1391,11 +1396,14 @@ export default {
|
||||
|
||||
.menu-ul {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 180px;
|
||||
transform: translateY(-30px);
|
||||
list-style: none;
|
||||
padding-left: 0 !important;
|
||||
background: #F0F0F0;
|
||||
line-height: $menuItemHeight;
|
||||
width: $menuItemWidth;
|
||||
bottom: $menuItemHeight;
|
||||
}
|
||||
|
||||
.active {
|
||||
|
256
src/jmapNew/theme/ningbo_03/menus/menuDialog/arrangeRoute.vue
Normal file
256
src/jmapNew/theme/ningbo_03/menus/menuDialog/arrangeRoute.vue
Normal file
@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="350px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-table :data="tableData">
|
||||
<el-table-column prop="groupNumber" label="列车" />
|
||||
<el-table-column prop="groupNumber" label="班次" />
|
||||
<el-table-column prop="groupNumber" label="运行线" />
|
||||
<el-table-column prop="groupNumber" label="模式" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane label="站台" name="first">站台</el-tab-pane>
|
||||
<el-tab-pane label="信号机" name="second">信号机</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<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="signalName" size="small" disabled />-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-row style="margin-top: 10px; line-height: 30px;">-->
|
||||
<!--<el-col :span="11"><span>进路列表</span></el-col>-->
|
||||
<!--<el-col :span="11" :offset="2">-->
|
||||
<!--<!– <el-button class="expand" @click="expandPath">展开进路预览</el-button> –>-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<!--<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 120px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">-->
|
||||
<!--<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />-->
|
||||
<!--</el-table>-->
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>帮助(H)</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
tableData: [{}],
|
||||
activeName: 'first',
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'overlapData'
|
||||
]),
|
||||
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;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.commitDisabled) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
expandPath() {
|
||||
console.log('展开进路预览');
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
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.row.canSetting = true;
|
||||
this.restoreBeforeDevices();
|
||||
const containSectionList = [];
|
||||
if (!row.setting) {
|
||||
// 设置选中区段为切除状态
|
||||
if (row.routeSectionList && row.routeSectionList.length) {
|
||||
// 设置新选的进路区段为切除状态
|
||||
row.routeSectionList.forEach(elem => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(item => {
|
||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
|
||||
sec.cutOff = true;
|
||||
containSectionList.push(sec);
|
||||
});
|
||||
} else {
|
||||
section.cutOff = true;
|
||||
containSectionList.push(section);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.overlapData[row.overlapCode] && this.overlapData[row.overlapCode].pathList && this.overlapData[row.overlapCode].pathList.length) {
|
||||
this.overlapData[row.overlapCode].pathList.forEach(item => {
|
||||
if (item.sectionList && item.sectionList.length) {
|
||||
item.sectionList.forEach(elem => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(logicSectionCode => {
|
||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](logicSectionCode));
|
||||
sec.cutOff = true;
|
||||
containSectionList.push(sec);
|
||||
});
|
||||
} else {
|
||||
section.cutOff = true;
|
||||
containSectionList.push(section);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
||||
this.beforeSectionList = containSectionList || [];
|
||||
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow('当前进路不允许排列, 与其他进路可能发生冲突');
|
||||
}
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user