删除多余指令
This commit is contained in:
parent
912f61cda7
commit
9e5838c647
@ -127,7 +127,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
resetShowPosition(point) {
|
resetShowPosition(point) {
|
||||||
console.log(point);
|
|
||||||
if (point) {
|
if (point) {
|
||||||
this.show = true;
|
this.show = true;
|
||||||
const self = this;
|
const self = this;
|
||||||
|
@ -1,196 +1,208 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="batong-01__systerm confirm-control" :title="title" :visible.sync="show" width="320px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row>
|
class="batong-01__systerm confirm-control"
|
||||||
<el-col :span="20" :offset="2">
|
:title="title"
|
||||||
<div style="float: left; line-height: 33px; font-size: 15px;">车站:</div>
|
:visible.sync="show"
|
||||||
<div style="float: left; width: 140px; margin-left: 10px;">
|
width="320px"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
:before-close="doClose"
|
||||||
</div>
|
:z-index="2000"
|
||||||
</el-col>
|
:modal="false"
|
||||||
<el-col :span="20" :offset="2" style="margin-top: 10px;">
|
:close-on-click-modal="false"
|
||||||
<div style="float: left; line-height: 33px; font-size: 15px;">{{tipContent}}:</div>
|
append-to-body
|
||||||
<div style="float: left; width: 140px; margin-left: 10px;">
|
>
|
||||||
<el-input v-model="splitName" size="small" disabled></el-input>
|
<el-row>
|
||||||
</div>
|
<el-col :span="20" :offset="2">
|
||||||
</el-col>
|
<div style="float: left; line-height: 33px; font-size: 15px;">车站:</div>
|
||||||
</el-row>
|
<div style="float: left; width: 140px; margin-left: 10px;">
|
||||||
<el-row justify="center" class="button-group">
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
<el-col :span="10" :offset="2">
|
</div>
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="20" :offset="2" style="margin-top: 10px;">
|
||||||
<el-col :span="8" :offset="4">
|
<div style="float: left; line-height: 33px; font-size: 15px;">{{ tipContent }}:</div>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<div style="float: left; width: 140px; margin-left: 10px;">
|
||||||
</el-col>
|
<el-input v-model="splitName" size="small" disabled />
|
||||||
</el-row>
|
</div>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
</el-col>
|
||||||
</el-dialog>
|
</el-row>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="10" :offset="2">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="4">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SplitModule',
|
name: 'SplitModule',
|
||||||
data() {
|
components: {
|
||||||
return {
|
NoticeInfo
|
||||||
dialogShow: false,
|
},
|
||||||
loading: false,
|
data() {
|
||||||
operate: {},
|
return {
|
||||||
messages: '',
|
dialogShow: false,
|
||||||
operation: null,
|
loading: false,
|
||||||
tipContent: '轨道',
|
operate: {},
|
||||||
stationName: '',
|
messages: '',
|
||||||
splitName: '',
|
operation: null,
|
||||||
selected: null,
|
tipContent: '轨道',
|
||||||
|
stationName: '',
|
||||||
|
splitName: '',
|
||||||
|
selected: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
if (this.operation === OperationEvent.Section.split.mbar.operation) {
|
||||||
|
this.tipContent = '轨道';
|
||||||
|
return '轨道切除';
|
||||||
|
} else if (this.operation === OperationEvent.Section.active.mbar.operation) {
|
||||||
|
this.tipContent = '轨道';
|
||||||
|
return '轨道恢复';
|
||||||
|
} else if (this.operation === OperationEvent.Switch.split.mbar.operation) {
|
||||||
|
this.tipContent = '道岔';
|
||||||
|
return '道岔切除';
|
||||||
|
} else if (this.operation === OperationEvent.Switch.active.mbar.operation) {
|
||||||
|
this.tipContent = '道岔';
|
||||||
|
return '道岔恢复';
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
components: {
|
domIdCancel() {
|
||||||
NoticeInfo
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
computed: {
|
domIdConfirm() {
|
||||||
show() {
|
if (this.dialogShow) {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation === OperationEvent.Section.split.mbar.operation) {
|
if (this.operation === OperationEvent.Section.split.mbar.operation) {
|
||||||
this.tipContent = '轨道';
|
/** 轨道切除*/
|
||||||
return '轨道切除';
|
return OperationEvent.Section.split.mbar.domId;
|
||||||
} else if (this.operation === OperationEvent.Section.active.mbar.operation) {
|
|
||||||
this.tipContent = '轨道';
|
|
||||||
return '轨道恢复';
|
|
||||||
} else if (this.operation === OperationEvent.Switch.split.mbar.operation) {
|
|
||||||
this.tipContent = '道岔';
|
|
||||||
return '道岔切除';
|
|
||||||
} else if (this.operation === OperationEvent.Switch.active.mbar.operation) {
|
|
||||||
this.tipContent = '道岔';
|
|
||||||
return '道岔恢复';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation === OperationEvent.Section.split.mbar.operation) {
|
|
||||||
/** 轨道切除*/
|
|
||||||
return OperationEvent.Section.split.mbar.domId
|
|
||||||
} else if (this.operation === OperationEvent.Section.active.mbar.operation) {
|
|
||||||
// 轨道恢复
|
|
||||||
return OperationEvent.Section.active.mbar.domId
|
|
||||||
} else if (this.operation === OperationEvent.Switch.split.mbar.operation) {
|
|
||||||
// '道岔切除';
|
|
||||||
return OperationEvent.Switch.split.mbar.domId
|
|
||||||
} else if (this.operation === OperationEvent.Switch.active.mbar.operation) {
|
|
||||||
// '道岔恢复';
|
|
||||||
return OperationEvent.Switch.active.mbar.domId
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, select) {
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.loading = false;
|
|
||||||
this.operate = operate || {};
|
|
||||||
this.messages = operate.messages;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
console.log(select, '数据');
|
|
||||||
this.stationName = '';
|
|
||||||
this.dialogShow = true;
|
|
||||||
if (this.operation == OperationEvent.Section.split.mbar.operation || this.operation == OperationEvent.Section.active.mbar.operation) {
|
|
||||||
if (select && select._type.toUpperCase() === 'Section'.toUpperCase()) {
|
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](select.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$message.error('选择数据错误,请重新操作!');
|
|
||||||
this.dialogShow = false;
|
|
||||||
}
|
|
||||||
} else if (this.operation == OperationEvent.Switch.split.mbar.operation || this.operation == OperationEvent.Switch.active.mbar.operation) {
|
|
||||||
if (select && select._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](select.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$message.error('选择数据错误,请重新操作!');
|
|
||||||
this.dialogShow = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.splitName = select.name;
|
|
||||||
this.selected = select;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation === OperationEvent.Section.split.mbar.operation) {
|
|
||||||
/** 轨道切除*/
|
|
||||||
this.handleData(OperationEvent.Section.split.menu.operation);
|
|
||||||
} else if (this.operation === OperationEvent.Section.active.mbar.operation) {
|
} else if (this.operation === OperationEvent.Section.active.mbar.operation) {
|
||||||
// 轨道恢复
|
// 轨道恢复
|
||||||
this.handleData(OperationEvent.Section.active.menu.operation);
|
return OperationEvent.Section.active.mbar.domId;
|
||||||
} else if (this.operation === OperationEvent.Switch.split.mbar.operation) {
|
} else if (this.operation === OperationEvent.Switch.split.mbar.operation) {
|
||||||
// '道岔切除';
|
// '道岔切除';
|
||||||
this.handleData(OperationEvent.Switch.split.menu.operation);
|
return OperationEvent.Switch.split.mbar.domId;
|
||||||
} else if (this.operation === OperationEvent.Switch.active.mbar.operation) {
|
} else if (this.operation === OperationEvent.Switch.active.mbar.operation) {
|
||||||
// '道岔恢复';
|
// '道岔恢复';
|
||||||
this.handleData(OperationEvent.Switch.active.menu.operation);
|
return OperationEvent.Switch.active.mbar.domId;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
//轨道切除/轨道恢复
|
|
||||||
handleData(operation) {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
code: this.selected.code,
|
|
||||||
label: MapDeviceType.Section.label,
|
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate, select) {
|
||||||
|
if (!this.dialogShow) {
|
||||||
|
this.loading = false;
|
||||||
|
this.operate = operate || {};
|
||||||
|
this.messages = operate.messages;
|
||||||
|
this.operation = operate.operation;
|
||||||
|
this.stationName = '';
|
||||||
|
this.dialogShow = true;
|
||||||
|
if (this.operation == OperationEvent.Section.split.mbar.operation || this.operation == OperationEvent.Section.active.mbar.operation) {
|
||||||
|
if (select && select._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
|
const station = this.$store.getters['map/getDeviceByCode'](select.stationCode);
|
||||||
|
if (station) {
|
||||||
|
this.stationName = station.name;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.error('选择数据错误,请重新操作!');
|
||||||
|
this.dialogShow = false;
|
||||||
|
}
|
||||||
|
} else if (this.operation == OperationEvent.Switch.split.mbar.operation || this.operation == OperationEvent.Switch.active.mbar.operation) {
|
||||||
|
if (select && select._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||||
|
const station = this.$store.getters['map/getDeviceByCode'](select.stationCode);
|
||||||
|
if (station) {
|
||||||
|
this.stationName = station.name;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.error('选择数据错误,请重新操作!');
|
||||||
|
this.dialogShow = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.splitName = select.name;
|
||||||
|
this.selected = select;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
if (this.operation === OperationEvent.Section.split.mbar.operation) {
|
||||||
|
/** 轨道切除*/
|
||||||
|
this.handleData(OperationEvent.Section.split.menu.operation);
|
||||||
|
} else if (this.operation === OperationEvent.Section.active.mbar.operation) {
|
||||||
|
// 轨道恢复
|
||||||
|
this.handleData(OperationEvent.Section.active.menu.operation);
|
||||||
|
} else if (this.operation === OperationEvent.Switch.split.mbar.operation) {
|
||||||
|
// '道岔切除';
|
||||||
|
this.handleData(OperationEvent.Switch.split.menu.operation);
|
||||||
|
} else if (this.operation === OperationEvent.Switch.active.mbar.operation) {
|
||||||
|
// '道岔恢复';
|
||||||
|
this.handleData(OperationEvent.Switch.active.menu.operation);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 轨道切除/轨道恢复
|
||||||
|
handleData(operation) {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
code: this.selected.code,
|
||||||
|
label: MapDeviceType.Section.label,
|
||||||
|
type: MapDeviceType.Section.type,
|
||||||
|
operation: operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.loading = true;
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
@ -198,4 +210,4 @@
|
|||||||
padding-bottom: 40px !important;
|
padding-bottom: 40px !important;
|
||||||
border: 1px solid lightgray;
|
border: 1px solid lightgray;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,209 +1,214 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou_01 alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-form label-width="80px" size="mini">
|
class="fuzhou_01 alarm-detail"
|
||||||
<el-row>
|
:title="level+'级告警详细信息'"
|
||||||
<el-col :span="8">
|
:visible.sync="show"
|
||||||
<el-form-item label="线路名称">
|
width="760px"
|
||||||
<el-input v-model="model.lineName" disabled></el-input>
|
:before-close="doClose"
|
||||||
</el-form-item>
|
:z-index="2000"
|
||||||
</el-col>
|
:modal="false"
|
||||||
<el-col :span="8">
|
:close-on-click-modal="false"
|
||||||
<el-form-item label="单位名称">
|
append-to-body
|
||||||
<el-input v-model="model.unitName" disabled></el-input>
|
>
|
||||||
</el-form-item>
|
<el-form label-width="80px" size="mini">
|
||||||
</el-col>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="模块名称">
|
<el-form-item label="线路名称">
|
||||||
<el-input v-model="model.moduleName" disabled></el-input>
|
<el-input v-model="model.lineName" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="8">
|
||||||
<el-row>
|
<el-form-item label="单位名称">
|
||||||
<el-col :span="9">
|
<el-input v-model="model.unitName" disabled />
|
||||||
<el-form-item label="报警时间">
|
</el-form-item>
|
||||||
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled>
|
</el-col>
|
||||||
</el-date-picker>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="模块名称">
|
||||||
</el-col>
|
<el-input v-model="model.moduleName" disabled />
|
||||||
<el-col :span="7">
|
</el-form-item>
|
||||||
<el-form-item>
|
</el-col>
|
||||||
<span slot="label">等 级</span>
|
</el-row>
|
||||||
<el-input v-model="model.level" disabled></el-input>
|
<el-row>
|
||||||
</el-form-item>
|
<el-col :span="9">
|
||||||
</el-col>
|
<el-form-item label="报警时间">
|
||||||
<el-col :span="8">
|
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
|
||||||
<el-form-item label="确认状态">
|
</el-form-item>
|
||||||
<el-input v-model="model.confirm" disabled></el-input>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="7">
|
||||||
</el-col>
|
<el-form-item>
|
||||||
</el-row>
|
<span slot="label">等 级</span>
|
||||||
<el-row>
|
<el-input v-model="model.level" disabled />
|
||||||
<el-col :span="9" class="alarm-type">
|
</el-form-item>
|
||||||
<el-form-item>
|
</el-col>
|
||||||
<span slot="label">类  型</span>
|
<el-col :span="8">
|
||||||
<el-input v-model="model.type" disabled></el-input>
|
<el-form-item label="确认状态">
|
||||||
</el-form-item>
|
<el-input v-model="model.confirm" disabled />
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="15" class="alarm-child-type">
|
</el-col>
|
||||||
<el-form-item label="子类型">
|
</el-row>
|
||||||
<el-input v-model="model.childType" disabled></el-input>
|
<el-row>
|
||||||
</el-form-item>
|
<el-col :span="9" class="alarm-type">
|
||||||
</el-col>
|
<el-form-item>
|
||||||
</el-row>
|
<span slot="label">类  型</span>
|
||||||
<el-form-item label="时间摘要">
|
<el-input v-model="model.type" disabled />
|
||||||
<el-input v-model="model.timeSummary" disabled></el-input>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
<el-form-item label="推荐操作">
|
<el-col :span="15" class="alarm-child-type">
|
||||||
<el-input v-model="model.recommendedOperation" disabled></el-input>
|
<el-form-item label="子类型">
|
||||||
</el-form-item>
|
<el-input v-model="model.childType" disabled />
|
||||||
<div class="alarm-detail-description">
|
</el-form-item>
|
||||||
<span> 报警详细描述</span><br>
|
</el-col>
|
||||||
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="model.alarmDetail" disabled>
|
</el-row>
|
||||||
</el-input>
|
<el-form-item label="时间摘要">
|
||||||
</div>
|
<el-input v-model="model.timeSummary" disabled />
|
||||||
</el-form>
|
</el-form-item>
|
||||||
<el-row class="button-group">
|
<el-form-item label="推荐操作">
|
||||||
<el-col :span="3" :offset="9">
|
<el-input v-model="model.recommendedOperation" disabled />
|
||||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
</el-form-item>
|
||||||
</el-col>
|
<div class="alarm-detail-description">
|
||||||
<el-col :span="10">
|
<span> 报警详细描述</span><br>
|
||||||
<span style="line-height:26px">未确认{{level}}级报警数目:1</span>
|
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
|
||||||
</el-col>
|
</div>
|
||||||
</el-row>
|
</el-form>
|
||||||
</span>
|
<el-row class="button-group">
|
||||||
</el-dialog>
|
<el-col :span="3" :offset="9">
|
||||||
|
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<span style="line-height:26px">未确认{{ level }}级报警数目:1</span>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AlarmDetail',
|
name: 'AlarmDetail',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
level: 0,
|
level: 0,
|
||||||
operate: null,
|
operate: null,
|
||||||
controlProps: {
|
controlProps: {
|
||||||
'01': '中控',
|
'01': '中控',
|
||||||
'02': '站控'
|
'02': '站控'
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
lineName: '',
|
lineName: '',
|
||||||
unitName: '',
|
unitName: '',
|
||||||
moduleName: '',
|
moduleName: '',
|
||||||
level: '',
|
level: '',
|
||||||
confirm: '',
|
confirm: '',
|
||||||
alarmDate: '',
|
alarmDate: '',
|
||||||
type: '',
|
type: '',
|
||||||
childType: '',
|
childType: '',
|
||||||
timeSummary: '',
|
timeSummary: '',
|
||||||
recommendedOperation: '',
|
recommendedOperation: '',
|
||||||
alarmDetail: ''
|
alarmDetail: ''
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'name'
|
||||||
|
]),
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
computed: {
|
domIdCancel() {
|
||||||
...mapGetters('map', [
|
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||||
'name',
|
}
|
||||||
]),
|
},
|
||||||
show() {
|
watch: {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
'$store.state.socket.msgHead': function (elem) {
|
||||||
},
|
if (elem && elem.type == 'resp') {
|
||||||
domIdCancel() {
|
if (elem.agree) {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
const operate = this.$store.state.training.operate;
|
||||||
},
|
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||||
},
|
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||||
watch: {
|
const newOperate = {
|
||||||
'$store.state.socket.msgHead': function (elem) {
|
type: operate.type,
|
||||||
console.log('alram', elem);
|
name: station.name
|
||||||
if (elem && elem.type == 'resp') {
|
};
|
||||||
if (elem.agree) {
|
|
||||||
let operate = this.$store.state.training.operate;
|
|
||||||
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
|
||||||
let newOperate = {
|
|
||||||
type: operate.type,
|
|
||||||
name: station.name,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.doShow(newOperate);
|
this.doShow(newOperate);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate) {
|
|
||||||
this.operate = operate || {};
|
|
||||||
this.model = {
|
|
||||||
lineName: this.name,
|
|
||||||
unitName: this.operate.name,
|
|
||||||
moduleName: 'CMM控制模式转换模式',
|
|
||||||
level: '0级告警',
|
|
||||||
confirm: '确认状态',
|
|
||||||
alarmDate: new Date(),
|
|
||||||
type: '系统事件',
|
|
||||||
childType: '依据信号设备操作命令设置控制模式',
|
|
||||||
timeSummary: '控制模式摘要',
|
|
||||||
recommendedOperation: '',
|
|
||||||
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
this.$store.dispatch('socket/shiftMsgQueue');
|
|
||||||
}
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.close.alarm.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.close.alarm.operation,
|
|
||||||
}
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
isClose() {
|
|
||||||
return this.dialogShow;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate) {
|
||||||
|
this.operate = operate || {};
|
||||||
|
this.model = {
|
||||||
|
lineName: this.name,
|
||||||
|
unitName: this.operate.name,
|
||||||
|
moduleName: 'CMM控制模式转换模式',
|
||||||
|
level: '0级告警',
|
||||||
|
confirm: '确认状态',
|
||||||
|
alarmDate: new Date(),
|
||||||
|
type: '系统事件',
|
||||||
|
childType: '依据信号设备操作命令设置控制模式',
|
||||||
|
timeSummary: '控制模式摘要',
|
||||||
|
recommendedOperation: '',
|
||||||
|
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
|
||||||
|
};
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
if (this.dialogShow) {
|
||||||
|
this.$store.dispatch('socket/shiftMsgQueue');
|
||||||
|
}
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Command.close.alarm.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
const operate = {
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Command.close.alarm.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
isClose() {
|
||||||
|
return this.dialogShow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
.alarm-type .el-input {
|
.alarm-type .el-input {
|
||||||
width: 220px;
|
width: 220px;
|
||||||
}
|
}
|
||||||
@ -212,4 +217,4 @@
|
|||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,107 +1,116 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou_01 cmd-notice" title="操作命令提示" :visible.sync="show" width="400px" :before-close="doClose"
|
<el-dialog
|
||||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
<span>{{name}},{{msg}}!</span>
|
class="fuzhou_01 cmd-notice"
|
||||||
<el-row class="button-group">
|
title="操作命令提示"
|
||||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确认</el-button>
|
:visible.sync="show"
|
||||||
</el-row>
|
width="400px"
|
||||||
</el-dialog>
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<span>{{ name }},{{ msg }}!</span>
|
||||||
|
<el-row class="button-group">
|
||||||
|
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确认</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
export default {
|
export default {
|
||||||
name: 'CmdNotice',
|
name: 'CmdNotice',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
operate: null,
|
operate: null,
|
||||||
name: '',
|
name: '',
|
||||||
msg: ''
|
msg: ''
|
||||||
}
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
computed: {
|
domIdCancel() {
|
||||||
show() {
|
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
}
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
watch: {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
'$store.state.socket.msgHead': function (elem) {
|
||||||
},
|
if (elem && elem.type == 'resp') {
|
||||||
},
|
const operate = this.$store.state.training.operate;
|
||||||
watch: {
|
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||||
'$store.state.socket.msgHead': function (elem) {
|
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||||
console.log('timeout', elem);
|
const newOperate = {
|
||||||
if (elem && elem.type == 'resp') {
|
type: operate.type,
|
||||||
let operate = this.$store.state.training.operate;
|
name: station.name
|
||||||
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
};
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
|
||||||
let newOperate = {
|
|
||||||
type: operate.type,
|
|
||||||
name: station.name,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (elem.timeout) {
|
if (elem.timeout) {
|
||||||
newOperate['msg'] = '请求超时';
|
newOperate['msg'] = '请求超时';
|
||||||
this.doShow(newOperate);
|
this.doShow(newOperate);
|
||||||
} else if (!elem.agree) {
|
} else if (!elem.agree) {
|
||||||
newOperate['msg'] = '请求拒绝';
|
newOperate['msg'] = '请求拒绝';
|
||||||
this.doShow(newOperate);
|
this.doShow(newOperate);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate) {
|
|
||||||
this.operate = operate || {};
|
|
||||||
this.name = this.operate.name || '';
|
|
||||||
this.msg = this.operate.msg || '';
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
this.$store.dispatch('socket/shiftMsgQueue');
|
|
||||||
}
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
operation: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.close.notice.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.close.notice.operation,
|
|
||||||
}
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
isClose() {
|
|
||||||
return this.dialogShow;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate) {
|
||||||
|
this.operate = operate || {};
|
||||||
|
this.name = this.operate.name || '';
|
||||||
|
this.msg = this.operate.msg || '';
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
if (this.dialogShow) {
|
||||||
|
this.$store.dispatch('socket/shiftMsgQueue');
|
||||||
|
}
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
operation: this.operate.type,
|
||||||
|
operation: OperationEvent.Command.close.notice.operation
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
const operate = {
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Command.close.notice.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
isClose() {
|
||||||
|
return this.dialogShow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
@ -1,273 +1,289 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<div class="head_content content">
|
class="beijing-01__systerm stand-detain-train"
|
||||||
<span class="base-label" style="left: 0px;">会话管理</span>
|
:title="title"
|
||||||
<el-col :span="8">
|
:visible.sync="show"
|
||||||
<el-button class="status">查询会话状态</el-button>
|
width="380px"
|
||||||
</el-col>
|
:before-close="doClose"
|
||||||
<el-col :span="15" :offset="1">
|
:z-index="2000"
|
||||||
<el-input :value="messageText" placeholder="" size="mini" disabled></el-input>
|
:modal="false"
|
||||||
</el-col>
|
:close-on-click-modal="false"
|
||||||
<el-col :span="12">
|
>
|
||||||
<el-button class="status_btn" :id="openMessageId" @click="handleMessage('open')"
|
<div class="head_content content">
|
||||||
:disabled="isOpenMessage">打开会话</el-button>
|
<span class="base-label" style="left: 0px;">会话管理</span>
|
||||||
</el-col>
|
<el-col :span="8">
|
||||||
<el-col :span="12">
|
<el-button class="status">查询会话状态</el-button>
|
||||||
<el-button class="status_btn" :id="closeMessageId" @click="handleMessage('close')"
|
</el-col>
|
||||||
:disabled="!isOpenMessage">关闭会话
|
<el-col :span="15" :offset="1">
|
||||||
</el-button>
|
<el-input :value="messageText" placeholder="" size="mini" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</div>
|
<el-col :span="12">
|
||||||
<div class="content cotnent_body">
|
<el-button
|
||||||
<span class="base-label" style="left: 0px;">操作</span>
|
:id="openMessageId"
|
||||||
<el-col :span="3">
|
class="status_btn"
|
||||||
<div class="text">操作</div>
|
:disabled="isOpenMessage"
|
||||||
</el-col>
|
@click="handleMessage('open')"
|
||||||
<el-col :span="11" :offset="1">
|
>打开会话</el-button>
|
||||||
<el-input :value="messageText1" placeholder="" size="mini" disabled></el-input>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="12">
|
||||||
<el-col :span="8" :offset="1">
|
<el-button
|
||||||
<el-button class="status_btn" :id="confirmId1" @click="confirm1" :disabled="disabledConfirm1">确认
|
:id="closeMessageId"
|
||||||
</el-button>
|
class="status_btn"
|
||||||
</el-col>
|
:disabled="!isOpenMessage"
|
||||||
</div>
|
@click="handleMessage('close')"
|
||||||
<div class="content cotnent_body">
|
>关闭会话
|
||||||
<span class="base-label" style="left: 0px;">确认</span>
|
</el-button>
|
||||||
<el-col :span="3">
|
</el-col>
|
||||||
<div class="text">操作</div>
|
</div>
|
||||||
</el-col>
|
<div class="content cotnent_body">
|
||||||
<el-col :span="11" :offset="1">
|
<span class="base-label" style="left: 0px;">操作</span>
|
||||||
<el-input :value="messageText2" placeholder="" size="mini" disabled></el-input>
|
<el-col :span="3">
|
||||||
</el-col>
|
<div class="text">操作</div>
|
||||||
<el-col :span="8" :offset="1">
|
</el-col>
|
||||||
<el-button class="status_btn" :id="confirmId2" @click="confirm2" :disabled="disabledConfirm2">确认
|
<el-col :span="11" :offset="1">
|
||||||
</el-button>
|
<el-input :value="messageText1" placeholder="" size="mini" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</div>
|
<el-col :span="8" :offset="1">
|
||||||
<div class="body_cont">
|
<el-button :id="confirmId1" class="status_btn" :disabled="disabledConfirm1" @click="confirm1">确认
|
||||||
<el-col :span="7">
|
</el-button>
|
||||||
<div class="text">操作倒计时</div>
|
</el-col>
|
||||||
</el-col>
|
</div>
|
||||||
<el-col :span="17">
|
<div class="content cotnent_body">
|
||||||
<div style="border: 2px inset #E9E9E9; height: 30px; width: 100%;">
|
<span class="base-label" style="left: 0px;">确认</span>
|
||||||
{{timeCountConfirm == -1 ? '' : timeCountConfirm}}</div>
|
<el-col :span="3">
|
||||||
</el-col>
|
<div class="text">操作</div>
|
||||||
</div>
|
</el-col>
|
||||||
<div class="body_cont">
|
<el-col :span="11" :offset="1">
|
||||||
<div class="status_text">状态</div>
|
<el-input :value="messageText2" placeholder="" size="mini" disabled />
|
||||||
<div class="textarea_content"></div>
|
</el-col>
|
||||||
</div>
|
<el-col :span="8" :offset="1">
|
||||||
|
<el-button :id="confirmId2" class="status_btn" :disabled="disabledConfirm2" @click="confirm2">确认
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
<div class="body_cont">
|
||||||
|
<el-col :span="7">
|
||||||
|
<div class="text">操作倒计时</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="17">
|
||||||
|
<div style="border: 2px inset #E9E9E9; height: 30px; width: 100%;">
|
||||||
|
{{ timeCountConfirm == -1 ? '' : timeCountConfirm }}</div>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
<div class="body_cont">
|
||||||
|
<div class="status_text">状态</div>
|
||||||
|
<div class="textarea_content" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-button class="close_btn" :id="domIdConfirm" type="primary" @click="commit">关闭</el-button>
|
<el-button :id="domIdConfirm" class="close_btn" type="primary" @click="commit">关闭</el-button>
|
||||||
<confirm-tip ref='ConfirmTip' @close="closeMessage"></confirm-tip>
|
<confirm-tip ref="ConfirmTip" @close="closeMessage" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmTip from './childDialog/confirmTip';
|
import ConfirmTip from './childDialog/confirmTip';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'StandDetainTrain',
|
||||||
|
components: {
|
||||||
|
ConfirmTip
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
standName: '',
|
||||||
|
stationName: '',
|
||||||
|
selected: null,
|
||||||
|
operation: null,
|
||||||
|
radio: '1',
|
||||||
|
radio1: '1',
|
||||||
|
earlyDepar: false,
|
||||||
|
|
||||||
export default {
|
messageText: '',
|
||||||
name: 'StandDetainTrain',
|
messageText1: '',
|
||||||
components: {
|
messageText2: '',
|
||||||
ConfirmTip
|
isOpenMessage: false,
|
||||||
|
timeCountConfirm: -1,
|
||||||
|
disabledConfirm1: false,
|
||||||
|
disabledConfirm2: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
data() {
|
openMessageId() {
|
||||||
return {
|
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.openMessage.domId : '';
|
||||||
dialogShow: false,
|
},
|
||||||
standName: '',
|
closeMessageId() {
|
||||||
stationName: '',
|
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.closeMessage.domId : '';
|
||||||
selected: null,
|
},
|
||||||
operation: null,
|
confirmId1() {
|
||||||
radio: '1',
|
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm1.domId : '';
|
||||||
radio1: '1',
|
},
|
||||||
earlyDepar: false,
|
confirmId2() {
|
||||||
|
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm2.domId : '';
|
||||||
messageText: '',
|
},
|
||||||
messageText1: '',
|
domIdConfirm() {
|
||||||
messageText2: '',
|
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm.domId : '';
|
||||||
isOpenMessage: false,
|
},
|
||||||
timeCountConfirm: -1,
|
title() {
|
||||||
disabledConfirm1: false,
|
return '取消全线临时限速';
|
||||||
disabledConfirm2: false,
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
if (this.timeCountConfirm > 0) {
|
||||||
|
this.timeCountConfirm--;
|
||||||
|
} else if (this.timeCountConfirm == 0) { // 关闭会话
|
||||||
|
this.timeCountConfirm = -1;
|
||||||
|
this.disabledConfirm2 = true;
|
||||||
}
|
}
|
||||||
},
|
}, 1000);
|
||||||
computed: {
|
},
|
||||||
show() {
|
methods: {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
doShow(operate, selected) {
|
||||||
},
|
this.selected = selected;
|
||||||
openMessageId() {
|
if (!this.dialogShow) {
|
||||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.openMessage.domId : '';
|
this.standName = '';
|
||||||
},
|
this.stationName = '';
|
||||||
closeMessageId() {
|
|
||||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.closeMessage.domId : '';
|
|
||||||
},
|
|
||||||
confirmId1() {
|
|
||||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm1.domId : '';
|
|
||||||
},
|
|
||||||
confirmId2() {
|
|
||||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm2.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '取消全线临时限速';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (this.timeCountConfirm > 0) {
|
|
||||||
this.timeCountConfirm--;
|
|
||||||
} else if (this.timeCountConfirm == 0) { // 关闭会话
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.disabledConfirm2 = true;
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.standName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
|
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
});
|
||||||
},
|
},
|
||||||
handleMessage(message) {
|
doClose() {
|
||||||
if (message == 'open') {
|
this.dialogShow = false;
|
||||||
let operate = {
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
type: MapDeviceType.LimitControl.type,
|
mouseCancelState(this.selected);
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.openMessage.operation,
|
},
|
||||||
}
|
handleMessage(message) {
|
||||||
|
if (message == 'open') {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
const operate = {
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.isOpenMessage = true;
|
|
||||||
this.messageText1 = '取消全线临时限速';
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.LimitControl.type,
|
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.closeMessage.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.isOpenMessage = false;
|
|
||||||
this.messageText1 = '';
|
|
||||||
this.messageText2 = '';
|
|
||||||
this.disabledConfirm1 = false;
|
|
||||||
this.disabledConfirm2 = false;
|
|
||||||
this.timeCountConfirm = -1; // 倒计时
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
confirm1() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.LimitControl.type,
|
type: MapDeviceType.LimitControl.type,
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm1.operation,
|
operation: OperationEvent.LimitControl.CancelAllLimit.openMessage.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.isOpenMessage = true;
|
this.isOpenMessage = true;
|
||||||
this.messageText1 = '**************';
|
this.messageText1 = '取消全线临时限速';
|
||||||
this.messageText2 = '取消全线临时限速';
|
|
||||||
this.disabledConfirm1 = true;
|
|
||||||
this.timeCountConfirm = 60; // 倒计时
|
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
} else {
|
||||||
confirm2() {
|
const operate = {
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.LimitControl.type,
|
type: MapDeviceType.LimitControl.type,
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm2.operation,
|
operation: OperationEvent.LimitControl.CancelAllLimit.closeMessage.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.isOpenMessage = true;
|
this.isOpenMessage = false;
|
||||||
this.messageText2 = '**************';
|
this.messageText1 = '';
|
||||||
this.disabledConfirm2 = true;
|
this.messageText2 = '';
|
||||||
this.timeCountConfirm = -1;
|
this.disabledConfirm1 = false;
|
||||||
|
this.disabledConfirm2 = false;
|
||||||
|
this.timeCountConfirm = -1; // 倒计时
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.LimitControl.type,
|
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm.operation,
|
|
||||||
}
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
if (!this.isOpenMessage) {
|
|
||||||
this.doClose();
|
|
||||||
} else {
|
|
||||||
let operate = {
|
|
||||||
message: `是否关闭会话,并关闭窗口`,
|
|
||||||
confirmId: OperationEvent.LimitControl.CancelAllLimit.close.domId,
|
|
||||||
}
|
|
||||||
this.$refs.ConfirmTip.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
closeMessage() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.LimitControl.type,
|
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.close.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.ConfirmTip.doClose();
|
|
||||||
this.isOpenMessage = false;
|
|
||||||
this.messageText1 = '';
|
|
||||||
this.messageText2 = '';
|
|
||||||
this.disabledConfirm1 = false;
|
|
||||||
this.disabledConfirm2 = false;
|
|
||||||
this.timeCountConfirm = -1; // 倒计时
|
|
||||||
this.doClose();
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
confirm1() {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.LimitControl.type,
|
||||||
|
operation: OperationEvent.LimitControl.CancelAllLimit.confirm1.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.isOpenMessage = true;
|
||||||
|
this.messageText1 = '**************';
|
||||||
|
this.messageText2 = '取消全线临时限速';
|
||||||
|
this.disabledConfirm1 = true;
|
||||||
|
this.timeCountConfirm = 60; // 倒计时
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirm2() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.LimitControl.type,
|
||||||
|
operation: OperationEvent.LimitControl.CancelAllLimit.confirm2.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.isOpenMessage = true;
|
||||||
|
this.messageText2 = '**************';
|
||||||
|
this.disabledConfirm2 = true;
|
||||||
|
this.timeCountConfirm = -1;
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.LimitControl.type,
|
||||||
|
operation: OperationEvent.LimitControl.CancelAllLimit.confirm.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
if (!this.isOpenMessage) {
|
||||||
|
this.doClose();
|
||||||
|
} else {
|
||||||
|
const operate = {
|
||||||
|
message: `是否关闭会话,并关闭窗口`,
|
||||||
|
confirmId: OperationEvent.LimitControl.CancelAllLimit.close.domId
|
||||||
|
};
|
||||||
|
this.$refs.ConfirmTip.doShow(operate);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
closeMessage() {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.LimitControl.type,
|
||||||
|
operation: OperationEvent.LimitControl.CancelAllLimit.close.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.ConfirmTip.doClose();
|
||||||
|
this.isOpenMessage = false;
|
||||||
|
this.messageText1 = '';
|
||||||
|
this.messageText2 = '';
|
||||||
|
this.disabledConfirm1 = false;
|
||||||
|
this.disabledConfirm2 = false;
|
||||||
|
this.timeCountConfirm = -1; // 倒计时
|
||||||
|
this.doClose();
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.stand-detain-train .context {
|
.stand-detain-train .context {
|
||||||
@ -352,4 +368,4 @@
|
|||||||
box-shadow: 2px 2px #959595 inset;
|
box-shadow: 2px 2px #959595 inset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -68,186 +68,186 @@ import { mouseCancelState } from '../utils/menuItemStatus';
|
|||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteSelection',
|
name: 'RouteSelection',
|
||||||
components: {
|
components: {
|
||||||
// ConfirmControl,
|
// ConfirmControl,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tempData: [],
|
tempData: [],
|
||||||
beforeSectionList: [],
|
beforeSectionList: [],
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
selected: null,
|
selected: null,
|
||||||
row: null,
|
row: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
display: true,
|
display: true,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: '',
|
signalName: '',
|
||||||
tableStyle: {
|
tableStyle: {
|
||||||
'border-bottom': 'none'
|
'border-bottom': 'none'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '进路选排';
|
return '进路选排';
|
||||||
},
|
},
|
||||||
commitDisabled() {
|
commitDisabled() {
|
||||||
let disabled = true;
|
let disabled = true;
|
||||||
if (this.row) {
|
if (this.row) {
|
||||||
disabled = !this.row.canSetting;
|
disabled = !this.row.canSetting;
|
||||||
}
|
}
|
||||||
return disabled;
|
return disabled;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getProtectedSectionName(row) {
|
getProtectedSectionName(row) {
|
||||||
let name = '';
|
let name = '';
|
||||||
if (row &&
|
if (row &&
|
||||||
row.overlapSectionList &&
|
row.overlapSectionList &&
|
||||||
row.overlapSectionList &&
|
row.overlapSectionList &&
|
||||||
row.overlapSectionList.length > 0) {
|
row.overlapSectionList.length > 0) {
|
||||||
|
|
||||||
const protect = row.overlapSectionList[0];
|
const protect = row.overlapSectionList[0];
|
||||||
name = `${protect.name}`;
|
name = `${protect.name}`;
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
name = `${name}(${station.name})`;
|
name = `${name}(${station.name})`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
},
|
},
|
||||||
expandPath() {
|
expandPath() {
|
||||||
console.log('展开进路预览');
|
console.log('展开进路预览');
|
||||||
},
|
},
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name;
|
this.signalName = selected.name;
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tempData = tempData || [];
|
this.tempData = tempData || [];
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.restoreBeforeDevices();
|
this.restoreBeforeDevices();
|
||||||
this.$refs.table.setCurrentRow();
|
this.$refs.table.setCurrentRow();
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
restoreBeforeDevices() {
|
restoreBeforeDevices() {
|
||||||
// 恢复之前选中设备
|
// 恢复之前选中设备
|
||||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||||
this.beforeSectionList.forEach(elem => {
|
this.beforeSectionList.forEach(elem => {
|
||||||
elem.cutOff = false;
|
elem.cutOff = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||||
this.beforeSectionList = [];
|
this.beforeSectionList = [];
|
||||||
},
|
},
|
||||||
clickEvent(row, event, column) {
|
clickEvent(row, event, column) {
|
||||||
this.row = row;
|
this.row = row;
|
||||||
if (row) {
|
if (row) {
|
||||||
// 恢复进路区段的切除状态
|
// 恢复进路区段的切除状态
|
||||||
this.restoreBeforeDevices();
|
this.restoreBeforeDevices();
|
||||||
|
|
||||||
if (row.canSetting) {
|
if (row.canSetting) {
|
||||||
// 设置选中区段为切除状态
|
// 设置选中区段为切除状态
|
||||||
if (row.containSectionList && row.containSectionList.length) {
|
if (row.containSectionList && row.containSectionList.length) {
|
||||||
// 设置新选的进路区段为切除状态
|
// 设置新选的进路区段为切除状态
|
||||||
row.containSectionList.forEach(elem => {
|
row.containSectionList.forEach(elem => {
|
||||||
elem.cutOff = true;
|
elem.cutOff = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
||||||
this.beforeSectionList = row.containSectionList || [];
|
this.beforeSectionList = row.containSectionList || [];
|
||||||
|
|
||||||
// 设置选中指令
|
// 设置选中指令
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||||
val: row.code
|
val: row.code
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.row && this.row.canSetting) {
|
if (this.row && this.row.canSetting) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -115,205 +115,205 @@ import { mouseCancelState } from '../utils/menuItemStatus';
|
|||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetainTrain',
|
name: 'StandDetainTrain',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
standName: '',
|
standName: '',
|
||||||
stationName: '',
|
stationName: '',
|
||||||
selected: null,
|
selected: null,
|
||||||
operation: null,
|
operation: null,
|
||||||
radio: '1',
|
radio: '1',
|
||||||
radio1: '1',
|
radio1: '1',
|
||||||
radio2: '1',
|
radio2: '1',
|
||||||
earlyDepar: false
|
earlyDepar: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
upRadioId() {
|
upRadioId() {
|
||||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
|
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
|
||||||
},
|
},
|
||||||
downRadioId() {
|
downRadioId() {
|
||||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
|
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
this.earlyDepar = false;
|
this.earlyDepar = false;
|
||||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||||
this.radio1 = '1';
|
this.radio1 = '1';
|
||||||
return '扣车';
|
return '扣车';
|
||||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||||
this.radio1 = '2';
|
this.radio1 = '2';
|
||||||
return '取消扣车';
|
return '取消扣车';
|
||||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||||
this.earlyDepar = true;
|
this.earlyDepar = true;
|
||||||
if (this.selected.direction == '01') {
|
if (this.selected.direction == '01') {
|
||||||
this.radio2 = '2';
|
this.radio2 = '2';
|
||||||
} else {
|
} else {
|
||||||
this.radio2 = '1';
|
this.radio2 = '1';
|
||||||
}
|
}
|
||||||
return '提前发车';
|
return '提前发车';
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.standName = '';
|
this.standName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected) {
|
if (selected) {
|
||||||
this.standName = selected.name;
|
this.standName = selected.name;
|
||||||
}
|
}
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standName = selected.name;
|
this.standName = selected.name;
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
changeRadio(val) {
|
changeRadio(val) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: '',
|
operation: '',
|
||||||
val: val
|
val: val
|
||||||
};
|
};
|
||||||
if (val == 1) {
|
if (val == 1) {
|
||||||
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
|
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
|
||||||
} else if (val == 2) {
|
} else if (val == 2) {
|
||||||
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
|
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||||
/** 设置扣车*/
|
/** 设置扣车*/
|
||||||
this.setDetainTrain();
|
this.setDetainTrain();
|
||||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||||
/** 取消扣车*/
|
/** 取消扣车*/
|
||||||
this.cancelDetainTrain();
|
this.cancelDetainTrain();
|
||||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||||
/** 提前发车*/
|
/** 提前发车*/
|
||||||
this.earlyDeparture();
|
this.earlyDeparture();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消扣车
|
// 取消扣车
|
||||||
cancelDetainTrain() {
|
cancelDetainTrain() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 提前发车
|
// 提前发车
|
||||||
earlyDeparture() {
|
earlyDeparture() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -91,7 +91,6 @@ export default {
|
|||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
console.log(this.map);
|
|
||||||
/** 加载列车数据*/
|
/** 加载列车数据*/
|
||||||
this.loadInitData(this.map);
|
this.loadInitData(this.map);
|
||||||
|
|
||||||
|
@ -118,7 +118,6 @@ export default {
|
|||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
console.log('operate', operate, selected);
|
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
|
@ -1,273 +1,289 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<div class="head_content content">
|
class="chengdou-03__systerm stand-detain-train"
|
||||||
<span class="base-label" style="left: 0px;">会话管理</span>
|
:title="title"
|
||||||
<el-col :span="8">
|
:visible.sync="show"
|
||||||
<el-button class="status">查询会话状态</el-button>
|
width="380px"
|
||||||
</el-col>
|
:before-close="doClose"
|
||||||
<el-col :span="15" :offset="1">
|
:z-index="2000"
|
||||||
<el-input :value="messageText" placeholder="" size="mini" disabled></el-input>
|
:modal="false"
|
||||||
</el-col>
|
:close-on-click-modal="false"
|
||||||
<el-col :span="12">
|
>
|
||||||
<el-button class="status_btn" :id="openMessageId" @click="handleMessage('open')"
|
<div class="head_content content">
|
||||||
:disabled="isOpenMessage">打开会话</el-button>
|
<span class="base-label" style="left: 0px;">会话管理</span>
|
||||||
</el-col>
|
<el-col :span="8">
|
||||||
<el-col :span="12">
|
<el-button class="status">查询会话状态</el-button>
|
||||||
<el-button class="status_btn" :id="closeMessageId" @click="handleMessage('close')"
|
</el-col>
|
||||||
:disabled="!isOpenMessage">关闭会话
|
<el-col :span="15" :offset="1">
|
||||||
</el-button>
|
<el-input :value="messageText" placeholder="" size="mini" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</div>
|
<el-col :span="12">
|
||||||
<div class="content cotnent_body">
|
<el-button
|
||||||
<span class="base-label" style="left: 0px;">操作</span>
|
:id="openMessageId"
|
||||||
<el-col :span="3">
|
class="status_btn"
|
||||||
<div class="text">操作</div>
|
:disabled="isOpenMessage"
|
||||||
</el-col>
|
@click="handleMessage('open')"
|
||||||
<el-col :span="11" :offset="1">
|
>打开会话</el-button>
|
||||||
<el-input :value="messageText1" placeholder="" size="mini" disabled></el-input>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="12">
|
||||||
<el-col :span="8" :offset="1">
|
<el-button
|
||||||
<el-button class="status_btn" :id="confirmId1" @click="confirm1" :disabled="disabledConfirm1">确认
|
:id="closeMessageId"
|
||||||
</el-button>
|
class="status_btn"
|
||||||
</el-col>
|
:disabled="!isOpenMessage"
|
||||||
</div>
|
@click="handleMessage('close')"
|
||||||
<div class="content cotnent_body">
|
>关闭会话
|
||||||
<span class="base-label" style="left: 0px;">确认</span>
|
</el-button>
|
||||||
<el-col :span="3">
|
</el-col>
|
||||||
<div class="text">操作</div>
|
</div>
|
||||||
</el-col>
|
<div class="content cotnent_body">
|
||||||
<el-col :span="11" :offset="1">
|
<span class="base-label" style="left: 0px;">操作</span>
|
||||||
<el-input :value="messageText2" placeholder="" size="mini" disabled></el-input>
|
<el-col :span="3">
|
||||||
</el-col>
|
<div class="text">操作</div>
|
||||||
<el-col :span="8" :offset="1">
|
</el-col>
|
||||||
<el-button class="status_btn" :id="confirmId2" @click="confirm2" :disabled="disabledConfirm2">确认
|
<el-col :span="11" :offset="1">
|
||||||
</el-button>
|
<el-input :value="messageText1" placeholder="" size="mini" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</div>
|
<el-col :span="8" :offset="1">
|
||||||
<div class="body_cont">
|
<el-button :id="confirmId1" class="status_btn" :disabled="disabledConfirm1" @click="confirm1">确认
|
||||||
<el-col :span="7">
|
</el-button>
|
||||||
<div class="text">操作倒计时</div>
|
</el-col>
|
||||||
</el-col>
|
</div>
|
||||||
<el-col :span="17">
|
<div class="content cotnent_body">
|
||||||
<div style="border: 2px inset #E9E9E9; height: 30px; width: 100%;">
|
<span class="base-label" style="left: 0px;">确认</span>
|
||||||
{{timeCountConfirm == -1 ? '' : timeCountConfirm}}</div>
|
<el-col :span="3">
|
||||||
</el-col>
|
<div class="text">操作</div>
|
||||||
</div>
|
</el-col>
|
||||||
<div class="body_cont">
|
<el-col :span="11" :offset="1">
|
||||||
<div class="status_text">状态</div>
|
<el-input :value="messageText2" placeholder="" size="mini" disabled />
|
||||||
<div class="textarea_content"></div>
|
</el-col>
|
||||||
</div>
|
<el-col :span="8" :offset="1">
|
||||||
|
<el-button :id="confirmId2" class="status_btn" :disabled="disabledConfirm2" @click="confirm2">确认
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
<div class="body_cont">
|
||||||
|
<el-col :span="7">
|
||||||
|
<div class="text">操作倒计时</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="17">
|
||||||
|
<div style="border: 2px inset #E9E9E9; height: 30px; width: 100%;">
|
||||||
|
{{ timeCountConfirm == -1 ? '' : timeCountConfirm }}</div>
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
<div class="body_cont">
|
||||||
|
<div class="status_text">状态</div>
|
||||||
|
<div class="textarea_content" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-button class="close_btn" :id="domIdConfirm" type="primary" @click="commit">关闭</el-button>
|
<el-button :id="domIdConfirm" class="close_btn" type="primary" @click="commit">关闭</el-button>
|
||||||
<confirm-tip ref='ConfirmTip' @close="closeMessage"></confirm-tip>
|
<confirm-tip ref="ConfirmTip" @close="closeMessage" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmTip from './childDialog/confirmTip';
|
import ConfirmTip from './childDialog/confirmTip';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'StandDetainTrain',
|
||||||
|
components: {
|
||||||
|
ConfirmTip
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
standName: '',
|
||||||
|
stationName: '',
|
||||||
|
selected: null,
|
||||||
|
operation: null,
|
||||||
|
radio: '1',
|
||||||
|
radio1: '1',
|
||||||
|
earlyDepar: false,
|
||||||
|
|
||||||
export default {
|
messageText: '',
|
||||||
name: 'StandDetainTrain',
|
messageText1: '',
|
||||||
components: {
|
messageText2: '',
|
||||||
ConfirmTip
|
isOpenMessage: false,
|
||||||
|
timeCountConfirm: -1,
|
||||||
|
disabledConfirm1: false,
|
||||||
|
disabledConfirm2: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
data() {
|
openMessageId() {
|
||||||
return {
|
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.openMessage.domId : '';
|
||||||
dialogShow: false,
|
},
|
||||||
standName: '',
|
closeMessageId() {
|
||||||
stationName: '',
|
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.closeMessage.domId : '';
|
||||||
selected: null,
|
},
|
||||||
operation: null,
|
confirmId1() {
|
||||||
radio: '1',
|
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm1.domId : '';
|
||||||
radio1: '1',
|
},
|
||||||
earlyDepar: false,
|
confirmId2() {
|
||||||
|
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm2.domId : '';
|
||||||
messageText: '',
|
},
|
||||||
messageText1: '',
|
domIdConfirm() {
|
||||||
messageText2: '',
|
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm.domId : '';
|
||||||
isOpenMessage: false,
|
},
|
||||||
timeCountConfirm: -1,
|
title() {
|
||||||
disabledConfirm1: false,
|
return '取消全线临时限速';
|
||||||
disabledConfirm2: false,
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
if (this.timeCountConfirm > 0) {
|
||||||
|
this.timeCountConfirm--;
|
||||||
|
} else if (this.timeCountConfirm == 0) { // 关闭会话
|
||||||
|
this.timeCountConfirm = -1;
|
||||||
|
this.disabledConfirm2 = true;
|
||||||
}
|
}
|
||||||
},
|
}, 1000);
|
||||||
computed: {
|
},
|
||||||
show() {
|
methods: {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
doShow(operate, selected) {
|
||||||
},
|
this.selected = selected;
|
||||||
openMessageId() {
|
if (!this.dialogShow) {
|
||||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.openMessage.domId : '';
|
this.standName = '';
|
||||||
},
|
this.stationName = '';
|
||||||
closeMessageId() {
|
|
||||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.closeMessage.domId : '';
|
|
||||||
},
|
|
||||||
confirmId1() {
|
|
||||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm1.domId : '';
|
|
||||||
},
|
|
||||||
confirmId2() {
|
|
||||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm2.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.confirm.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '取消全线临时限速';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (this.timeCountConfirm > 0) {
|
|
||||||
this.timeCountConfirm--;
|
|
||||||
} else if (this.timeCountConfirm == 0) { // 关闭会话
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.disabledConfirm2 = true;
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.standName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
|
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
});
|
||||||
},
|
},
|
||||||
handleMessage(message) {
|
doClose() {
|
||||||
if (message == 'open') {
|
this.dialogShow = false;
|
||||||
let operate = {
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
type: MapDeviceType.LimitControl.type,
|
mouseCancelState(this.selected);
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.openMessage.operation,
|
},
|
||||||
}
|
handleMessage(message) {
|
||||||
|
if (message == 'open') {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
const operate = {
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.isOpenMessage = true;
|
|
||||||
this.messageText1 = '取消全线临时限速';
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.LimitControl.type,
|
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.closeMessage.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.isOpenMessage = false;
|
|
||||||
this.messageText1 = '';
|
|
||||||
this.messageText2 = '';
|
|
||||||
this.disabledConfirm1 = false;
|
|
||||||
this.disabledConfirm2 = false;
|
|
||||||
this.timeCountConfirm = -1; // 倒计时
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
confirm1() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.LimitControl.type,
|
type: MapDeviceType.LimitControl.type,
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm1.operation,
|
operation: OperationEvent.LimitControl.CancelAllLimit.openMessage.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.isOpenMessage = true;
|
this.isOpenMessage = true;
|
||||||
this.messageText1 = '**************';
|
this.messageText1 = '取消全线临时限速';
|
||||||
this.messageText2 = '取消全线临时限速';
|
|
||||||
this.disabledConfirm1 = true;
|
|
||||||
this.timeCountConfirm = 60; // 倒计时
|
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
} else {
|
||||||
confirm2() {
|
const operate = {
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.LimitControl.type,
|
type: MapDeviceType.LimitControl.type,
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm2.operation,
|
operation: OperationEvent.LimitControl.CancelAllLimit.closeMessage.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.isOpenMessage = true;
|
this.isOpenMessage = false;
|
||||||
this.messageText2 = '**************';
|
this.messageText1 = '';
|
||||||
this.disabledConfirm2 = true;
|
this.messageText2 = '';
|
||||||
this.timeCountConfirm = -1;
|
this.disabledConfirm1 = false;
|
||||||
|
this.disabledConfirm2 = false;
|
||||||
|
this.timeCountConfirm = -1; // 倒计时
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.LimitControl.type,
|
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm.operation,
|
|
||||||
}
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
if (!this.isOpenMessage) {
|
|
||||||
this.doClose();
|
|
||||||
} else {
|
|
||||||
let operate = {
|
|
||||||
message: `是否关闭会话,并关闭窗口`,
|
|
||||||
confirmId: OperationEvent.LimitControl.CancelAllLimit.close.domId,
|
|
||||||
}
|
|
||||||
this.$refs.ConfirmTip.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
closeMessage() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.LimitControl.type,
|
|
||||||
operation: OperationEvent.LimitControl.CancelAllLimit.close.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.ConfirmTip.doClose();
|
|
||||||
this.isOpenMessage = false;
|
|
||||||
this.messageText1 = '';
|
|
||||||
this.messageText2 = '';
|
|
||||||
this.disabledConfirm1 = false;
|
|
||||||
this.disabledConfirm2 = false;
|
|
||||||
this.timeCountConfirm = -1; // 倒计时
|
|
||||||
this.doClose();
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error);
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
confirm1() {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.LimitControl.type,
|
||||||
|
operation: OperationEvent.LimitControl.CancelAllLimit.confirm1.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.isOpenMessage = true;
|
||||||
|
this.messageText1 = '**************';
|
||||||
|
this.messageText2 = '取消全线临时限速';
|
||||||
|
this.disabledConfirm1 = true;
|
||||||
|
this.timeCountConfirm = 60; // 倒计时
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirm2() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.LimitControl.type,
|
||||||
|
operation: OperationEvent.LimitControl.CancelAllLimit.confirm2.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.isOpenMessage = true;
|
||||||
|
this.messageText2 = '**************';
|
||||||
|
this.disabledConfirm2 = true;
|
||||||
|
this.timeCountConfirm = -1;
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.LimitControl.type,
|
||||||
|
operation: OperationEvent.LimitControl.CancelAllLimit.confirm.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
if (!this.isOpenMessage) {
|
||||||
|
this.doClose();
|
||||||
|
} else {
|
||||||
|
const operate = {
|
||||||
|
message: `是否关闭会话,并关闭窗口`,
|
||||||
|
confirmId: OperationEvent.LimitControl.CancelAllLimit.close.domId
|
||||||
|
};
|
||||||
|
this.$refs.ConfirmTip.doShow(operate);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
closeMessage() {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.LimitControl.type,
|
||||||
|
operation: OperationEvent.LimitControl.CancelAllLimit.close.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.ConfirmTip.doClose();
|
||||||
|
this.isOpenMessage = false;
|
||||||
|
this.messageText1 = '';
|
||||||
|
this.messageText2 = '';
|
||||||
|
this.disabledConfirm1 = false;
|
||||||
|
this.disabledConfirm2 = false;
|
||||||
|
this.timeCountConfirm = -1; // 倒计时
|
||||||
|
this.doClose();
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.stand-detain-train .context {
|
.stand-detain-train .context {
|
||||||
@ -352,4 +368,4 @@
|
|||||||
box-shadow: 2px 2px #959595 inset;
|
box-shadow: 2px 2px #959595 inset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -101,7 +101,6 @@ export default {
|
|||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
console.log(this.map, 111);
|
|
||||||
/** 加载列车数据*/
|
/** 加载列车数据*/
|
||||||
this.loadInitData(this.map);
|
this.loadInitData(this.map);
|
||||||
|
|
||||||
|
@ -179,8 +179,6 @@ export function updateForList(model, state, liststr) {
|
|||||||
list.push(deepClone(model)); // 新增
|
list.push(deepClone(model)); // 新增
|
||||||
} else if (i >= 0) {
|
} else if (i >= 0) {
|
||||||
list[i] = deepClone(model); // item map 数据 model 页面表单数据
|
list[i] = deepClone(model); // item map 数据 model 页面表单数据
|
||||||
// state.mapDevice[model.code] = deepClone(model);
|
|
||||||
// console.log(list[i], '更新');
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
state.map[liststr] = [model];
|
state.map[liststr] = [model];
|
||||||
@ -188,8 +186,6 @@ export function updateForList(model, state, liststr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function updateMapData(state, model) {
|
export function updateMapData(state, model) {
|
||||||
// const map = state.map;
|
|
||||||
// const mapDevice = state.mapDevice;
|
|
||||||
if (state.map && model) {
|
if (state.map && model) {
|
||||||
switch (model._type) {
|
switch (model._type) {
|
||||||
case deviceType.Link: updateForList(model, state, 'linkList'); break;
|
case deviceType.Link: updateForList(model, state, 'linkList'); break;
|
||||||
|
@ -212,7 +212,7 @@ function handleOperation(state, models) {
|
|||||||
list.push({ operation: 'add', data: deepAssign({}, item) });
|
list.push({ operation: 'add', data: deepAssign({}, item) });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// console.log(list, '步骤数据');
|
|
||||||
if (list.length) {
|
if (list.length) {
|
||||||
if (state.stepData.length >= 15) { // 步骤数据最多储存15步
|
if (state.stepData.length >= 15) { // 步骤数据最多储存15步
|
||||||
state.stepData.pop();
|
state.stepData.pop();
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="display-draft">
|
<div class="display-draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">{{$t('display.plan.drivingByPlan')}}</el-button>
|
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">{{ $t('display.plan.drivingByPlan') }}</el-button>
|
||||||
<el-button type="danger" :disabled="!isDisable" @click="end">{{$t('display.plan.exitPlan')}}</el-button>
|
<el-button type="danger" :disabled="!isDisable" @click="end">{{ $t('display.plan.exitPlan') }}</el-button>
|
||||||
<el-button type="primary" @click="back">{{$t('display.plan.back')}}</el-button>
|
<el-button type="primary" @click="back">{{ $t('display.plan.back') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||||
</div>
|
</div>
|
||||||
@ -13,92 +13,91 @@
|
|||||||
import SetTime from './demon/setTime';
|
import SetTime from './demon/setTime';
|
||||||
import { Notification } from 'element-ui';
|
import { Notification } from 'element-ui';
|
||||||
import { runDiagramIsStart, runDiagramGetTime, runDiagramOver, runDiagramStart } from '@/api/simulation';
|
import { runDiagramIsStart, runDiagramGetTime, runDiagramOver, runDiagramStart } from '@/api/simulation';
|
||||||
import { exitFullscreen } from '@/utils/screen';
|
|
||||||
import { timeFormat } from '@/utils/date';
|
import { timeFormat } from '@/utils/date';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuPlan',
|
name: 'MenuPlan',
|
||||||
components: {
|
components: {
|
||||||
SetTime
|
SetTime
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
group: {
|
group: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
offset: {
|
offset: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isDisable: false
|
isDisable: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.training.simulationGroupCount': function () {
|
'$store.state.training.simulationGroupCount': function () {
|
||||||
this.initLoadPage();
|
this.initLoadPage();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async initLoadPage() {
|
async initLoadPage() {
|
||||||
try {
|
try {
|
||||||
const rest = await runDiagramIsStart(this.group);
|
const rest = await runDiagramIsStart(this.group);
|
||||||
if (rest && rest.data) {
|
if (rest && rest.data) {
|
||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
this.$store.dispatch('training/simulationStart');
|
this.$store.dispatch('training/simulationStart');
|
||||||
} else {
|
} else {
|
||||||
this.isDisable = false;
|
this.isDisable = false;
|
||||||
this.$store.dispatch('training/over');
|
this.$store.dispatch('training/over');
|
||||||
}
|
}
|
||||||
await this.loadSystemTime();
|
await this.loadSystemTime();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async loadSystemTime() {
|
async loadSystemTime() {
|
||||||
const rest = await runDiagramGetTime(this.group);
|
const rest = await runDiagramGetTime(this.group);
|
||||||
if (rest && rest.code == 200) {
|
if (rest && rest.code == 200) {
|
||||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectBeginTime() {
|
selectBeginTime() {
|
||||||
this.$refs.setTime.doShow();
|
this.$refs.setTime.doShow();
|
||||||
},
|
},
|
||||||
start(model) {
|
start(model) {
|
||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
runDiagramStart(model, this.group).then(res => {
|
runDiagramStart(model, this.group).then(res => {
|
||||||
this.$store.dispatch('training/simulationStart').then(() => {
|
this.$store.dispatch('training/simulationStart').then(() => {
|
||||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`));
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`));
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.isDisable = false;
|
this.isDisable = false;
|
||||||
this.$messageBox(this.$t('display.plan.startPlanFail'));
|
this.$messageBox(this.$t('display.plan.startPlanFail'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
end() {
|
end() {
|
||||||
this.isDisable = false;
|
this.isDisable = false;
|
||||||
runDiagramOver(this.group).then(() => {
|
runDiagramOver(this.group).then(() => {
|
||||||
this.$store.dispatch('training/over').then(() => {
|
this.$store.dispatch('training/over').then(() => {
|
||||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||||
this.$store.dispatch('map/clearJlmapTrainView');
|
this.$store.dispatch('map/clearJlmapTrainView');
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
this.$messageBox(this.$t('display.plan.endPlanFail'));
|
this.$messageBox(this.$t('display.plan.endPlanFail'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async back() {
|
async back() {
|
||||||
this.$store.dispatch('training/over').then(() => {
|
this.$store.dispatch('training/over').then(() => {
|
||||||
history.go(-1);
|
history.go(-1);
|
||||||
Notification.closeAll();
|
Notification.closeAll();
|
||||||
// exitFullscreen();
|
// exitFullscreen();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="display-card" :style="{top: offset+'px'}">
|
<div class="display-card" :style="{top: offset+'px'}">
|
||||||
<el-row>
|
<el-row>
|
||||||
<span v-if="countTime" class="display-score">{{$t('display.screen.trialTime')}} {{ countTime }}</span>
|
<span v-if="countTime" class="display-score">{{ $t('display.screen.trialTime') }} {{ countTime }}</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -10,107 +10,106 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getGoodsTryUse } from '@/api/management/goods';
|
import { getGoodsTryUse } from '@/api/management/goods';
|
||||||
import { PermissionType } from '@/scripts/ConstDic';
|
import { PermissionType } from '@/scripts/ConstDic';
|
||||||
import { exitFullscreen } from '@/utils/screen';
|
|
||||||
import { getCountTime } from '@/utils/index';
|
import { getCountTime } from '@/utils/index';
|
||||||
import { runDiagramIsStart, runDiagramGetTime, runDiagramStart } from '@/api/simulation';
|
import { runDiagramIsStart, runDiagramGetTime, runDiagramStart } from '@/api/simulation';
|
||||||
import { timeFormat } from '@/utils/date';
|
import { timeFormat } from '@/utils/date';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MenuScreen',
|
name: 'MenuScreen',
|
||||||
props: {
|
props: {
|
||||||
group: {
|
group: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
offset: {
|
offset: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tryTime: 0, // 进入页面多少秒
|
tryTime: 0, // 进入页面多少秒
|
||||||
timeNow: 0, // 进入页面 相对时间
|
timeNow: 0, // 进入页面 相对时间
|
||||||
time: null, // 定时器
|
time: null, // 定时器
|
||||||
countTime: 0, // 显示 倒计时
|
countTime: 0, // 显示 倒计时
|
||||||
remainingTime: 0,
|
remainingTime: 0,
|
||||||
goodsId: this.$route.query.goodsId,
|
goodsId: this.$route.query.goodsId,
|
||||||
try: this.$route.query.try, // 是否是试用权限
|
try: this.$route.query.try, // 是否是试用权限
|
||||||
training: {
|
training: {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
remarks: ''
|
remarks: ''
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.training.subscribeCount': function () {
|
'$store.state.training.subscribeCount': function () {
|
||||||
this.group && this.initLoadPage();
|
this.group && this.initLoadPage();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (this.time) {
|
if (this.time) {
|
||||||
this.setTryTime();
|
this.setTryTime();
|
||||||
clearTimeout(this.time);
|
clearTimeout(this.time);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async initLoadPage() {
|
async initLoadPage() {
|
||||||
try {
|
try {
|
||||||
if (this.try != '0') {
|
if (this.try != '0') {
|
||||||
const data = {
|
const data = {
|
||||||
permissionType: PermissionType.SCREEN
|
permissionType: PermissionType.SCREEN
|
||||||
};
|
};
|
||||||
|
|
||||||
const resr = await getGoodsTryUse(data);
|
const resr = await getGoodsTryUse(data);
|
||||||
if (resr && resr.code == 200) {
|
if (resr && resr.code == 200) {
|
||||||
this.remainingTime = resr.data.tryTime;
|
this.remainingTime = resr.data.tryTime;
|
||||||
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
|
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
|
||||||
if (this.try) {
|
if (this.try) {
|
||||||
this.time = setInterval(() => {
|
this.time = setInterval(() => {
|
||||||
this.tryTime += 1;
|
this.tryTime += 1;
|
||||||
this.countTime = getCountTime(this.timeNow);
|
this.countTime = getCountTime(this.timeNow);
|
||||||
if (this.countTime == -1) {
|
if (this.countTime == -1) {
|
||||||
this.back();
|
this.back();
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(this.$t('display.screen.getTimeFail'));
|
this.$messageBox(this.$t('display.screen.getTimeFail'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const initTime = this.$route.query.initTime;
|
const initTime = this.$route.query.initTime;
|
||||||
const retp = await runDiagramIsStart(this.group);
|
const retp = await runDiagramIsStart(this.group);
|
||||||
if (retp && !retp.data) {
|
if (retp && !retp.data) {
|
||||||
await runDiagramStart({ initTime: initTime }, this.group);
|
await runDiagramStart({ initTime: initTime }, this.group);
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.$store.dispatch('training/simulationStart');
|
await this.$store.dispatch('training/simulationStart');
|
||||||
await this.loadSystemTime();
|
await this.loadSystemTime();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async loadSystemTime() {
|
async loadSystemTime() {
|
||||||
const rest = await runDiagramGetTime(this.group);
|
const rest = await runDiagramGetTime(this.group);
|
||||||
if (rest && rest.code == 200) {
|
if (rest && rest.code == 200) {
|
||||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setTryTime() {
|
setTryTime() {
|
||||||
if (this.try) {
|
if (this.try) {
|
||||||
this.$emit('tryTime', { time: this.tryTime, goodsId: this.goodsId });
|
this.$emit('tryTime', { time: this.tryTime, goodsId: this.goodsId });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$store.dispatch('training/over').then(() => {
|
this.$store.dispatch('training/over').then(() => {
|
||||||
Notification.closeAll();
|
Notification.closeAll();
|
||||||
history.go(-1);
|
history.go(-1);
|
||||||
// exitFullscreen();
|
// exitFullscreen();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@ -1,214 +1,209 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||||
<el-form-item label="文字编号" prop="code">
|
<el-form-item label="文字编号" prop="code">
|
||||||
<el-input :disabled="true" v-model="form.code" >
|
<el-input v-model="form.code" :disabled="true">
|
||||||
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文字内容" prop="context">
|
<el-form-item label="文字内容" prop="context">
|
||||||
<el-input type="textarea" v-model="form.context"></el-input>
|
<el-input v-model="form.context" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文字颜色" prop="textFill">
|
<el-form-item label="文字颜色" prop="textFill">
|
||||||
<el-input v-model="form.textFill"></el-input>
|
<el-input v-model="form.textFill" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文字大小" prop="fontSize">
|
<el-form-item label="文字大小" prop="fontSize">
|
||||||
<el-input-number v-model="form.fontSize" controls-position="right" :min="1" :max="100"></el-input-number>
|
<el-input-number v-model="form.fontSize" controls-position="right" :min="1" :max="100" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文字粗细" prop="fontWeight">
|
<el-form-item label="文字粗细" prop="fontWeight">
|
||||||
<el-input-number v-model="form.fontWeight" controls-position="right" :min="1" ></el-input-number>
|
<el-input-number v-model="form.fontWeight" controls-position="right" :min="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="X轴坐标">
|
<el-form-item label="X轴坐标">
|
||||||
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="Y轴坐标">
|
<el-form-item label="Y轴坐标">
|
||||||
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--<el-form-item label="文字背景">-->
|
<!--<el-form-item label="文字背景">-->
|
||||||
<!--<el-switch v-model="form.hasRect" @change="handleChange"></el-switch>-->
|
<!--<el-switch v-model="form.hasRect" @change="handleChange"></el-switch>-->
|
||||||
<!--</el-form-item>-->
|
<!--</el-form-item>-->
|
||||||
<!--<el-form-item v-show="form.hasRect" label="背景X轴坐标">-->
|
<!--<el-form-item v-show="form.hasRect" label="背景X轴坐标">-->
|
||||||
<!--<el-input-number v-model="form.xBg" controls-position="right" :min="0"></el-input-number>-->
|
<!--<el-input-number v-model="form.xBg" controls-position="right" :min="0"></el-input-number>-->
|
||||||
<!--</el-form-item>-->
|
<!--</el-form-item>-->
|
||||||
<!--<el-form-item v-show="form.hasRect" label="背景Y轴坐标">-->
|
<!--<el-form-item v-show="form.hasRect" label="背景Y轴坐标">-->
|
||||||
<!--<el-input-number v-model="form.yBg" controls-position="right" :min="0"></el-input-number>-->
|
<!--<el-input-number v-model="form.yBg" controls-position="right" :min="0"></el-input-number>-->
|
||||||
<!--</el-form-item>-->
|
<!--</el-form-item>-->
|
||||||
<!--<el-form-item v-show="form.hasRect" label="背景宽度">-->
|
<!--<el-form-item v-show="form.hasRect" label="背景宽度">-->
|
||||||
<!--<el-input-number v-model="form.bgWidth" controls-position="right" :min="1"></el-input-number>-->
|
<!--<el-input-number v-model="form.bgWidth" controls-position="right" :min="1"></el-input-number>-->
|
||||||
<!--</el-form-item>-->
|
<!--</el-form-item>-->
|
||||||
<!--<el-form-item v-show="form.hasRect" label="背景高度">-->
|
<!--<el-form-item v-show="form.hasRect" label="背景高度">-->
|
||||||
<!--<el-input-number v-model="form.bgHeight" controls-position="right" :min="1"></el-input-number>-->
|
<!--<el-input-number v-model="form.bgHeight" controls-position="right" :min="1"></el-input-number>-->
|
||||||
<!--</el-form-item>-->
|
<!--</el-form-item>-->
|
||||||
<!--<el-form-item v-show="form.hasRect" label="背景颜色" prop="elevatorColor">-->
|
<!--<el-form-item v-show="form.hasRect" label="背景颜色" prop="elevatorColor">-->
|
||||||
<!--<el-color-picker v-model="form.textBackgroundColor"></el-color-picker>-->
|
<!--<el-color-picker v-model="form.textBackgroundColor"></el-color-picker>-->
|
||||||
<!--</el-form-item>-->
|
<!--</el-form-item>-->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">删除</el-button>
|
||||||
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'TextDraft',
|
name: 'TextDraft',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isUpdate: false,
|
isUpdate: false,
|
||||||
buttonText: '立即创建',
|
buttonText: '立即创建',
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
context: '',
|
context: '',
|
||||||
textFill: '',
|
textFill: '',
|
||||||
fontSize: '',
|
fontSize: '',
|
||||||
fontWeight: '',
|
fontWeight: '',
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10,
|
y: 10
|
||||||
// hasRect: false,
|
// hasRect: false,
|
||||||
// xBg: 10,
|
// xBg: 10,
|
||||||
// yBg: 10,
|
// yBg: 10,
|
||||||
// bgWidth: 0,
|
// bgWidth: 0,
|
||||||
// bgHeight: 0,
|
// bgHeight: 0,
|
||||||
// textBackgroundColor: ''
|
// textBackgroundColor: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请输入文字编号', trigger: 'blur' },
|
{ required: true, message: '请输入文字编号', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
context: [
|
context: [
|
||||||
{ required: true, message: '请输入文字内容', trigger: 'blur' },
|
{ required: true, message: '请输入文字内容', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
textFill: [
|
textFill: [
|
||||||
{ required: true, message: '请输入文字颜色', trigger: 'blur' },
|
{ required: true, message: '请输入文字颜色', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
fontSize: [
|
fontSize: [
|
||||||
{ required: true, message: '请输入文字大小', trigger: 'blur' },
|
{ required: true, message: '请输入文字大小', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
fontWeight: [
|
fontWeight: [
|
||||||
{ required: true, message: '请输入文字粗细', trigger: 'blur' },
|
{ required: true, message: '请输入文字粗细', trigger: 'blur' }
|
||||||
],
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.ibp.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||||
|
if (model._type === 'IbpText' ) {
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.context = model.context;
|
||||||
|
this.form.textFill = model.textFill;
|
||||||
|
this.form.fontSize = model.fontSize;
|
||||||
|
this.form.fontWeight = model.fontWeight;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
// this.form.hasRect = model.hasRect;
|
||||||
|
// this.form.xBg = model.textRect ? model.textRect.x : 10;
|
||||||
|
// this.form.yBg = model.textRect ? model.textRect.y : 10;
|
||||||
|
// this.form.bgWidth = model.textRect ? model.textRect.width : 0;
|
||||||
|
// this.form.bgHeight = model.textRect ? model.textRect.height : 0;
|
||||||
|
// this.form.textBackgroundColor = model.textRect ? model.textRect.textBackgroundColor : '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const textModel = {
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
code: this.form.code,
|
||||||
|
_type: 'IbpText',
|
||||||
|
context: this.form.context,
|
||||||
|
textFill: this.form.textFill,
|
||||||
|
fontSize: this.form.fontSize,
|
||||||
|
fontWeight: this.form.fontWeight,
|
||||||
|
fontFamily: 'consolas'
|
||||||
|
// hasRect: this.form.hasRect,
|
||||||
|
// textRect: this.form.hasRect ?
|
||||||
|
// {
|
||||||
|
// x: this.form.xBg,
|
||||||
|
// y: this.form.yBg,
|
||||||
|
// width: this.form.bgWidth,
|
||||||
|
// height: this.form.bgHeight
|
||||||
|
// }:'',
|
||||||
|
// textBackgroundColor: this.form.hasRect?this.form.textBackgroundColor: ''
|
||||||
|
};
|
||||||
|
this.$emit('createText', textModel);
|
||||||
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
deleteDevice() {
|
||||||
|
const textModel = {
|
||||||
|
zlevel: 2,
|
||||||
|
z: 1,
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
code: this.form.code,
|
||||||
|
_type: 'IbpText',
|
||||||
|
context: this.form.context,
|
||||||
|
textFill: this.form.textFill,
|
||||||
|
fontSize: this.form.fontSize,
|
||||||
|
fontWeight: this.form.fontWeight,
|
||||||
|
fontFamily: 'consolas'
|
||||||
|
// hasRect: this.form.hasRect,
|
||||||
|
// textRect: this.form.hasRect ?
|
||||||
|
// {
|
||||||
|
// x: this.form.xBg,
|
||||||
|
// y: this.form.yBg,
|
||||||
|
// width: this.form.bgWidth,
|
||||||
|
// height: this.form.bgHeight
|
||||||
|
// }:'',
|
||||||
|
// textBackgroundColor: this.form.hasRect?this.form.textBackgroundColor: ''
|
||||||
|
};
|
||||||
|
this.$emit('deleteDataModel', textModel);
|
||||||
|
this.initPage();
|
||||||
|
},
|
||||||
|
initPage() {
|
||||||
|
this.isUpdate = false;
|
||||||
|
this.buttonText = '立即创建';
|
||||||
|
this.showDeleteButton = false;
|
||||||
|
this.form = {
|
||||||
|
code: '',
|
||||||
|
context: '',
|
||||||
|
textFill: '',
|
||||||
|
fontSize: '',
|
||||||
|
fontWeight: '',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
generateCode() {
|
||||||
|
const mydate = new Date();
|
||||||
},
|
this.form.code = 'text_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||||
watch: {
|
|
||||||
'$store.state.ibp.rightClickCount': function (val) {
|
|
||||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
|
||||||
if (model._type === 'IbpText' ){
|
|
||||||
this.buttonText = '修改';
|
|
||||||
this.showDeleteButton = true;
|
|
||||||
this.isUpdate = true;
|
|
||||||
this.form.code = model.code;
|
|
||||||
this.form.context = model.context;
|
|
||||||
this.form.textFill = model.textFill;
|
|
||||||
this.form.fontSize = model.fontSize;
|
|
||||||
this.form.fontWeight = model.fontWeight;
|
|
||||||
this.form.x = model.point.x;
|
|
||||||
this.form.y = model.point.y;
|
|
||||||
// this.form.hasRect = model.hasRect;
|
|
||||||
// this.form.xBg = model.textRect ? model.textRect.x : 10;
|
|
||||||
// this.form.yBg = model.textRect ? model.textRect.y : 10;
|
|
||||||
// this.form.bgWidth = model.textRect ? model.textRect.width : 0;
|
|
||||||
// this.form.bgHeight = model.textRect ? model.textRect.height : 0;
|
|
||||||
// this.form.textBackgroundColor = model.textRect ? model.textRect.textBackgroundColor : '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
onSubmit(form) {
|
|
||||||
this.$refs[form].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const textModel = {
|
|
||||||
point: {
|
|
||||||
x: this.form.x,
|
|
||||||
y: this.form.y
|
|
||||||
},
|
|
||||||
code: this.form.code,
|
|
||||||
_type: 'IbpText',
|
|
||||||
context: this.form.context,
|
|
||||||
textFill: this.form.textFill,
|
|
||||||
fontSize: this.form.fontSize ,
|
|
||||||
fontWeight: this.form.fontWeight,
|
|
||||||
fontFamily: 'consolas',
|
|
||||||
// hasRect: this.form.hasRect,
|
|
||||||
// textRect: this.form.hasRect ?
|
|
||||||
// {
|
|
||||||
// x: this.form.xBg,
|
|
||||||
// y: this.form.yBg,
|
|
||||||
// width: this.form.bgWidth,
|
|
||||||
// height: this.form.bgHeight
|
|
||||||
// }:'',
|
|
||||||
// textBackgroundColor: this.form.hasRect?this.form.textBackgroundColor: ''
|
|
||||||
};
|
|
||||||
this.$emit('createText', textModel);
|
|
||||||
this.initPage();
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
deleteDevice() {
|
|
||||||
const textModel = {
|
|
||||||
zlevel: 2,
|
|
||||||
z: 1,
|
|
||||||
point: {
|
|
||||||
x: this.form.x,
|
|
||||||
y: this.form.y
|
|
||||||
},
|
|
||||||
code: this.form.code,
|
|
||||||
_type: 'IbpText',
|
|
||||||
context: this.form.context,
|
|
||||||
textFill: this.form.textFill,
|
|
||||||
fontSize: this.form.fontSize ,
|
|
||||||
fontWeight: this.form.fontWeight,
|
|
||||||
fontFamily: 'consolas',
|
|
||||||
// hasRect: this.form.hasRect,
|
|
||||||
// textRect: this.form.hasRect ?
|
|
||||||
// {
|
|
||||||
// x: this.form.xBg,
|
|
||||||
// y: this.form.yBg,
|
|
||||||
// width: this.form.bgWidth,
|
|
||||||
// height: this.form.bgHeight
|
|
||||||
// }:'',
|
|
||||||
// textBackgroundColor: this.form.hasRect?this.form.textBackgroundColor: ''
|
|
||||||
};
|
|
||||||
this.$emit('deleteDataModel',textModel);
|
|
||||||
this.initPage();
|
|
||||||
},
|
|
||||||
initPage() {
|
|
||||||
this.isUpdate = false;
|
|
||||||
this.buttonText = '立即创建';
|
|
||||||
this.showDeleteButton = false;
|
|
||||||
this.form = {
|
|
||||||
code: '',
|
|
||||||
context: '',
|
|
||||||
textFill: '',
|
|
||||||
fontSize: '',
|
|
||||||
fontWeight: '',
|
|
||||||
x: 10,
|
|
||||||
y: 10
|
|
||||||
};
|
|
||||||
},
|
|
||||||
generateCode() {
|
|
||||||
const mydate = new Date();
|
|
||||||
this.form.code = "text_"+mydate.getDay()+ mydate.getHours()+ mydate.getMinutes()+mydate.getSeconds()+mydate.getMilliseconds()+ Math.round(Math.random() * 10000);
|
|
||||||
},
|
|
||||||
// handleChange(e) {
|
|
||||||
// this.form.hasRect = e;
|
|
||||||
// // this.form.hasRect = !this.form.hasRect;
|
|
||||||
// console.log('-------',e,this.form.hasRect);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,227 +1,253 @@
|
|||||||
<template>
|
<template>
|
||||||
<transition name="el-zoom-in-center">
|
<transition name="el-zoom-in-center">
|
||||||
<div class="map-control">
|
<div class="map-control">
|
||||||
<el-card type="border-card">
|
<el-card type="border-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>{{$t('ibp.stationName')}}</span>
|
<span>{{ $t('ibp.stationName') }}</span>
|
||||||
<el-select v-model="stationCode" @change="changeStationCode" :placeholder="this.$t('rules.selectStation')">
|
<el-select v-model="stationCode" :placeholder="this.$t('rules.selectStation')" @change="changeStationCode">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stationOptions"
|
v-for="item in stationOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value"
|
||||||
</el-option>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
style="float: right; padding: 3px 0; margin-right: 5px;"
|
style="float: right; padding: 3px 0; margin-right: 5px;"
|
||||||
@click="handleSave"
|
@click="handleSave"
|
||||||
>{{$t('ibp.save')}}</el-button>
|
>{{ $t('ibp.save') }}</el-button>
|
||||||
</div>
|
|
||||||
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
|
|
||||||
<el-tab-pane :label="this.$t('ibp.background')" name="Background">
|
|
||||||
<ibp-bg ref="background"
|
|
||||||
@updateBg="createDataModel" style="width:90%"
|
|
||||||
></ibp-bg>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.line')" name="IbpLine">
|
|
||||||
<ibp-line ref="ibpline"
|
|
||||||
@createLine="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-line>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.text')" name="IbpText">
|
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
|
|
||||||
<ibp-text ref="ibptext"
|
|
||||||
@createText="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-text>
|
|
||||||
</el-scrollbar>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.rect')" name="TipBox">
|
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
|
|
||||||
<ibp-tip-box ref="tipbox"
|
|
||||||
@createTipBox="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
></ibp-tip-box>
|
|
||||||
</el-scrollbar>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.button')" name="SquareButton">
|
|
||||||
<ibp-button ref="squarebutton"
|
|
||||||
@createButton="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-button>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.circularLamp')" name="CircularLamp">
|
|
||||||
<ibp-lamp ref="circularlamp"
|
|
||||||
@createLamp="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-lamp>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.arrow')" name="Arrow">
|
|
||||||
<ibp-arrow ref="arrow"
|
|
||||||
@createArrow="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-arrow>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.escalatorFrame')" name="AppendageBox">
|
|
||||||
<ibp-appendage-box ref="appendagebox"
|
|
||||||
@createAppendageBox="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-appendage-box>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.alarm')" name="Alarm">
|
|
||||||
<ibp-alarm ref="alarm"
|
|
||||||
@createAlarm="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-alarm>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.telephoneTerminal')" name="TeleTerminal">
|
|
||||||
<ibp-telephone-terminal ref="teleTerminal"
|
|
||||||
@createTeleTerminal="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-telephone-terminal>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.escalator')" name="Elevator">
|
|
||||||
<ibp-elevator ref="elevator"
|
|
||||||
@createElevator="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-elevator>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.key')" name="Key">
|
|
||||||
<ibp-key ref="key"
|
|
||||||
@createKey="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-key>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.digitalClock')" name="Clock">
|
|
||||||
<ibp-clock ref="clock"
|
|
||||||
@createClock="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-clock>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane :label="this.$t('ibp.rotateTip')" name="RotateTip">
|
|
||||||
<ibp-rotate-tip ref="rotateTip"
|
|
||||||
@createRotateTip="createDataModel" @deleteDataModel="deleteDataModel" style="width:90%"
|
|
||||||
>
|
|
||||||
</ibp-rotate-tip>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
<el-tabs v-model="enabledTab" class="mapEdit" type="card" @tab-click="handleTabClick">
|
||||||
|
<el-tab-pane :label="this.$t('ibp.background')" name="Background">
|
||||||
|
<ibp-bg
|
||||||
|
ref="background"
|
||||||
|
style="width:90%"
|
||||||
|
@updateBg="createDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.line')" name="IbpLine">
|
||||||
|
<ibp-line
|
||||||
|
ref="ibpline"
|
||||||
|
style="width:90%"
|
||||||
|
@createLine="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.text')" name="IbpText">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
|
||||||
|
<ibp-text
|
||||||
|
ref="ibptext"
|
||||||
|
style="width:90%"
|
||||||
|
@createText="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-scrollbar>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.rect')" name="TipBox">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height+'px' }">
|
||||||
|
<ibp-tip-box
|
||||||
|
ref="tipbox"
|
||||||
|
style="width:90%"
|
||||||
|
@createTipBox="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-scrollbar>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.button')" name="SquareButton">
|
||||||
|
<ibp-button
|
||||||
|
ref="squarebutton"
|
||||||
|
style="width:90%"
|
||||||
|
@createButton="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.circularLamp')" name="CircularLamp">
|
||||||
|
<ibp-lamp
|
||||||
|
ref="circularlamp"
|
||||||
|
style="width:90%"
|
||||||
|
@createLamp="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.arrow')" name="Arrow">
|
||||||
|
<ibp-arrow
|
||||||
|
ref="arrow"
|
||||||
|
style="width:90%"
|
||||||
|
@createArrow="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.escalatorFrame')" name="AppendageBox">
|
||||||
|
<ibp-appendage-box
|
||||||
|
ref="appendagebox"
|
||||||
|
style="width:90%"
|
||||||
|
@createAppendageBox="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.alarm')" name="Alarm">
|
||||||
|
<ibp-alarm
|
||||||
|
ref="alarm"
|
||||||
|
style="width:90%"
|
||||||
|
@createAlarm="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.telephoneTerminal')" name="TeleTerminal">
|
||||||
|
<ibp-telephone-terminal
|
||||||
|
ref="teleTerminal"
|
||||||
|
style="width:90%"
|
||||||
|
@createTeleTerminal="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.escalator')" name="Elevator">
|
||||||
|
<ibp-elevator
|
||||||
|
ref="elevator"
|
||||||
|
style="width:90%"
|
||||||
|
@createElevator="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.key')" name="Key">
|
||||||
|
<ibp-key
|
||||||
|
ref="key"
|
||||||
|
style="width:90%"
|
||||||
|
@createKey="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.digitalClock')" name="Clock">
|
||||||
|
<ibp-clock
|
||||||
|
ref="clock"
|
||||||
|
style="width:90%"
|
||||||
|
@createClock="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="this.$t('ibp.rotateTip')" name="RotateTip">
|
||||||
|
<ibp-rotate-tip
|
||||||
|
ref="rotateTip"
|
||||||
|
style="width:90%"
|
||||||
|
@createRotateTip="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { checkLoginLine } from '@/api/login';
|
import {deviceFactory} from '@/ibp/utils/parser';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import IbpText from './ibpText';
|
||||||
import {deviceFactory} from '@/ibp/utils/parser';
|
import IbpTipBox from './ibpTipBox';
|
||||||
import deviceType from '@/ibp/constant/deviceType';
|
import IbpButton from './ibpButton';
|
||||||
import IbpText from './ibpText';
|
import IbpBg from './ibpBg';
|
||||||
import IbpTipBox from './ibpTipBox';
|
import IbpAlarm from './ibpAlarm';
|
||||||
import IbpButton from './ibpButton';
|
import IbpAppendageBox from './ibpAppendageBox';
|
||||||
import IbpBg from './ibpBg';
|
import IbpArrow from './ibpArrow';
|
||||||
import IbpAlarm from './ibpAlarm';
|
import IbpLamp from './ibpLamp';
|
||||||
import IbpAppendageBox from './ibpAppendageBox';
|
import IbpLine from './ibpLine';
|
||||||
import IbpArrow from './ibpArrow';
|
import IbpTelephoneTerminal from './ibpTelephoneTerminal';
|
||||||
import IbpLamp from './ibpLamp';
|
import IbpElevator from './ibpElevator';
|
||||||
import IbpLine from './ibpLine';
|
import IbpKey from './ibpKey';
|
||||||
import IbpTelephoneTerminal from './ibpTelephoneTerminal';
|
import IbpClock from './ibpClock';
|
||||||
import IbpElevator from './ibpElevator';
|
import IbpRotateTip from './ibpRotateTip';
|
||||||
import IbpKey from './ibpKey';
|
|
||||||
import IbpClock from './ibpClock';
|
|
||||||
import IbpRotateTip from './ibpRotateTip';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'IbpOperate',
|
name: 'IbpOperate',
|
||||||
components: {
|
components: {
|
||||||
IbpText,
|
IbpText,
|
||||||
IbpBg,
|
IbpBg,
|
||||||
IbpButton,
|
IbpButton,
|
||||||
IbpTipBox,
|
IbpTipBox,
|
||||||
IbpAlarm,
|
IbpAlarm,
|
||||||
IbpAppendageBox,
|
IbpAppendageBox,
|
||||||
IbpArrow,
|
IbpArrow,
|
||||||
IbpLamp,
|
IbpLamp,
|
||||||
IbpLine,
|
IbpLine,
|
||||||
IbpTelephoneTerminal,
|
IbpTelephoneTerminal,
|
||||||
IbpElevator,
|
IbpElevator,
|
||||||
IbpKey,
|
IbpKey,
|
||||||
IbpClock,
|
IbpClock,
|
||||||
IbpRotateTip
|
IbpRotateTip
|
||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
|
|
||||||
],
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
enabledTab: 'Background',
|
enabledTab: 'Background',
|
||||||
data: '',
|
data: '',
|
||||||
stationOptions:[
|
stationOptions:[
|
||||||
{
|
{
|
||||||
value: 'Station_203_0.07533',
|
value: 'Station_203_0.07533',
|
||||||
// label: '通化门站'
|
// label: '通化门站'
|
||||||
label: '车站一'
|
label: '车站一'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'Station_207_0.62282',
|
value: 'Station_207_0.62282',
|
||||||
// label: '枣园站'
|
// label: '枣园站'
|
||||||
label: '车站二'
|
label: '车站二'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'Station_209_0.95175',
|
value: 'Station_209_0.95175',
|
||||||
label: '车站三'
|
label: '车站三'
|
||||||
// label: '后卫寨站'
|
// label: '后卫寨站'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
stationCode: '',
|
stationCode: '',
|
||||||
height: this.$store.state.app.height - 190
|
height: this.$store.state.app.height - 190
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.ibp.rightClickCount': function (val) {
|
'$store.state.ibp.rightClickCount': function (val) {
|
||||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||||
this.enabledTab = model._type;
|
this.enabledTab = model._type;
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
createDataModel(model) {
|
|
||||||
const newModel = deviceFactory(model._type, model);
|
|
||||||
this.$store.dispatch('ibp/updateIbpDevices', newModel.model);
|
|
||||||
},
|
|
||||||
deleteDataModel(model) {
|
|
||||||
this.$store.dispatch('ibp/deleteIbpDevices', model);
|
|
||||||
},
|
|
||||||
handleSave() {
|
|
||||||
const data = JSON.stringify(this.$store.state.ibp.ibp);
|
|
||||||
console.log(data);
|
|
||||||
},
|
|
||||||
changeStationCode(e) {
|
|
||||||
this.$emit('ibpChange',e);
|
|
||||||
this.handleTabClick();
|
|
||||||
},
|
|
||||||
handleTabClick() {
|
|
||||||
this.$refs.ibpline.initPage();
|
|
||||||
this.$refs.ibptext.initPage();
|
|
||||||
this.$refs.tipbox.initPage();
|
|
||||||
this.$refs.squarebutton.initPage();
|
|
||||||
this.$refs.circularlamp.initPage();
|
|
||||||
this.$refs.arrow.initPage();
|
|
||||||
this.$refs.appendagebox.initPage();
|
|
||||||
this.$refs.alarm.initPage();
|
|
||||||
this.$refs.elevator.initPage();
|
|
||||||
this.$refs.key.initPage();
|
|
||||||
this.$refs.teleTerminal.initPage();
|
|
||||||
this.$refs.clock.initPage();
|
|
||||||
this.$refs.rotateTip.initPage();
|
|
||||||
this.$refs.background.initPage();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
createDataModel(model) {
|
||||||
|
const newModel = deviceFactory(model._type, model);
|
||||||
|
this.$store.dispatch('ibp/updateIbpDevices', newModel.model);
|
||||||
|
},
|
||||||
|
deleteDataModel(model) {
|
||||||
|
this.$store.dispatch('ibp/deleteIbpDevices', model);
|
||||||
|
},
|
||||||
|
handleSave() {
|
||||||
|
const data = JSON.stringify(this.$store.state.ibp.ibp);
|
||||||
|
console.log(data);
|
||||||
|
},
|
||||||
|
changeStationCode(e) {
|
||||||
|
this.$emit('ibpChange', e);
|
||||||
|
this.handleTabClick();
|
||||||
|
},
|
||||||
|
handleTabClick() {
|
||||||
|
this.$refs.ibpline.initPage();
|
||||||
|
this.$refs.ibptext.initPage();
|
||||||
|
this.$refs.tipbox.initPage();
|
||||||
|
this.$refs.squarebutton.initPage();
|
||||||
|
this.$refs.circularlamp.initPage();
|
||||||
|
this.$refs.arrow.initPage();
|
||||||
|
this.$refs.appendagebox.initPage();
|
||||||
|
this.$refs.alarm.initPage();
|
||||||
|
this.$refs.elevator.initPage();
|
||||||
|
this.$refs.key.initPage();
|
||||||
|
this.$refs.teleTerminal.initPage();
|
||||||
|
this.$refs.clock.initPage();
|
||||||
|
this.$refs.rotateTip.initPage();
|
||||||
|
this.$refs.background.initPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -79,7 +79,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickEvent(obj, node, data) {
|
clickEvent(obj, node, data) {
|
||||||
console.log(obj, node);
|
|
||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||||
this.$emit('loadData', node);
|
this.$emit('loadData', node);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user