Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
d3d17f7bf6
@ -84,7 +84,7 @@ class SkinCode extends defaultStyle {
|
||||
textShadowColor: '#22DFDF',
|
||||
nameShow: true,
|
||||
lineDash: [3, 3],
|
||||
lineWidthMore: 0
|
||||
lineWidthMore: 2.5
|
||||
},
|
||||
line: {
|
||||
width: 5, // 区段宽度
|
||||
|
@ -379,10 +379,7 @@ export default {
|
||||
/** 确认计轴恢复工作*/
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
over:true,
|
||||
type: this.operate.type,
|
||||
operation: '',
|
||||
val: this.selected.code,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
};
|
||||
|
@ -11,7 +11,7 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>车站名称</span></el-col>
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -25,7 +25,7 @@
|
||||
<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-button class="expand" @click="expandPath">展开进路预览</el-button> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
@ -35,7 +35,7 @@
|
||||
:cell-style="tableStyle"
|
||||
style="width: 100%; margin-top:10px"
|
||||
size="mini"
|
||||
height="120"
|
||||
height="160"
|
||||
highlight-current-row
|
||||
:show-header="false"
|
||||
@row-click="clickEvent"
|
||||
@ -230,10 +230,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -12,7 +12,7 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.signal') }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
@ -84,14 +84,12 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<popup-alarm ref="popupAlarm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import PopupAlarm from './childDialog/popupAlarm';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
@ -99,8 +97,7 @@ import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus'
|
||||
export default {
|
||||
name: 'AlxeEffective',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PopupAlarm
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -357,10 +354,6 @@ export default {
|
||||
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(() => {
|
||||
this.loading = false;
|
||||
|
@ -1,98 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__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><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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
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() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.popup-alarm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -21,7 +21,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
|
@ -1,401 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :z-index="2000" class="xian-02__system alxe-effective" :title="title" :visible.sync="show" width="420px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||
<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 v-model="model.stationName" :type="type" size="mini" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-input v-model="model.sectionName" :type="type" size="mini" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认</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 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-select
|
||||
:id="domIdChoose1"
|
||||
v-model="model.confirmStationCode"
|
||||
filterable
|
||||
size="mini"
|
||||
:disabled="type==='text'"
|
||||
@change="stationSelectChange"
|
||||
>
|
||||
<el-option v-for="(option,index) in filterStationList" :key="index" :label="option.name" :value="option.code" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-select
|
||||
:id="domIdChoose2"
|
||||
v-model="model.confirmSectionCode"
|
||||
filterable
|
||||
size="mini"
|
||||
:disabled="type==='text'"
|
||||
@change="sectionSelectChange"
|
||||
>
|
||||
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name" :value="option.code" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button
|
||||
:id="domIdConfirm2"
|
||||
size="mini"
|
||||
:loading="loading"
|
||||
:disabled="type==='text'"
|
||||
@click="commit"
|
||||
>确认</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;">
|
||||
<el-col :span="6" :offset="1">操作倒计时</el-col>
|
||||
<el-col :span="16">
|
||||
<el-input v-model="model.time" size="mini" :readonly="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="1">状态</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="1" :span="23">
|
||||
<el-input v-model="model.status" type="textarea" :rows="2" placeholder />
|
||||
</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" pop-class="xian-02__systerm" />
|
||||
<popup-alarm ref="popupAlarm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import PopupAlarm from './childDialog/popupAlarm';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'AlxeEffective',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PopupAlarm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: 'text',
|
||||
timeout: 1000,
|
||||
stepNum: 0,
|
||||
task: null,
|
||||
model: {
|
||||
stationName: '',
|
||||
sectionName: '',
|
||||
stationCode: '',
|
||||
sectionCode: '',
|
||||
confirmStationCode: '',
|
||||
confirmSectionCode: '',
|
||||
status: '',
|
||||
time: 0
|
||||
},
|
||||
selected: null,
|
||||
operate: null,
|
||||
operation: '',
|
||||
randomSectionList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', ['stationList', 'sectionList']),
|
||||
filterStationList() {
|
||||
const list = [];
|
||||
if (this.stationList) {
|
||||
this.stationList.forEach(elem => {
|
||||
if (
|
||||
list.findIndex(it => {
|
||||
return it.name == elem.name;
|
||||
}) < 0
|
||||
) {
|
||||
list.push({ name: elem.name, code: elem.code });
|
||||
}
|
||||
});
|
||||
}
|
||||
return list;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.confirm1.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.confirm2.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdChoose1() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.choose1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.choose1.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdChoose2() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.choose2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.choose2.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
if ( this.operation == OperationEvent.Section.alxeEffective.menu.operation || this.operation == OperationEvent.Switch.alxeEffective.menu.operation ) {
|
||||
return '确认计轴恢复工作';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
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.confirmStationCode = '';
|
||||
this.model.confirmSectionCode = '';
|
||||
this.model.sectionCode = '';
|
||||
this.model.stationCode = '';
|
||||
if (selected) {
|
||||
this.model.sectionCode = selected.code;
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.model.sectionName = `${section.name}-${selected.name}(${selected.code})`;
|
||||
} else {
|
||||
this.model.sectionName = `${selected.name}(${selected.code})`;
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionParentCode);
|
||||
if (section) {
|
||||
this.model.sectionName = `${section.name}(${section.code})`;
|
||||
this.model.sectionCode = section.code;
|
||||
}
|
||||
}
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
this.model.stationCode = station.code;
|
||||
}
|
||||
}
|
||||
|
||||
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');
|
||||
},
|
||||
getSectionList(code) {
|
||||
this.randomSectionList = [];
|
||||
this.sectionList.forEach(section => {
|
||||
if (section.stationCode == code) {
|
||||
let name = `${section.name}(${section.code})`;
|
||||
if (section.type == '02') {
|
||||
const sectionParent = this.$store.getters['map/getDeviceByCode'](section.parentCode);
|
||||
name = `${sectionParent.name}-${section.name}(${section.code})`;
|
||||
}
|
||||
this.randomSectionList.push({ name: `${name}`, code: section.code });
|
||||
}
|
||||
});
|
||||
},
|
||||
waitSelectEvent() {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
this.model.time -= 1;
|
||||
if (this.model.time <= 0) {
|
||||
this.stopTask();
|
||||
}
|
||||
}
|
||||
},
|
||||
commitOnce() {
|
||||
this.stepNum = 1;
|
||||
const operate = {
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm1.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.type = 'password';
|
||||
this.model.time = 60;
|
||||
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
||||
}
|
||||
});
|
||||
},
|
||||
stationSelectChange(code) {
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: code
|
||||
};
|
||||
this.getSectionList(code);
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
});
|
||||
},
|
||||
sectionSelectChange(code) {
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: code
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.choose2.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
});
|
||||
},
|
||||
/** 确认计轴恢复工作*/
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: '',
|
||||
cmdType: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_COMFIRMATION_AXLE;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE;
|
||||
}
|
||||
|
||||
this.model.status = '';
|
||||
if (this.model.stationCode == this.model.confirmStationCode && this.model.sectionCode == this.model.confirmSectionCode) {
|
||||
this.stepNum = 3;
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', 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;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
} else {
|
||||
if (this.model.stationCode != this.model.confirmStationCode) {
|
||||
this.model.status = '车站选择错误';
|
||||
} else if (
|
||||
this.model.sectionCode != this.model.confirmSectionCode
|
||||
) {
|
||||
this.model.status = '区段选择错误';
|
||||
}
|
||||
}
|
||||
},
|
||||
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>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.alxe-effective .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
</style>
|
@ -1,98 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-02__system 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><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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
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() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.popup-alarm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -4,7 +4,6 @@
|
||||
<section-control ref="sectionControl" pop-class="xian-02__systerm" />
|
||||
<section-un-lock ref="sectionUnLock" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" pop-class="xian-02__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
@ -14,7 +13,6 @@ import PopMenu from '@/components/PopMenu/index';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import SectionUnLock from './dialog/sectionUnLock';
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
@ -30,7 +28,6 @@ export default {
|
||||
SectionControl,
|
||||
SectionUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
@ -236,14 +233,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
|
@ -4,7 +4,6 @@
|
||||
<switch-control ref="switchControl" pop-class="xian-02__systerm" />
|
||||
<switch-un-lock ref="switchUnLock" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" pop-class="xian-02__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
@ -14,7 +13,6 @@ import PopMenu from '@/components/PopMenu/index';
|
||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
import SwitchUnLock from './dialog/switchUnLock';
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
@ -30,7 +28,6 @@ export default {
|
||||
SwitchControl,
|
||||
SwitchUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
@ -324,14 +321,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
enabledConfirm() {
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
device: this.selected,
|
||||
|
@ -153,7 +153,31 @@ export function deepAssign(obj, item) {
|
||||
const targetObj = item[keys].constructor == Array ? [] : {};
|
||||
target[keys] = deepAssign(targetObj, item[keys]);
|
||||
} else {
|
||||
target[keys] = item[keys];
|
||||
target[keys] = item[keys] || '';
|
||||
}
|
||||
}
|
||||
}
|
||||
return Object.assign(obj, target);
|
||||
}
|
||||
|
||||
// 对象深拷贝并赋值
|
||||
export function deepAssigns(obj, item) {
|
||||
const target = item.constructor === Array ? [] : {}; // 判断复制的目标是数组还是对象
|
||||
for (const keys in obj) {
|
||||
if (item.hasOwnProperty(keys) && keys != 'instance') { // instance 对面不拷贝
|
||||
if (item[keys] && typeof item[keys] == 'object') { // 如果值是对象,就递归一下
|
||||
const targetObj = item[keys].constructor == Array ? [] : {};
|
||||
target[keys] = deepAssign(targetObj, item[keys]);
|
||||
} else {
|
||||
target[keys] = item[keys] || '';
|
||||
}
|
||||
} else {
|
||||
if (typeof obj[keys] == 'boolean') {
|
||||
target[keys] = false;
|
||||
} else if (typeof obj[keys] == 'number') {
|
||||
target[keys] = 0;
|
||||
} else if (typeof obj[keys] == 'string') {
|
||||
target[keys] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -498,9 +498,8 @@ export default {
|
||||
},
|
||||
saveMapEvent() { // 保存地图
|
||||
const map = this.$store.state.map.map;
|
||||
// map.signalList.forEach(item => {
|
||||
// item.namePosition = { x: 0, y: 0 };
|
||||
// item.lampPositionType = '02';
|
||||
// map.sectionList.forEach(item => {
|
||||
// item.belongStation = '';
|
||||
// });
|
||||
if (this.$refs.jlmapVisual && map && parseInt(this.$route.params.mapId)) {
|
||||
if (this.verifySectionPoint(map)) {
|
||||
|
@ -56,7 +56,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import JTriangle from '@/jmapNew/utils/JTriangle';
|
||||
import ConfigList from '../config/list';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import { deepAssign, deepAssigns } from '@/utils/index';
|
||||
import LogicBlock from './logicBlock';
|
||||
import TipInfo from './tipInfo';
|
||||
import CreateSection from './create';
|
||||
@ -501,7 +501,7 @@ export default {
|
||||
}
|
||||
this.clear();
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel = deepAssigns(this.editModel, selected);
|
||||
this.oldPoint = selected.points;
|
||||
this.oldLeftSectionCode = selected.leftSectionCode;
|
||||
this.oldRightSectionCode = selected.rightSectionCode;
|
||||
|
Loading…
Reference in New Issue
Block a user