Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
7572e39664
@ -45,6 +45,7 @@ class Jlmap {
|
||||
// 显示集中站
|
||||
this.stationCode = '';
|
||||
this.isUpdateShowTrainList = false;
|
||||
this.isUpdateRunLineTrain = false;
|
||||
}
|
||||
|
||||
// 初始化属性有鼠标事件 缩放等
|
||||
@ -279,14 +280,14 @@ class Jlmap {
|
||||
}
|
||||
});
|
||||
|
||||
const prdType2ShowMode = { '01': '03', '02': '02'};
|
||||
const showMode = prdType2ShowMode[this.showConfig.prdType];
|
||||
const stationCode = this.stationCode;
|
||||
const prdType2ShowMode = { '01': '03', '02': '02'};
|
||||
const showMode = prdType2ShowMode[this.showConfig.prdType];
|
||||
const stationCode = this.stationCode;
|
||||
|
||||
this.updateShowMode(list, showMode);
|
||||
this.updateShowStation(list, stationCode);
|
||||
|
||||
if (this.methods.viewUpdate instanceof Function) { this.methods.viewUpdate(list); }
|
||||
if (this.methods.viewUpdate instanceof Function) { this.methods.viewUpdate(list); }
|
||||
}
|
||||
|
||||
// 中间处理
|
||||
@ -360,7 +361,7 @@ class Jlmap {
|
||||
});
|
||||
}
|
||||
}
|
||||
updateShowStation(list = [], stationCode = '') {
|
||||
updateShowStation(list = [], stationCode = '') {
|
||||
this.stationCode = stationCode;
|
||||
|
||||
store.dispatch('map/setShowCentralizedStationCode', stationCode);
|
||||
@ -388,18 +389,18 @@ class Jlmap {
|
||||
this.$painter.$transformHandle.setFoldLines([]);
|
||||
}
|
||||
}
|
||||
// 模式选择 -> 更新
|
||||
updateShowMode(list = [], showMode = '03') {
|
||||
this.showConfig.showMode = showMode;
|
||||
list.forEach(elem => {
|
||||
const code = elem.code;
|
||||
const type = elem._type;
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||
oDevice.showMode = showMode;
|
||||
this.$painter.updateShowMode(oDevice);
|
||||
});
|
||||
this.$painter.$transformHandle.revisibleAll();
|
||||
}
|
||||
// 模式选择 -> 更新
|
||||
updateShowMode(list = [], showMode = '03') {
|
||||
this.showConfig.showMode = showMode;
|
||||
list.forEach(elem => {
|
||||
const code = elem.code;
|
||||
const type = elem._type;
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||
oDevice.showMode = showMode;
|
||||
this.$painter.updateShowMode(oDevice);
|
||||
});
|
||||
this.$painter.$transformHandle.revisibleAll();
|
||||
}
|
||||
updatePrdType(list = [], showMode = '03', val = '') {
|
||||
this.showConfig.prdType = val;
|
||||
this.showConfig.showMode = showMode;
|
||||
@ -480,6 +481,7 @@ class Jlmap {
|
||||
} else {
|
||||
if (elem.deviceType === 'TRAIN') {
|
||||
this.isUpdateShowTrainList = true;
|
||||
if (elem.destinationCode) { this.isUpdateRunLineTrain = true; }
|
||||
store.commit('map/updateActiveTrainList', elem);
|
||||
} else if (elem.deviceType === 'STAND') {
|
||||
store.dispatch('map/updateStationStand', elem);
|
||||
@ -546,6 +548,10 @@ class Jlmap {
|
||||
store.dispatch('map/setActiveTrainList');
|
||||
this.isUpdateShowTrainList = false;
|
||||
}
|
||||
if (this.isUpdateRunLineTrain) {
|
||||
store.dispatch('map/setRunLineTrain');
|
||||
this.isUpdateRunLineTrain = false;
|
||||
}
|
||||
|
||||
if (selected && codeList.includes(selected.code)) {
|
||||
store.commit('menuOperation/setSelected', {device: {...selected}});
|
||||
@ -587,7 +593,7 @@ class Jlmap {
|
||||
const originX = payload.originX || zrWidth / 2;
|
||||
const originY = payload.originY || zrHeight / 2;
|
||||
|
||||
const x = (this.$options.offsetX + originX) / this.$options.scaleRate;
|
||||
const x = (this.$options.offsetX + originX) / this.$options.scaleRate;
|
||||
const y = (this.$options.offsetY + originY) / this.$options.scaleRate;
|
||||
const newScaleRate = this.$options.getScaleRate(payload.scale);
|
||||
const dx = originX - (x * newScaleRate - this.$options.offsetX);
|
||||
@ -615,7 +621,7 @@ class Jlmap {
|
||||
getShapeTipPoint(opts) {
|
||||
const device = adapter.adapterByDevice(this.mapDevice[opts.code], this.mapDevice);
|
||||
if (device) {
|
||||
return this.$painter.getShapeTipPoint(device.instance, opts);
|
||||
return this.$painter.getShapeTipPoint(device.instance, opts);
|
||||
}
|
||||
}
|
||||
|
||||
@ -638,9 +644,9 @@ class Jlmap {
|
||||
});
|
||||
}
|
||||
|
||||
clearEvent() {
|
||||
this.$zr.curEvent = null;
|
||||
}
|
||||
clearEvent() {
|
||||
this.$zr.curEvent = null;
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.lineCode = '';
|
||||
|
@ -121,13 +121,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -186,8 +186,6 @@ export default {
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
|
@ -191,8 +191,6 @@ export default {
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
|
@ -314,10 +314,8 @@ export default {
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
background: rgb(240 240 240);
|
||||
position: relative;
|
||||
left: -15px;
|
||||
top: -18px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .el-form-item label {
|
||||
|
@ -155,13 +155,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -126,13 +126,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -172,13 +172,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -125,8 +125,6 @@ export default {
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
|
@ -294,10 +294,8 @@ export default {
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
left: 0px;
|
||||
top: -20px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">{{ $t('menu.menuDialog.addLocation') }}</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<div style="position: relative; top:-25px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">{{ $t('menu.menuDialog.terminalOne') }}</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
|
||||
@ -158,10 +158,8 @@ export default {
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
top: -25px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
@ -138,13 +138,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -16,7 +16,7 @@
|
||||
</el-form-item>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">{{ $t('menu.menuDialog.purpose') }}</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<div style="position: relative; top:-25px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
|
||||
@ -155,3 +155,11 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
left: -5px;
|
||||
top: -25px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -205,4 +205,11 @@ export default {
|
||||
.elrow{
|
||||
margin-top:4px;
|
||||
}
|
||||
|
||||
.fuzhou-01__systerm .el-dialog .base-label {
|
||||
left: -10px;
|
||||
top: -24px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,19 +2,19 @@
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-table :data="tableData" height="397px" style="margin-top: 57px">
|
||||
<el-table-column prop="groupNumber" label="列车" />
|
||||
<el-table-column prop="groupNumber" label="班次" />
|
||||
<el-table-column prop="groupNumber" label="运行线" />
|
||||
<el-table-column prop="length" label="长度" />
|
||||
<el-table :id="domIdChoose" ref="trainTable" :data="tableData" height="397px" style="margin-top: 57px" :highlight-current-row="true" @current-change="handleChangeTrain">
|
||||
<el-table-column prop="trainName" label="列车" />
|
||||
<!-- <el-table-column prop="groupNumber" label="班次" /> -->
|
||||
<el-table-column prop="runPathName" label="运行线" />
|
||||
<!-- <el-table-column prop="length" label="长度" />
|
||||
<el-table-column prop="mode" label="模式" />
|
||||
<el-table-column prop="status" label="状态" />
|
||||
<el-table-column prop="status" label="状态" /> -->
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="13" :offset="1">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane label="运行线" name="first">
|
||||
<el-table ref="runLineTable" :data="runLineList" height="380px" :highlight-current-row="true" @current-change="handleChange">
|
||||
<el-table :id="domIdChoose1" ref="runLineTable" :data="runLineList" height="380px" :highlight-current-row="true" @current-change="handleChange">
|
||||
<el-table-column prop="name" label="运行线" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
@ -57,10 +57,10 @@
|
||||
</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">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="status" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>应用(A)</el-button>
|
||||
<el-button :loading="loading" :disabled="status" @click="commit(false)">应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||
@ -78,6 +78,7 @@ 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 {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { getSimulationDestinationList } from '@/api/jmap/mapdraft';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
@ -88,13 +89,16 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status:true,
|
||||
tableData: [],
|
||||
runLineList:[],
|
||||
activeName: 'first',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selectStandCode: '',
|
||||
showPath: false
|
||||
showPath: false,
|
||||
selectedTrain:'',
|
||||
selectedRunPath:''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -112,7 +116,10 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||
},
|
||||
domIdChoose1() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose1.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
@ -122,16 +129,17 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show) {
|
||||
this.commit();
|
||||
'$store.state.map.runLineTrainUpdate': function (val) {
|
||||
if (val) {
|
||||
this.getTrainList();
|
||||
this.status = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getSimulationDestinationList(this.$route.query.group).then(res=>{
|
||||
res.data.forEach(element => {
|
||||
this.runLineList.push({name:element.code + '(' + element.description + ')', runPath:element.runPath});
|
||||
this.runLineList.push({code:element.code, name:element.code + '(' + element.description + ')', runPath:element.runPath});
|
||||
});
|
||||
}).catch(()=>{
|
||||
});
|
||||
@ -141,6 +149,7 @@ export default {
|
||||
console.log('展开进路预览');
|
||||
},
|
||||
doShow(operate, activeName) {
|
||||
this.getTrainList();
|
||||
// this.$store.dispatch('menuOperation/setSelected', {device: selected});
|
||||
this.activeName = activeName;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
@ -149,34 +158,120 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
getTrainList() {
|
||||
this.tableData = [];
|
||||
const activeTrainList = this.$store.state.map.activeTrainList;
|
||||
activeTrainList.forEach((trainCode)=>{
|
||||
const train = this.$store.getters['map/getDeviceByCode'](trainCode);
|
||||
let destinationCode = train.destinationCode;
|
||||
const trainName = 'DD' + train.serviceNumber + train.tripNumber;
|
||||
if (train.destinationCode) {
|
||||
const runPath = this.runLineList.find((path)=>{ return path.code == train.destinationCode; });
|
||||
if (runPath) { destinationCode = runPath.name; }
|
||||
}
|
||||
this.tableData.push({code:train.groupNumber + ':' + train.serviceNumber, trainName:trainName, runPathName:destinationCode});
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.status = true;
|
||||
this.selectedRunPath = '';
|
||||
this.selectedTrain = '';
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
// this.$store.dispatch('menuOperation/setSelected', {device: {}});
|
||||
this.$refs.runLineTable.setCurrentRow();
|
||||
this.$refs.trainTable.setCurrentRow();
|
||||
// mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/setRunPathSelected', []);
|
||||
},
|
||||
commit() {
|
||||
commit(isClose = false) {
|
||||
// this.selectedRunPath = '';
|
||||
// this.selectedTrain = '';
|
||||
this.loading = true;
|
||||
const trainInfo = this.selectedTrain.split(':');
|
||||
const params = {
|
||||
groupNumber: trainInfo[0],
|
||||
destinationCode: this.selectedRunPath,
|
||||
serviceNumber: trainInfo[1]
|
||||
};
|
||||
const steps = {
|
||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||
over: true,
|
||||
param:params
|
||||
};
|
||||
steps.cmdType = CMD.TrainWindow.CMD_TRAIN_SET_HEAD;
|
||||
this.$store.dispatch('training/nextNew', steps).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.loading = false;
|
||||
if (isClose) {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
}).catch(() => {
|
||||
isClose && this.doClose();
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
judgeCanCommit() {
|
||||
if (this.selectedTrain && this.selectedRunPath) {
|
||||
this.status = false;
|
||||
} else {
|
||||
this.status = true;
|
||||
}
|
||||
},
|
||||
handleChange(row) {
|
||||
if (row) {
|
||||
const runPath = row.runPath;
|
||||
if (runPath && runPath.length > 0) {
|
||||
const oldRunPath = this.$store.state.training.runPathList;
|
||||
this.setRunPath(oldRunPath, false);
|
||||
this.setRunPath(runPath, true);
|
||||
this.$store.dispatch('training/setRunPathSelected', runPath);
|
||||
const step = {
|
||||
code: row.code,
|
||||
operation: OperationEvent.Command.common.choose1.operation,
|
||||
val: row.code
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
const oldRunPath = this.$store.state.training.runPathList;
|
||||
this.setRunPath(oldRunPath, false);
|
||||
this.setRunPath(runPath, true);
|
||||
this.selectedRunPath = row.code;
|
||||
this.judgeCanCommit();
|
||||
this.$store.dispatch('training/setRunPathSelected', runPath);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
|
||||
}
|
||||
} else {
|
||||
const runPath = this.$store.state.training.runPathList;
|
||||
this.setRunPath(runPath, false);
|
||||
}
|
||||
},
|
||||
handleChangeTrain(row) {
|
||||
if (row) {
|
||||
const step = {
|
||||
code: row.code,
|
||||
operation: OperationEvent.Command.common.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$store.dispatch('menuOperation/setSelected', {device: row});
|
||||
this.selectedTrain = row.code;
|
||||
this.judgeCanCommit();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
setRunPath(runPath, isShow) {
|
||||
runPath.forEach(sectionCode=>{
|
||||
|
@ -186,8 +186,6 @@ export default {
|
||||
</script>
|
||||
<style scoped>
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
|
@ -191,8 +191,6 @@ export default {
|
||||
</script>
|
||||
<style scoped>
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
|
@ -335,10 +335,8 @@ export default {
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
background: rgb(240 240 240);
|
||||
position: relative;
|
||||
left: -15px;
|
||||
top: -18px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .el-form-item label {
|
||||
|
@ -1,72 +1,6 @@
|
||||
<template>
|
||||
<div id="menuBar">
|
||||
<div class="nav">
|
||||
<template v-for="(item,i) in menu">
|
||||
<template v-if="noShowingChildren(item.children)">
|
||||
<li :id="item.operate.domId" :key="i" class="nav-li" @click="hookClick(item)">
|
||||
<span class="nav-li-text">{{ item.title }}</span>
|
||||
</li>
|
||||
</template>
|
||||
<template v-else>
|
||||
<li :id="item.operate.domId" :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">
|
||||
<template v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)">
|
||||
<li
|
||||
:id="child.operate.domId"
|
||||
:key="j"
|
||||
class="menu-li"
|
||||
@click.stop="selectedClassB(child, j)"
|
||||
>
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
<span class="label">{{ child.title }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<ul class="menu-ul" :class="{'active' :j==classB}">
|
||||
<template v-for="(grandchild,k) in child.children">
|
||||
<li
|
||||
v-if="grandchild.show"
|
||||
:id="grandchild.operate.domId"
|
||||
:key="k"
|
||||
class="menu-li"
|
||||
@click.stop="hookClick(grandchild)"
|
||||
>
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
<span class="label">{{ grandchild.title }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</li>
|
||||
</template>
|
||||
<template v-else>
|
||||
<li
|
||||
v-if="child.show"
|
||||
:id="child.operate.domId"
|
||||
:key="j"
|
||||
class="menu-li"
|
||||
@click.stop="hookClick(child)"
|
||||
>
|
||||
<div class="menu-li-block">
|
||||
<span class="menu-li-text">
|
||||
<span class="status"> </span>
|
||||
<span class="label">{{ child.title }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
</template>
|
||||
</ul>
|
||||
</li>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<div id="menuBarXian01">
|
||||
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
|
||||
<!--<div class="deviceStatus">-->
|
||||
<!--<div class="holdTrainStatus">H</div>-->
|
||||
<!--<div class="jumpStopStatus">S</div>-->
|
||||
@ -76,7 +10,6 @@
|
||||
<view-train-id ref="viewTrainId" />
|
||||
<view-name ref="viewName" />
|
||||
<view-device ref="viewDevice" />
|
||||
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
@ -85,11 +18,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
|
||||
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config.js';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import StationControlConvert from './menuDialog/stationControlConvert';
|
||||
import TrainAdd from './menuDialog/trainAdd';
|
||||
import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
@ -100,13 +30,12 @@ import ViewName from './menuDialog/viewName';
|
||||
import ViewDevice from './menuDialog/viewDevice';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'MenuBar',
|
||||
name: 'MenuBarXian01',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
MenuBar,
|
||||
StationControlConvert,
|
||||
PasswordBox,
|
||||
ViewTrainId,
|
||||
@ -128,12 +57,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
classA: -1,
|
||||
classB: -1,
|
||||
tempClassA: -1,
|
||||
tempClassB: -1,
|
||||
valid: true,
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
@ -399,133 +322,7 @@ export default {
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started',
|
||||
'steps',
|
||||
'order',
|
||||
'mode'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
tempClassA() {
|
||||
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
|
||||
},
|
||||
tempClassB() {
|
||||
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
|
||||
},
|
||||
'$store.state.menuOperation.break': function (val) {
|
||||
if (val) {
|
||||
this.classA = this.classB = -1;
|
||||
} else {
|
||||
this.classA = this.tempClassA;
|
||||
this.classB = this.tempClassB;
|
||||
}
|
||||
},
|
||||
'$store.state.training.operatemode': function (mode) {
|
||||
this.initMenu();
|
||||
},
|
||||
'$store.state.training.started': function (val) {
|
||||
this.closeMenu(true);
|
||||
},
|
||||
'$store.state.training.prdType': function () {
|
||||
this.initMenu();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initMenu();
|
||||
},
|
||||
methods: {
|
||||
initMenu(menu) {
|
||||
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[State2SimulationMap[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
||||
this.clickEvent();
|
||||
this.closeMenu(true);
|
||||
},
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
if (document.getElementById('menuBar')) {
|
||||
self.closeMenu(false);
|
||||
}
|
||||
};
|
||||
},
|
||||
noShowingChildren(children) {
|
||||
if (!children || children.length <= 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
hasShowingChildren(children) {
|
||||
if (children && children.length > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
closeMenu(flag) {
|
||||
if (flag || (this.mode !== TrainingMode.EDIT && this.mode !== TrainingMode.TEACH)) {
|
||||
this.classA = this.tempClassA = -1;
|
||||
this.classB = this.tempClassB = -1;
|
||||
}
|
||||
},
|
||||
hookClick(item, event) {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
if (item && typeof item.click == 'function') {
|
||||
item.click(item.operate);
|
||||
}
|
||||
},
|
||||
selectedClassA(item, index) {
|
||||
const order = this.order || 0;
|
||||
if (this.mode !== TrainingMode.TEACH) { // 编辑模式下可显示
|
||||
this.popupMenuA(item, index);
|
||||
} else if (this.steps[order] && this.steps[order].type == 'bar') { // 操作步骤没有顶部操作顶部菜单都不可显示
|
||||
this.popupMenuA(item, index);
|
||||
}
|
||||
},
|
||||
// 弹出顶部菜单操作
|
||||
popupMenuA(item, index) {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
this.clickEvent();
|
||||
const operate = {
|
||||
operation: item.operate.operation
|
||||
};
|
||||
if (this.$route.query.trainingId) {
|
||||
operate.code = this.$store.state.training.offsetStationCode;
|
||||
}
|
||||
this.tempClassA = index;
|
||||
this.tempClassB = -1;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
selectedClassB(item, index) {
|
||||
const order = this.order || 0;
|
||||
if (this.mode !== TrainingMode.TEACH) { // 编辑模式下可显示
|
||||
this.popupMenuB(item, index);
|
||||
} else if (this.steps[order] && this.steps[order].type == 'bar') { // 操作步骤没有顶部操作顶部菜单都不可显示
|
||||
this.popupMenuB(item, index);
|
||||
}
|
||||
},
|
||||
popupMenuB(item, index) {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
const operate = {
|
||||
operation: item.operate.operation
|
||||
};
|
||||
if (this.$route.query.trainingId) {
|
||||
operate.code = this.$store.state.training.offsetStationCode;
|
||||
}
|
||||
this.tempClassB = index;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
// 转为站控
|
||||
turnToStationControl(order) {
|
||||
const operate = {
|
||||
@ -533,7 +330,7 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
@ -546,7 +343,7 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
}
|
||||
@ -559,7 +356,7 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationControlConvert.doShow(operate);
|
||||
}
|
||||
@ -572,7 +369,7 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewTrainId.doShow(operate);
|
||||
}
|
||||
@ -585,7 +382,7 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewName.doShow(operate);
|
||||
}
|
||||
@ -598,7 +395,7 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.viewDevice.doShow(operate);
|
||||
}
|
||||
@ -611,7 +408,7 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainAdd.doShow(operate);
|
||||
}
|
||||
@ -624,7 +421,7 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainTranstalet.doShow(operate);
|
||||
}
|
||||
@ -637,7 +434,7 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDelete.doShow(operate);
|
||||
}
|
||||
@ -650,7 +447,7 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.manageUser.doShow(operate);
|
||||
}
|
||||
@ -663,7 +460,7 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.helpAbout.doShow(operate);
|
||||
}
|
||||
@ -671,7 +468,7 @@ export default {
|
||||
},
|
||||
// 刷新
|
||||
refresh() {
|
||||
this.closeMenu(true);
|
||||
this.$refs.menuBar.closeMenu(true);
|
||||
EventBus.$emit('refresh');
|
||||
},
|
||||
getLoginResult(operate) {
|
||||
@ -684,143 +481,18 @@ export default {
|
||||
}
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
|
||||
this.$refs.menuBar.doClose();
|
||||
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$nextTick(() => {
|
||||
EventBus.$emit('closeMenu');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$width: 30px;
|
||||
$height:30px;
|
||||
$menuPadding: 10px;
|
||||
$menuItemHeight: 30px;
|
||||
$menuItemWidth: 190px;
|
||||
$menuItemPadding: 5px;
|
||||
|
||||
#menuBar {
|
||||
z-index: 36;
|
||||
position: absolute;
|
||||
width: inherit;
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
color: #0000;
|
||||
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: linear-gradient(#FDFDFE, #DEE3F3);
|
||||
border: 1px solid #B6BCCC !important;
|
||||
border-bottom: 2px solid #B6BCCC !important;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.nav-li {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding-left: $menuPadding;
|
||||
padding-right: $menuPadding;
|
||||
}
|
||||
|
||||
.nav-li:active {
|
||||
background: #C9D0E1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.nav-li-text {
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.nav-ul {
|
||||
display: none;
|
||||
position: absolute;
|
||||
list-style: none;
|
||||
border: 1px solid gray !important;
|
||||
line-height: $menuItemHeight;
|
||||
width: $menuItemWidth;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.menu-ul {
|
||||
display: none;
|
||||
list-style: none;
|
||||
background: #F0F0F0;
|
||||
line-height: $menuItemHeight;
|
||||
width: $menuItemWidth;
|
||||
bottom: $menuItemHeight;
|
||||
}
|
||||
|
||||
.active {
|
||||
position: absolute;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.menu-ul-text {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
letter-spacing: 0;
|
||||
height: $menuItemHeight;
|
||||
line-height: $menuItemHeight;
|
||||
}
|
||||
|
||||
.menu-li {
|
||||
text-align: left;
|
||||
background: #F0F0F0;
|
||||
height: $menuItemHeight;
|
||||
line-height: $menuItemHeight;
|
||||
}
|
||||
|
||||
.menu-li-block {
|
||||
display: flex;
|
||||
letter-spacing: 0;
|
||||
height: $menuItemHeight;
|
||||
line-height: $menuItemHeight;
|
||||
}
|
||||
|
||||
.menu-li-text {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.menu-li-text .status {
|
||||
display: block;
|
||||
float: left;
|
||||
border-right: 1px inset #CACACA;
|
||||
width: $width;
|
||||
}
|
||||
|
||||
.menu-li-text .label {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.menu-li-block:hover {
|
||||
background: #C9DEF7;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.deviceStatus{
|
||||
display: inline-block;
|
||||
font-size: 0;
|
||||
@ -837,4 +509,11 @@ export default {
|
||||
background: #ccc;
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
#menuBarXian01{
|
||||
line-height:30px;
|
||||
}
|
||||
#menuBarXian01 #menuBar .menu-li-block .label{
|
||||
padding: 0px 30px 0px 5px !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -155,13 +155,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -126,13 +126,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -172,13 +172,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -123,13 +123,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -294,10 +294,8 @@ export default {
|
||||
</script>
|
||||
<style scoped>
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -10px;
|
||||
left: 0px;
|
||||
top: -20px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">{{ $t('menu.menuDialog.addLocation') }}</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<div style="position: relative; top:-25px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">{{ $t('menu.menuDialog.terminalOne') }}</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
|
||||
@ -160,10 +160,8 @@ export default {
|
||||
</script>
|
||||
<style scoped>
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
top: -25px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
@ -140,13 +140,3 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -16,7 +16,7 @@
|
||||
</el-form-item>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">{{ $t('menu.menuDialog.purpose') }}</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<div style="position: relative; top:-25px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
|
||||
@ -157,3 +157,11 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
left: -5px;
|
||||
top: -25px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -205,4 +205,11 @@ export default {
|
||||
.elrow{
|
||||
margin-top:4px;
|
||||
}
|
||||
|
||||
.xian-01__systerm .el-dialog .base-label {
|
||||
left: -10px;
|
||||
top: -24px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
|
@ -208,7 +208,7 @@ const map = {
|
||||
signalApproachSectionData: {}, // 信号机接近区段数据
|
||||
signalApproachSectionList: [], // 信号机接近区段list
|
||||
stepData: [], // 缓存数据
|
||||
mapName: '', //地图名称
|
||||
mapName: '', // 地图名称
|
||||
mapConfig: [], // 地图所属线路配置
|
||||
recoverStepData: [], // 缓存恢复数据
|
||||
seclectDeviceList: [], // 包围框选中元素列表
|
||||
@ -229,6 +229,7 @@ const map = {
|
||||
mousemove: 0, // 实训战场图移动标识
|
||||
version: '', // 地图版本,
|
||||
activeTrainListUpdate:0, // 当前按计划行车的列车列表更新标识
|
||||
runLineTrainUpdate:0, // 当前按计划行车列车运行线更新标识
|
||||
activeTrainListChange:0, // 当前按计划行车的列车列表变化标识(只对列车的groupNumber进行了检测)
|
||||
activeTrainList:[], // 当前按计划行车的列车列表
|
||||
showCentralizedStationCode: '', // 现地分集中站显示(集中站code)
|
||||
@ -662,10 +663,10 @@ const map = {
|
||||
state.map.trainWindowList = [...state.map.trainWindowList || []];
|
||||
}
|
||||
},
|
||||
// 设置地图名称
|
||||
setMapName: (state, name) => {
|
||||
state.mapName = name;
|
||||
},
|
||||
// 设置地图名称
|
||||
setMapName: (state, name) => {
|
||||
state.mapName = name;
|
||||
},
|
||||
// 设置地图数据
|
||||
setMapData: (state, map) => {
|
||||
if (map && map.skinVO) {
|
||||
@ -799,11 +800,15 @@ const map = {
|
||||
setActiveTrainList:(state) => {
|
||||
state.activeTrainListUpdate++;
|
||||
},
|
||||
setRunLineTrain:(state) => {
|
||||
state.runLineTrainUpdate++;
|
||||
},
|
||||
resetActiveTrainList:(state, isBack) => {
|
||||
state.activeTrainList = [];
|
||||
if (!isBack) {
|
||||
state.activeTrainListUpdate = 0;
|
||||
state.activeTrainListChange = 0;
|
||||
state.runLineTrainUpdate = 0;
|
||||
}
|
||||
},
|
||||
setDeleteCount: (state) => {
|
||||
@ -946,7 +951,7 @@ const map = {
|
||||
});
|
||||
mapData.graphDataNew.overlapList = overlapData;
|
||||
|
||||
commit('setMapName', mapData.name);
|
||||
commit('setMapName', mapData.name);
|
||||
commit('setMapData', mapData.graphDataNew);
|
||||
commit('setRouteData', mapData.logicDataNew.routeList);
|
||||
commit('setOverlapData', overlapData);
|
||||
@ -1104,6 +1109,9 @@ const map = {
|
||||
setActiveTrainList: ({ commit }) => {
|
||||
commit('setActiveTrainList');
|
||||
},
|
||||
setRunLineTrain: ({ commit }) => {
|
||||
commit('setRunLineTrain');
|
||||
},
|
||||
resetActiveTrainList: ({ commit }, isBack) => {
|
||||
commit('resetActiveTrainList', isBack);
|
||||
},
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="menu"
|
||||
@click.stop="onClick"
|
||||
@mouseenter.stop="onMouseEnter"
|
||||
@mouseleave.stop="onMouseLeave">
|
||||
@click.self="onClick"
|
||||
@mouseenter.self="onMouseEnter"
|
||||
@mouseleave.self="onMouseLeave">
|
||||
<slot name="prefix"/>
|
||||
<span class="menu-label" :class="{'menu-check': check}" :style="{color: color}">{{menu.title}}</span>
|
||||
<slot name="append"/>
|
||||
|
@ -9,7 +9,7 @@
|
||||
@mouseleave="onMouseLeave(el, i)">
|
||||
<template v-if="el.children&&el.children.length" slot="append">
|
||||
<span class="menu-arrow" />
|
||||
<menu-list class="menu-list" v-if="index==i" :background="background" :color="color" :menus="el.children"/>
|
||||
<menu-list class="menu-list" v-show="index==i" :background="background" :color="color" :menus="el.children"/>
|
||||
</template>
|
||||
</menu-item>
|
||||
</li>
|
||||
@ -49,18 +49,20 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onMouseEnter(el, i) {
|
||||
this.$emit('mouseenter', el, i);
|
||||
this.index = i;
|
||||
},
|
||||
onMouseLeave(el, i) {
|
||||
this.$emit('mouseleave', el, i);
|
||||
this.index = -1;
|
||||
console.log(999999999999999)
|
||||
},
|
||||
onClick(el, i) {
|
||||
this.$emit('click', el, i);
|
||||
if (el.disabled) return;
|
||||
|
||||
if (el.handle) {
|
||||
el.handle(el);
|
||||
this.$emit('close', el, i)
|
||||
this.index = -1;
|
||||
this.onMouseLeave(el, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,11 +4,10 @@
|
||||
<menu-item :menu="el"
|
||||
:check="active==i"
|
||||
@click="onClick(el, i)"
|
||||
@close="onMouseEnter(el, i)"
|
||||
@mouseenter="onMouseEnter(el, i)"
|
||||
@mouseleave="onMouseLeave(el, i)" :color="color" >
|
||||
<template v-if="el.children&&el.children.length" slot="append">
|
||||
<menu-list style="transform: translateY(-3px);" v-if="index==i" :menus="el.children" :background="background" :color="color" :elMenuClass="elMenuClass"/>
|
||||
<menu-list style="transform: translateY(-3px);" v-show="index==i" :menus="el.children" :background="background" :color="color" :elMenuClass="elMenuClass"/>
|
||||
</template>
|
||||
</menu-item>
|
||||
</div>
|
||||
@ -59,13 +58,15 @@ export default {
|
||||
if (el.disabled) return;
|
||||
if (el.handle) {
|
||||
el.handle(el);
|
||||
this.onMouseLeave();
|
||||
this.onMouseLeave(el, i);
|
||||
}
|
||||
},
|
||||
onMouseEnter(el, i) {
|
||||
this.index = i;
|
||||
console.log(333333333333333);
|
||||
},
|
||||
onMouseLeave(el, i) {
|
||||
console.log(444444444444444);
|
||||
this.index = -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user