Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
092603c2cc
16
src/App.vue
16
src/App.vue
@ -34,14 +34,14 @@ export default {
|
||||
this.subscribe();
|
||||
const project = window.sessionStorage.getItem('project');
|
||||
document.querySelector("link[rel*='icon']").href = ProjectIcon[project];
|
||||
window.addEventListener('beforeunload', async e => {
|
||||
const token = handleToken();
|
||||
Cookies.remove('UserDesignName');
|
||||
Cookies.remove('UserDesignToken');
|
||||
Cookies.remove('UserName');
|
||||
Cookies.remove('UserToken');
|
||||
await logout(token);
|
||||
});
|
||||
// window.addEventListener('beforeunload', async e => {
|
||||
// const token = handleToken();
|
||||
// Cookies.remove('UserDesignName');
|
||||
// Cookies.remove('UserDesignToken');
|
||||
// Cookies.remove('UserName');
|
||||
// Cookies.remove('UserToken');
|
||||
// await logout(token);
|
||||
// });
|
||||
},
|
||||
methods: {
|
||||
resizeHandler() {
|
||||
|
@ -127,7 +127,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
resetShowPosition(point) {
|
||||
console.log(point);
|
||||
if (point) {
|
||||
this.show = true;
|
||||
const self = this;
|
||||
|
@ -1,196 +1,208 @@
|
||||
<template>
|
||||
<el-dialog class="batong-01__systerm confirm-control" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :span="20" :offset="2">
|
||||
<div style="float: left; line-height: 33px; font-size: 15px;">车站:</div>
|
||||
<div style="float: left; width: 140px; margin-left: 10px;">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20" :offset="2" style="margin-top: 10px;">
|
||||
<div style="float: left; line-height: 33px; font-size: 15px;">{{tipContent}}:</div>
|
||||
<div style="float: left; width: 140px; margin-left: 10px;">
|
||||
<el-input v-model="splitName" size="small" disabled></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</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"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="batong-01__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="20" :offset="2">
|
||||
<div style="float: left; line-height: 33px; font-size: 15px;">车站:</div>
|
||||
<div style="float: left; width: 140px; margin-left: 10px;">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20" :offset="2" style="margin-top: 10px;">
|
||||
<div style="float: left; line-height: 33px; font-size: 15px;">{{ tipContent }}:</div>
|
||||
<div style="float: left; width: 140px; margin-left: 10px;">
|
||||
<el-input v-model="splitName" size="small" disabled />
|
||||
</div>
|
||||
</el-col>
|
||||
</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>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'SplitModule',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null,
|
||||
tipContent: '轨道',
|
||||
stationName: '',
|
||||
splitName: '',
|
||||
selected: null,
|
||||
export default {
|
||||
name: 'SplitModule',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: 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: {
|
||||
NoticeInfo
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
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 '道岔恢复';
|
||||
}
|
||||
},
|
||||
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);
|
||||
/** 轨道切除*/
|
||||
return OperationEvent.Section.split.mbar.domId;
|
||||
} 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) {
|
||||
// '道岔切除';
|
||||
this.handleData(OperationEvent.Switch.split.menu.operation);
|
||||
return OperationEvent.Switch.split.mbar.domId;
|
||||
} 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>
|
||||
<style>
|
||||
@ -198,4 +210,4 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,209 +1,214 @@
|
||||
<template>
|
||||
<el-dialog class="fuzhou_01 alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="线路名称">
|
||||
<el-input v-model="model.lineName" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位名称">
|
||||
<el-input v-model="model.unitName" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="模块名称">
|
||||
<el-input v-model="model.moduleName" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="报警时间">
|
||||
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item>
|
||||
<span slot="label">等 级</span>
|
||||
<el-input v-model="model.level" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="确认状态">
|
||||
<el-input v-model="model.confirm" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9" class="alarm-type">
|
||||
<el-form-item>
|
||||
<span slot="label">类  型</span>
|
||||
<el-input v-model="model.type" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="15" class="alarm-child-type">
|
||||
<el-form-item label="子类型">
|
||||
<el-input v-model="model.childType" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="时间摘要">
|
||||
<el-input v-model="model.timeSummary" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="推荐操作">
|
||||
<el-input v-model="model.recommendedOperation" disabled></el-input>
|
||||
</el-form-item>
|
||||
<div class="alarm-detail-description">
|
||||
<span> 报警详细描述</span><br>
|
||||
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="model.alarmDetail" disabled>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row class="button-group">
|
||||
<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>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou_01 alarm-detail"
|
||||
:title="level+'级告警详细信息'"
|
||||
:visible.sync="show"
|
||||
width="760px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="线路名称">
|
||||
<el-input v-model="model.lineName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位名称">
|
||||
<el-input v-model="model.unitName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="模块名称">
|
||||
<el-input v-model="model.moduleName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="报警时间">
|
||||
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item>
|
||||
<span slot="label">等 级</span>
|
||||
<el-input v-model="model.level" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="确认状态">
|
||||
<el-input v-model="model.confirm" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9" class="alarm-type">
|
||||
<el-form-item>
|
||||
<span slot="label">类  型</span>
|
||||
<el-input v-model="model.type" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="15" class="alarm-child-type">
|
||||
<el-form-item label="子类型">
|
||||
<el-input v-model="model.childType" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="时间摘要">
|
||||
<el-input v-model="model.timeSummary" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="推荐操作">
|
||||
<el-input v-model="model.recommendedOperation" disabled />
|
||||
</el-form-item>
|
||||
<div class="alarm-detail-description">
|
||||
<span> 报警详细描述</span><br>
|
||||
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row class="button-group">
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'AlarmDetail',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
level: 0,
|
||||
operate: null,
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
model: {
|
||||
lineName: '',
|
||||
unitName: '',
|
||||
moduleName: '',
|
||||
level: '',
|
||||
confirm: '',
|
||||
alarmDate: '',
|
||||
type: '',
|
||||
childType: '',
|
||||
timeSummary: '',
|
||||
recommendedOperation: '',
|
||||
alarmDetail: ''
|
||||
}
|
||||
export default {
|
||||
name: 'AlarmDetail',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
level: 0,
|
||||
operate: null,
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
model: {
|
||||
lineName: '',
|
||||
unitName: '',
|
||||
moduleName: '',
|
||||
level: '',
|
||||
confirm: '',
|
||||
alarmDate: '',
|
||||
type: '',
|
||||
childType: '',
|
||||
timeSummary: '',
|
||||
recommendedOperation: '',
|
||||
alarmDetail: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'name'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'name',
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
console.log('alram', elem);
|
||||
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,
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && elem.type == 'resp') {
|
||||
if (elem.agree) {
|
||||
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);
|
||||
const 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>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
|
||||
.alarm-type .el-input {
|
||||
width: 220px;
|
||||
}
|
||||
@ -212,4 +217,4 @@
|
||||
padding-left: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,107 +1,116 @@
|
||||
<template>
|
||||
<el-dialog class="fuzhou_01 cmd-notice" title="操作命令提示" :visible.sync="show" width="400px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<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>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou_01 cmd-notice"
|
||||
title="操作命令提示"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
: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>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'CmdNotice',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
name: '',
|
||||
msg: ''
|
||||
}
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'CmdNotice',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
name: '',
|
||||
msg: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
console.log('timeout', elem);
|
||||
if (elem && elem.type == 'resp') {
|
||||
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,
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && elem.type == 'resp') {
|
||||
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);
|
||||
const newOperate = {
|
||||
type: operate.type,
|
||||
name: station.name
|
||||
};
|
||||
|
||||
if (elem.timeout) {
|
||||
newOperate['msg'] = '请求超时';
|
||||
this.doShow(newOperate);
|
||||
} else if (!elem.agree) {
|
||||
newOperate['msg'] = '请求拒绝';
|
||||
this.doShow(newOperate);
|
||||
}
|
||||
if (elem.timeout) {
|
||||
newOperate['msg'] = '请求超时';
|
||||
this.doShow(newOperate);
|
||||
} else if (!elem.agree) {
|
||||
newOperate['msg'] = '请求拒绝';
|
||||
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>
|
||||
<el-dialog class="beijing-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div class="head_content content">
|
||||
<span class="base-label" style="left: 0px;">会话管理</span>
|
||||
<el-col :span="8">
|
||||
<el-button class="status">查询会话状态</el-button>
|
||||
</el-col>
|
||||
<el-col :span="15" :offset="1">
|
||||
<el-input :value="messageText" placeholder="" size="mini" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button class="status_btn" :id="openMessageId" @click="handleMessage('open')"
|
||||
:disabled="isOpenMessage">打开会话</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button class="status_btn" :id="closeMessageId" @click="handleMessage('close')"
|
||||
:disabled="!isOpenMessage">关闭会话
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="content cotnent_body">
|
||||
<span class="base-label" style="left: 0px;">操作</span>
|
||||
<el-col :span="3">
|
||||
<div class="text">操作</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input :value="messageText1" placeholder="" size="mini" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button class="status_btn" :id="confirmId1" @click="confirm1" :disabled="disabledConfirm1">确认
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="content cotnent_body">
|
||||
<span class="base-label" style="left: 0px;">确认</span>
|
||||
<el-col :span="3">
|
||||
<div class="text">操作</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input :value="messageText2" placeholder="" size="mini" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button class="status_btn" :id="confirmId2" @click="confirm2" :disabled="disabledConfirm2">确认
|
||||
</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>
|
||||
</div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-detain-train"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="head_content content">
|
||||
<span class="base-label" style="left: 0px;">会话管理</span>
|
||||
<el-col :span="8">
|
||||
<el-button class="status">查询会话状态</el-button>
|
||||
</el-col>
|
||||
<el-col :span="15" :offset="1">
|
||||
<el-input :value="messageText" placeholder="" size="mini" disabled />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button
|
||||
:id="openMessageId"
|
||||
class="status_btn"
|
||||
:disabled="isOpenMessage"
|
||||
@click="handleMessage('open')"
|
||||
>打开会话</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button
|
||||
:id="closeMessageId"
|
||||
class="status_btn"
|
||||
:disabled="!isOpenMessage"
|
||||
@click="handleMessage('close')"
|
||||
>关闭会话
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="content cotnent_body">
|
||||
<span class="base-label" style="left: 0px;">操作</span>
|
||||
<el-col :span="3">
|
||||
<div class="text">操作</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input :value="messageText1" placeholder="" size="mini" disabled />
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button :id="confirmId1" class="status_btn" :disabled="disabledConfirm1" @click="confirm1">确认
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="content cotnent_body">
|
||||
<span class="base-label" style="left: 0px;">确认</span>
|
||||
<el-col :span="3">
|
||||
<div class="text">操作</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input :value="messageText2" placeholder="" size="mini" disabled />
|
||||
</el-col>
|
||||
<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>
|
||||
<confirm-tip ref='ConfirmTip' @close="closeMessage"></confirm-tip>
|
||||
</el-dialog>
|
||||
<el-button :id="domIdConfirm" class="close_btn" type="primary" @click="commit">关闭</el-button>
|
||||
<confirm-tip ref="ConfirmTip" @close="closeMessage" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmTip from './childDialog/confirmTip';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
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 {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
ConfirmTip
|
||||
messageText: '',
|
||||
messageText1: '',
|
||||
messageText2: '',
|
||||
isOpenMessage: false,
|
||||
timeCountConfirm: -1,
|
||||
disabledConfirm1: false,
|
||||
disabledConfirm2: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
radio: '1',
|
||||
radio1: '1',
|
||||
earlyDepar: false,
|
||||
|
||||
messageText: '',
|
||||
messageText1: '',
|
||||
messageText2: '',
|
||||
isOpenMessage: false,
|
||||
timeCountConfirm: -1,
|
||||
disabledConfirm1: false,
|
||||
disabledConfirm2: false,
|
||||
openMessageId() {
|
||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.openMessage.domId : '';
|
||||
},
|
||||
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;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
openMessageId() {
|
||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.openMessage.domId : '';
|
||||
},
|
||||
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 = '';
|
||||
}, 1000);
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
handleMessage(message) {
|
||||
if (message == 'open') {
|
||||
let operate = {
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.openMessage.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
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 = {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
handleMessage(message) {
|
||||
if (message == 'open') {
|
||||
const operate = {
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm1.operation,
|
||||
}
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.openMessage.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; // 倒计时
|
||||
this.messageText1 = '取消全线临时限速';
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
let operate = {
|
||||
send: true,
|
||||
} else {
|
||||
const operate = {
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm2.operation,
|
||||
}
|
||||
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 = true;
|
||||
this.messageText2 = '**************';
|
||||
this.disabledConfirm2 = true;
|
||||
this.timeCountConfirm = -1;
|
||||
this.isOpenMessage = false;
|
||||
this.messageText1 = '';
|
||||
this.messageText2 = '';
|
||||
this.disabledConfirm1 = false;
|
||||
this.disabledConfirm2 = false;
|
||||
this.timeCountConfirm = -1; // 倒计时
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
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>
|
||||
<style scoped lang="scss">
|
||||
.stand-detain-train .context {
|
||||
@ -352,4 +368,4 @@
|
||||
box-shadow: 2px 2px #959595 inset;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -68,186 +68,186 @@ import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
// ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '进路选排';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
disabled = !this.row.canSetting;
|
||||
}
|
||||
return disabled;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
// ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '进路选排';
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
disabled = !this.row.canSetting;
|
||||
}
|
||||
return disabled;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
expandPath() {
|
||||
console.log('展开进路预览');
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
expandPath() {
|
||||
console.log('展开进路预览');
|
||||
},
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.restoreBeforeDevices();
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.cutOff = false;
|
||||
});
|
||||
}
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.restoreBeforeDevices();
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.cutOff = false;
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||
this.beforeSectionList = [];
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.row = row;
|
||||
if (row) {
|
||||
// 恢复进路区段的切除状态
|
||||
this.restoreBeforeDevices();
|
||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||
this.beforeSectionList = [];
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.row = row;
|
||||
if (row) {
|
||||
// 恢复进路区段的切除状态
|
||||
this.restoreBeforeDevices();
|
||||
|
||||
if (row.canSetting) {
|
||||
// 设置选中区段为切除状态
|
||||
if (row.containSectionList && row.containSectionList.length) {
|
||||
// 设置新选的进路区段为切除状态
|
||||
row.containSectionList.forEach(elem => {
|
||||
elem.cutOff = true;
|
||||
});
|
||||
}
|
||||
if (row.canSetting) {
|
||||
// 设置选中区段为切除状态
|
||||
if (row.containSectionList && row.containSectionList.length) {
|
||||
// 设置新选的进路区段为切除状态
|
||||
row.containSectionList.forEach(elem => {
|
||||
elem.cutOff = true;
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
||||
this.beforeSectionList = row.containSectionList || [];
|
||||
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
||||
this.beforeSectionList = row.containSectionList || [];
|
||||
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</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';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
radio: '1',
|
||||
radio1: '1',
|
||||
radio2: '1',
|
||||
earlyDepar: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
upRadioId() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
|
||||
},
|
||||
downRadioId() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
|
||||
},
|
||||
title() {
|
||||
this.earlyDepar = false;
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
this.radio1 = '1';
|
||||
return '扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.radio1 = '2';
|
||||
return '取消扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
this.earlyDepar = true;
|
||||
if (this.selected.direction == '01') {
|
||||
this.radio2 = '2';
|
||||
} else {
|
||||
this.radio2 = '1';
|
||||
}
|
||||
return '提前发车';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.standName = selected.name;
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
radio: '1',
|
||||
radio1: '1',
|
||||
radio2: '1',
|
||||
earlyDepar: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
upRadioId() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
|
||||
},
|
||||
downRadioId() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
|
||||
},
|
||||
title() {
|
||||
this.earlyDepar = false;
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
this.radio1 = '1';
|
||||
return '扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
this.radio1 = '2';
|
||||
return '取消扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
this.earlyDepar = true;
|
||||
if (this.selected.direction == '01') {
|
||||
this.radio2 = '2';
|
||||
} else {
|
||||
this.radio2 = '1';
|
||||
}
|
||||
return '提前发车';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.standName = selected.name;
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
changeRadio(val) {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: '',
|
||||
val: val
|
||||
};
|
||||
if (val == 1) {
|
||||
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
|
||||
} else if (val == 2) {
|
||||
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
|
||||
}
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
changeRadio(val) {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: '',
|
||||
val: val
|
||||
};
|
||||
if (val == 1) {
|
||||
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
|
||||
} else if (val == 2) {
|
||||
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
/** 设置扣车*/
|
||||
this.setDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
/** 取消扣车*/
|
||||
this.cancelDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
/** 提前发车*/
|
||||
this.earlyDeparture();
|
||||
}
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
/** 设置扣车*/
|
||||
this.setDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
/** 取消扣车*/
|
||||
this.cancelDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
/** 提前发车*/
|
||||
this.earlyDeparture();
|
||||
}
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 提前发车
|
||||
earlyDeparture() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 提前发车
|
||||
earlyDeparture() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.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: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
|
@ -91,7 +91,6 @@ export default {
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.selected = selected;
|
||||
console.log(this.map);
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
|
||||
|
@ -118,7 +118,6 @@ export default {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
console.log('operate', operate, selected);
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
|
@ -1,273 +1,289 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div class="head_content content">
|
||||
<span class="base-label" style="left: 0px;">会话管理</span>
|
||||
<el-col :span="8">
|
||||
<el-button class="status">查询会话状态</el-button>
|
||||
</el-col>
|
||||
<el-col :span="15" :offset="1">
|
||||
<el-input :value="messageText" placeholder="" size="mini" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button class="status_btn" :id="openMessageId" @click="handleMessage('open')"
|
||||
:disabled="isOpenMessage">打开会话</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button class="status_btn" :id="closeMessageId" @click="handleMessage('close')"
|
||||
:disabled="!isOpenMessage">关闭会话
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="content cotnent_body">
|
||||
<span class="base-label" style="left: 0px;">操作</span>
|
||||
<el-col :span="3">
|
||||
<div class="text">操作</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input :value="messageText1" placeholder="" size="mini" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button class="status_btn" :id="confirmId1" @click="confirm1" :disabled="disabledConfirm1">确认
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="content cotnent_body">
|
||||
<span class="base-label" style="left: 0px;">确认</span>
|
||||
<el-col :span="3">
|
||||
<div class="text">操作</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input :value="messageText2" placeholder="" size="mini" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button class="status_btn" :id="confirmId2" @click="confirm2" :disabled="disabledConfirm2">确认
|
||||
</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>
|
||||
</div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-detain-train"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="head_content content">
|
||||
<span class="base-label" style="left: 0px;">会话管理</span>
|
||||
<el-col :span="8">
|
||||
<el-button class="status">查询会话状态</el-button>
|
||||
</el-col>
|
||||
<el-col :span="15" :offset="1">
|
||||
<el-input :value="messageText" placeholder="" size="mini" disabled />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button
|
||||
:id="openMessageId"
|
||||
class="status_btn"
|
||||
:disabled="isOpenMessage"
|
||||
@click="handleMessage('open')"
|
||||
>打开会话</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button
|
||||
:id="closeMessageId"
|
||||
class="status_btn"
|
||||
:disabled="!isOpenMessage"
|
||||
@click="handleMessage('close')"
|
||||
>关闭会话
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="content cotnent_body">
|
||||
<span class="base-label" style="left: 0px;">操作</span>
|
||||
<el-col :span="3">
|
||||
<div class="text">操作</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input :value="messageText1" placeholder="" size="mini" disabled />
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button :id="confirmId1" class="status_btn" :disabled="disabledConfirm1" @click="confirm1">确认
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
<div class="content cotnent_body">
|
||||
<span class="base-label" style="left: 0px;">确认</span>
|
||||
<el-col :span="3">
|
||||
<div class="text">操作</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input :value="messageText2" placeholder="" size="mini" disabled />
|
||||
</el-col>
|
||||
<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>
|
||||
<confirm-tip ref='ConfirmTip' @close="closeMessage"></confirm-tip>
|
||||
</el-dialog>
|
||||
<el-button :id="domIdConfirm" class="close_btn" type="primary" @click="commit">关闭</el-button>
|
||||
<confirm-tip ref="ConfirmTip" @close="closeMessage" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmTip from './childDialog/confirmTip';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
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 {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
ConfirmTip
|
||||
messageText: '',
|
||||
messageText1: '',
|
||||
messageText2: '',
|
||||
isOpenMessage: false,
|
||||
timeCountConfirm: -1,
|
||||
disabledConfirm1: false,
|
||||
disabledConfirm2: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
selected: null,
|
||||
operation: null,
|
||||
radio: '1',
|
||||
radio1: '1',
|
||||
earlyDepar: false,
|
||||
|
||||
messageText: '',
|
||||
messageText1: '',
|
||||
messageText2: '',
|
||||
isOpenMessage: false,
|
||||
timeCountConfirm: -1,
|
||||
disabledConfirm1: false,
|
||||
disabledConfirm2: false,
|
||||
openMessageId() {
|
||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.openMessage.domId : '';
|
||||
},
|
||||
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;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
openMessageId() {
|
||||
return this.dialogShow ? OperationEvent.LimitControl.CancelAllLimit.openMessage.domId : '';
|
||||
},
|
||||
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 = '';
|
||||
}, 1000);
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
handleMessage(message) {
|
||||
if (message == 'open') {
|
||||
let operate = {
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.openMessage.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
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 = {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
handleMessage(message) {
|
||||
if (message == 'open') {
|
||||
const operate = {
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm1.operation,
|
||||
}
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.openMessage.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; // 倒计时
|
||||
this.messageText1 = '取消全线临时限速';
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
let operate = {
|
||||
send: true,
|
||||
} else {
|
||||
const operate = {
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.confirm2.operation,
|
||||
}
|
||||
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 = true;
|
||||
this.messageText2 = '**************';
|
||||
this.disabledConfirm2 = true;
|
||||
this.timeCountConfirm = -1;
|
||||
this.isOpenMessage = false;
|
||||
this.messageText1 = '';
|
||||
this.messageText2 = '';
|
||||
this.disabledConfirm1 = false;
|
||||
this.disabledConfirm2 = false;
|
||||
this.timeCountConfirm = -1; // 倒计时
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
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>
|
||||
<style scoped lang="scss">
|
||||
.stand-detain-train .context {
|
||||
@ -352,4 +368,4 @@
|
||||
box-shadow: 2px 2px #959595 inset;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -101,7 +101,6 @@ export default {
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.selected = selected;
|
||||
console.log(this.map, 111);
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
|
||||
|
@ -179,8 +179,6 @@ export function updateForList(model, state, liststr) {
|
||||
list.push(deepClone(model)); // 新增
|
||||
} else if (i >= 0) {
|
||||
list[i] = deepClone(model); // item map 数据 model 页面表单数据
|
||||
// state.mapDevice[model.code] = deepClone(model);
|
||||
// console.log(list[i], '更新');
|
||||
}
|
||||
} else {
|
||||
state.map[liststr] = [model];
|
||||
@ -188,8 +186,6 @@ export function updateForList(model, state, liststr) {
|
||||
}
|
||||
|
||||
export function updateMapData(state, model) {
|
||||
// const map = state.map;
|
||||
// const mapDevice = state.mapDevice;
|
||||
if (state.map && model) {
|
||||
switch (model._type) {
|
||||
case deviceType.Link: updateForList(model, state, 'linkList'); break;
|
||||
|
@ -212,7 +212,7 @@ function handleOperation(state, models) {
|
||||
list.push({ operation: 'add', data: deepAssign({}, item) });
|
||||
}
|
||||
});
|
||||
// console.log(list, '步骤数据');
|
||||
|
||||
if (list.length) {
|
||||
if (state.stepData.length >= 15) { // 步骤数据最多储存15步
|
||||
state.stepData.pop();
|
||||
|
@ -235,11 +235,18 @@ export default {
|
||||
});
|
||||
},
|
||||
buy() {
|
||||
this.buttonLoading = true;
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
||||
query: { permissionType: PermissionType.SIMULATION, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
this.$confirm('支付系统正在改进,如需购买请联系客服<br/>客服电话:13289398171', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
dangerouslyUseHTMLString: true,
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
center: true
|
||||
});
|
||||
// this.buttonLoading = true;
|
||||
// this.$router.push({
|
||||
// path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
||||
// query: { permissionType: PermissionType.SIMULATION, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
// });
|
||||
},
|
||||
transfer() {
|
||||
this.buttonLoading = false;
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<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="primary" @click="back">{{$t('display.plan.back')}}</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="primary" @click="back">{{ $t('display.plan.back') }}</el-button>
|
||||
</el-button-group>
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
</div>
|
||||
@ -13,92 +13,91 @@
|
||||
import SetTime from './demon/setTime';
|
||||
import { Notification } from 'element-ui';
|
||||
import { runDiagramIsStart, runDiagramGetTime, runDiagramOver, runDiagramStart } from '@/api/simulation';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
|
||||
export default {
|
||||
name: 'MenuPlan',
|
||||
components: {
|
||||
SetTime
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisable: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.simulationGroupCount': function () {
|
||||
this.initLoadPage();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initLoadPage() {
|
||||
try {
|
||||
const rest = await runDiagramIsStart(this.group);
|
||||
if (rest && rest.data) {
|
||||
this.isDisable = true;
|
||||
this.$store.dispatch('training/simulationStart');
|
||||
} else {
|
||||
this.isDisable = false;
|
||||
this.$store.dispatch('training/over');
|
||||
}
|
||||
await this.loadSystemTime();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
async loadSystemTime() {
|
||||
const rest = await runDiagramGetTime(this.group);
|
||||
if (rest && rest.code == 200) {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
||||
}
|
||||
},
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
start(model) {
|
||||
this.isDisable = true;
|
||||
runDiagramStart(model, this.group).then(res => {
|
||||
this.$store.dispatch('training/simulationStart').then(() => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`));
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = false;
|
||||
this.$messageBox(this.$t('display.plan.startPlanFail'));
|
||||
});
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
runDiagramOver(this.group).then(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
this.$store.dispatch('map/clearJlmapTrainView');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = true;
|
||||
this.$messageBox(this.$t('display.plan.endPlanFail'));
|
||||
});
|
||||
},
|
||||
async back() {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
history.go(-1);
|
||||
Notification.closeAll();
|
||||
// exitFullscreen();
|
||||
});
|
||||
}
|
||||
}
|
||||
name: 'MenuPlan',
|
||||
components: {
|
||||
SetTime
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisable: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.simulationGroupCount': function () {
|
||||
this.initLoadPage();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initLoadPage() {
|
||||
try {
|
||||
const rest = await runDiagramIsStart(this.group);
|
||||
if (rest && rest.data) {
|
||||
this.isDisable = true;
|
||||
this.$store.dispatch('training/simulationStart');
|
||||
} else {
|
||||
this.isDisable = false;
|
||||
this.$store.dispatch('training/over');
|
||||
}
|
||||
await this.loadSystemTime();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
async loadSystemTime() {
|
||||
const rest = await runDiagramGetTime(this.group);
|
||||
if (rest && rest.code == 200) {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
||||
}
|
||||
},
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
start(model) {
|
||||
this.isDisable = true;
|
||||
runDiagramStart(model, this.group).then(res => {
|
||||
this.$store.dispatch('training/simulationStart').then(() => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`));
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = false;
|
||||
this.$messageBox(this.$t('display.plan.startPlanFail'));
|
||||
});
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
runDiagramOver(this.group).then(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
this.$store.dispatch('map/clearJlmapTrainView');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = true;
|
||||
this.$messageBox(this.$t('display.plan.endPlanFail'));
|
||||
});
|
||||
},
|
||||
async back() {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
history.go(-1);
|
||||
Notification.closeAll();
|
||||
// exitFullscreen();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<div class="display-card" :style="{top: offset+'px'}">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@ -10,107 +10,106 @@
|
||||
<script>
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { getCountTime } from '@/utils/index';
|
||||
import { runDiagramIsStart, runDiagramGetTime, runDiagramStart } from '@/api/simulation';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
|
||||
export default {
|
||||
name: 'MenuScreen',
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tryTime: 0, // 进入页面多少秒
|
||||
timeNow: 0, // 进入页面 相对时间
|
||||
time: null, // 定时器
|
||||
countTime: 0, // 显示 倒计时
|
||||
remainingTime: 0,
|
||||
goodsId: this.$route.query.goodsId,
|
||||
try: this.$route.query.try, // 是否是试用权限
|
||||
training: {
|
||||
id: '',
|
||||
name: '',
|
||||
remarks: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.subscribeCount': function () {
|
||||
this.group && this.initLoadPage();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.time) {
|
||||
this.setTryTime();
|
||||
clearTimeout(this.time);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initLoadPage() {
|
||||
try {
|
||||
if (this.try != '0') {
|
||||
const data = {
|
||||
permissionType: PermissionType.SCREEN
|
||||
};
|
||||
name: 'MenuScreen',
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tryTime: 0, // 进入页面多少秒
|
||||
timeNow: 0, // 进入页面 相对时间
|
||||
time: null, // 定时器
|
||||
countTime: 0, // 显示 倒计时
|
||||
remainingTime: 0,
|
||||
goodsId: this.$route.query.goodsId,
|
||||
try: this.$route.query.try, // 是否是试用权限
|
||||
training: {
|
||||
id: '',
|
||||
name: '',
|
||||
remarks: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.subscribeCount': function () {
|
||||
this.group && this.initLoadPage();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.time) {
|
||||
this.setTryTime();
|
||||
clearTimeout(this.time);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initLoadPage() {
|
||||
try {
|
||||
if (this.try != '0') {
|
||||
const data = {
|
||||
permissionType: PermissionType.SCREEN
|
||||
};
|
||||
|
||||
const resr = await getGoodsTryUse(data);
|
||||
if (resr && resr.code == 200) {
|
||||
this.remainingTime = resr.data.tryTime;
|
||||
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
|
||||
if (this.try) {
|
||||
this.time = setInterval(() => {
|
||||
this.tryTime += 1;
|
||||
this.countTime = getCountTime(this.timeNow);
|
||||
if (this.countTime == -1) {
|
||||
this.back();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
this.$messageBox(this.$t('display.screen.getTimeFail'));
|
||||
}
|
||||
}
|
||||
const resr = await getGoodsTryUse(data);
|
||||
if (resr && resr.code == 200) {
|
||||
this.remainingTime = resr.data.tryTime;
|
||||
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
|
||||
if (this.try) {
|
||||
this.time = setInterval(() => {
|
||||
this.tryTime += 1;
|
||||
this.countTime = getCountTime(this.timeNow);
|
||||
if (this.countTime == -1) {
|
||||
this.back();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
this.$messageBox(this.$t('display.screen.getTimeFail'));
|
||||
}
|
||||
}
|
||||
|
||||
const initTime = this.$route.query.initTime;
|
||||
const retp = await runDiagramIsStart(this.group);
|
||||
if (retp && !retp.data) {
|
||||
await runDiagramStart({ initTime: initTime }, this.group);
|
||||
}
|
||||
const initTime = this.$route.query.initTime;
|
||||
const retp = await runDiagramIsStart(this.group);
|
||||
if (retp && !retp.data) {
|
||||
await runDiagramStart({ initTime: initTime }, this.group);
|
||||
}
|
||||
|
||||
await this.$store.dispatch('training/simulationStart');
|
||||
await this.loadSystemTime();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
async loadSystemTime() {
|
||||
const rest = await runDiagramGetTime(this.group);
|
||||
if (rest && rest.code == 200) {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
||||
}
|
||||
},
|
||||
setTryTime() {
|
||||
if (this.try) {
|
||||
this.$emit('tryTime', { time: this.tryTime, goodsId: this.goodsId });
|
||||
}
|
||||
},
|
||||
back() {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
Notification.closeAll();
|
||||
history.go(-1);
|
||||
// exitFullscreen();
|
||||
});
|
||||
}
|
||||
}
|
||||
await this.$store.dispatch('training/simulationStart');
|
||||
await this.loadSystemTime();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
async loadSystemTime() {
|
||||
const rest = await runDiagramGetTime(this.group);
|
||||
if (rest && rest.code == 200) {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
||||
}
|
||||
},
|
||||
setTryTime() {
|
||||
if (this.try) {
|
||||
this.$emit('tryTime', { time: this.tryTime, goodsId: this.goodsId });
|
||||
}
|
||||
},
|
||||
back() {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
Notification.closeAll();
|
||||
history.go(-1);
|
||||
// exitFullscreen();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -137,11 +137,18 @@ export default {
|
||||
});
|
||||
},
|
||||
buy() {
|
||||
this.loading = true;
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
||||
query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
this.$confirm('支付系统正在改进,如需购买请联系客服<br/>客服电话:13289398171', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
dangerouslyUseHTMLString: true,
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
center: true
|
||||
});
|
||||
// this.loading = true;
|
||||
// this.$router.push({
|
||||
// path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
||||
// query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||
// });
|
||||
},
|
||||
checkCourse() {
|
||||
this.loading = true;
|
||||
|
@ -30,14 +30,6 @@ export default {
|
||||
type: 'text',
|
||||
label: this.$t('global.name')
|
||||
},
|
||||
cityCode: {
|
||||
type: 'select',
|
||||
label: this.$t('publish.city'),
|
||||
selectChange: this.handleCitySelect,
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('publish.belongsToMap'),
|
||||
@ -186,21 +178,6 @@ export default {
|
||||
},
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
},
|
||||
handleCitySelect(form) {
|
||||
this.queryForm.queryObject.mapId.config.data = [];
|
||||
form.mapId = '';
|
||||
if (!form.cityCode) {
|
||||
this.mapList.forEach(elem => {
|
||||
this.queryForm.queryObject.mapId.config.data.push({value: elem.id, label: elem.name});
|
||||
});
|
||||
} else {
|
||||
this.mapList.forEach(elem => {
|
||||
if (elem.cityCode === form.cityCode) {
|
||||
this.queryForm.queryObject.mapId.config.data.push({value: elem.id, label: elem.name});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,214 +1,209 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-form-item label="文字编号" prop="code">
|
||||
<el-input :disabled="true" v-model="form.code" >
|
||||
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="文字内容" prop="context">
|
||||
<el-input type="textarea" v-model="form.context"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="文字颜色" prop="textFill">
|
||||
<el-input v-model="form.textFill"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="文字大小" prop="fontSize">
|
||||
<el-input-number v-model="form.fontSize" controls-position="right" :min="1" :max="100"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="文字粗细" prop="fontWeight">
|
||||
<el-input-number v-model="form.fontWeight" controls-position="right" :min="1" ></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="X轴坐标">
|
||||
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="Y轴坐标">
|
||||
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="文字背景">-->
|
||||
<!--<el-switch v-model="form.hasRect" @change="handleChange"></el-switch>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<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-form-item>-->
|
||||
<!--<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-form-item>-->
|
||||
<!--<el-form-item v-show="form.hasRect" label="背景宽度">-->
|
||||
<!--<el-input-number v-model="form.bgWidth" controls-position="right" :min="1"></el-input-number>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item v-show="form.hasRect" label="背景高度">-->
|
||||
<!--<el-input-number v-model="form.bgHeight" controls-position="right" :min="1"></el-input-number>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item v-show="form.hasRect" label="背景颜色" prop="elevatorColor">-->
|
||||
<!--<el-color-picker v-model="form.textBackgroundColor"></el-color-picker>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item>
|
||||
<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" @click="initPage">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-form-item label="文字编号" prop="code">
|
||||
<el-input v-model="form.code" :disabled="true">
|
||||
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="文字内容" prop="context">
|
||||
<el-input v-model="form.context" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文字颜色" prop="textFill">
|
||||
<el-input v-model="form.textFill" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文字大小" prop="fontSize">
|
||||
<el-input-number v-model="form.fontSize" controls-position="right" :min="1" :max="100" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文字粗细" prop="fontWeight">
|
||||
<el-input-number v-model="form.fontWeight" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="X轴坐标">
|
||||
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Y轴坐标">
|
||||
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="文字背景">-->
|
||||
<!--<el-switch v-model="form.hasRect" @change="handleChange"></el-switch>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<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-form-item>-->
|
||||
<!--<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-form-item>-->
|
||||
<!--<el-form-item v-show="form.hasRect" label="背景宽度">-->
|
||||
<!--<el-input-number v-model="form.bgWidth" controls-position="right" :min="1"></el-input-number>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item v-show="form.hasRect" label="背景高度">-->
|
||||
<!--<el-input-number v-model="form.bgHeight" controls-position="right" :min="1"></el-input-number>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item v-show="form.hasRect" label="背景颜色" prop="elevatorColor">-->
|
||||
<!--<el-color-picker v-model="form.textBackgroundColor"></el-color-picker>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">删除</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="initPage">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'TextDraft',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isUpdate: false,
|
||||
buttonText: '立即创建',
|
||||
showDeleteButton: false,
|
||||
form: {
|
||||
code: '',
|
||||
context: '',
|
||||
textFill: '',
|
||||
fontSize: '',
|
||||
fontWeight: '',
|
||||
x: 10,
|
||||
y: 10,
|
||||
// hasRect: false,
|
||||
// xBg: 10,
|
||||
// yBg: 10,
|
||||
// bgWidth: 0,
|
||||
// bgHeight: 0,
|
||||
// textBackgroundColor: ''
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: '请输入文字编号', trigger: 'blur' },
|
||||
],
|
||||
context: [
|
||||
{ required: true, message: '请输入文字内容', trigger: 'blur' },
|
||||
],
|
||||
textFill: [
|
||||
{ required: true, message: '请输入文字颜色', trigger: 'blur' },
|
||||
],
|
||||
fontSize: [
|
||||
{ required: true, message: '请输入文字大小', trigger: 'blur' },
|
||||
],
|
||||
fontWeight: [
|
||||
{ required: true, message: '请输入文字粗细', trigger: 'blur' },
|
||||
],
|
||||
export default {
|
||||
name: 'TextDraft',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isUpdate: false,
|
||||
buttonText: '立即创建',
|
||||
showDeleteButton: false,
|
||||
form: {
|
||||
code: '',
|
||||
context: '',
|
||||
textFill: '',
|
||||
fontSize: '',
|
||||
fontWeight: '',
|
||||
x: 10,
|
||||
y: 10
|
||||
// hasRect: false,
|
||||
// xBg: 10,
|
||||
// yBg: 10,
|
||||
// bgWidth: 0,
|
||||
// bgHeight: 0,
|
||||
// textBackgroundColor: ''
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: '请输入文字编号', trigger: 'blur' }
|
||||
],
|
||||
context: [
|
||||
{ required: true, message: '请输入文字内容', trigger: 'blur' }
|
||||
],
|
||||
textFill: [
|
||||
{ required: true, message: '请输入文字颜色', trigger: 'blur' }
|
||||
],
|
||||
fontSize: [
|
||||
{ required: true, message: '请输入文字大小', trigger: 'blur' }
|
||||
],
|
||||
fontWeight: [
|
||||
{ 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: {
|
||||
|
||||
},
|
||||
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);
|
||||
// }
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
this.form.code = 'text_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,227 +1,253 @@
|
||||
<template>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="map-control">
|
||||
<el-card type="border-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{$t('ibp.stationName')}}</span>
|
||||
<el-select v-model="stationCode" @change="changeStationCode" :placeholder="this.$t('rules.selectStation')">
|
||||
<el-option
|
||||
v-for="item in stationOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="text"
|
||||
style="float: right; padding: 3px 0; margin-right: 5px;"
|
||||
@click="handleSave"
|
||||
>{{$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>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="map-control">
|
||||
<el-card type="border-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ $t('ibp.stationName') }}</span>
|
||||
<el-select v-model="stationCode" :placeholder="this.$t('rules.selectStation')" @change="changeStationCode">
|
||||
<el-option
|
||||
v-for="item in stationOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="text"
|
||||
style="float: right; padding: 3px 0; margin-right: 5px;"
|
||||
@click="handleSave"
|
||||
>{{ $t('ibp.save') }}</el-button>
|
||||
</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>
|
||||
<script>
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import {deviceFactory} from '@/ibp/utils/parser';
|
||||
import deviceType from '@/ibp/constant/deviceType';
|
||||
import IbpText from './ibpText';
|
||||
import IbpTipBox from './ibpTipBox';
|
||||
import IbpButton from './ibpButton';
|
||||
import IbpBg from './ibpBg';
|
||||
import IbpAlarm from './ibpAlarm';
|
||||
import IbpAppendageBox from './ibpAppendageBox';
|
||||
import IbpArrow from './ibpArrow';
|
||||
import IbpLamp from './ibpLamp';
|
||||
import IbpLine from './ibpLine';
|
||||
import IbpTelephoneTerminal from './ibpTelephoneTerminal';
|
||||
import IbpElevator from './ibpElevator';
|
||||
import IbpKey from './ibpKey';
|
||||
import IbpClock from './ibpClock';
|
||||
import IbpRotateTip from './ibpRotateTip';
|
||||
import {deviceFactory} from '@/ibp/utils/parser';
|
||||
import IbpText from './ibpText';
|
||||
import IbpTipBox from './ibpTipBox';
|
||||
import IbpButton from './ibpButton';
|
||||
import IbpBg from './ibpBg';
|
||||
import IbpAlarm from './ibpAlarm';
|
||||
import IbpAppendageBox from './ibpAppendageBox';
|
||||
import IbpArrow from './ibpArrow';
|
||||
import IbpLamp from './ibpLamp';
|
||||
import IbpLine from './ibpLine';
|
||||
import IbpTelephoneTerminal from './ibpTelephoneTerminal';
|
||||
import IbpElevator from './ibpElevator';
|
||||
import IbpKey from './ibpKey';
|
||||
import IbpClock from './ibpClock';
|
||||
import IbpRotateTip from './ibpRotateTip';
|
||||
|
||||
export default {
|
||||
name: 'IbpOperate',
|
||||
components: {
|
||||
IbpText,
|
||||
IbpBg,
|
||||
IbpButton,
|
||||
IbpTipBox,
|
||||
IbpAlarm,
|
||||
IbpAppendageBox,
|
||||
IbpArrow,
|
||||
IbpLamp,
|
||||
IbpLine,
|
||||
IbpTelephoneTerminal,
|
||||
IbpElevator,
|
||||
IbpKey,
|
||||
IbpClock,
|
||||
IbpRotateTip
|
||||
},
|
||||
mixins: [
|
||||
export default {
|
||||
name: 'IbpOperate',
|
||||
components: {
|
||||
IbpText,
|
||||
IbpBg,
|
||||
IbpButton,
|
||||
IbpTipBox,
|
||||
IbpAlarm,
|
||||
IbpAppendageBox,
|
||||
IbpArrow,
|
||||
IbpLamp,
|
||||
IbpLine,
|
||||
IbpTelephoneTerminal,
|
||||
IbpElevator,
|
||||
IbpKey,
|
||||
IbpClock,
|
||||
IbpRotateTip
|
||||
},
|
||||
mixins: [
|
||||
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
enabledTab: 'Background',
|
||||
data: '',
|
||||
stationOptions:[
|
||||
{
|
||||
value: 'Station_203_0.07533',
|
||||
// label: '通化门站'
|
||||
label: '车站一'
|
||||
},
|
||||
{
|
||||
value: 'Station_207_0.62282',
|
||||
// label: '枣园站'
|
||||
label: '车站二'
|
||||
},
|
||||
{
|
||||
value: 'Station_209_0.95175',
|
||||
label: '车站三'
|
||||
// label: '后卫寨站'
|
||||
}
|
||||
],
|
||||
stationCode: '',
|
||||
height: this.$store.state.app.height - 190
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
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();
|
||||
}
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
enabledTab: 'Background',
|
||||
data: '',
|
||||
stationOptions:[
|
||||
{
|
||||
value: 'Station_203_0.07533',
|
||||
// label: '通化门站'
|
||||
label: '车站一'
|
||||
},
|
||||
{
|
||||
value: 'Station_207_0.62282',
|
||||
// label: '枣园站'
|
||||
label: '车站二'
|
||||
},
|
||||
{
|
||||
value: 'Station_209_0.95175',
|
||||
label: '车站三'
|
||||
// label: '后卫寨站'
|
||||
}
|
||||
],
|
||||
stationCode: '',
|
||||
height: this.$store.state.app.height - 190
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
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();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -79,7 +79,6 @@ export default {
|
||||
}
|
||||
},
|
||||
clickEvent(obj, node, data) {
|
||||
console.log(obj, node);
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
this.$emit('loadData', node);
|
||||
},
|
||||
|
@ -157,10 +157,17 @@ export default {
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
buy() {
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, query:
|
||||
{ permissionType: PermissionType.LESSON, lessonId: this.courseModel.id, prdId: this.$route.query.prdId, mapId: this.$route.query.mapId, subSystem: this.$route.params.subSystem }
|
||||
this.$confirm('支付系统正在改进,如需购买请联系客服<br/>客服电话:13289398171', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
dangerouslyUseHTMLString: true,
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
center: true
|
||||
});
|
||||
// this.$router.push({
|
||||
// path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, query:
|
||||
// { permissionType: PermissionType.LESSON, lessonId: this.courseModel.id, prdId: this.$route.query.prdId, mapId: this.$route.query.mapId, subSystem: this.$route.params.subSystem }
|
||||
// });
|
||||
},
|
||||
nodeExpand(obj, node, ele) {
|
||||
const key = obj.id;
|
||||
|
Loading…
Reference in New Issue
Block a user