merger
This commit is contained in:
commit
b990150b0f
@ -238,6 +238,7 @@ export default class Section extends Group {
|
||||
}
|
||||
|
||||
/** 目的码名称*/
|
||||
console.log(model.destinationCode, model.destinationNameShow);
|
||||
if (model.destinationCode && model.destinationNameShow && style.Section.destinationText.show) {
|
||||
const opposite = style.Section.destinationText.opposite ? -1 : 1;
|
||||
const tempx = x + traingle.getSin(style.Section.destinationText.distance);
|
||||
|
@ -361,10 +361,10 @@ export default {
|
||||
// Object.assign(this.operate, {val: operate.val}), [`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]
|
||||
// );
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
if (this.model.stationCode != this.model.confirmStationCode) {
|
||||
|
@ -1,72 +1,80 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm notice-info" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{message}}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm notice-info"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{ message }}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
}
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(messages) {
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令执行失败'];
|
||||
|
||||
if (messages && messages != 'null' && messages != 'undefined') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
if (messages && messages != 'null' && messages != 'undefined') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@ -74,4 +82,4 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -135,10 +135,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -183,10 +183,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消
|
||||
@ -201,7 +201,7 @@ export default {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -283,10 +283,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -147,10 +147,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -107,8 +107,14 @@ export default {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
const routeList = JSON.parse(JSON.stringify(tempData || []));
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.tempData = routeList;
|
||||
this.tempData.forEach(route => {
|
||||
if (route.turnBack) {
|
||||
route.name = `${route.name}(Z)`;
|
||||
}
|
||||
});
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
@ -188,10 +194,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -159,8 +159,8 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
||||
@ -178,8 +178,8 @@ export default {
|
||||
this.disabledConfirm2 = false;
|
||||
this.timeCountConfirm = 60; // 倒计时
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
@ -196,8 +196,8 @@ export default {
|
||||
this.disabledConfirm2 = true;
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
this.message = '选择信号机错误';
|
||||
@ -212,9 +212,9 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -112,10 +112,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -133,10 +133,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -168,7 +168,7 @@ export default {
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -206,8 +206,8 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
||||
@ -231,8 +231,8 @@ export default {
|
||||
this.disabledConfirm2 = false;
|
||||
this.timeCountConfirm = 60; // 倒计时
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
@ -258,8 +258,8 @@ export default {
|
||||
this.disabledConfirm2 = true;
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
this.message = '选择区段错误';
|
||||
@ -279,9 +279,9 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +120,6 @@ export default {
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
const stationList = [...this.stationList];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
|
||||
this.$nextTick(() => {
|
||||
@ -204,7 +203,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
this.doClose();
|
||||
|
@ -205,12 +205,12 @@ export default {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 批量取消扣车
|
||||
@ -242,12 +242,12 @@ export default {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -333,10 +333,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -243,10 +243,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
@ -257,10 +257,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -296,7 +296,6 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
} else {
|
||||
this.doClose();
|
||||
|
@ -206,10 +206,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -249,10 +249,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -98,7 +98,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -117,7 +117,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -233,10 +233,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -190,8 +190,8 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
||||
@ -215,8 +215,8 @@ export default {
|
||||
this.disabledConfirm2 = false;
|
||||
this.timeCountConfirm = 60; // 倒计时
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
@ -240,8 +240,8 @@ export default {
|
||||
this.disabledConfirm2 = true;
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
this.message = '选择道岔错误';
|
||||
@ -262,9 +262,9 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -144,7 +144,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
|
@ -1,157 +1,161 @@
|
||||
<template>
|
||||
|
||||
<!-- <el-dialog class="fuzhou_01 stand-stop-time" :title="title" :visible.sync="show" width="640px" :before-close="doClose" :zIndex="2000" -->
|
||||
<el-dialog class="ningbo-01__systerm train-set-plan" :title="title" :visible.sync="show" width="380px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
|
||||
<div style="overflow: hidden;">
|
||||
<div style="width: 98%; float: left; padding: 10px 15px; margin: 20px 0px; height: 120px;">
|
||||
<!-- <span class="base-label">目的</span> -->
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainGoal" style="width:280px">
|
||||
<el-input v-model="addModel.trainGoal"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
<!-- <el-dialog class="fuzhou_01 stand-stop-time" :title="title" :visible.sync="show" width="640px" :before-close="doClose" :zIndex="2000" -->
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="overflow: hidden;">
|
||||
<div style="width: 98%; float: left; padding: 10px 15px; margin: 20px 0px; height: 120px;">
|
||||
<!-- <span class="base-label">目的</span> -->
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainGoal" style="width:280px">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
// trainNo: '',
|
||||
trainSource: '',
|
||||
// stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: '',
|
||||
},
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
// trainNo: '',
|
||||
trainSource: '',
|
||||
// stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
// trainNo: [
|
||||
// { required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
// ],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// stationStandSource: [
|
||||
// { required: true, message: '请选择车站', trigger: 'change' }
|
||||
// ],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
rules: {
|
||||
// trainNo: [
|
||||
// { required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
// ],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// stationStandSource: [
|
||||
// { required: true, message: '请选择车站', trigger: 'change' }
|
||||
// ],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除计划车'
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
title() {
|
||||
return '删除计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
// operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
operation: OperationEvent.Train.deletePlanTrainId.menu.operation,
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
// operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
operation: OperationEvent.Train.deletePlanTrainId.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.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou_01 .el-dialog .base-label {
|
||||
@ -162,4 +166,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -146,7 +146,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -125,7 +125,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -146,7 +146,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -1,177 +1,181 @@
|
||||
<template>
|
||||
|
||||
<!-- <el-dialog class="fuzhou_01 stand-stop-time" :title="title" :visible.sync="show" width="640px" :before-close="doClose" :zIndex="2000" -->
|
||||
<el-dialog class="ningbo-01__systerm train-set-plan" :title="title" :visible.sync="show" width="640px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
|
||||
<!-- <div style="width: 46%;">
|
||||
<!-- <el-dialog class="fuzhou_01 stand-stop-time" :title="title" :visible.sync="show" width="640px" :before-close="doClose" :zIndex="2000" -->
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<!-- <div style="width: 46%;">
|
||||
<el-form-item label="车 组 号:" label-width="95px" prop="trainNo">
|
||||
<el-input v-model="addModel.trainNo" disabled></el-input>
|
||||
</el-form-item>
|
||||
</div> -->
|
||||
<div style="overflow: hidden;">
|
||||
<div style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;">
|
||||
<span class="base-label">源</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<!-- <el-form-item prop="stationStandSource">
|
||||
<div style="overflow: hidden;">
|
||||
<div style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;">
|
||||
<span class="base-label">源</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<!-- <el-form-item prop="stationStandSource">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="车 次 号:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
<el-form-item label="车 次 号:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
// trainNo: '',
|
||||
trainSource: '',
|
||||
// stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: '',
|
||||
},
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
// trainNo: '',
|
||||
trainSource: '',
|
||||
// stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
// trainNo: [
|
||||
// { required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
// ],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// stationStandSource: [
|
||||
// { required: true, message: '请选择车站', trigger: 'change' }
|
||||
// ],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
rules: {
|
||||
// trainNo: [
|
||||
// { required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
// ],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// stationStandSource: [
|
||||
// { required: true, message: '请选择车站', trigger: 'change' }
|
||||
// ],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移计划车'
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
title() {
|
||||
return '平移计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
// operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
operation: OperationEvent.Train.moveEventlyTrainId.menu.operation,
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
// operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
operation: OperationEvent.Train.moveEventlyTrainId.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.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou_01 .el-dialog .base-label {
|
||||
@ -182,4 +186,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -146,7 +146,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -139,7 +139,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -130,7 +130,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -141,7 +141,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -45,7 +45,6 @@
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
@ -148,10 +147,10 @@ export default {
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消
|
||||
@ -166,7 +165,7 @@ export default {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -124,8 +124,8 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}, 1000).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}, 1000).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -27,162 +27,159 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StationStand',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
control: '01',
|
||||
controlProps: {
|
||||
'01': '全线扣车',
|
||||
'02': '取消全线扣车'
|
||||
}
|
||||
name: 'StationStand',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
control: '01',
|
||||
controlProps: {
|
||||
'01': '全线扣车',
|
||||
'02': '取消全线扣车'
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return '全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return '取消全线扣车';
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return '全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return '取消全线扣车';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.control = '01';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.control = '02';
|
||||
}
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.control = '01';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.control = '02';
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.setDetainTrainAll();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.cancelDetainTrainAll();
|
||||
}
|
||||
},
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.setDetainTrainAll();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.cancelDetainTrainAll();
|
||||
}
|
||||
},
|
||||
|
||||
// 设置全线扣车
|
||||
setDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认设置全线扣车!']
|
||||
};
|
||||
// 设置全线扣车
|
||||
setDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认设置全线扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
||||
});
|
||||
},
|
||||
// 取消全线扣车
|
||||
cancelDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线扣车!']
|
||||
};
|
||||
|
||||
// 取消全线扣车
|
||||
cancelDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ .el-radio {
|
||||
|
@ -1,183 +1,189 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm station-control" :title="title" :visible.sync="show" width="400px"
|
||||
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
v-dialogDrag>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-row style="padding-bottom: 10px;padding-top:10px" v-for="item in Object.keys(controlProps)" :key="item">
|
||||
<el-radio :label="item">{{controlProps[item]}}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel" style="margin-left: 200px">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm station-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:show-close="true"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
|
||||
<el-radio :label="item">{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo'
|
||||
|
||||
export default {
|
||||
name: 'StationStand',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
control: '01',
|
||||
controlProps: {
|
||||
'01': '取消上行扣车',
|
||||
'02': '取消下行扣车',
|
||||
},
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StationStand',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
control: '01',
|
||||
controlProps: {
|
||||
'01': '取消上行扣车',
|
||||
'02': '取消下行扣车'
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return '取消上行扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return '取消下行扣车';
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return '取消上行扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return '取消下行扣车';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.control = '01'
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.control = '02'
|
||||
}
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.control = '01';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.control = '02';
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.cancelUpDetainTrainAll();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.cancelDownDetainTrainAll();
|
||||
}
|
||||
},
|
||||
|
||||
// 取消全线上行扣车
|
||||
cancelUpDetainTrainAll() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelUpDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线上行扣车!'],
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
// 取消全线下行扣车
|
||||
cancelDetainTrainAll() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDownDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线下行扣车!'],
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.cancelUpDetainTrainAll();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.cancelDownDetainTrainAll();
|
||||
}
|
||||
},
|
||||
|
||||
// 取消全线上行扣车
|
||||
cancelUpDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelUpDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线上行扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
||||
// 取消全线下行扣车
|
||||
cancelDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDownDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线下行扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ .el-radio {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,154 +1,163 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">添加位置</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终   端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="前车车次号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">添加位置</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终   端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="前车车次号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: '',
|
||||
},
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// trainNumberLimber: [
|
||||
// { required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
// ],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// trainNumberLimber: [
|
||||
// { required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
// ],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '添加计划车'
|
||||
}
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '添加计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.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();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
@ -159,4 +168,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,141 +1,146 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
},
|
||||
export default {
|
||||
name: 'TrainAdd',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除计划车'
|
||||
}
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.delPlanTrain.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.delPlanTrain.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();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
@ -146,4 +151,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,152 +1,161 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
||||
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber"></el-input>
|
||||
</el-form-item>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<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>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainTranstalet',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: '',
|
||||
},
|
||||
export default {
|
||||
name: 'TrainTranstalet',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
trainNumberLimber: [
|
||||
{ required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
trainNumberLimber: [
|
||||
{ required: true, message: '请输入前车车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移计划车'
|
||||
}
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
|
||||
//非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
// 非断电激活时设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.translatPlanTrain.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();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
@ -152,8 +152,8 @@ export default {
|
||||
alxeFailure() {
|
||||
this.mouseCancelState(this.selected);
|
||||
commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
}).catch((error)=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
}).catch(()=>{
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
|
@ -251,10 +251,10 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
@ -273,10 +273,10 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
|
@ -173,10 +173,10 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
@ -195,10 +195,10 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 全站设置联锁自动触发
|
||||
@ -216,7 +216,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 全站取消联锁自动触发
|
||||
@ -234,7 +234,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 上电解锁
|
||||
|
@ -214,10 +214,10 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
@ -235,10 +235,10 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
|
@ -200,10 +200,10 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
@ -222,10 +222,10 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 定操定位
|
||||
|
@ -278,8 +278,6 @@ export default {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Train.type,
|
||||
label: MapDeviceType.Train.label,
|
||||
operation: OperationEvent.Train.stoppage.menu.operation
|
||||
};
|
||||
|
||||
@ -288,10 +286,10 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
@ -300,8 +298,6 @@ export default {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Train.type,
|
||||
label: MapDeviceType.Train.label,
|
||||
operation: OperationEvent.Train.cancelStoppage.menu.operation
|
||||
};
|
||||
|
||||
@ -310,10 +306,10 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 限速行驶
|
||||
@ -322,18 +318,16 @@ export default {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Train.type,
|
||||
label: MapDeviceType.Train.label,
|
||||
operation: OperationEvent.Train.limitSpeed.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
|
@ -1,278 +1,296 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm passive-control" title="控制模式请求" :visible.sync="show" width="700px"
|
||||
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
v-dialogDrag>
|
||||
<span class="control-label">{{`${requestInfo}请求如下区域的控制模式`}}</span>
|
||||
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%" height="250" center
|
||||
size="mini" highlight-current-row>
|
||||
<el-table-column prop="operate" label="操作区域">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.operate}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="control" label="当前控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.control.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="target" label="请求控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.target.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agree" label="是否同意" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled"></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="control-label">距离对话还有{{count}}秒,请应答。</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">同意
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">拒绝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm passive-control"
|
||||
title="控制模式请求"
|
||||
:visible.sync="show"
|
||||
width="700px"
|
||||
:before-close="doClose"
|
||||
:show-close="true"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<span class="control-label">{{ `${requestInfo}请求如下区域的控制模式` }}</span>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
border
|
||||
row-key="code"
|
||||
style="width: 100%"
|
||||
height="250"
|
||||
center
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column prop="operate" label="操作区域">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="control" label="当前控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="target" label="请求控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.target.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agree" label="是否同意" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="control-label">距离对话还有{{ count }}秒,请应答。</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">同意
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">拒绝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } 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: 'RequestControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
export default {
|
||||
name: 'RequestControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
disabledAgree: false,
|
||||
disabledRefuse: false,
|
||||
requestInfo: '调度员1工作站',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
timeout: 61,
|
||||
count: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
targetStatus() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
return '01';
|
||||
}
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
return '02';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
disabledAgree: false,
|
||||
disabledRefuse: false,
|
||||
requestInfo: '调度员1工作站',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
timeout: 61,
|
||||
count: 0,
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.choose.domId : '';
|
||||
},
|
||||
domAgree() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.agree.domId : '';
|
||||
},
|
||||
domIdRefuse() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.refuse.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && !elem.hasOwnProperty('success') && !elem.hasOwnProperty('timeout')) {
|
||||
if (elem.stationControlCode) {
|
||||
this.doShow(elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
createTimer() {
|
||||
this.count = this.timeout;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count <= 0) {
|
||||
this.doClose();
|
||||
return;
|
||||
}
|
||||
this.count = this.count - 1;
|
||||
}, 1000);
|
||||
},
|
||||
clearTimer() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
targetStatus() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
return '01';
|
||||
}
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
return '02'
|
||||
}
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.choose.domId : '';
|
||||
},
|
||||
domAgree() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.agree.domId : '';
|
||||
},
|
||||
domIdRefuse() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.refuse.domId : '';
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.agree && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.disabledSend = !selection.length;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
this.disabledAgree = this.selection.length <= 0;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && !elem.hasOwnProperty('success') && !elem.hasOwnProperty('timeout')) {
|
||||
if (elem.stationControlCode) {
|
||||
this.doShow(elem);
|
||||
}
|
||||
updateTableData(code) {
|
||||
this.tableData = [];
|
||||
|
||||
const model = {
|
||||
code: code,
|
||||
operate: '',
|
||||
control: { code: '', name: '' },
|
||||
target: { code: '', name: '' },
|
||||
agree: false,
|
||||
disabled: false
|
||||
};
|
||||
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (device) {
|
||||
const control = (device || {}).state;
|
||||
if (control) {
|
||||
model.control = { status: control.status, name: this.controlProps[control.status] };
|
||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||
}
|
||||
},
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||
if (station) {
|
||||
model.operate = station.name || '';
|
||||
}
|
||||
}
|
||||
|
||||
this.tableData.push(model);
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
doShow(msgHead) {
|
||||
this.dialogShow = true;
|
||||
this.disabledAgree = true;
|
||||
this.createTimer();
|
||||
this.updateTableData(msgHead.stationControlCode);
|
||||
|
||||
const operate = {
|
||||
start: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
createTimer() {
|
||||
this.count = this.timeout;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count <= 0) {
|
||||
this.doClose();
|
||||
return;
|
||||
}
|
||||
this.count = this.count - 1;
|
||||
}, 1000)
|
||||
},
|
||||
clearTimer() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
let selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.agree && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
})
|
||||
}
|
||||
doClose() {
|
||||
this.disabledAgree = false;
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
|
||||
this.disabledSend = selection.length ? false : true;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
this.disabledAgree = this.selection.length <= 0;
|
||||
}
|
||||
},
|
||||
updateTableData(code) {
|
||||
this.tableData = [];
|
||||
|
||||
let model = {
|
||||
code: code,
|
||||
operate: '',
|
||||
control: { code: '', name: '' },
|
||||
target: { code: '', name: '' },
|
||||
agree: false,
|
||||
disabled: false,
|
||||
}
|
||||
|
||||
let device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (device) {
|
||||
let control = (device||{}).state;
|
||||
if (control) {
|
||||
model.control = { status: control.status, name: this.controlProps[control.status] };
|
||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||
}
|
||||
|
||||
let station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||
if (station) {
|
||||
model.operate = station.name || '';
|
||||
}
|
||||
}
|
||||
|
||||
this.tableData.push(model);
|
||||
},
|
||||
doShow(msgHead) {
|
||||
this.dialogShow = true;
|
||||
this.disabledAgree = true;
|
||||
this.createTimer();
|
||||
this.updateTableData(msgHead.stationControlCode);
|
||||
|
||||
let operate = {
|
||||
start: true,
|
||||
this.count = 0;
|
||||
this.dialogShow = false;
|
||||
this.clearTimer();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.multipleTable.setCurrentRow();
|
||||
},
|
||||
serializeCodeListWithSeparator(sep) {
|
||||
const codeList = [];
|
||||
if (this.selection && this.selection.length) {
|
||||
this.selection.forEach(elem => {
|
||||
codeList.push(elem.code);
|
||||
});
|
||||
}
|
||||
return codeList.join(sep);
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.menu.operation,
|
||||
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
||||
val: this.serializeCodeListWithSeparator('::')
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
doClose() {
|
||||
this.disabledAgree = false;
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
|
||||
this.count = 0;
|
||||
this.dialogShow = false;
|
||||
this.clearTimer();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.multipleTable.setCurrentRow();
|
||||
},
|
||||
serializeCodeListWithSeparator(sep) {
|
||||
let codeList = [];
|
||||
if (this.selection && this.selection.length) {
|
||||
this.selection.forEach(elem => {
|
||||
codeList.push(elem.code);
|
||||
})
|
||||
}
|
||||
return codeList.join(sep);
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
let operate = {
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
} else if (!selection) {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
},
|
||||
agree() {
|
||||
let operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
val: this.selection[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
}
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
refuse() {
|
||||
let operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||
val: this.tableData[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
}
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else if (!selection) {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
},
|
||||
agree() {
|
||||
const operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
val: this.selection[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
};
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
refuse() {
|
||||
const operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||
val: this.tableData[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
};
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@ -282,4 +300,4 @@
|
||||
line-height: 30px;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -450,6 +450,7 @@ export default {
|
||||
this.oldRightSectionCode = selected.rightSectionCode;
|
||||
this.editModel.leftAxlePosition = selected.leftAxlePosition || 0; // 重置计轴显示
|
||||
this.editModel.rightAxlePosition = selected.rightAxlePosition || 0; // 重置计轴显示
|
||||
this.editModel.belongStation = selected.belongStation || '';
|
||||
if (this.field.toUpperCase() === 'splitSection'.toUpperCase()) {
|
||||
this.$refs.splitOrMerge.addModel.splitOffsetMax = Math.sqrt(new JTriangle(selected.points[0], selected.points[selected.points.length - 1]).abspowz);
|
||||
this.$refs.splitOrMerge.addModel.splitOffset = this.$refs.splitOrMerge.addModel.splitOffsetMax / 2;
|
||||
@ -670,7 +671,7 @@ export default {
|
||||
}
|
||||
},
|
||||
clear() {
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
// 新加属性需要单独在这里清除(避免老数据无新属性,深拷贝是未获取属性,沿用上一个设备的属性导致的数据污染)
|
||||
this.editModel.logicSectionCodeList = [];
|
||||
this.editModel.rightSectionCode = '';
|
||||
|
Loading…
Reference in New Issue
Block a user