修改福州线国际化导致的操作问题以及eslint的问题
This commit is contained in:
parent
39d3ee757a
commit
a789f301c3
@ -1,9 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm notice-info" :title="title" :visible.sync="show" width="360px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-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">
|
<div class="context">
|
||||||
<template v-for="message in messages">
|
<template v-for="(message,index) in messages">
|
||||||
<span>{{message}}</span><br>
|
<div :key="index">{{ message }}</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -11,12 +21,11 @@
|
|||||||
<el-button :id="domIdSure" type="primary" @click="commit">{{ $t('global.confirm') }}</el-button>
|
<el-button :id="domIdSure" type="primary" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</span>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NoticeInfo',
|
name: 'NoticeInfo',
|
||||||
@ -25,7 +34,7 @@
|
|||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
messages: [this.$t('tip.commandFailed')],
|
messages: [this.$t('tip.commandFailed')],
|
||||||
operate: null
|
operate: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -41,7 +50,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, messages) {
|
doShow(operate, messages) {
|
||||||
@ -66,7 +75,7 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,9 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm confirm-control"
|
||||||
|
: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">
|
<div class="context">
|
||||||
<template v-for="message in messages">
|
<template v-for="(message,index) in messages">
|
||||||
<span>{{message}}</span>
|
<span :key="index">{{ message }}</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -14,16 +24,19 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmControl',
|
name: 'ConfirmControl',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -31,10 +44,7 @@
|
|||||||
operate: {},
|
operate: {},
|
||||||
messages: '',
|
messages: '',
|
||||||
operation: null
|
operation: null
|
||||||
}
|
};
|
||||||
},
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -60,6 +70,7 @@
|
|||||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||||
return this.$t('menu.setSwitchbackStrategy');
|
return this.$t('menu.setSwitchbackStrategy');
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
@ -68,7 +79,7 @@
|
|||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||||
/** 进路设置*/
|
/** 进路设置*/
|
||||||
return OperationEvent.Signal.arrangementRoute.confirm.domId
|
return OperationEvent.Signal.arrangementRoute.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
/** 信号关灯*/
|
/** 信号关灯*/
|
||||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||||
@ -95,12 +106,13 @@
|
|||||||
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
return '';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -153,11 +165,11 @@
|
|||||||
},
|
},
|
||||||
// 进路设置
|
// 进路设置
|
||||||
routeSetting() {
|
routeSetting() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
|
operation: OperationEvent.Signal.arrangementRoute.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -165,19 +177,19 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 信号关灯
|
// 信号关灯
|
||||||
signalClose() {
|
signalClose() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Signal.signalClose.confirm.operation
|
operation: OperationEvent.Signal.signalClose.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -185,19 +197,19 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 信号重开
|
// 信号重开
|
||||||
reopenSignal() {
|
reopenSignal() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation
|
operation: OperationEvent.Signal.reopenSignal.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -205,19 +217,19 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 取消进路
|
// 取消进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
|
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -225,19 +237,19 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 进路交人工控
|
// 进路交人工控
|
||||||
humanControl() {
|
humanControl() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
operation: OperationEvent.Signal.humanControl.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -245,7 +257,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -253,11 +265,11 @@
|
|||||||
},
|
},
|
||||||
// 进路交ATS自动控
|
// 进路交ATS自动控
|
||||||
atsAutoControl() {
|
atsAutoControl() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -265,7 +277,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -273,12 +285,12 @@
|
|||||||
},
|
},
|
||||||
// 设置运行等级
|
// 设置运行等级
|
||||||
setRunLevel() {
|
setRunLevel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
||||||
val: this.operate.val
|
val: this.operate.val
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -286,20 +298,20 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 停站时间
|
// 停站时间
|
||||||
setStopTime() {
|
setStopTime() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
||||||
val: this.operate.val,
|
val: this.operate.val
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -307,20 +319,20 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 设置折返策略
|
// 设置折返策略
|
||||||
setBackStrategy() {
|
setBackStrategy() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
||||||
val: this.operate.val,
|
val: this.operate.val
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -328,28 +340,28 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm confirm-control-speed"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="540px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<div style="height: 60px; padding-left: 20px">
|
<div style="height: 60px; padding-left: 20px">
|
||||||
<span style="font-size: 18px">{{ message }}</span>
|
<span style="font-size: 18px">{{ message }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -16,7 +26,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmControlSpeed',
|
name: 'ConfirmControlSpeed',
|
||||||
@ -26,8 +36,8 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
type: '',
|
type: '',
|
||||||
operation: '',
|
operation: '',
|
||||||
message: '',
|
message: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -45,6 +55,7 @@
|
|||||||
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
|
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
@ -65,12 +76,13 @@
|
|||||||
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -92,9 +104,9 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.type
|
type: this.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
@ -118,17 +130,17 @@
|
|||||||
this.$emit('setOperate', { step: 1, success: true });
|
this.$emit('setOperate', { step: 1, success: true });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$emit('setOperate', { step: 0, success: false });
|
this.$emit('setOperate', { step: 0, success: false });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.type,
|
type: this.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
@ -137,12 +149,12 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm route-unlock-confirm" :title="title" :visible.sync="show" width="500px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm route-unlock-confirm"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="500px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<div style="height: 60px; padding-left: 20px">
|
<div style="height: 60px; padding-left: 20px">
|
||||||
<span>{{ $t('menu.in') }}{{ stationName }}【{{ signalName }}】{{ $t('menu.signalConfirmed') }}</span>
|
<span>{{ $t('menu.in') }}{{ stationName }}【{{ signalName }}】{{ $t('menu.signalConfirmed') }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -26,14 +36,14 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
signalName: '',
|
signalName: '',
|
||||||
stationName: ''
|
stationName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.signalDeblocking')
|
return this.$t('menu.signalDeblocking');
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
@ -45,15 +55,15 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.stationName = ''
|
this.stationName = '';
|
||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
if (selected) {
|
if (selected) {
|
||||||
this.signalName = selected.name;
|
this.signalName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -71,10 +81,10 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
operation: OperationEvent.Signal.unlock.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -84,17 +94,17 @@
|
|||||||
this.$emit('setOperate', { step: 1, success: true });
|
this.$emit('setOperate', { step: 1, success: true });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$emit('setOperate', { step: 0, success: false });
|
this.$emit('setOperate', { step: 0, success: false });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
@ -102,12 +112,12 @@
|
|||||||
this.$emit('setOperate', { step: 0, success: false });
|
this.$emit('setOperate', { step: 0, success: false });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,9 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm confirm-control"
|
||||||
|
: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">
|
<div class="context">
|
||||||
<template v-for="message in messages">
|
<template v-for="(message,index) in messages">
|
||||||
<span>{{message}}</span>
|
<span :key="index">{{ message }}</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -14,16 +24,19 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmTrain',
|
name: 'ConfirmTrain',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -31,10 +44,7 @@
|
|||||||
operate: {},
|
operate: {},
|
||||||
messages: '',
|
messages: '',
|
||||||
operation: null
|
operation: null
|
||||||
}
|
};
|
||||||
},
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -54,6 +64,7 @@
|
|||||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||||
return this.$t('menu.menuTrain.editTrainNo');
|
return this.$t('menu.menuTrain.editTrainNo');
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
@ -62,30 +73,31 @@
|
|||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||||
/** 添加列车识别号*/
|
/** 添加列车识别号*/
|
||||||
return OperationEvent.Train.addTrainId.confirm.domId
|
return OperationEvent.Train.addTrainId.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||||
/** 修改列车识别号*/
|
/** 修改列车识别号*/
|
||||||
return OperationEvent.Train.editTrainId.confirm.domId
|
return OperationEvent.Train.editTrainId.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||||
/** 删除列车识别号*/
|
/** 删除列车识别号*/
|
||||||
return OperationEvent.Train.delTrainId.confirm.domId
|
return OperationEvent.Train.delTrainId.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||||
/** 移动列车识别号*/
|
/** 移动列车识别号*/
|
||||||
return OperationEvent.Train.moveTrainId.confirm.domId
|
return OperationEvent.Train.moveTrainId.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||||
/** 交换列车识别号*/
|
/** 交换列车识别号*/
|
||||||
return OperationEvent.Train.switchTrainId.confirm.domId
|
return OperationEvent.Train.switchTrainId.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||||
/** 修改车组号*/
|
/** 修改车组号*/
|
||||||
return OperationEvent.Train.editTrainNo.confirm.domId
|
return OperationEvent.Train.editTrainNo.confirm.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
return '';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -124,11 +136,11 @@
|
|||||||
},
|
},
|
||||||
// 进路设置
|
// 进路设置
|
||||||
routeSetting() {
|
routeSetting() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Train.addTrainId.confirm.operation,
|
operation: OperationEvent.Train.addTrainId.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -136,28 +148,28 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog class="fuzhou-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="840px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm route-cmd-control"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="840px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||||
<el-form label-position="center" size="mini">
|
<el-form label-position="center" size="mini">
|
||||||
@ -9,41 +18,49 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
||||||
<el-select v-model="operation" size="small" disabled>
|
<el-select v-model="operation" size="small" disabled>
|
||||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
<el-option
|
||||||
:value="option.code">
|
v-for="option in typeList"
|
||||||
</el-option>
|
:key="option.code"
|
||||||
|
:label="option.name"
|
||||||
|
:value="option.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="this.$t('menu.signalName')" label-width="100px">
|
<el-form-item :label="this.$t('menu.signalName')" label-width="100px">
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
|
<el-table
|
||||||
highlight-current-row height="200">
|
ref="tempData"
|
||||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')">
|
class="table"
|
||||||
</el-table-column>
|
:data="tempData"
|
||||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')">
|
border
|
||||||
</el-table-column>
|
style="width: 100%"
|
||||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')">
|
size="mini"
|
||||||
</el-table-column>
|
highlight-current-row
|
||||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')">
|
height="200"
|
||||||
</el-table-column>
|
>
|
||||||
|
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||||
|
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||||
|
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||||
|
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<span class="notice">{{ message }}</span>
|
<span class="notice">{{ message }}</span>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
<el-col :span="2" :offset="3">
|
<el-col :span="2" :offset="3">
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
||||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
v-show="timeCountCommand>0"
|
||||||
|
>({{ timeCountCommand }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="1">
|
<el-col :span="2" :offset="1">
|
||||||
<el-button :id="domIdConfirm1" style="width:120px;" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
<el-button :id="domIdConfirm1" style="width:120px;" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
||||||
@ -51,7 +68,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
||||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
v-show="timeCountConfirm>0"
|
||||||
|
>({{ timeCountConfirm }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||||
@ -61,7 +79,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate"></confirm-signal-unlock>
|
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -91,14 +109,14 @@
|
|||||||
timeCountConfirm: -1,
|
timeCountConfirm: -1,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: ''
|
signalName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
typeList() {
|
typeList() {
|
||||||
return [
|
return [
|
||||||
{ code: OperationEvent.Signal.unlock.menu.operation, name: this.$t('menu.menuSignal.signalDeblock') },
|
{ code: OperationEvent.Signal.unlock.menu.operation, name: this.$t('menu.menuSignal.signalDeblock') },
|
||||||
{ code: OperationEvent.Signal.guide.menu.operation, name: this.$t('menu.menuSignal.guideRouteHandle') }
|
{ code: OperationEvent.Signal.guide.menu.operation, name: this.$t('menu.menuSignal.guideRouteHandle') }
|
||||||
]
|
];
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -113,6 +131,7 @@
|
|||||||
return OperationEvent.Signal.guide.order.domId;
|
return OperationEvent.Signal.guide.order.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm1() {
|
domIdConfirm1() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -124,6 +143,7 @@
|
|||||||
return OperationEvent.Signal.guide.confirm1.domId;
|
return OperationEvent.Signal.guide.confirm1.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm2() {
|
domIdConfirm2() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -135,6 +155,7 @@
|
|||||||
return OperationEvent.Signal.guide.confirm2.domId;
|
return OperationEvent.Signal.guide.confirm2.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdStop() {
|
domIdStop() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -146,11 +167,13 @@
|
|||||||
return OperationEvent.Signal.guide.stop.domId;
|
return OperationEvent.Signal.guide.stop.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdClose() {
|
domIdClose() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
return OperationEvent.Command.close.menu.domId;
|
return OperationEvent.Command.close.menu.domId;
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -160,6 +183,7 @@
|
|||||||
return '办理引导进路';
|
return '办理引导进路';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -168,7 +192,7 @@
|
|||||||
this.stpDisabled = true;
|
this.stpDisabled = true;
|
||||||
val.forEach((elem, index) => {
|
val.forEach((elem, index) => {
|
||||||
// 在确定1之前的操作才可以终止
|
// 在确定1之前的操作才可以终止
|
||||||
if (elem == false && 1 <= index && index <= 2) {
|
if (elem == false && index >= 1 && index <= 2) {
|
||||||
this.stpDisabled = false;
|
this.stpDisabled = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -179,7 +203,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
if (!this.$store.state.menuOperation.break) {
|
if (!this.$store.state.menuOperation.break) {
|
||||||
if (this.timeCountCommand > 0) {
|
if (this.timeCountCommand > 0) {
|
||||||
@ -195,7 +219,7 @@
|
|||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
@ -207,8 +231,8 @@
|
|||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name
|
this.signalName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -244,13 +268,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
commandHasPopUp() {
|
commandHasPopUp() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
operate.operation = OperationEvent.Signal.unlock.order.operation
|
operate.operation = OperationEvent.Signal.unlock.order.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||||
@ -262,16 +286,16 @@
|
|||||||
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
|
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commandNoPopUp() {
|
commandNoPopUp() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type
|
type: MapDeviceType.Signal.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||||
/** 办理引导进路*/
|
/** 办理引导进路*/
|
||||||
operate.operation = OperationEvent.Signal.guide.order.operation
|
operate.operation = OperationEvent.Signal.guide.order.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||||
@ -286,12 +310,12 @@
|
|||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm1() {
|
confirm1() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
@ -315,13 +339,13 @@
|
|||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm2() {
|
confirm2() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type
|
type: MapDeviceType.Signal.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
@ -347,12 +371,12 @@
|
|||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
this.setButtonEnable({ step: -1 });
|
this.setButtonEnable({ step: -1 });
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
@ -362,7 +386,6 @@
|
|||||||
operate.operation = OperationEvent.Signal.guide.stop.operation;
|
operate.operation = OperationEvent.Signal.guide.stop.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -372,21 +395,21 @@
|
|||||||
} else {
|
} else {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -423,8 +446,8 @@
|
|||||||
elem[prop] = param[prop];
|
elem[prop] = param[prop];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,16 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm signal-control" :title="title" :visible.sync="show" width="300px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm signal-control"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="300px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.signal') }}</span></el-col>
|
<el-col :span="11" :offset="2"><span>{{ $t('menu.signal') }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="2">
|
<el-col :span="11" :offset="2">
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -21,15 +30,15 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-control ref="confirmControl"></confirm-control>
|
<confirm-control ref="confirmControl" />
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteControl',
|
name: 'RouteControl',
|
||||||
@ -46,7 +55,7 @@
|
|||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: ''
|
signalName: ''
|
||||||
|
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -74,12 +83,13 @@
|
|||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
||||||
return this.$t('menu.menuSignal.cancelInterlockAutoTrigger');
|
return this.$t('menu.menuSignal.cancelInterlockAutoTrigger');
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
@ -87,8 +97,8 @@
|
|||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name
|
this.signalName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -142,11 +152,11 @@
|
|||||||
},
|
},
|
||||||
// 现地工作站取消进路
|
// 现地工作站取消进路
|
||||||
cancelTrainRouteByLocal() {
|
cancelTrainRouteByLocal() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -154,7 +164,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -162,11 +172,11 @@
|
|||||||
},
|
},
|
||||||
// 行调工作站取消进路
|
// 行调工作站取消进路
|
||||||
cancelTrainRouteByCentral() {
|
cancelTrainRouteByCentral() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||||
messages: [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')]
|
messages: [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')]
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -176,17 +186,17 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.confirmControl.doShow(operate, this.selected);
|
this.$refs.confirmControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号关灯
|
// 信号关灯
|
||||||
signalClose() {
|
signalClose() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||||
messages: [this.$t('menu.menuSignal.signalOff') + this.$t('global.colon') + this.signalName],
|
messages: [this.$t('menu.menuSignal.signalOff') + this.$t('global.colon') + this.signalName]
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -196,17 +206,17 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.confirmControl.doShow(operate);
|
this.$refs.confirmControl.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号重开
|
// 信号重开
|
||||||
reopenSignal() {
|
reopenSignal() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||||
messages: [this.$t('menu.menuSignal.signalReopen') + this.$t('global.colon') + this.signalName],
|
messages: [this.$t('menu.menuSignal.signalReopen') + this.$t('global.colon') + this.signalName]
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -216,18 +226,17 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.confirmControl.doShow(operate);
|
this.$refs.confirmControl.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置联锁自动进路
|
// 设置联锁自动进路
|
||||||
setAutoInterlock() {
|
setAutoInterlock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
|
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -235,7 +244,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -243,12 +252,11 @@
|
|||||||
},
|
},
|
||||||
// 取消联锁自动进路
|
// 取消联锁自动进路
|
||||||
cancelAutoInterlock() {
|
cancelAutoInterlock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
|
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -256,7 +264,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -264,12 +272,11 @@
|
|||||||
},
|
},
|
||||||
// 设置联锁自动触发
|
// 设置联锁自动触发
|
||||||
setAutoTrigger() {
|
setAutoTrigger() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation
|
operation: OperationEvent.Signal.setAutoTrigger.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -277,7 +284,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -285,11 +292,11 @@
|
|||||||
},
|
},
|
||||||
// 取消联锁自动触发
|
// 取消联锁自动触发
|
||||||
cancelAutoTrigger() {
|
cancelAutoTrigger() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
|
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -298,7 +305,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -306,20 +313,20 @@
|
|||||||
},
|
},
|
||||||
// 取消
|
// 取消
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,23 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog class="fuzhou-01__systerm route-detail" :title="title" :visible.sync="show" width="340px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm route-detail"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="340px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
|
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10" :offset="2">
|
<el-col :span="10" :offset="2">
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<span>{{ $t('menu.routeList') }}</span>
|
<span>{{ $t('menu.routeList') }}</span>
|
||||||
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
|
<el-table
|
||||||
:height="140">
|
ref="tempTable"
|
||||||
|
:data="tempData"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
size="mini"
|
||||||
|
highlight-current-row
|
||||||
|
:height="140"
|
||||||
|
>
|
||||||
<el-table-column :label="this.$t('menu.route')">
|
<el-table-column :label="this.$t('menu.route')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.name }}</span>
|
<span>{{ scope.row.name }}</span>
|
||||||
@ -39,7 +55,7 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -47,7 +63,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteDetail',
|
name: 'RouteDetail',
|
||||||
@ -60,8 +76,8 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
tempData: [],
|
tempData: [],
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: '',
|
signalName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -83,7 +99,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
@ -92,8 +108,8 @@
|
|||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name
|
this.signalName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -112,11 +128,11 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.detail.menu.operation
|
operation: OperationEvent.Signal.detail.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -124,26 +140,26 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,26 +1,42 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog class="fuzhou-01__systerm route-hand-control" :title="title" :visible.sync="show" width="360px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm route-hand-control"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="360px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
|
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10" :offset="2">
|
<el-col :span="10" :offset="2">
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<span>{{ $t('menu.routeList') }}</span>
|
<span>{{ $t('menu.routeList') }}</span>
|
||||||
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
|
<el-table
|
||||||
:height="140">
|
ref="tempTable"
|
||||||
<el-table-column prop="name" :label="this.$t('menu.route')" :id="domIdChoose" style="margin-left:30px">
|
:data="tempData"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
size="mini"
|
||||||
|
highlight-current-row
|
||||||
|
:height="140"
|
||||||
|
>
|
||||||
|
<el-table-column :id="domIdChoose" prop="name" :label="this.$t('menu.route')" style="margin-left:30px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-checkbox v-model="scope.row.check" :disabled="scope.row.disabled"> </el-checkbox>
|
<el-checkbox v-model="scope.row.check" :disabled="scope.row.disabled" />
|
||||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
|
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -35,22 +51,28 @@
|
|||||||
<el-table-column prop="conflictCheck" :label="this.$t('menu.conflictCheck')" :width="80">
|
<el-table-column prop="conflictCheck" :label="this.$t('menu.conflictCheck')" :width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span
|
<span
|
||||||
:style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.conflictCheck}}</span>
|
:style="{color: scope.row.disabled ? '#CBCBCB':'unset'}"
|
||||||
|
>{{ scope.row.conflictCheck }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="10" :offset="2">
|
<el-col :span="10" :offset="2">
|
||||||
<el-button :id="domIdConfirm" type="primary" :disabled="commitDisabled" :loading="loading"
|
<el-button
|
||||||
@click="commit">{{$t('global.confirm')}}</el-button>
|
:id="domIdConfirm"
|
||||||
|
type="primary"
|
||||||
|
:disabled="commitDisabled"
|
||||||
|
:loading="loading"
|
||||||
|
@click="commit"
|
||||||
|
>{{ $t('global.confirm') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" :offset="4">
|
<el-col :span="8" :offset="4">
|
||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-control ref="confirmControl"></confirm-control>
|
<confirm-control ref="confirmControl" />
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -59,7 +81,7 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteHandControl',
|
name: 'RouteHandControl',
|
||||||
@ -75,8 +97,8 @@
|
|||||||
operation: null,
|
operation: null,
|
||||||
selection: [],
|
selection: [],
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: '',
|
signalName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -96,6 +118,7 @@
|
|||||||
return OperationEvent.Signal.atsAutoControl.choose.domId;
|
return OperationEvent.Signal.atsAutoControl.choose.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||||
@ -106,6 +129,7 @@
|
|||||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||||
return this.$t('menu.menuSignal.atsAutoControl');
|
return this.$t('menu.menuSignal.atsAutoControl');
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
commitDisabled() {
|
commitDisabled() {
|
||||||
let disabled = true;
|
let disabled = true;
|
||||||
@ -128,7 +152,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
@ -137,8 +161,8 @@
|
|||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name
|
this.signalName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -154,9 +178,9 @@
|
|||||||
elem.disabled = true;
|
elem.disabled = true;
|
||||||
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
|
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
|
||||||
elem.controlType == '01') {
|
elem.controlType == '01') {
|
||||||
elem.disabled = true
|
elem.disabled = true;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tempData = tempData || [];
|
this.tempData = tempData || [];
|
||||||
@ -174,13 +198,13 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
checkTableDataSelction(data) {
|
checkTableDataSelction(data) {
|
||||||
let selection = [];
|
const selection = [];
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
data.forEach(row => {
|
data.forEach(row => {
|
||||||
if (row.check && !row.disabled) {
|
if (row.check && !row.disabled) {
|
||||||
selection.push(row);
|
selection.push(row);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||||
@ -189,38 +213,38 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
serializeCodeListWithSeparator(sep) {
|
serializeCodeListWithSeparator(sep) {
|
||||||
let codeList = [];
|
const codeList = [];
|
||||||
if (this.selection && this.selection.length) {
|
if (this.selection && this.selection.length) {
|
||||||
this.selection.forEach(elem => {
|
this.selection.forEach(elem => {
|
||||||
codeList.push(elem.code);
|
codeList.push(elem.code);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
return codeList.join(sep);
|
return codeList.join(sep);
|
||||||
},
|
},
|
||||||
handleChooseChange(selection) {
|
handleChooseChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
if (selection && selection.length) {
|
if (selection && selection.length) {
|
||||||
let operate = {
|
const operate = {
|
||||||
repeat: true,
|
repeat: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: '',
|
operation: '',
|
||||||
val: this.serializeCodeListWithSeparator('::'),
|
val: this.serializeCodeListWithSeparator('::'),
|
||||||
selection: selection
|
selection: selection
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
/** 自排关*/
|
/** 自排关*/
|
||||||
operate.operation = OperationEvent.Signal.humanControl.choose.operation
|
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
|
||||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||||
/** 自排开*/
|
/** 自排开*/
|
||||||
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation
|
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else if (!selection) {
|
} else if (!selection) {
|
||||||
this.$messageBox(this.$t('tip.selectAPieceOfData'));
|
this.$messageBox(this.$t('tip.selectAPieceOfData'));
|
||||||
}
|
}
|
||||||
@ -236,11 +260,11 @@
|
|||||||
},
|
},
|
||||||
// 自排关
|
// 自排关
|
||||||
humanControl() {
|
humanControl() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
operation: OperationEvent.Signal.humanControl.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -248,7 +272,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -256,11 +280,11 @@
|
|||||||
},
|
},
|
||||||
// 自排开
|
// 自排开
|
||||||
atsAutoControl() {
|
atsAutoControl() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -268,26 +292,26 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog class="fuzhou-01__systerm section-cmd-control" :title="title" :visible.sync="show" width="840px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm section-cmd-control"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="840px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||||
<el-form label-position="center" size="mini">
|
<el-form label-position="center" size="mini">
|
||||||
@ -9,41 +18,49 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="this.$t('global.status')" label-width="40px">
|
<el-form-item :label="this.$t('global.status')" label-width="40px">
|
||||||
<el-select v-model="operation" size="small" disabled>
|
<el-select v-model="operation" size="small" disabled>
|
||||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
<el-option
|
||||||
:value="option.code">
|
v-for="option in typeList"
|
||||||
</el-option>
|
:key="option.code"
|
||||||
|
:label="option.name"
|
||||||
|
:value="option.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="this.$t('menu.sectionName')" label-width="100px">
|
<el-form-item :label="this.$t('menu.sectionName')" label-width="100px">
|
||||||
<el-input v-model="sectionName" size="small" disabled></el-input>
|
<el-input v-model="sectionName" size="small" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
|
<el-table
|
||||||
highlight-current-row height="200">
|
ref="tempData"
|
||||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')">
|
class="table"
|
||||||
</el-table-column>
|
:data="tempData"
|
||||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')">
|
border
|
||||||
</el-table-column>
|
style="width: 100%"
|
||||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')">
|
size="mini"
|
||||||
</el-table-column>
|
highlight-current-row
|
||||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')">
|
height="200"
|
||||||
</el-table-column>
|
>
|
||||||
|
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||||
|
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||||
|
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||||
|
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<span class="notice">{{ message }}</span>
|
<span class="notice">{{ message }}</span>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
<el-col :span="2" :offset="3">
|
<el-col :span="2" :offset="3">
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
||||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
v-show="timeCountCommand>0"
|
||||||
|
>({{ timeCountCommand }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="1">
|
<el-col :span="2" :offset="1">
|
||||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
||||||
@ -51,7 +68,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
||||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
v-show="timeCountConfirm>0"
|
||||||
|
>({{ timeCountConfirm }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||||
@ -86,15 +104,15 @@
|
|||||||
timeCountConfirm: -1,
|
timeCountConfirm: -1,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
sectionName: ''
|
sectionName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
typeList() {
|
typeList() {
|
||||||
return [
|
return [
|
||||||
{ code: OperationEvent.Section.unlock.menu.operation, name: this.$t('menu.menuSection.sectionUnblock') },
|
{ code: OperationEvent.Section.unlock.menu.operation, name: this.$t('menu.menuSection.sectionUnblock') },
|
||||||
{ code: OperationEvent.Section.fault.menu.operation, name: this.$t('menu.menuSection.sectionFaultUnlock') },
|
{ code: OperationEvent.Section.fault.menu.operation, name: this.$t('menu.menuSection.sectionFaultUnlock') },
|
||||||
{ code: OperationEvent.Section.axlePreReset.menu.operation, name: this.$t('menu.menuSection.sectionAxisPreReset') },
|
{ code: OperationEvent.Section.axlePreReset.menu.operation, name: this.$t('menu.menuSection.sectionAxisPreReset') }
|
||||||
]
|
];
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -112,6 +130,7 @@
|
|||||||
return OperationEvent.Section.axlePreReset.order.domId;
|
return OperationEvent.Section.axlePreReset.order.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm1() {
|
domIdConfirm1() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -126,6 +145,7 @@
|
|||||||
return OperationEvent.Section.axlePreReset.confirm1.domId;
|
return OperationEvent.Section.axlePreReset.confirm1.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm2() {
|
domIdConfirm2() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -140,6 +160,7 @@
|
|||||||
return OperationEvent.Section.axlePreReset.confirm2.domId;
|
return OperationEvent.Section.axlePreReset.confirm2.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdStop() {
|
domIdStop() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -154,11 +175,13 @@
|
|||||||
return OperationEvent.Section.axlePreReset.stop.domId;
|
return OperationEvent.Section.axlePreReset.stop.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdClose() {
|
domIdClose() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
return OperationEvent.Command.close.menu.domId;
|
return OperationEvent.Command.close.menu.domId;
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -170,6 +193,7 @@
|
|||||||
return this.$t('menu.menuSection.sectionAxisPreReset');
|
return this.$t('menu.menuSection.sectionAxisPreReset');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -178,7 +202,7 @@
|
|||||||
this.stpDisabled = true;
|
this.stpDisabled = true;
|
||||||
val.forEach((elem, index) => {
|
val.forEach((elem, index) => {
|
||||||
// 在确定1之前的操作才可以终止
|
// 在确定1之前的操作才可以终止
|
||||||
if (elem == false && 1 <= index && index <= 2) {
|
if (elem == false && index >= 1 && index <= 2) {
|
||||||
this.stpDisabled = false;
|
this.stpDisabled = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -189,7 +213,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
if (!this.$store.state.menuOperation.break) {
|
if (!this.$store.state.menuOperation.break) {
|
||||||
if (this.timeCountCommand > 0) {
|
if (this.timeCountCommand > 0) {
|
||||||
@ -205,7 +229,7 @@
|
|||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
@ -218,14 +242,14 @@
|
|||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
if (selected.type === '02') {
|
if (selected.type === '02') {
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||||
if (section) {
|
if (section) {
|
||||||
this.sectionName += section.name
|
this.sectionName += section.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.sectionName += selected.name
|
this.sectionName += selected.name;
|
||||||
|
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -265,19 +289,19 @@
|
|||||||
commandHasPopUp() {
|
commandHasPopUp() {
|
||||||
},
|
},
|
||||||
commandNoPopUp() {
|
commandNoPopUp() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type
|
type: MapDeviceType.Section.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段解封*/
|
/** 区段解封*/
|
||||||
operate.operation = OperationEvent.Section.unlock.order.operation
|
operate.operation = OperationEvent.Section.unlock.order.operation;
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
/** 区段故障解锁*/
|
/** 区段故障解锁*/
|
||||||
operate.operation = OperationEvent.Section.fault.order.operation
|
operate.operation = OperationEvent.Section.fault.order.operation;
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||||
/** 区段计轴预复位*/
|
/** 区段计轴预复位*/
|
||||||
operate.operation = OperationEvent.Section.axlePreReset.order.operation
|
operate.operation = OperationEvent.Section.axlePreReset.order.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||||
@ -292,12 +316,12 @@
|
|||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm1() {
|
confirm1() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段解封*/
|
/** 区段解封*/
|
||||||
@ -324,13 +348,13 @@
|
|||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm2() {
|
confirm2() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type
|
type: MapDeviceType.Section.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段解封*/
|
/** 区段解封*/
|
||||||
@ -359,12 +383,12 @@
|
|||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
this.setButtonEnable({ step: -1 });
|
this.setButtonEnable({ step: -1 });
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段解封*/
|
/** 区段解封*/
|
||||||
@ -386,21 +410,21 @@
|
|||||||
} else {
|
} else {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -426,8 +450,8 @@
|
|||||||
elem[prop] = param[prop];
|
elem[prop] = param[prop];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,16 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm section-control" :title="title" :visible.sync="show" width="300px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm section-control"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="300px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.section') }}</span></el-col>
|
<el-col :span="11" :offset="2"><span>{{ $t('menu.section') }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="2">
|
<el-col :span="11" :offset="2">
|
||||||
<el-input v-model="sectionName" size="small" disabled></el-input>
|
<el-input v-model="sectionName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -21,13 +30,13 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionControl',
|
name: 'SectionControl',
|
||||||
@ -40,8 +49,8 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
operation: '',
|
operation: '',
|
||||||
stationName: '',
|
stationName: '',
|
||||||
sectionName: '',
|
sectionName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -61,12 +70,13 @@
|
|||||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||||
return this.$t('menu.menuSection.orbitalSectionActive');
|
return this.$t('menu.menuSection.orbitalSectionActive');
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
@ -75,14 +85,14 @@
|
|||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
if (selected.type === '02') {
|
if (selected.type === '02') {
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||||
if (section) {
|
if (section) {
|
||||||
this.sectionName += section.name
|
this.sectionName += section.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.sectionName += selected.name
|
this.sectionName += selected.name;
|
||||||
|
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -113,11 +123,11 @@
|
|||||||
},
|
},
|
||||||
// 道岔单锁
|
// 道岔单锁
|
||||||
lock() {
|
lock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.lock.menu.operation,
|
operation: OperationEvent.Section.lock.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -125,7 +135,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -133,11 +143,11 @@
|
|||||||
},
|
},
|
||||||
// 轨道区段切除
|
// 轨道区段切除
|
||||||
split() {
|
split() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.split.menu.operation,
|
operation: OperationEvent.Section.split.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -145,7 +155,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -153,11 +163,11 @@
|
|||||||
},
|
},
|
||||||
// 轨道区段激活
|
// 轨道区段激活
|
||||||
active() {
|
active() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.active.menu.operation,
|
operation: OperationEvent.Section.active.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -165,26 +175,26 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,37 +1,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm stand-run-level"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="500px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.stationStandStatus') }}</span></el-col>
|
<el-col :span="10" :offset="2"><span>{{ $t('menu.stationStandStatus') }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10" :offset="2">
|
<el-col :span="10" :offset="2">
|
||||||
<div style="height: 32px;">
|
<div style="height: 32px;">
|
||||||
<el-radio v-model="standStatus" label="02" style="line-height: 32px;"
|
<el-radio
|
||||||
:style="{color: standStatus == '02' ? '' : 'red'}" disabled>{{$t('menu.upDirection')}}</el-radio>
|
v-model="standStatus"
|
||||||
<el-radio v-model="standStatus" label="01" style="line-height: 32px;"
|
label="02"
|
||||||
:style="{color: standStatus == '01' ? '' : 'red'}" disabled>{{$t('menu.downDirection')}}</el-radio>
|
style="line-height: 32px;"
|
||||||
|
:style="{color: standStatus == '02' ? '' : 'red'}"
|
||||||
|
disabled
|
||||||
|
>{{ $t('menu.upDirection') }}</el-radio>
|
||||||
|
<el-radio
|
||||||
|
v-model="standStatus"
|
||||||
|
label="01"
|
||||||
|
style="line-height: 32px;"
|
||||||
|
:style="{color: standStatus == '01' ? '' : 'red'}"
|
||||||
|
disabled
|
||||||
|
>{{ $t('menu.downDirection') }}</el-radio>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<span>{{ $t('menu.stationStandStatus') }}</span>
|
<span>{{ $t('menu.stationStandStatus') }}</span>
|
||||||
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
||||||
<el-table-column prop="name" :width="170" :label="this.$t('menu.switchbackStation')">
|
<el-table-column prop="name" :width="170" :label="this.$t('menu.switchbackStation')" />
|
||||||
</el-table-column>
|
<el-table-column prop="station" :label="this.$t('menu.switchbackPlatform')" />
|
||||||
<el-table-column prop="station" :label="this.$t('menu.switchbackPlatform')">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="strategy" :label="this.$t('menu.switchbackStrategy')">
|
<el-table-column prop="strategy" :label="this.$t('menu.switchbackStrategy')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="scope.row.strategy" size="mini" @change="strategySelectChange"
|
<el-select
|
||||||
:id='domIdChoose'>
|
:id="domIdChoose"
|
||||||
<el-option v-for="item in strategyList" :key="item.value" :label="item.label"
|
v-model="scope.row.strategy"
|
||||||
:value="item.value">
|
size="mini"
|
||||||
</el-option>
|
@change="strategySelectChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in strategyList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -50,14 +74,14 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-control ref="confirmControl"></confirm-control>
|
<confirm-control ref="confirmControl" />
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
@ -88,19 +112,19 @@
|
|||||||
{
|
{
|
||||||
value: '04',
|
value: '04',
|
||||||
label: this.$t('menu.default')
|
label: this.$t('menu.default')
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
stationName: '',
|
stationName: '',
|
||||||
standStatus: '',
|
standStatus: '',
|
||||||
selection: [],
|
selection: [],
|
||||||
isSelect: true,
|
isSelect: true,
|
||||||
isConfirm: false,
|
isConfirm: false,
|
||||||
strategy: '',
|
strategy: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'stationList',
|
'stationList'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -121,13 +145,12 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(selected, opts) {
|
loadInitData(selected, opts) {
|
||||||
this.tempData = [];
|
this.tempData = [];
|
||||||
let stationList = [...this.stationList];
|
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||||
let station = this.stationList.find(n => n.code == selected.stationCode)
|
|
||||||
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
|
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
|
||||||
},
|
},
|
||||||
doShow(operate, selected, opts) {
|
doShow(operate, selected, opts) {
|
||||||
@ -136,7 +159,7 @@
|
|||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standStatus = selected.direction;
|
this.standStatus = selected.direction;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -150,26 +173,26 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
checkTableDataSelction(data) {
|
checkTableDataSelction(data) {
|
||||||
let selection = [];
|
const selection = [];
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
data.forEach(row => {
|
data.forEach(row => {
|
||||||
if (row.check && !row.disabled) {
|
if (row.check && !row.disabled) {
|
||||||
selection.push(row);
|
selection.push(row);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.disabledSend = selection.length ? false : true;
|
this.disabledSend = !selection.length;
|
||||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
strategySelectChange(strategy) {
|
strategySelectChange(strategy) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
|
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
|
||||||
val: `${strategy}`,
|
val: `${strategy}`
|
||||||
}
|
};
|
||||||
|
|
||||||
this.strategy = strategy;
|
this.strategy = strategy;
|
||||||
this.isSelect = false;
|
this.isSelect = false;
|
||||||
@ -178,7 +201,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -187,12 +210,12 @@
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.isConfirm) {
|
if (this.isConfirm) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||||
val: `${this.strategy}`
|
val: `${this.strategy}`
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -200,29 +223,29 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="320px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm stand-detain-train"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="320px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div class="context">
|
<div class="context">
|
||||||
<span>{{ preContext }}{{ standName }}</span>
|
<span>{{ preContext }}{{ standName }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -12,13 +21,13 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetainTrain',
|
name: 'StandDetainTrain',
|
||||||
@ -32,7 +41,7 @@
|
|||||||
standName: '',
|
standName: '',
|
||||||
selected: null,
|
selected: null,
|
||||||
operation: null
|
operation: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -58,6 +67,7 @@
|
|||||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||||
return this.$t('menu.menuStationStand.cancelJumpStop');
|
return this.$t('menu.menuStationStand.cancelJumpStop');
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
preContext() {
|
preContext() {
|
||||||
return this.title + ':';
|
return this.title + ':';
|
||||||
@ -66,7 +76,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
@ -112,11 +122,11 @@
|
|||||||
},
|
},
|
||||||
// 设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -125,19 +135,19 @@
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 取消扣车
|
// 取消扣车
|
||||||
cancelDetainTrain() {
|
cancelDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -146,19 +156,19 @@
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 强制取消扣车
|
// 强制取消扣车
|
||||||
cancelDetainTrainForce() {
|
cancelDetainTrainForce() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -167,19 +177,19 @@
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 提前发车
|
// 提前发车
|
||||||
earlyDeparture() {
|
earlyDeparture() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -187,20 +197,20 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 设置跳停
|
// 设置跳停
|
||||||
setJumpStop() {
|
setJumpStop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||||
val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行
|
val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -208,20 +218,20 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 取消跳停
|
// 取消跳停
|
||||||
cancelJumpStop() {
|
cancelJumpStop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||||
val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行
|
val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -229,29 +239,29 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.stand-detain-train .context {
|
.stand-detain-train .context {
|
||||||
|
@ -1,25 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-detail" :title="title" :visible.sync="show" width="400px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm stand-detail"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</span></el-col>
|
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10" :offset="2">
|
<el-col :span="10" :offset="2">
|
||||||
<el-input v-model="standName" size="small" disabled></el-input>
|
<el-input v-model="standName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<span>{{ $t('menu.stationStandStatus') }}</span>
|
<span>{{ $t('menu.stationStandStatus') }}</span>
|
||||||
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" highlight-current-row>
|
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" highlight-current-row>
|
||||||
<el-table-column prop="item" :width="140" :label="this.$t('menu.item')">
|
<el-table-column prop="item" :width="140" :label="this.$t('menu.item')" />
|
||||||
</el-table-column>
|
<el-table-column prop="status" :label="this.$t('global.status')" />
|
||||||
<el-table-column prop="status" :label="this.$t('global.status')">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -30,7 +37,7 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -57,11 +64,11 @@
|
|||||||
'03': this.$t('menu.automaticChange'),
|
'03': this.$t('menu.automaticChange'),
|
||||||
'04': this.$t('menu.default')
|
'04': this.$t('menu.default')
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'stationList',
|
'stationList'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -79,14 +86,13 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(selected, opts) {
|
loadInitData(selected, opts) {
|
||||||
this.tempData = [];
|
this.tempData = [];
|
||||||
|
|
||||||
let stationList = this.stationList.slice();
|
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||||
let index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
|
||||||
let stationStand, station;
|
let stationStand, station;
|
||||||
if (selected.direction == '01') { // 下行
|
if (selected.direction == '01') { // 下行
|
||||||
// 下行时,此站不是最后一站
|
// 下行时,此站不是最后一站
|
||||||
@ -120,7 +126,7 @@
|
|||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standName = selected.name;
|
this.standName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -138,10 +144,10 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
operation: OperationEvent.Command.close.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -149,25 +155,25 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<el-radio-group style="padding: 10px 20px; border: 1px double lightgray;width:100%;">
|
<el-radio-group style="padding: 10px 20px; border: 1px double lightgray;width:100%;">
|
||||||
<span class="base-label" style="font-size:14px;">{{ $t('menu.range') }}</span>
|
<span class="base-label" style="font-size:14px;">{{ $t('menu.range') }}</span>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-radio-group v-model="upDown" @change="choose" style="width:100%;">
|
<el-radio-group v-model="upDown" style="width:100%;" @change="choose">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-radio :id="upDown == '01' ? domIdChoose : ''" label="02">{{ $t('menu.uplinkBroadly') }}</el-radio>
|
<el-radio :id="upDown == '01' ? domIdChoose : ''" label="02">{{ $t('menu.uplinkBroadly') }}</el-radio>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -1,36 +1,46 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm stand-run-level"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="500px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</span></el-col>
|
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10" :offset="2">
|
<el-col :span="10" :offset="2">
|
||||||
<el-input v-model="standName" size="small" disabled></el-input>
|
<el-input v-model="standName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<span>{{ $t('menu.stationStandStatus') }}</span>
|
<span>{{ $t('menu.stationStandStatus') }}</span>
|
||||||
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
||||||
<el-table-column prop="name" :width="210" :label="this.$t('menu.nextPlatform')">
|
<el-table-column prop="name" :width="210" :label="this.$t('menu.nextPlatform')" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="time" :label="this.$t('menu.intervalRunningTime')">
|
<el-table-column prop="time" :label="this.$t('menu.intervalRunningTime')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="scope.row.time" size="mini" @change="timeSelectChange" :id='domIdChoose'>
|
<el-select :id="domIdChoose" v-model="scope.row.time" size="mini" @change="timeSelectChange">
|
||||||
<el-option v-for="item in timeList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value">
|
v-for="item in timeList"
|
||||||
</el-option>
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="check" :label="this.$t('menu.alwaysEffective')">
|
<el-table-column prop="check" :label="this.$t('menu.alwaysEffective')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-checkbox ref="check" v-model="scope.row.check" @change="checkChange" :id='domIdCheck'>
|
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
|
||||||
</el-checkbox>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -48,7 +58,7 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-control ref="confirmControl"></confirm-control>
|
<confirm-control ref="confirmControl" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -74,7 +84,7 @@
|
|||||||
isSelect: true,
|
isSelect: true,
|
||||||
isConfirm: false,
|
isConfirm: false,
|
||||||
time: ''
|
time: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// 深度数据状态
|
// 深度数据状态
|
||||||
@ -109,12 +119,12 @@
|
|||||||
return this.$t('menu.menuStationStand.setRunLevel');
|
return this.$t('menu.menuStationStand.setRunLevel');
|
||||||
},
|
},
|
||||||
timeList() {
|
timeList() {
|
||||||
let list = [
|
const list = [
|
||||||
{ value: 0, label: this.$t('menu.automatic2') },
|
{ value: 0, label: this.$t('menu.automatic2') },
|
||||||
{ value: 1, label: '1' }
|
{ value: 1, label: '1' }
|
||||||
];
|
];
|
||||||
for (var i = 60; i <= this.maxRunLevel; i++) {
|
for (var i = 60; i <= this.maxRunLevel; i++) {
|
||||||
list.push({ value: i, label: `${i}` })
|
list.push({ value: i, label: `${i}` });
|
||||||
}
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
@ -123,25 +133,24 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(selected, opts) {
|
loadInitData(selected, opts) {
|
||||||
this.tempData = [];
|
this.tempData = [];
|
||||||
let stationList = this.stationList.slice();
|
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||||
let index = this.stationList.findIndex(n => n.code == selected.stationCode)
|
|
||||||
if (selected.direction == '01') { // 下行
|
if (selected.direction == '01') { // 下行
|
||||||
// 下行时,此站不是最后一站
|
// 下行时,此站不是最后一站
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 上行时,此站不是最后一站
|
// 上行时,此站不是最后一站
|
||||||
if (index != this.stationList.length) {
|
if (index != this.stationList.length) {
|
||||||
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -153,7 +162,7 @@
|
|||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standName = selected.name;
|
this.standName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -167,26 +176,26 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
checkTableDataSelction(data) {
|
checkTableDataSelction(data) {
|
||||||
let selection = [];
|
const selection = [];
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
data.forEach(row => {
|
data.forEach(row => {
|
||||||
if (row.check && !row.disabled) {
|
if (row.check && !row.disabled) {
|
||||||
selection.push(row);
|
selection.push(row);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.disabledSend = selection.length ? false : true;
|
this.disabledSend = !selection.length;
|
||||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
timeSelectChange(time) {
|
timeSelectChange(time) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
||||||
val: time.toString(),
|
val: time.toString()
|
||||||
}
|
};
|
||||||
|
|
||||||
this.time = time.toString();
|
this.time = time.toString();
|
||||||
this.isSelect = false;
|
this.isSelect = false;
|
||||||
@ -195,20 +204,20 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
checkChange(check) {
|
checkChange(check) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
||||||
val: check.toString(),
|
val: check.toString()
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -217,13 +226,13 @@
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.isConfirm) {
|
if (this.isConfirm) {
|
||||||
let forver = this.tempData[0].check ? true : false;
|
const forver = !!this.tempData[0].check;
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||||
messages: [`${this.$t('menu.menuStationStand.setRunLevel')}${this.$t('global.colon')}${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? this.$t('menu.runTimeAutomatically') : `${this.$t('menu.runningTimeIs')}${this.tempData[0].time}s`},${this.$t('menu.effectiveFrequencyIs')}${this.tempData[0].check ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`],
|
messages: [`${this.$t('menu.menuStationStand.setRunLevel')}${this.$t('global.colon')}${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? this.$t('menu.runTimeAutomatically') : `${this.$t('menu.runningTimeIs')}${this.tempData[0].time}s`},${this.$t('menu.effectiveFrequencyIs')}${this.tempData[0].check ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`],
|
||||||
val: [this.time, forver].join('::'),
|
val: [this.time, forver].join('::')
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -233,28 +242,28 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.confirmControl.doShow(operate);
|
this.$refs.confirmControl.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,28 +1,44 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="390px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm stand-stop-time"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="390px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.platformName') }}</span></el-col>
|
<el-col :span="11" :offset="2"><span>{{ $t('menu.platformName') }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="2">
|
<el-col :span="11" :offset="2">
|
||||||
<el-input v-model="standName" size="small" disabled></el-input>
|
<el-input v-model="standName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 60px;">
|
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 60px;">
|
||||||
<span class="base-label">{{ $t('menu.controlMode') }}</span>
|
<span class="base-label">{{ $t('menu.controlMode') }}</span>
|
||||||
<div style=" position: relative; top:-10px;">
|
<div style=" position: relative; top:-10px;">
|
||||||
<el-radio-group v-model="control" @change='chooseControl'>
|
<el-radio-group v-model="control" @change="chooseControl">
|
||||||
<el-radio label="01" :id="control === '01'? '': domIdChoose1">{{$t('menu.automatic2')}}</el-radio>
|
<el-radio :id="control === '01'? '': domIdChoose1" label="01">{{ $t('menu.automatic2') }}</el-radio>
|
||||||
<el-radio label="02" :id="control === '02'? '': domIdChoose1">{{$t('menu.artificial')}}</el-radio>
|
<el-radio :id="control === '02'? '': domIdChoose1" label="02">{{ $t('menu.artificial') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-input-number v-model="time" @change="inputTime" :disabled="disabledInput" :id="domIdInput"
|
<el-input-number
|
||||||
controls-position="right" :min="0" size="mini" style="width: 130px; padding-left:30px">
|
:id="domIdInput"
|
||||||
</el-input-number>{{$t('global.second')}}
|
v-model="time"
|
||||||
|
:disabled="disabledInput"
|
||||||
|
controls-position="right"
|
||||||
|
:min="0"
|
||||||
|
size="mini"
|
||||||
|
style="width: 130px; padding-left:30px"
|
||||||
|
@change="inputTime"
|
||||||
|
/>{{ $t('global.second') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 0px 15px; height: 30px;">
|
<div style="padding: 0px 15px; height: 30px;">
|
||||||
@ -36,9 +52,9 @@
|
|||||||
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
|
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
|
||||||
<span class="base-label">{{ $t('menu.effectiveNumber') }}</span>
|
<span class="base-label">{{ $t('menu.effectiveNumber') }}</span>
|
||||||
<div style=" position: relative; top:-10px;">
|
<div style=" position: relative; top:-10px;">
|
||||||
<el-radio-group v-model="effective" @change="chooseEffective" :disabled="disabledTime">
|
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
||||||
<el-radio :label="false" :id="effective === false? '': domIdChoose2">{{$t('menu.onceEffective')}}</el-radio>
|
<el-radio :id="effective === false? '': domIdChoose2" :label="false">{{ $t('menu.onceEffective') }}</el-radio>
|
||||||
<el-radio :label="true" :id="effective === true? '': domIdChoose2">{{$t('menu.alwaysEffective')}}</el-radio>
|
<el-radio :id="effective === true? '': domIdChoose2" :label="true">{{ $t('menu.alwaysEffective') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -50,15 +66,15 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-control ref="confirmControl"></confirm-control>
|
<confirm-control ref="confirmControl" />
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandStopTime',
|
name: 'StandStopTime',
|
||||||
@ -76,8 +92,8 @@
|
|||||||
effective: false,
|
effective: false,
|
||||||
selected: null,
|
selected: null,
|
||||||
standName: '',
|
standName: '',
|
||||||
stationName: '',
|
stationName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -100,13 +116,13 @@
|
|||||||
},
|
},
|
||||||
disabledUp() {
|
disabledUp() {
|
||||||
if (this.selected) {
|
if (this.selected) {
|
||||||
return this.selected.direction !== '02'
|
return this.selected.direction !== '02';
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
disabledDown() {
|
disabledDown() {
|
||||||
if (this.selected) {
|
if (this.selected) {
|
||||||
return this.selected.direction !== '01'
|
return this.selected.direction !== '01';
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
@ -123,7 +139,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected, tempDate) {
|
doShow(operate, selected, tempDate) {
|
||||||
@ -133,7 +149,7 @@
|
|||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standName = selected.name;
|
this.standName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -141,7 +157,7 @@
|
|||||||
|
|
||||||
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
|
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
|
||||||
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
|
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
|
||||||
this.effective = tempDate.parkingValidStatus ? true : false;
|
this.effective = !!tempDate.parkingValidStatus;
|
||||||
this.direction = selected.direction;
|
this.direction = selected.direction;
|
||||||
this.selected = selected || {};
|
this.selected = selected || {};
|
||||||
}
|
}
|
||||||
@ -162,52 +178,52 @@
|
|||||||
this.effective = true;
|
this.effective = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
||||||
val: `${control}`
|
val: `${control}`
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
chooseEffective(effective) {
|
chooseEffective(effective) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
||||||
val: `${effective}`
|
val: `${effective}`
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
inputTime(time) {
|
inputTime(time) {
|
||||||
let operate = {
|
const operate = {
|
||||||
repeat: true,
|
repeat: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
||||||
val: `${time}`
|
val: `${time}`
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||||
val: [`${this.control}`, this.time, this.effective].join('::'),
|
val: [`${this.control}`, this.time, this.effective].join('::'),
|
||||||
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == false ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
|
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == false ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -217,23 +233,23 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.confirmControl.doShow(operate);
|
this.$refs.confirmControl.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog class="fuzhou-01__systerm station-cmd-control" :title="title" :visible.sync="show" width="840px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm station-cmd-control"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="840px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||||
<el-form label-position="center" size="mini">
|
<el-form label-position="center" size="mini">
|
||||||
@ -9,36 +18,44 @@
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
||||||
<el-select v-model="operation" size="small" disabled style="width:230px">
|
<el-select v-model="operation" size="small" disabled style="width:230px">
|
||||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
<el-option
|
||||||
:value="option.code">
|
v-for="option in typeList"
|
||||||
</el-option>
|
:key="option.code"
|
||||||
|
:label="option.name"
|
||||||
|
:value="option.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item :label="this.$t('menu.stationName')" label-width="100px">
|
<el-form-item :label="this.$t('menu.stationName')" label-width="100px">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
|
<el-table
|
||||||
highlight-current-row height="200">
|
ref="tempData"
|
||||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')">
|
class="table"
|
||||||
</el-table-column>
|
:data="tempData"
|
||||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')">
|
border
|
||||||
</el-table-column>
|
style="width: 100%"
|
||||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')">
|
size="mini"
|
||||||
</el-table-column>
|
highlight-current-row
|
||||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')">
|
height="200"
|
||||||
</el-table-column>
|
>
|
||||||
|
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||||
|
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||||
|
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||||
|
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<span class="notice">{{ message }}</span>
|
<span class="notice">{{ message }}</span>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
<el-col :span="2" :offset="3">
|
<el-col :span="2" :offset="3">
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
||||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
v-show="timeCountCommand>0"
|
||||||
|
>({{ timeCountCommand }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="1">
|
<el-col :span="2" :offset="1">
|
||||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
||||||
@ -46,7 +63,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
||||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
v-show="timeCountConfirm>0"
|
||||||
|
>({{ timeCountConfirm }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||||
@ -79,14 +97,14 @@
|
|||||||
timeCountCommand: -1,
|
timeCountCommand: -1,
|
||||||
timeCountConfirm: -1,
|
timeCountConfirm: -1,
|
||||||
stationName: ''
|
stationName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
typeList() {
|
typeList() {
|
||||||
return [
|
return [
|
||||||
{ code: OperationEvent.Station.powerUnLock.menu.operation, name: this.$t('menu.menuStation.powerUnLock') },
|
{ code: OperationEvent.Station.powerUnLock.menu.operation, name: this.$t('menu.menuStation.powerUnLock') },
|
||||||
{ code: OperationEvent.Station.execKeyOperationTest.menu.operation, name: this.$t('menu.menuStation.execKeyOperationTest') }
|
{ code: OperationEvent.Station.execKeyOperationTest.menu.operation, name: this.$t('menu.menuStation.execKeyOperationTest') }
|
||||||
]
|
];
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -101,6 +119,7 @@
|
|||||||
return OperationEvent.Station.execKeyOperationTest.order.domId;
|
return OperationEvent.Station.execKeyOperationTest.order.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm1() {
|
domIdConfirm1() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -112,6 +131,7 @@
|
|||||||
return OperationEvent.Station.execKeyOperationTest.confirm1.domId;
|
return OperationEvent.Station.execKeyOperationTest.confirm1.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm2() {
|
domIdConfirm2() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -123,6 +143,7 @@
|
|||||||
return OperationEvent.Station.execKeyOperationTest.confirm2.domId;
|
return OperationEvent.Station.execKeyOperationTest.confirm2.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdStop() {
|
domIdStop() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -134,11 +155,13 @@
|
|||||||
return OperationEvent.Station.execKeyOperationTest.stop.domId;
|
return OperationEvent.Station.execKeyOperationTest.stop.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdClose() {
|
domIdClose() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
return OperationEvent.Command.close.menu.domId;
|
return OperationEvent.Command.close.menu.domId;
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -148,6 +171,7 @@
|
|||||||
return this.$t('menu.menuStation.execKeyOperationTest');
|
return this.$t('menu.menuStation.execKeyOperationTest');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -156,7 +180,7 @@
|
|||||||
this.stpDisabled = true;
|
this.stpDisabled = true;
|
||||||
val.forEach((elem, index) => {
|
val.forEach((elem, index) => {
|
||||||
// 在确定1之前的操作才可以终止
|
// 在确定1之前的操作才可以终止
|
||||||
if (elem == false && 1 <= index && index <= 2) {
|
if (elem == false && index >= 1 && index <= 2) {
|
||||||
this.stpDisabled = false;
|
this.stpDisabled = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -167,7 +191,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
if (!this.$store.state.menuOperation.break) {
|
if (!this.$store.state.menuOperation.break) {
|
||||||
if (this.timeCountCommand > 0) {
|
if (this.timeCountCommand > 0) {
|
||||||
@ -183,7 +207,7 @@
|
|||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
@ -194,7 +218,7 @@
|
|||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
||||||
this.stationName = selected.name
|
this.stationName = selected.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.order = 0;
|
this.order = 0;
|
||||||
@ -228,16 +252,16 @@
|
|||||||
commandHasPopUp() {
|
commandHasPopUp() {
|
||||||
},
|
},
|
||||||
commandNoPopUp() {
|
commandNoPopUp() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type
|
type: MapDeviceType.Station.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||||
/** 上电解锁*/
|
/** 上电解锁*/
|
||||||
operate.operation = OperationEvent.Station.powerUnLock.order.operation
|
operate.operation = OperationEvent.Station.powerUnLock.order.operation;
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||||
/** 执行关键操作测试*/
|
/** 执行关键操作测试*/
|
||||||
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation
|
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||||
@ -252,12 +276,12 @@
|
|||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm1() {
|
confirm1() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||||
/** 上电解锁*/
|
/** 上电解锁*/
|
||||||
@ -281,13 +305,13 @@
|
|||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm2() {
|
confirm2() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Station.type
|
type: MapDeviceType.Station.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||||
/** 上电解锁*/
|
/** 上电解锁*/
|
||||||
@ -314,12 +338,12 @@
|
|||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
this.setButtonEnable({ step: -1 });
|
this.setButtonEnable({ step: -1 });
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||||
/** 上电解锁*/
|
/** 上电解锁*/
|
||||||
@ -338,21 +362,21 @@
|
|||||||
} else {
|
} else {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -378,8 +402,8 @@
|
|||||||
elem[prop] = param[prop];
|
elem[prop] = param[prop];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm station-human-control-all" :title="title" :visible.sync="show" width="430px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm station-human-control-all"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="430px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<div class="context">
|
<div class="context">
|
||||||
<span>{{ title }}</span>
|
<span>{{ title }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -12,25 +22,25 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationHumanControlAll',
|
name: 'StationHumanControlAll',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
operation: null
|
operation: null
|
||||||
}
|
};
|
||||||
},
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -44,12 +54,12 @@
|
|||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -69,7 +79,7 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
@ -82,28 +92,28 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,11 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm station-set-route-control-all" :title="title" :visible.sync="show"
|
<el-dialog
|
||||||
width="450px" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body
|
v-dialogDrag
|
||||||
v-dialogDrag>
|
class="fuzhou-01__systerm station-set-route-control-all"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="450px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<div style="padding: 0px 10px">
|
<div style="padding: 0px 10px">
|
||||||
<el-form size="small" label-width="110px" label-position="left" ref="form">
|
<el-form ref="form" size="small" label-width="110px" label-position="left">
|
||||||
<el-form-item :label="this.$t('menu.concentratedStationName')" prop="stationName">
|
<el-form-item :label="this.$t('menu.concentratedStationName')" prop="stationName">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-radio-group v-model="mode">
|
<el-radio-group v-model="mode">
|
||||||
@ -25,27 +34,27 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationSetRouteControlAll',
|
name: 'StationSetRouteControlAll',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
operation: null,
|
operation: null,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
mode: true,
|
mode: true
|
||||||
}
|
};
|
||||||
},
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -59,12 +68,12 @@
|
|||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
@ -88,7 +97,7 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
@ -102,28 +111,28 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog class="fuzhou-01__systerm switch-cmd-control" :title="title" :visible.sync="show" width="840px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm switch-cmd-control"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="840px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||||
<el-form label-position="center" size="mini">
|
<el-form label-position="center" size="mini">
|
||||||
@ -9,41 +18,49 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
||||||
<el-select v-model="operation" size="small" disabled>
|
<el-select v-model="operation" size="small" disabled>
|
||||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
<el-option
|
||||||
:value="option.code">
|
v-for="option in typeList"
|
||||||
</el-option>
|
:key="option.code"
|
||||||
|
:label="option.name"
|
||||||
|
:value="option.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="this.$t('menu.switchName')" label-width="80px">
|
<el-form-item :label="this.$t('menu.switchName')" label-width="80px">
|
||||||
<el-input v-model="switchName" size="small" disabled></el-input>
|
<el-input v-model="switchName" size="small" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
|
<el-table
|
||||||
highlight-current-row height="200">
|
ref="tempData"
|
||||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')">
|
class="table"
|
||||||
</el-table-column>
|
:data="tempData"
|
||||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')">
|
border
|
||||||
</el-table-column>
|
style="width: 100%"
|
||||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')">
|
size="mini"
|
||||||
</el-table-column>
|
highlight-current-row
|
||||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')">
|
height="200"
|
||||||
</el-table-column>
|
>
|
||||||
|
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||||
|
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||||
|
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||||
|
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<span class="notice">{{ message }}</span>
|
<span class="notice">{{ message }}</span>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
<el-col :span="2" :offset="3">
|
<el-col :span="2" :offset="3">
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
||||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
v-show="timeCountCommand>0"
|
||||||
|
>({{ timeCountCommand }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="1">
|
<el-col :span="2" :offset="1">
|
||||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
||||||
@ -51,7 +68,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
||||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
v-show="timeCountConfirm>0"
|
||||||
|
>({{ timeCountConfirm }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||||
@ -86,7 +104,7 @@
|
|||||||
timeCountConfirm: -1,
|
timeCountConfirm: -1,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
switchName: ''
|
switchName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
typeList() {
|
typeList() {
|
||||||
@ -94,8 +112,8 @@
|
|||||||
{ code: OperationEvent.Switch.unlock.menu.operation, name: this.$t('menu.menuSwitch.switchUnlock') },
|
{ code: OperationEvent.Switch.unlock.menu.operation, name: this.$t('menu.menuSwitch.switchUnlock') },
|
||||||
{ code: OperationEvent.Switch.unblock.menu.operation, name: this.$t('menu.menuSwitch.switchSectionUnblock') },
|
{ code: OperationEvent.Switch.unblock.menu.operation, name: this.$t('menu.menuSwitch.switchSectionUnblock') },
|
||||||
{ code: OperationEvent.Switch.fault.menu.operation, name: this.$t('menu.menuSwitch.switchMalfunctionUnlock') },
|
{ code: OperationEvent.Switch.fault.menu.operation, name: this.$t('menu.menuSwitch.switchMalfunctionUnlock') },
|
||||||
{ code: OperationEvent.Switch.axlePreReset.menu.operation, name: this.$t('menu.menuSwitch.switchSectionAxisPreReset') },
|
{ code: OperationEvent.Switch.axlePreReset.menu.operation, name: this.$t('menu.menuSwitch.switchSectionAxisPreReset') }
|
||||||
]
|
];
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -116,6 +134,7 @@
|
|||||||
return OperationEvent.Switch.axlePreReset.order.domId;
|
return OperationEvent.Switch.axlePreReset.order.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm1() {
|
domIdConfirm1() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -133,6 +152,7 @@
|
|||||||
return OperationEvent.Switch.axlePreReset.confirm1.domId;
|
return OperationEvent.Switch.axlePreReset.confirm1.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm2() {
|
domIdConfirm2() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -150,6 +170,7 @@
|
|||||||
return OperationEvent.Switch.axlePreReset.confirm2.domId;
|
return OperationEvent.Switch.axlePreReset.confirm2.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdStop() {
|
domIdStop() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -167,11 +188,13 @@
|
|||||||
return OperationEvent.Switch.axlePreReset.stop.domId;
|
return OperationEvent.Switch.axlePreReset.stop.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdClose() {
|
domIdClose() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
return OperationEvent.Command.close.menu.domId;
|
return OperationEvent.Command.close.menu.domId;
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
@ -185,6 +208,7 @@
|
|||||||
return '道岔计轴复位';
|
return '道岔计轴复位';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -193,7 +217,7 @@
|
|||||||
this.stpDisabled = true;
|
this.stpDisabled = true;
|
||||||
val.forEach((elem, index) => {
|
val.forEach((elem, index) => {
|
||||||
// 在确定1之前的操作才可以终止
|
// 在确定1之前的操作才可以终止
|
||||||
if (elem == false && 1 <= index && index <= 2) {
|
if (elem == false && index >= 1 && index <= 2) {
|
||||||
this.stpDisabled = false;
|
this.stpDisabled = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -204,7 +228,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
if (!this.$store.state.menuOperation.break) {
|
if (!this.$store.state.menuOperation.break) {
|
||||||
if (this.timeCountCommand > 0) {
|
if (this.timeCountCommand > 0) {
|
||||||
@ -220,7 +244,7 @@
|
|||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
@ -232,8 +256,8 @@
|
|||||||
this.switchName = '';
|
this.switchName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||||
this.switchName = selected.name
|
this.switchName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -276,19 +300,19 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
commandNoPopUp() {
|
commandNoPopUp() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type
|
type: MapDeviceType.Switch.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
/** 道岔单解*/
|
/** 道岔单解*/
|
||||||
operate.operation = OperationEvent.Switch.unlock.order.operation
|
operate.operation = OperationEvent.Switch.unlock.order.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
/** 道岔解封*/
|
/** 道岔解封*/
|
||||||
operate.operation = OperationEvent.Switch.unblock.order.operation
|
operate.operation = OperationEvent.Switch.unblock.order.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||||
/** 道岔故障解锁*/
|
/** 道岔故障解锁*/
|
||||||
operate.operation = OperationEvent.Switch.fault.order.operation
|
operate.operation = OperationEvent.Switch.fault.order.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||||
/** 道岔计轴复位*/
|
/** 道岔计轴复位*/
|
||||||
operate.operation = OperationEvent.Switch.axlePreReset.order.operation;
|
operate.operation = OperationEvent.Switch.axlePreReset.order.operation;
|
||||||
@ -306,12 +330,12 @@
|
|||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm1() {
|
confirm1() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
/** 道岔单解*/
|
/** 道岔单解*/
|
||||||
@ -321,7 +345,7 @@
|
|||||||
operate.operation = OperationEvent.Switch.unblock.confirm1.operation;
|
operate.operation = OperationEvent.Switch.unblock.confirm1.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||||
/** 道岔故障解锁*/
|
/** 道岔故障解锁*/
|
||||||
operate.operation = OperationEvent.Switch.fault.confirm1.operation
|
operate.operation = OperationEvent.Switch.fault.confirm1.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||||
/** 道岔计轴复位*/
|
/** 道岔计轴复位*/
|
||||||
operate.operation = OperationEvent.Switch.axlePreReset.confirm1.operation;
|
operate.operation = OperationEvent.Switch.axlePreReset.confirm1.operation;
|
||||||
@ -341,13 +365,13 @@
|
|||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm2() {
|
confirm2() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
/** 道岔单解*/
|
/** 道岔单解*/
|
||||||
@ -357,7 +381,7 @@
|
|||||||
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
|
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||||
/** 道岔故障解锁*/
|
/** 道岔故障解锁*/
|
||||||
operate.operation = OperationEvent.Switch.fault.confirm2.operation
|
operate.operation = OperationEvent.Switch.fault.confirm2.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||||
/** 道岔计轴复位*/
|
/** 道岔计轴复位*/
|
||||||
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
|
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
|
||||||
@ -380,12 +404,12 @@
|
|||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
this.setButtonEnable({ step: -1 });
|
this.setButtonEnable({ step: -1 });
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
/** 道岔单解*/
|
/** 道岔单解*/
|
||||||
@ -395,7 +419,7 @@
|
|||||||
operate.operation = OperationEvent.Switch.unblock.stop.operation;
|
operate.operation = OperationEvent.Switch.unblock.stop.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||||
/** 道岔故障解锁*/
|
/** 道岔故障解锁*/
|
||||||
operate.operation = OperationEvent.Switch.fault.stop.operation
|
operate.operation = OperationEvent.Switch.fault.stop.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||||
/** 道岔计轴复位*/
|
/** 道岔计轴复位*/
|
||||||
operate.operation = OperationEvent.Switch.axlePreReset.stop.operation;
|
operate.operation = OperationEvent.Switch.axlePreReset.stop.operation;
|
||||||
@ -410,21 +434,21 @@
|
|||||||
} else {
|
} else {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -450,8 +474,8 @@
|
|||||||
elem[prop] = param[prop];
|
elem[prop] = param[prop];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,19 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm switch-control" :title="title" :visible.sync="show" width="300px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm switch-control"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="300px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.switch') }}</span></el-col>
|
<el-col :span="11" :offset="2"><span>{{ $t('menu.switch') }}</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="2">
|
<el-col :span="11" :offset="2">
|
||||||
<el-input v-model="switchName" size="small" disabled></el-input>
|
<el-input v-model="switchName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 10px;" v-if="activeShow">
|
<el-row v-if="activeShow" style="margin-top: 10px;">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
||||||
{{ $t('menu.activation') }}</el-radio>
|
{{ $t('menu.activation') }}</el-radio>
|
||||||
@ -31,13 +40,13 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchControl',
|
name: 'SwitchControl',
|
||||||
@ -52,8 +61,8 @@
|
|||||||
stationName: '',
|
stationName: '',
|
||||||
switchName: '',
|
switchName: '',
|
||||||
radio: 1,
|
radio: 1,
|
||||||
activeShow: false,
|
activeShow: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -83,12 +92,13 @@
|
|||||||
this.radio = '1';
|
this.radio = '1';
|
||||||
return this.$t('menu.menuSwitch.sectionActive');
|
return this.$t('menu.menuSwitch.sectionActive');
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
@ -96,8 +106,8 @@
|
|||||||
this.switchName = '';
|
this.switchName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||||
this.switchName = selected.name
|
this.switchName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -137,11 +147,11 @@
|
|||||||
},
|
},
|
||||||
// 道岔单锁
|
// 道岔单锁
|
||||||
lock() {
|
lock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
operation: OperationEvent.Switch.lock.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -149,7 +159,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -157,11 +167,11 @@
|
|||||||
},
|
},
|
||||||
// 道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
block() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Switch.block.menu.operation,
|
operation: OperationEvent.Switch.block.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -169,7 +179,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -177,11 +187,11 @@
|
|||||||
},
|
},
|
||||||
// 道岔转动
|
// 道岔转动
|
||||||
turnout(operation) {
|
turnout(operation) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
operation: OperationEvent.Switch.turnout.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -189,7 +199,7 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -197,18 +207,18 @@
|
|||||||
},
|
},
|
||||||
// 道岔强扮
|
// 道岔强扮
|
||||||
turnoutForce() {
|
turnoutForce() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
||||||
}
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -216,18 +226,18 @@
|
|||||||
},
|
},
|
||||||
// 区段切除
|
// 区段切除
|
||||||
split() {
|
split() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Switch.split.menu.operation,
|
operation: OperationEvent.Switch.split.menu.operation
|
||||||
}
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -235,37 +245,37 @@
|
|||||||
},
|
},
|
||||||
// 区段激活
|
// 区段激活
|
||||||
active() {
|
active() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Switch.active.menu.operation,
|
operation: OperationEvent.Switch.active.menu.operation
|
||||||
}
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,13 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm route-create" :title="title" :visible.sync="show" width="580px"
|
<el-dialog
|
||||||
label-position="top" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
v-dialogDrag
|
||||||
v-dialogDrag>
|
class="fuzhou-01__systerm route-create"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="580px"
|
||||||
|
label-position="top"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<el-form size="small" label-width="100px">
|
<el-form size="small" label-width="100px">
|
||||||
<el-form-item :label="this.$t('menu.train')+this.$t('global.colon')" prop="trainCode">
|
<el-form-item :label="this.$t('menu.train')+this.$t('global.colon')" prop="trainCode">
|
||||||
<el-select v-model="trainCode" filterable :placeholder="this.$t('menu.train')">
|
<el-select v-model="trainCode" filterable :placeholder="this.$t('menu.train')">
|
||||||
<el-option v-for="item in trainList" :key="item.code" :label="item.groupNumber"
|
<el-option
|
||||||
:value="item.code"></el-option>
|
v-for="item in trainList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.groupNumber"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="列车车次:" prop="tripNumber">
|
<!-- <el-form-item label="列车车次:" prop="tripNumber">
|
||||||
@ -18,8 +31,7 @@
|
|||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item :label="this.$t('menu.trainDirection')+this.$t('global.colon')" prop="direction">
|
<el-form-item :label="this.$t('menu.trainDirection')+this.$t('global.colon')" prop="direction">
|
||||||
<el-select v-model="direction" filterable :placeholder="this.$t('menu.trainDirection')">
|
<el-select v-model="direction" filterable :placeholder="this.$t('menu.trainDirection')">
|
||||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value">
|
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -31,7 +43,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -39,7 +51,7 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import { getPublishTrainList } from '@/api/jmap/map';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteCreate',
|
name: 'RouteCreate',
|
||||||
@ -66,7 +78,7 @@
|
|||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
direction: '',
|
direction: '',
|
||||||
selected: null
|
selected: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -88,16 +100,16 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (Object.keys(map || {}).length) {
|
if (Object.keys(map || {}).length) {
|
||||||
getPublishTrainList(map.skinCode).then(response => {
|
getPublishTrainList(map.skinCode).then(response => {
|
||||||
this.trainList = response.data;
|
this.trainList = response.data;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('error.getTrainListFailed'));
|
this.$messageBox(this.$t('error.getTrainListFailed'));
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
@ -119,38 +131,38 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||||
val: '' + this.direction + '::' + this.trainCode
|
val: '' + this.direction + '::' + this.trainCode
|
||||||
}
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,9 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-form size="small" label-width="120px" :model="addModel" :rules="rules" ref="form">
|
class="fuzhou-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="120px" :model="addModel" :rules="rules">
|
||||||
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" label-width="120px" prop="tripNumber">
|
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" label-width="120px" prop="tripNumber">
|
||||||
<el-input v-model="addModel.tripNumber"></el-input>
|
<el-input v-model="addModel.tripNumber" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -29,17 +38,17 @@
|
|||||||
return {
|
return {
|
||||||
trainNoList: [],
|
trainNoList: [],
|
||||||
addModel: {
|
addModel: {
|
||||||
tripNumber: '',
|
tripNumber: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
tripNumber: [
|
tripNumber: [
|
||||||
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
|
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -55,20 +64,16 @@
|
|||||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.menuTrain.editTrainNo')
|
return this.$t('menu.menuTrain.editTrainNo');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
@ -83,11 +88,11 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.editTrainNo.menu.operation,
|
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -95,29 +100,29 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.fuzhou-01__systerm .el-dialog .base-label {
|
.fuzhou-01__systerm .el-dialog .base-label {
|
||||||
|
@ -1,44 +1,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="640px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
|
class="fuzhou-01__systerm stand-stop-time"
|
||||||
|
: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%;">
|
<div style="width: 46%;">
|
||||||
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" label-width="95px" prop="tripNumber">
|
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" label-width="95px" prop="tripNumber">
|
||||||
<el-input v-model="addModel.tripNumber" disabled></el-input>
|
<el-input v-model="addModel.tripNumber" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div style="overflow: hidden;">
|
<div style="overflow: hidden;">
|
||||||
<div
|
<div
|
||||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;">
|
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;"
|
||||||
|
>
|
||||||
<span class="base-label">{{ $t('menu.sourceTrainWindow') }}</span>
|
<span class="base-label">{{ $t('menu.sourceTrainWindow') }}</span>
|
||||||
<div style="position: relative; top:-10px;">
|
<div style="position: relative; top:-10px;">
|
||||||
<el-form-item prop="stationStandSource">
|
<el-form-item prop="stationStandSource">
|
||||||
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
||||||
<el-select v-model="addModel.stationStandSource" filterable :placeholder="this.$t('global.choose')">
|
<el-select v-model="addModel.stationStandSource" filterable :placeholder="this.$t('global.choose')">
|
||||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
<el-option
|
||||||
:value="item.code">
|
v-for="item in stationStandList"
|
||||||
</el-option>
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainSource">
|
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainSource">
|
||||||
<el-input v-model="addModel.trainSource"></el-input>
|
<el-input v-model="addModel.trainSource" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;"
|
||||||
|
>
|
||||||
<span class="base-label">{{ $t('menu.targetTrainWindow') }}</span>
|
<span class="base-label">{{ $t('menu.targetTrainWindow') }}</span>
|
||||||
<div style="position: relative; top:-10px;">
|
<div style="position: relative; top:-10px;">
|
||||||
<el-form-item prop="stationStandGoal">
|
<el-form-item prop="stationStandGoal">
|
||||||
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
||||||
<el-select v-model="addModel.stationStandGoal" filterable :placeholder="this.$t('global.choose')">
|
<el-select v-model="addModel.stationStandGoal" filterable :placeholder="this.$t('global.choose')">
|
||||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
<el-option
|
||||||
:value="item.code">
|
v-for="item in stationStandList"
|
||||||
</el-option>
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainGoal">
|
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainGoal">
|
||||||
<el-input v-model="addModel.trainGoal"></el-input>
|
<el-input v-model="addModel.trainGoal" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -71,7 +88,7 @@
|
|||||||
trainSource: '',
|
trainSource: '',
|
||||||
stationStandSource: '',
|
stationStandSource: '',
|
||||||
trainGoal: '',
|
trainGoal: '',
|
||||||
stationStandGoal: '',
|
stationStandGoal: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
@ -89,11 +106,11 @@
|
|||||||
],
|
],
|
||||||
stationStandGoal: [
|
stationStandGoal: [
|
||||||
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -115,14 +132,10 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
@ -137,11 +150,11 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -149,30 +162,30 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.fuzhou-01__systerm .el-dialog .base-label {
|
.fuzhou-01__systerm .el-dialog .base-label {
|
||||||
|
@ -1,45 +1,62 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="640px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
|
class="fuzhou-01__systerm stand-stop-time"
|
||||||
|
: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="overflow: hidden;">
|
<div style="overflow: hidden;">
|
||||||
<div
|
<div
|
||||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px; margin-right: 4%;">
|
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px; margin-right: 4%;"
|
||||||
|
>
|
||||||
<span class="base-label">{{ $t('menu.sourceTrainWindow') }}</span>
|
<span class="base-label">{{ $t('menu.sourceTrainWindow') }}</span>
|
||||||
<div style="position: relative; top:-10px;">
|
<div style="position: relative; top:-10px;">
|
||||||
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="trainNumberSource">
|
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="trainNumberSource">
|
||||||
<el-input v-model="addModel.trainNumberSource"></el-input>
|
<el-input v-model="addModel.trainNumberSource" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="stationStandSource">
|
<el-form-item prop="stationStandSource">
|
||||||
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
||||||
<el-select v-model="addModel.stationStandSource" filterable :placeholder="this.$t('global.choose')">
|
<el-select v-model="addModel.stationStandSource" filterable :placeholder="this.$t('global.choose')">
|
||||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
<el-option
|
||||||
:value="item.code">
|
v-for="item in stationStandList"
|
||||||
</el-option>
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainSource">
|
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainSource">
|
||||||
<el-input v-model="addModel.trainSource"></el-input>
|
<el-input v-model="addModel.trainSource" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px;">
|
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px;"
|
||||||
|
>
|
||||||
<span class="base-label">{{ $t('menu.targetTrainWindow') }}</span>
|
<span class="base-label">{{ $t('menu.targetTrainWindow') }}</span>
|
||||||
<div style="position: relative; top:-10px;">
|
<div style="position: relative; top:-10px;">
|
||||||
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="trainNumberGoal">
|
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="trainNumberGoal">
|
||||||
<el-input v-model="addModel.trainNumberGoal"></el-input>
|
<el-input v-model="addModel.trainNumberGoal" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="stationStandGoal">
|
<el-form-item prop="stationStandGoal">
|
||||||
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
||||||
<el-select v-model="addModel.stationStandGoal" filterable :placeholder="this.$t('global.choose')">
|
<el-select v-model="addModel.stationStandGoal" filterable :placeholder="this.$t('global.choose')">
|
||||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
<el-option
|
||||||
:value="item.code">
|
v-for="item in stationStandList"
|
||||||
</el-option>
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainGoal">
|
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainGoal">
|
||||||
<el-input v-model="addModel.trainGoal"></el-input>
|
<el-input v-model="addModel.trainGoal" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -73,7 +90,7 @@
|
|||||||
stationStandSource: '',
|
stationStandSource: '',
|
||||||
trainGoal: '',
|
trainGoal: '',
|
||||||
stationStandGoal: '',
|
stationStandGoal: '',
|
||||||
trainNumberGoal: '',
|
trainNumberGoal: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
@ -94,11 +111,11 @@
|
|||||||
],
|
],
|
||||||
stationStandGoal: [
|
stationStandGoal: [
|
||||||
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -120,14 +137,10 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
@ -142,11 +155,11 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -154,30 +167,30 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.fuzhou-01__systerm .el-dialog .base-label {
|
.fuzhou-01__systerm .el-dialog .base-label {
|
||||||
|
@ -1,10 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm two-confirmation" :title="$t('menu.menuChildDialog.secondaryConfirmation')" :visible.sync="show" width="360px"
|
<el-dialog
|
||||||
:before-close="doClose" :showClose="false" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
v-dialogDrag
|
||||||
append-to-body v-dialogDrag>
|
class="fuzhou-01__systerm two-confirmation"
|
||||||
|
:title="$t('menu.menuChildDialog.secondaryConfirmation')"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="360px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:show-close="false"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<div class="context">
|
<div class="context">
|
||||||
<template v-for="message in messages">
|
<template v-for="(message,index) in messages">
|
||||||
<span>{{message}}</span><br/>
|
<span :key="index">{{ message }}</span><br>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
@ -15,16 +25,19 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.close') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.close') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo'
|
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TwoConfirmation',
|
name: 'TwoConfirmation',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -32,10 +45,7 @@
|
|||||||
operate: '',
|
operate: '',
|
||||||
timer: null,
|
timer: null,
|
||||||
domIdConfirm: ''
|
domIdConfirm: ''
|
||||||
}
|
};
|
||||||
},
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -48,13 +58,13 @@
|
|||||||
if (this.operate) {
|
if (this.operate) {
|
||||||
return this.operate.messages;
|
return this.operate.messages;
|
||||||
}
|
}
|
||||||
return []
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -78,10 +88,10 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
operation: OperationEvent.Command.close.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -89,22 +99,22 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
forEachDoHandler(selection, handler) {
|
forEachDoHandler(selection, handler) {
|
||||||
selection.forEach(elem => {
|
selection.forEach(elem => {
|
||||||
handler(elem)
|
handler(elem);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operate) {
|
if (this.operate) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.forEachDoHandler(this.operate.selection || [], elem => {
|
this.forEachDoHandler(this.operate.selection || [], elem => {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
val: elem.code
|
val: elem.code
|
||||||
}
|
};
|
||||||
|
|
||||||
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
||||||
@ -114,20 +124,19 @@
|
|||||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,19 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm user-add" :title="title" :visible.sync="show" width="420px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm user-add"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="420px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
<el-form ref="form" size="small" label-width="90px" :model="model" label-position="left" :rules="rules">
|
||||||
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
|
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
|
||||||
<el-input v-model="model.jobNumber"></el-input>
|
<el-input v-model="model.jobNumber" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
|
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
|
||||||
<el-input v-model="model.userName"></el-input>
|
<el-input v-model="model.userName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
|
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
|
||||||
<el-input type="password" v-model="model.password"></el-input>
|
<el-input v-model="model.password" type="password" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
|
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
|
||||||
<el-input type="password" v-model="model.confirm"></el-input>
|
<el-input v-model="model.confirm" type="password" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -31,7 +41,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserAdd',
|
name: 'UserAdd',
|
||||||
@ -48,7 +58,7 @@
|
|||||||
jobNumber: '',
|
jobNumber: '',
|
||||||
userName: '',
|
userName: '',
|
||||||
password: '',
|
password: '',
|
||||||
confirm: '',
|
confirm: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
jobNumber: [
|
jobNumber: [
|
||||||
@ -62,9 +72,9 @@
|
|||||||
],
|
],
|
||||||
confirm: [
|
confirm: [
|
||||||
{ required: true, message: this.$t('menu.menuChildDialog.inputPasswordAgain'), trigger: 'change' }
|
{ required: true, message: this.$t('menu.menuChildDialog.inputPasswordAgain'), trigger: 'change' }
|
||||||
],
|
]
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -80,13 +90,13 @@
|
|||||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.menuChildDialog.addUser')
|
return this.$t('menu.menuChildDialog.addUser');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -113,10 +123,10 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
operation: OperationEvent.Command.close.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -129,26 +139,26 @@
|
|||||||
this.$messageBox(this.$t('menu.menuChildDialog.passwordInconsistent'));
|
this.$messageBox(this.$t('menu.menuChildDialog.passwordInconsistent'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); this.model });
|
}).catch(() => { this.doClose(); this.model; });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.fuzhou-01__systerm .el-dialog .base-label {
|
.fuzhou-01__systerm .el-dialog .base-label {
|
||||||
|
@ -1,10 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm user-delete" :title="title" :visible.sync="show" width="260px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm user-delete"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="260px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<div style="padding-left: 10px; padding-bottom: 10px">
|
<div style="padding-left: 10px; padding-bottom: 10px">
|
||||||
<i class="el-icon-info"></i>
|
<i class="el-icon-info" />
|
||||||
<template v-for="message in messages">
|
<template v-for="(message,index) in messages">
|
||||||
<span>{{message}}</span>
|
<span :key="index">{{ message }}</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -19,7 +29,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserDelete',
|
name: 'UserDelete',
|
||||||
@ -32,12 +42,12 @@
|
|||||||
model: {
|
model: {
|
||||||
type: 'DELETE',
|
type: 'DELETE',
|
||||||
jobNumber: '',
|
jobNumber: '',
|
||||||
userName: '',
|
userName: ''
|
||||||
},
|
},
|
||||||
operation: null,
|
operation: null,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -59,7 +69,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
@ -89,10 +99,10 @@
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.model.userName && this.model.jobNumber) {
|
if (this.model.userName && this.model.jobNumber) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
operation: OperationEvent.Command.close.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -101,25 +111,25 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
this.$emit('operateUser', this.model);
|
this.$emit('operateUser', this.model);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(this.$t('menu.menuChildDialog.selectTips'));
|
this.$messageBox(this.$t('menu.menuChildDialog.selectTips'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.fuzhou-01__systerm .el-dialog .base-label {
|
.fuzhou-01__systerm .el-dialog .base-label {
|
||||||
|
@ -1,22 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm user-edit" :title="title" :visible.sync="show" width="420px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm user-edit"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="420px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
<el-form ref="form" size="small" label-width="90px" :model="model" label-position="left" :rules="rules">
|
||||||
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
|
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
|
||||||
<el-input v-model="model.jobNumber" disabled></el-input>
|
<el-input v-model="model.jobNumber" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
|
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
|
||||||
<el-input v-model="model.userName" disabled></el-input>
|
<el-input v-model="model.userName" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('menu.menuChildDialog.originalPassword')" prop="oldPassword">
|
<el-form-item :label="$t('menu.menuChildDialog.originalPassword')" prop="oldPassword">
|
||||||
<el-input type="oldPassword" v-model="model.oldPassword"></el-input>
|
<el-input v-model="model.oldPassword" type="oldPassword" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
|
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
|
||||||
<el-input type="password" v-model="model.password"></el-input>
|
<el-input v-model="model.password" type="password" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
|
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
|
||||||
<el-input type="password" v-model="model.confirm"></el-input>
|
<el-input v-model="model.confirm" type="password" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -34,7 +44,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserEdit',
|
name: 'UserEdit',
|
||||||
@ -53,7 +63,7 @@
|
|||||||
userName: '',
|
userName: '',
|
||||||
oldPassword: '',
|
oldPassword: '',
|
||||||
password: '',
|
password: '',
|
||||||
confirm: '',
|
confirm: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
jobNumber: [
|
jobNumber: [
|
||||||
@ -70,9 +80,9 @@
|
|||||||
],
|
],
|
||||||
confirm: [
|
confirm: [
|
||||||
{ required: true, message: this.$t('menu.menuChildDialog.inputNewAgain'), trigger: 'change' }
|
{ required: true, message: this.$t('menu.menuChildDialog.inputNewAgain'), trigger: 'change' }
|
||||||
],
|
]
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -88,13 +98,13 @@
|
|||||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.menuChildDialog.userEditPage')
|
return this.$t('menu.menuChildDialog.userEditPage');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
@ -126,15 +136,15 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
operation: OperationEvent.Command.close.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid)
|
if (valid) {
|
||||||
if (this.selected.password !== this.model.oldPassword) {
|
if (this.selected.password !== this.model.oldPassword) {
|
||||||
this.$messageBox(this.$t('menu.menuChildDialog.originalPasswordError'));
|
this.$messageBox(this.$t('menu.menuChildDialog.originalPasswordError'));
|
||||||
} else if (this.model.password !== this.model.confirm) {
|
} else if (this.model.password !== this.model.confirm) {
|
||||||
@ -145,26 +155,27 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
this.$emit('operateUser', this.model);
|
this.$emit('operateUser', this.model);
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.fuzhou-01__systerm .el-dialog .base-label {
|
.fuzhou-01__systerm .el-dialog .base-label {
|
||||||
|
@ -1,14 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm manage-user" :title="title" :visible.sync="show" width="600px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm manage-user"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="600px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="height: 70px;">
|
<div style="height: 70px;">
|
||||||
<div style="position: relative; left: 10px;">
|
<div style="position: relative; left: 10px;" />
|
||||||
</div>
|
|
||||||
<div style="position: relative; left: 80px;">
|
<div style="position: relative; left: 80px;">
|
||||||
<div style="width:100%">
|
<div style="width:100%">
|
||||||
<span style="padding-left: 60px">{{ $t('menu.menuDialog.versionName') }}</span>
|
<span style="padding-left: 60px">{{ $t('menu.menuDialog.versionName') }}</span>
|
||||||
<el-button style="position: absolute; right: 95px;" :id="domIdConfirm" type="primary"
|
<el-button
|
||||||
:loading="loading" @click="commit">{{$t('menu.menuDialog.confirm')}}</el-button>
|
:id="domIdConfirm"
|
||||||
|
style="position: absolute; right: 95px;"
|
||||||
|
type="primary"
|
||||||
|
:loading="loading"
|
||||||
|
@click="commit"
|
||||||
|
>{{ $t('menu.menuDialog.confirm') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:100%; padding-top: 20px">
|
<div style="width:100%; padding-top: 20px">
|
||||||
<span> {{ $t('menu.menuDialog.copyright') }}</span>
|
<span> {{ $t('menu.menuDialog.copyright') }}</span>
|
||||||
@ -17,18 +30,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="padding: 10px; margin: 5px; ">
|
<div style="padding: 10px; margin: 5px; ">
|
||||||
<el-table :data="tableData" style="width: 100%;" height="400">
|
<el-table :data="tableData" style="width: 100%;" height="400">
|
||||||
<el-table-column prop="moduleName" :label="$t('menu.menuDialog.moduleName')" width="180">
|
<el-table-column prop="moduleName" :label="$t('menu.menuDialog.moduleName')" width="180" />
|
||||||
</el-table-column>
|
<el-table-column prop="version" :label="$t('menu.menuDialog.version')" width="180" />
|
||||||
<el-table-column prop="version" :label="$t('menu.menuDialog.version')" width="180">
|
<el-table-column prop="updateDate" :label="$t('menu.menuDialog.modifyDate')" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="updateDate" :label="$t('menu.menuDialog.modifyDate')">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ManageUser',
|
name: 'ManageUser',
|
||||||
@ -45,8 +55,8 @@
|
|||||||
operation: null,
|
operation: null,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
selected: null,
|
selected: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -59,13 +69,13 @@
|
|||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.menuDialog.about')
|
return this.$t('menu.menuDialog.about');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -87,10 +97,10 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -98,25 +108,25 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.fuzhou-01__systerm .el-dialog .base-label {
|
.fuzhou-01__systerm .el-dialog .base-label {
|
||||||
|
@ -1,12 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm manage-user" :title="title" :visible.sync="show" width="420px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm manage-user"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="420px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
|
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
|
||||||
<span class="base-label">{{ $t('menu.menuDialog.userList') }}</span>
|
<span class="base-label">{{ $t('menu.menuDialog.userList') }}</span>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%"
|
<el-table
|
||||||
height="450" center size="mini" highlight-current-row @row-click="chooseUser">
|
ref="multipleTable"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
row-key="code"
|
||||||
|
style="width: 100%"
|
||||||
|
height="450"
|
||||||
|
center
|
||||||
|
size="mini"
|
||||||
|
highlight-current-row
|
||||||
|
@row-click="chooseUser"
|
||||||
|
>
|
||||||
<el-table-column prop="jobNumber" :label="$t('menu.menuDialog.jobNumber')" width="120">
|
<el-table-column prop="jobNumber" :label="$t('menu.menuDialog.jobNumber')" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.jobNumber }}</span>
|
<span>{{ scope.row.jobNumber }}</span>
|
||||||
@ -17,18 +36,17 @@
|
|||||||
<span>{{ scope.row.userName }}</span>
|
<span>{{ scope.row.userName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="20">
|
<el-table-column width="20" />
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-button style="margin-top: 140px; margin-left: 10px;" :id="domIdFreshUser" @click="freshUser">{{$t('menu.menuDialog.refresh')}}
|
<el-button :id="domIdFreshUser" style="margin-top: 140px; margin-left: 10px;" @click="freshUser">{{ $t('menu.menuDialog.refresh') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdAddUser" @click="addUser">{{$t('menu.menuDialog.add')}}
|
<el-button :id="domIdAddUser" style="margin-top: 30px; margin-left: 10px;" @click="addUser">{{ $t('menu.menuDialog.add') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdEditUser" @click="editUser">{{$t('menu.menuDialog.modify')}}
|
<el-button :id="domIdEditUser" style="margin-top: 30px; margin-left: 10px;" @click="editUser">{{ $t('menu.menuDialog.modify') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdDelUser" @click="delUser">{{$t('menu.menuDialog.delete')}}
|
<el-button :id="domIdDelUser" style="margin-top: 30px; margin-left: 10px;" @click="delUser">{{ $t('menu.menuDialog.delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -41,9 +59,9 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<user-add ref="userAdd" @operateUser="operateUser"></user-add>
|
<user-add ref="userAdd" @operateUser="operateUser" />
|
||||||
<user-edit ref="userEdit" @operateUser="operateUser"></user-edit>
|
<user-edit ref="userEdit" @operateUser="operateUser" />
|
||||||
<user-delete ref="userDelete" @operateUser="operateUser"></user-delete>
|
<user-delete ref="userDelete" @operateUser="operateUser" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -52,7 +70,7 @@
|
|||||||
import UserAdd from './childDialog/userAdd';
|
import UserAdd from './childDialog/userAdd';
|
||||||
import UserEdit from './childDialog/userEdit';
|
import UserEdit from './childDialog/userEdit';
|
||||||
import UserDelete from './childDialog/userDelete';
|
import UserDelete from './childDialog/userDelete';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ManageUser',
|
name: 'ManageUser',
|
||||||
@ -68,8 +86,8 @@
|
|||||||
operation: null,
|
operation: null,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
selected: null,
|
selected: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -100,13 +118,13 @@
|
|||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.menuDialog.userManage')
|
return this.$t('menu.menuDialog.userManage');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -129,10 +147,10 @@
|
|||||||
},
|
},
|
||||||
// 添加用户
|
// 添加用户
|
||||||
addUser() {
|
addUser() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.manage.addUser.operation,
|
operation: OperationEvent.Command.manage.addUser.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -140,17 +158,17 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.userAdd.doShow(operate);
|
this.$refs.userAdd.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 编辑用户
|
// 编辑用户
|
||||||
editUser() {
|
editUser() {
|
||||||
if (this.selected) {
|
if (this.selected) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.manage.editUser.operation,
|
operation: OperationEvent.Command.manage.editUser.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -158,9 +176,9 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.userEdit.doShow(operate, this.selected);
|
this.$refs.userEdit.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
|
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
|
||||||
}
|
}
|
||||||
@ -168,11 +186,11 @@
|
|||||||
// 删除用户
|
// 删除用户
|
||||||
delUser() {
|
delUser() {
|
||||||
if (this.selected) {
|
if (this.selected) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.manage.delUser.operation,
|
operation: OperationEvent.Command.manage.delUser.operation,
|
||||||
messages: [`${this.$t('menu.menuDialog.deleteMessageOne')} ${this.selected.userName} ${this.$t('menu.menuDialog.deleteMessageTwo')}`]
|
messages: [`${this.$t('menu.menuDialog.deleteMessageOne')} ${this.selected.userName} ${this.$t('menu.menuDialog.deleteMessageTwo')}`]
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -180,47 +198,47 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.userDelete.doShow(operate, this.selected);
|
this.$refs.userDelete.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
|
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 刷新用户
|
// 刷新用户
|
||||||
freshUser() {
|
freshUser() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.manage.freshUser.operation,
|
operation: OperationEvent.Command.manage.freshUser.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 选择用户
|
// 选择用户
|
||||||
chooseUser(row) {
|
chooseUser(row) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.manage.chooseUser.operation,
|
operation: OperationEvent.Command.manage.chooseUser.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.selected = row;
|
this.selected = row;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -228,27 +246,27 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
},
|
},
|
||||||
// 增删改函数处理
|
// 增删改函数处理
|
||||||
operateUser(data) {
|
operateUser(data) {
|
||||||
if (data && data.type === 'ADD') {
|
if (data && data.type === 'ADD') {
|
||||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
this.tableData.push({
|
this.tableData.push({
|
||||||
jobNumber: data.jobNumber,
|
jobNumber: data.jobNumber,
|
||||||
@ -259,7 +277,7 @@
|
|||||||
this.$messageBox(this.$t('menu.menuDialog.addFail'));
|
this.$messageBox(this.$t('menu.menuDialog.addFail'));
|
||||||
}
|
}
|
||||||
} else if (data && data.type === 'EDIT') {
|
} else if (data && data.type === 'EDIT') {
|
||||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
this.tableData[index].password = data.password;
|
this.tableData[index].password = data.password;
|
||||||
this.tableData[index].userName = data.userName;
|
this.tableData[index].userName = data.userName;
|
||||||
@ -267,7 +285,7 @@
|
|||||||
this.$messageBox(this.$t('menu.menuDialog.modifyFail'));
|
this.$messageBox(this.$t('menu.menuDialog.modifyFail'));
|
||||||
}
|
}
|
||||||
} else if (data && data.type === 'DELETE') {
|
} else if (data && data.type === 'DELETE') {
|
||||||
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
|
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
this.tableData.splice(index, 1);
|
this.tableData.splice(index, 1);
|
||||||
} else {
|
} else {
|
||||||
@ -276,7 +294,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.fuzhou-01__systerm .el-dialog .base-label {
|
.fuzhou-01__systerm .el-dialog .base-label {
|
||||||
|
@ -1,36 +1,45 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm password-box" :title="$t('menu.menuDialog.passwordBox')" :visible.sync="show" width="320px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm password-box"
|
||||||
|
:title="$t('menu.menuDialog.passwordBox')"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="320px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div class="context" style="overflow:hidden">
|
<div class="context" style="overflow:hidden">
|
||||||
<el-form label-width="80px" size="mini">
|
<el-form label-width="80px" size="mini">
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<span slot="label">{{ $t('menu.menuDialog.userNameLabel') }}</span>
|
<span slot="label">{{ $t('menu.menuDialog.userNameLabel') }}</span>
|
||||||
<el-input v-model="model.username" disabled></el-input>
|
<el-input v-model="model.username" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<span slot="label">{{ $t('menu.menuDialog.password') }}</span>
|
<span slot="label">{{ $t('menu.menuDialog.password') }}</span>
|
||||||
<el-input type="password" v-model="model.password"></el-input>
|
<el-input v-model="model.password" type="password" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="operate">
|
<div class="operate">
|
||||||
<el-button-group class="left" v-model="key" size="mini">
|
<el-button-group v-model="key" class="left" size="mini">
|
||||||
<el-button size="mini" @click="click(1)">1</el-button>
|
<el-button size="mini" @click="click(1)">1</el-button>
|
||||||
<el-button size="mini" @click="click(2)">2</el-button>
|
<el-button size="mini" @click="click(2)">2</el-button>
|
||||||
<el-button size="mini" @click="click(3)">3</el-button>
|
<el-button size="mini" @click="click(3)">3</el-button>
|
||||||
<el-button size="mini" @click="click(4)">4</el-button>
|
<el-button size="mini" @click="click(4)">4</el-button>
|
||||||
<el-button size="mini" @click="click(5)">5</el-button>
|
<el-button size="mini" @click="click(5)">5</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
<el-button-group class="right" v-model="key" size="mini">
|
<el-button-group v-model="key" class="right" size="mini">
|
||||||
<el-button @click="esc">{{ $t('menu.menuDialog.back') }}</el-button>
|
<el-button @click="esc">{{ $t('menu.menuDialog.back') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
<el-button-group class="left" v-model="key" size="mini">
|
<el-button-group v-model="key" class="left" size="mini">
|
||||||
<el-button size="mini" @click="click(6)">6</el-button>
|
<el-button size="mini" @click="click(6)">6</el-button>
|
||||||
<el-button size="mini" @click="click(7)">7</el-button>
|
<el-button size="mini" @click="click(7)">7</el-button>
|
||||||
<el-button size="mini" @click="click(8)">8</el-button>
|
<el-button size="mini" @click="click(8)">8</el-button>
|
||||||
<el-button size="mini" @click="click(9)">9</el-button>
|
<el-button size="mini" @click="click(9)">9</el-button>
|
||||||
<el-button size="mini" @click="click(0)">0</el-button>
|
<el-button size="mini" @click="click(0)">0</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
<el-button-group class="right" v-model="key" size="mini">
|
<el-button-group v-model="key" class="right" size="mini">
|
||||||
<el-button @click="clr">{{ $t('menu.menuDialog.clear') }}</el-button>
|
<el-button @click="clr">{{ $t('menu.menuDialog.clear') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
@ -43,16 +52,19 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PasswordBox',
|
name: 'PasswordBox',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -61,13 +73,10 @@
|
|||||||
operation: null,
|
operation: null,
|
||||||
model: {
|
model: {
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
password: ''
|
||||||
},
|
},
|
||||||
key: ''
|
key: ''
|
||||||
}
|
};
|
||||||
},
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -83,12 +92,13 @@
|
|||||||
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
|
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(operate) {
|
loadInitData(operate) {
|
||||||
@ -113,25 +123,25 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.password.operation,
|
operation: OperationEvent.Command.close.password.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type
|
||||||
}
|
};
|
||||||
|
|
||||||
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||||
/** 强制站控*/
|
/** 强制站控*/
|
||||||
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation
|
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.model.password == '123456') {
|
if (this.model.password == '123456') {
|
||||||
@ -153,7 +163,7 @@
|
|||||||
operation: operate.operation,
|
operation: operate.operation,
|
||||||
success: false
|
success: false
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate, [this.$t('menu.menuDialog.IncorrectPassword')]);
|
this.$refs.noticeInfo.doShow(operate, [this.$t('menu.menuDialog.IncorrectPassword')]);
|
||||||
|
|
||||||
@ -175,14 +185,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.password-box .el-form {
|
.password-box .el-form {
|
||||||
margin-top: 10px !important;
|
margin-top: 10px !important;
|
||||||
margin-right: 20px !important;
|
margin-right: 20px !important;
|
||||||
|
@ -1,26 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
class="fuzhou-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;">
|
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||||
<span class="base-label">{{ $t('menu.menuDialog.addLocation') }}</span>
|
<span class="base-label">{{ $t('menu.menuDialog.addLocation') }}</span>
|
||||||
<div style="position: relative; top:-10px;">
|
<div style="position: relative; top:-10px;">
|
||||||
<el-form-item prop="stationStandCode">
|
<el-form-item prop="stationStandCode">
|
||||||
<span slot="label">{{ $t('menu.menuDialog.terminalOne') }}</span>
|
<span slot="label">{{ $t('menu.menuDialog.terminalOne') }}</span>
|
||||||
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
|
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
|
||||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
<el-option
|
||||||
:value="item.code">
|
v-for="item in stationStandList"
|
||||||
</el-option>
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="trainNumberLimber">
|
<el-form-item prop="trainNumberLimber">
|
||||||
<span slot="label" id="frontTrainNumber">{{$t('menu.menuDialog.frontTrainNumber')}}</span>
|
<span id="frontTrainNumber" slot="label">{{ $t('menu.menuDialog.frontTrainNumber') }}</span>
|
||||||
<el-input v-model="addModel.trainNumberLimber"></el-input>
|
<el-input v-model="addModel.trainNumberLimber" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item :label="$t('menu.menuDialog.addTrainNumber')" label-width="115px" prop="groupNumber" id="groupNumber">
|
<el-form-item id="groupNumber" :label="$t('menu.menuDialog.addTrainNumber')" label-width="115px" prop="groupNumber">
|
||||||
<el-input v-model="addModel.groupNumber"></el-input>
|
<el-input v-model="addModel.groupNumber" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -48,7 +60,7 @@
|
|||||||
addModel: {
|
addModel: {
|
||||||
groupNumber: '',
|
groupNumber: '',
|
||||||
stationStandCode: '',
|
stationStandCode: '',
|
||||||
trainNumberLimber: '',
|
trainNumberLimber: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
@ -60,12 +72,12 @@
|
|||||||
// ],
|
// ],
|
||||||
stationStandCode: [
|
stationStandCode: [
|
||||||
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
|
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
operation: null,
|
operation: null,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -81,13 +93,13 @@
|
|||||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.menuDialog.addPlanTrain')
|
return this.$t('menu.menuDialog.addPlanTrain');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -112,11 +124,11 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation,
|
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -126,30 +138,30 @@
|
|||||||
} else {
|
} else {
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.fuzhou-01__systerm .el-dialog .base-label {
|
.fuzhou-01__systerm .el-dialog .base-label {
|
||||||
|
@ -1,16 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
class="fuzhou-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">
|
<el-form-item prop="stationStandCode">
|
||||||
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
|
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
|
||||||
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
|
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
|
||||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
|
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('menu.menuDialog.trainNumber')" prop="groupNumber">
|
<el-form-item :label="$t('menu.menuDialog.trainNumber')" prop="groupNumber">
|
||||||
<el-input v-model="addModel.groupNumber"></el-input>
|
<el-input v-model="addModel.groupNumber" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -37,7 +45,7 @@
|
|||||||
trainNoList: [],
|
trainNoList: [],
|
||||||
addModel: {
|
addModel: {
|
||||||
groupNumber: '',
|
groupNumber: '',
|
||||||
stationStandCode: '',
|
stationStandCode: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
@ -46,12 +54,12 @@
|
|||||||
],
|
],
|
||||||
stationStandCode: [
|
stationStandCode: [
|
||||||
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
|
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
operation: null,
|
operation: null,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -67,13 +75,13 @@
|
|||||||
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
|
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.menuDialog.deletePlanTrain')
|
return this.$t('menu.menuDialog.deletePlanTrain');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -98,11 +106,11 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.planTrain.delPlanTrain.operation,
|
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -112,30 +120,30 @@
|
|||||||
} else {
|
} else {
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.fuzhou-01__systerm .el-dialog .base-label {
|
.fuzhou-01__systerm .el-dialog .base-label {
|
||||||
|
@ -1,9 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
class="fuzhou-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="$t('menu.menuDialog.trainNumber')" label-width="115px" prop="groupNumber">
|
<el-form-item :label="$t('menu.menuDialog.trainNumber')" label-width="115px" prop="groupNumber">
|
||||||
<el-input v-model="addModel.groupNumber"></el-input>
|
<el-input v-model="addModel.groupNumber" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||||
<span class="base-label">{{ $t('menu.menuDialog.purpose') }}</span>
|
<span class="base-label">{{ $t('menu.menuDialog.purpose') }}</span>
|
||||||
@ -11,13 +20,16 @@
|
|||||||
<el-form-item prop="stationStandCode">
|
<el-form-item prop="stationStandCode">
|
||||||
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
|
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
|
||||||
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
|
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
|
||||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
<el-option
|
||||||
:value="item.code">
|
v-for="item in stationStandList"
|
||||||
</el-option>
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('menu.menuDialog.trainNumber')" prop="trainNumberLimber">
|
<el-form-item :label="$t('menu.menuDialog.trainNumber')" prop="trainNumberLimber">
|
||||||
<el-input v-model="addModel.trainNumberLimber"></el-input>
|
<el-input v-model="addModel.trainNumberLimber" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -47,7 +59,7 @@
|
|||||||
addModel: {
|
addModel: {
|
||||||
groupNumber: '',
|
groupNumber: '',
|
||||||
stationStandCode: '',
|
stationStandCode: '',
|
||||||
trainNumberLimber: '',
|
trainNumberLimber: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
@ -59,12 +71,12 @@
|
|||||||
],
|
],
|
||||||
stationStandCode: [
|
stationStandCode: [
|
||||||
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
|
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
operation: null,
|
operation: null,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -80,13 +92,13 @@
|
|||||||
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
|
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.menuDialog.panPlanCar')
|
return this.$t('menu.menuDialog.panPlanCar');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -111,11 +123,11 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation,
|
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -125,28 +137,28 @@
|
|||||||
} else {
|
} else {
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm view-display" :title="$t('menu.menuDialog.deviceDisplaySettings')" :visible.sync="show" width="340px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm view-display"
|
||||||
|
:title="$t('menu.menuDialog.deviceDisplaySettings')"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="340px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-checkbox-group v-model="deviceLevels">
|
<el-checkbox-group v-model="deviceLevels">
|
||||||
<div>
|
<div>
|
||||||
<el-checkbox :label="1">{{ $t('menu.menuDialog.trainWindow') }}</el-checkbox>
|
<el-checkbox :label="1">{{ $t('menu.menuDialog.trainWindow') }}</el-checkbox>
|
||||||
@ -17,35 +26,34 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
<el-col :span="8" :offset="2">
|
<el-col :span="8" :offset="2">
|
||||||
<el-button class="commit" :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuDialog.confirm')}}
|
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" :offset="3">
|
<el-col :span="8" :offset="3">
|
||||||
<el-button class="cancal" :id="domIdCancel" @click="cancel">{{$t('menu.menuDialog.cancel')}}</el-button>
|
<el-button :id="domIdCancel" class="cancal" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
import deviceType from '@/jmap/constant/deviceType';
|
|
||||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ViewDevice',
|
name: 'ViewDevice',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
operate: null,
|
operate: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
deviceLevels: [2, 3, 4, 5],
|
deviceLevels: [2, 3, 4, 5]
|
||||||
}
|
};
|
||||||
},
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -63,7 +71,7 @@
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.setDeviceDisplay();
|
this.setDeviceDisplay();
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -84,24 +92,24 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
operation: OperationEvent.Command.close.confirm.operation,
|
||||||
val: this.deviceLevels.sort().join('::')
|
val: this.deviceLevels.sort().join('::')
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -110,16 +118,16 @@
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
this.setDeviceDisplay();
|
this.setDeviceDisplay();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
setDeviceDisplay() {
|
setDeviceDisplay() {
|
||||||
let deviceList = [];
|
const deviceList = [];
|
||||||
|
|
||||||
// 区段边界设置
|
// 区段边界设置
|
||||||
let borderBorderShow = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
const borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
|
||||||
let sectionList = this.$store.getters['map/sectionList'];
|
const sectionList = this.$store.getters['map/sectionList'];
|
||||||
if (sectionList && sectionList.length > 0) {
|
if (sectionList && sectionList.length > 0) {
|
||||||
sectionList.forEach(elem => {
|
sectionList.forEach(elem => {
|
||||||
// 区段边界
|
// 区段边界
|
||||||
@ -128,8 +136,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 车次窗设置
|
// 车次窗设置
|
||||||
let trainWindowShow = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
const trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
|
||||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
const trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||||
if (trainWindowList && trainWindowList.length > 0) {
|
if (trainWindowList && trainWindowList.length > 0) {
|
||||||
trainWindowList.forEach(elem => {
|
trainWindowList.forEach(elem => {
|
||||||
// 车次窗
|
// 车次窗
|
||||||
@ -138,19 +146,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 联锁自动进路表示灯和ATS自动触发表示灯设置
|
// 联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||||
let linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1 ? true : false; //联锁自动进路表示灯
|
const linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1; // 联锁自动进路表示灯
|
||||||
let atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1 ? true : false; //ATS自动触发表示灯
|
const atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1; // ATS自动触发表示灯
|
||||||
let signalList = this.$store.getters['map/signalList'];
|
const signalList = this.$store.getters['map/signalList'];
|
||||||
if (signalList && signalList.length > 0) {
|
if (signalList && signalList.length > 0) {
|
||||||
signalList.forEach(elem => {
|
signalList.forEach(elem => {
|
||||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
|
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@ -126,7 +126,7 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
@ -138,7 +138,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
operation: OperationEvent.Command.close.confirm.operation,
|
||||||
@ -157,24 +157,21 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setNameDisplay() {
|
setNameDisplay() {
|
||||||
let deviceList = [];
|
const deviceList = [];
|
||||||
|
|
||||||
// 信号机
|
// 信号机
|
||||||
let nameShow = this.nameLevels.indexOf(1) !== -1;
|
let nameShow = this.nameLevels.indexOf(1) !== -1;
|
||||||
let signalList = this.$store.getters['map/signalList'];
|
const signalList = this.$store.getters['map/signalList'];
|
||||||
if (signalList && signalList.length > 0) {
|
if (signalList && signalList.length > 0) {
|
||||||
signalList.forEach(elem => {
|
signalList.forEach(elem => {
|
||||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 按钮名称
|
|
||||||
let show = this.nameLevels.indexOf(3) !== -1;
|
|
||||||
|
|
||||||
// 道岔
|
// 道岔
|
||||||
nameShow = this.nameLevels.indexOf(7) !== -1; // 道岔名称
|
nameShow = this.nameLevels.indexOf(7) !== -1; // 道岔名称
|
||||||
let switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称
|
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称
|
||||||
let switchList = this.$store.getters['map/switchList'];
|
const switchList = this.$store.getters['map/switchList'];
|
||||||
if (switchList && switchList.length > 0) {
|
if (switchList && switchList.length > 0) {
|
||||||
switchList.forEach(elem => {
|
switchList.forEach(elem => {
|
||||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameShow, switchSectionNameShow }));
|
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameShow, switchSectionNameShow }));
|
||||||
@ -182,8 +179,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 控制模式
|
// 控制模式
|
||||||
let indicatorShow = this.nameLevels.indexOf(8) !== -1;
|
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
|
||||||
let control = this.$store.getters['map/stationControlList'];
|
const control = this.$store.getters['map/stationControlList'];
|
||||||
if (control && control.length > 0) {
|
if (control && control.length > 0) {
|
||||||
control.forEach(elem => {
|
control.forEach(elem => {
|
||||||
// 标识灯名称
|
// 标识灯名称
|
||||||
@ -196,7 +193,7 @@ export default {
|
|||||||
let standTrackNameShow = false;
|
let standTrackNameShow = false;
|
||||||
let reentryTrackNameShow = false;
|
let reentryTrackNameShow = false;
|
||||||
let transferTrackNameShow = false;
|
let transferTrackNameShow = false;
|
||||||
let sectionList = this.$store.getters['map/sectionList'];
|
const sectionList = this.$store.getters['map/sectionList'];
|
||||||
if (sectionList && sectionList.length > 0) {
|
if (sectionList && sectionList.length > 0) {
|
||||||
sectionList.forEach(elem => {
|
sectionList.forEach(elem => {
|
||||||
elem._type = deviceType.Section;
|
elem._type = deviceType.Section;
|
||||||
@ -236,8 +233,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 车站
|
// 车站
|
||||||
let kmPostShow = this.nameLevels.indexOf(12) !== -1;
|
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
|
||||||
let stationList = this.$store.getters['map/stationList'];
|
const stationList = this.$store.getters['map/stationList'];
|
||||||
if (stationList && stationList.length > 0) {
|
if (stationList && stationList.length > 0) {
|
||||||
stationList.forEach(elem => {
|
stationList.forEach(elem => {
|
||||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<section-control ref="sectionControl"></section-control>
|
<section-control ref="sectionControl" />
|
||||||
<section-cmd-control ref="sectionCmdControl"></section-cmd-control>
|
<section-cmd-control ref="sectionCmdControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl"></speed-cmd-control>
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
<train-create ref="trainCreate"></train-create>
|
<train-create ref="trainCreate" />
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -15,9 +15,9 @@
|
|||||||
import SectionCmdControl from './dialog/sectionCmdControl';
|
import SectionCmdControl from './dialog/sectionCmdControl';
|
||||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||||
import TrainCreate from './dialog/trainCreate';
|
import TrainCreate from './dialog/trainCreate';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||||
|
|
||||||
@ -33,7 +33,8 @@
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -146,7 +147,7 @@
|
|||||||
label: this.$t('menu.menuSection.createTrain'),
|
label: this.$t('menu.menuSection.createTrain'),
|
||||||
handler: this.newTrain,
|
handler: this.newTrain,
|
||||||
disabledCallback: MenuDisabledState.Section.newTrain
|
disabledCallback: MenuDisabledState.Section.newTrain
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
@ -160,16 +161,7 @@
|
|||||||
disabledCallback: MenuDisabledState.Section.cancelStoppage
|
disabledCallback: MenuDisabledState.Section.cancelStoppage
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
|
||||||
} else {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
@ -180,23 +172,32 @@
|
|||||||
'buttonOperation'
|
'buttonOperation'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
||||||
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
let self = this;
|
const self = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
self.doClose();
|
self.doClose();
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain]
|
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
this.menu = menuConvert(this.menu);
|
||||||
@ -215,7 +216,7 @@
|
|||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -229,13 +230,13 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -249,13 +250,13 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 故障解锁
|
// 故障解锁
|
||||||
fault() {
|
fault() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
@ -271,7 +272,7 @@
|
|||||||
},
|
},
|
||||||
// 切除
|
// 切除
|
||||||
split() {
|
split() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
@ -287,7 +288,7 @@
|
|||||||
},
|
},
|
||||||
// 激活
|
// 激活
|
||||||
active() {
|
active() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
@ -303,7 +304,7 @@
|
|||||||
},
|
},
|
||||||
// 区段计轴预复位
|
// 区段计轴预复位
|
||||||
axlePreReset() {
|
axlePreReset() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
@ -319,7 +320,7 @@
|
|||||||
},
|
},
|
||||||
// 区段解锁
|
// 区段解锁
|
||||||
lock() {
|
lock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
@ -335,7 +336,7 @@
|
|||||||
},
|
},
|
||||||
// 区段封锁
|
// 区段封锁
|
||||||
unlock() {
|
unlock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
@ -351,7 +352,7 @@
|
|||||||
},
|
},
|
||||||
// 设置速度
|
// 设置速度
|
||||||
setSpeed() {
|
setSpeed() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
@ -367,7 +368,7 @@
|
|||||||
},
|
},
|
||||||
// 取消速度
|
// 取消速度
|
||||||
cancelSpeed() {
|
cancelSpeed() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -377,7 +378,7 @@
|
|||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempData = response.data;
|
const tempData = response.data;
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
||||||
}
|
}
|
||||||
@ -385,7 +386,7 @@
|
|||||||
},
|
},
|
||||||
// 新建列车
|
// 新建列车
|
||||||
newTrain() {
|
newTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
@ -397,8 +398,8 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.trainCreate.doShow(operate, this.selected);
|
this.$refs.trainCreate.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -39,7 +39,8 @@ export default {
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<station-cmd-control ref="stationCmdControl"></station-cmd-control>
|
<station-cmd-control ref="stationCmdControl" />
|
||||||
<station-human-control-all ref="stationHumanControlAll"></station-human-control-all>
|
<station-human-control-all ref="stationHumanControlAll" />
|
||||||
<station-set-route-control-all ref="stationSetRouteControlAll"></station-set-route-control-all>
|
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -12,10 +12,10 @@
|
|||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import StationCmdControl from './dialog/stationCmdControl';
|
import StationCmdControl from './dialog/stationCmdControl';
|
||||||
import StationHumanControlAll from './dialog/stationHumanControlAll';
|
import StationHumanControlAll from './dialog/stationHumanControlAll';
|
||||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll'
|
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||||
|
|
||||||
@ -30,7 +30,8 @@
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -42,25 +43,25 @@
|
|||||||
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
|
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
|
||||||
handler: this.setAutoTrigger,
|
handler: this.setAutoTrigger,
|
||||||
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
|
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
|
||||||
auth: { station: true, center: false },
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
|
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
|
||||||
handler: this.cancelAutoTrigger,
|
handler: this.cancelAutoTrigger,
|
||||||
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
|
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
|
||||||
auth: { station: true, center: false },
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.powerUnLock'),
|
label: this.$t('menu.menuStation.powerUnLock'),
|
||||||
handler: this.powerUnLock,
|
handler: this.powerUnLock,
|
||||||
disabledCallback: MenuDisabledState.Station.powerUnLock,
|
disabledCallback: MenuDisabledState.Station.powerUnLock,
|
||||||
auth: { station: true, center: false },
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.execKeyOperationTest'),
|
label: this.$t('menu.menuStation.execKeyOperationTest'),
|
||||||
handler: this.execKeyOperationTest,
|
handler: this.execKeyOperationTest,
|
||||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
||||||
auth: { station: true, center: false },
|
auth: { station: true, center: false }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
central: [
|
||||||
@ -68,21 +69,21 @@
|
|||||||
label: this.$t('menu.menuStation.allHumanControl'),
|
label: this.$t('menu.menuStation.allHumanControl'),
|
||||||
handler: this.humanControlALL,
|
handler: this.humanControlALL,
|
||||||
disabledCallback: MenuDisabledState.Station.humanControlALL,
|
disabledCallback: MenuDisabledState.Station.humanControlALL,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.allATSAutoControl'),
|
label: this.$t('menu.menuStation.allATSAutoControl'),
|
||||||
handler: this.atsAutoControlALL,
|
handler: this.atsAutoControlALL,
|
||||||
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
|
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuStation.execKeyOperationTest'),
|
label: this.$t('menu.menuStation.execKeyOperationTest'),
|
||||||
handler: this.execKeyOperationTest,
|
handler: this.execKeyOperationTest,
|
||||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true }
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
@ -96,16 +97,7 @@
|
|||||||
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
|
||||||
} else {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
@ -116,12 +108,21 @@
|
|||||||
'buttonOperation'
|
'buttonOperation'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
||||||
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
let self = this;
|
const self = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
self.doClose();
|
self.doClose();
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
@ -129,14 +130,14 @@
|
|||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce]
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.selected.centralized) {
|
if (this.selected.centralized) {
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = [...this.menuForce]
|
this.menu = [...this.menuForce];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +157,7 @@
|
|||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -170,13 +171,13 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -190,13 +191,13 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 全站设置联锁自动触发
|
// 全站设置联锁自动触发
|
||||||
setAutoTrigger() {
|
setAutoTrigger() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -208,13 +209,13 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 全站取消联锁自动触发
|
// 全站取消联锁自动触发
|
||||||
cancelAutoTrigger() {
|
cancelAutoTrigger() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -226,13 +227,13 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 上电解锁
|
// 上电解锁
|
||||||
powerUnLock() {
|
powerUnLock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
@ -248,7 +249,7 @@
|
|||||||
},
|
},
|
||||||
// 执行关键操作测试
|
// 执行关键操作测试
|
||||||
execKeyOperationTest() {
|
execKeyOperationTest() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
@ -264,23 +265,23 @@
|
|||||||
},
|
},
|
||||||
// 所有进路自排关
|
// 所有进路自排关
|
||||||
humanControlALL() {
|
humanControlALL() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.humanControlALL.menu.operation,
|
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.stationHumanControlAll.doShow(operate);
|
this.$refs.stationHumanControlAll.doShow(operate);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 所有进路自排开
|
// 所有进路自排开
|
||||||
atsAutoControlALL() {
|
atsAutoControlALL() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
@ -292,8 +293,8 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,24 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
|
||||||
import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationControlMenu',
|
name: 'StationControlMenu',
|
||||||
props: {
|
|
||||||
selected: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
PopMenu
|
PopMenu
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
@ -26,16 +25,7 @@
|
|||||||
],
|
],
|
||||||
menuForce: [
|
menuForce: [
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
|
||||||
} else {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
@ -46,12 +36,21 @@
|
|||||||
'buttonOperation'
|
'buttonOperation'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
||||||
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
let self = this;
|
const self = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
self.doClose();
|
self.doClose();
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
@ -64,5 +63,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -39,7 +39,8 @@ export default {
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<switch-control ref="switchControl"></switch-control>
|
<switch-control ref="switchControl" />
|
||||||
<switch-cmd-control ref="switchCmdControl"></switch-cmd-control>
|
<switch-cmd-control ref="switchCmdControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl"></speed-cmd-control>
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -13,9 +13,9 @@
|
|||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from './dialog/switchControl';
|
||||||
import SwitchCmdControl from './dialog/switchCmdControl';
|
import SwitchCmdControl from './dialog/switchCmdControl';
|
||||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||||
|
|
||||||
@ -30,7 +30,8 @@
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -186,16 +187,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
|
||||||
} else {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
@ -206,23 +198,32 @@
|
|||||||
'buttonOperation'
|
'buttonOperation'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||||
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
let self = this;
|
const self = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
self.doClose();
|
self.doClose();
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce]
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
this.menu = menuConvert(this.menu);
|
||||||
@ -241,7 +242,7 @@
|
|||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -255,13 +256,13 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -275,13 +276,13 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 道岔单锁
|
// 道岔单锁
|
||||||
lock() {
|
lock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
@ -297,7 +298,7 @@
|
|||||||
},
|
},
|
||||||
// 道岔解封
|
// 道岔解封
|
||||||
unlock() {
|
unlock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
@ -313,7 +314,7 @@
|
|||||||
},
|
},
|
||||||
// 道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
block() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
@ -329,7 +330,7 @@
|
|||||||
},
|
},
|
||||||
// 道岔解封
|
// 道岔解封
|
||||||
unblock() {
|
unblock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
@ -345,7 +346,7 @@
|
|||||||
},
|
},
|
||||||
// 道岔强扳
|
// 道岔强扳
|
||||||
switchTurnoutForce() {
|
switchTurnoutForce() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
@ -361,7 +362,7 @@
|
|||||||
},
|
},
|
||||||
// 道岔转动
|
// 道岔转动
|
||||||
switchTurnout() {
|
switchTurnout() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
@ -380,7 +381,7 @@
|
|||||||
},
|
},
|
||||||
// 道岔故障解锁
|
// 道岔故障解锁
|
||||||
fault() {
|
fault() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
@ -396,7 +397,7 @@
|
|||||||
},
|
},
|
||||||
// 道岔计轴预复位
|
// 道岔计轴预复位
|
||||||
axlePreReset() {
|
axlePreReset() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
@ -412,7 +413,7 @@
|
|||||||
},
|
},
|
||||||
// 区段切除
|
// 区段切除
|
||||||
split() {
|
split() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
@ -428,7 +429,7 @@
|
|||||||
},
|
},
|
||||||
// 区段激活
|
// 区段激活
|
||||||
active() {
|
active() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
@ -444,7 +445,7 @@
|
|||||||
},
|
},
|
||||||
// 道岔设置速度
|
// 道岔设置速度
|
||||||
setSpeed() {
|
setSpeed() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
@ -460,7 +461,7 @@
|
|||||||
},
|
},
|
||||||
// 道岔取消速度
|
// 道岔取消速度
|
||||||
cancelSpeed() {
|
cancelSpeed() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -470,7 +471,7 @@
|
|||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempData = response.data;
|
const tempData = response.data;
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
||||||
}
|
}
|
||||||
@ -478,5 +479,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,40 +1,48 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm alarm-detail" :title="level+$t('menu.passiveDialog.alarmDetailInformation')" :visible.sync="show" width="760px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm alarm-detail"
|
||||||
|
:title="level+$t('menu.passiveDialog.alarmDetailInformation')"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="760px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-form label-width="80px" size="mini">
|
<el-form label-width="80px" size="mini">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="$t('menu.passiveDialog.lineName')">
|
<el-form-item :label="$t('menu.passiveDialog.lineName')">
|
||||||
<el-input v-model="model.lineName" disabled></el-input>
|
<el-input v-model="model.lineName" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="$t('menu.passiveDialog.unitName')">
|
<el-form-item :label="$t('menu.passiveDialog.unitName')">
|
||||||
<el-input v-model="model.unitName" disabled></el-input>
|
<el-input v-model="model.unitName" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="$t('menu.passiveDialog.moduleName')">
|
<el-form-item :label="$t('menu.passiveDialog.moduleName')">
|
||||||
<el-input v-model="model.moduleName" disabled></el-input>
|
<el-input v-model="model.moduleName" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-form-item :label="$t('menu.passiveDialog.alarmDate')">
|
<el-form-item :label="$t('menu.passiveDialog.alarmDate')">
|
||||||
<el-date-picker v-model="model.alarmDate" type="datetime" :placeholder="$t('menu.passiveDialog.selectDate')" disabled>
|
<el-date-picker v-model="model.alarmDate" type="datetime" :placeholder="$t('menu.passiveDialog.selectDate')" disabled />
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span slot="label">{{ $t('menu.passiveDialog.level') }}</span>
|
<span slot="label">{{ $t('menu.passiveDialog.level') }}</span>
|
||||||
<el-input v-model="model.level" disabled></el-input>
|
<el-input v-model="model.level" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="$t('menu.passiveDialog.confirmStatus')">
|
<el-form-item :label="$t('menu.passiveDialog.confirmStatus')">
|
||||||
<el-input v-model="model.confirm" disabled></el-input>
|
<el-input v-model="model.confirm" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -42,25 +50,24 @@
|
|||||||
<el-col :span="9" class="alarm-type">
|
<el-col :span="9" class="alarm-type">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span slot="label">{{ $t('menu.passiveDialog.type') }}</span>
|
<span slot="label">{{ $t('menu.passiveDialog.type') }}</span>
|
||||||
<el-input v-model="model.type" disabled></el-input>
|
<el-input v-model="model.type" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="15" class="alarm-child-type">
|
<el-col :span="15" class="alarm-child-type">
|
||||||
<el-form-item :label="$t('menu.passiveDialog.childType')">
|
<el-form-item :label="$t('menu.passiveDialog.childType')">
|
||||||
<el-input v-model="model.childType" disabled></el-input>
|
<el-input v-model="model.childType" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item :label="$t('menu.passiveDialog.timeSummary')">
|
<el-form-item :label="$t('menu.passiveDialog.timeSummary')">
|
||||||
<el-input v-model="model.timeSummary" disabled></el-input>
|
<el-input v-model="model.timeSummary" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('menu.passiveDialog.recommendedOperation')">
|
<el-form-item :label="$t('menu.passiveDialog.recommendedOperation')">
|
||||||
<el-input v-model="model.recommendedOperation" disabled></el-input>
|
<el-input v-model="model.recommendedOperation" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="alarm-detail-description">
|
<div class="alarm-detail-description">
|
||||||
<span>{{ $t('menu.passiveDialog.alarmDetailedDescription') }}</span><br>
|
<span>{{ $t('menu.passiveDialog.alarmDetailedDescription') }}</span><br>
|
||||||
<el-input type="textarea" :rows="5" :placeholder="$t('menu.passiveDialog.inputContent')" v-model="model.alarmDetail" disabled>
|
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" :placeholder="$t('menu.passiveDialog.inputContent')" disabled />
|
||||||
</el-input>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
@ -71,13 +78,12 @@
|
|||||||
<span style="line-height:26px">{{ $t('menu.passiveDialog.unconfirmedMessageOne') }}{{ level }}{{ $t('menu.passiveDialog.unconfirmedMessageTwo') }}</span>
|
<span style="line-height:26px">{{ $t('menu.passiveDialog.unconfirmedMessageOne') }}{{ level }}{{ $t('menu.passiveDialog.unconfirmedMessageTwo') }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</span>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AlarmDetail',
|
name: 'AlarmDetail',
|
||||||
@ -104,41 +110,41 @@
|
|||||||
recommendedOperation: '',
|
recommendedOperation: '',
|
||||||
alarmDetail: ''
|
alarmDetail: ''
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'name',
|
'name'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.socket.msgHead': function (elem) {
|
'$store.state.socket.msgHead': function (elem) {
|
||||||
if (elem && elem.type == 'resp' && elem.agree) {
|
if (elem && elem.type == 'resp' && elem.agree) {
|
||||||
if (elem.agree) {
|
if (elem.agree) {
|
||||||
let operate = this.$store.state.training.operate;
|
const operate = this.$store.state.training.operate;
|
||||||
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||||
let newOperate = {
|
const newOperate = {
|
||||||
type: operate.type,
|
type: operate.type,
|
||||||
name: station.name,
|
name: station.name,
|
||||||
currentMode: elem.currentMode
|
currentMode: elem.currentMode
|
||||||
}
|
};
|
||||||
|
|
||||||
this.doShow(newOperate);
|
this.doShow(newOperate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -154,8 +160,8 @@
|
|||||||
childType: this.$t('menu.passiveDialog.childTypeTips'),
|
childType: this.$t('menu.passiveDialog.childTypeTips'),
|
||||||
timeSummary: this.$t('menu.passiveDialog.controlModeSummary'),
|
timeSummary: this.$t('menu.passiveDialog.controlModeSummary'),
|
||||||
recommendedOperation: '',
|
recommendedOperation: '',
|
||||||
alarmDetail: `${$t('menu.passiveDialog.controlModeTransfer')} ${this.operate.name}${$t('menu.passiveDialog.alarmDetailOne')}${operate.currentMode == '01' ? this.$t('menu.passiveDialog.stationToCentral') : this.$t('menu.passiveDialog.centralToStation') }!`
|
alarmDetail: `${this.$t('menu.passiveDialog.controlModeTransfer')} ${this.operate.name}${this.$t('menu.passiveDialog.alarmDetailOne')}${operate.currentMode == '01' ? this.$t('menu.passiveDialog.stationToCentral') : this.$t('menu.passiveDialog.centralToStation')}!`
|
||||||
}
|
};
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
@ -169,41 +175,40 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.alarm.operation,
|
operation: OperationEvent.Command.close.alarm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.alarm.operation,
|
operation: OperationEvent.Command.close.alarm.operation
|
||||||
}
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
isClose() {
|
isClose() {
|
||||||
return this.dialogShow;
|
return this.dialogShow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
.alarm-type .el-input {
|
.alarm-type .el-input {
|
||||||
width: 220px;
|
width: 220px;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm passive-control" :title="$t('menu.passiveDialog.controlModeRequest')" :visible.sync="show" width="700px"
|
<el-dialog
|
||||||
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
v-dialogDrag
|
||||||
v-dialogDrag>
|
class="fuzhou-01__systerm passive-control"
|
||||||
|
:title="$t('menu.passiveDialog.controlModeRequest')"
|
||||||
|
: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}${$t('menu.passiveDialog.requestAreaControlMode')}` }}</span>
|
<span class="control-label">{{ `${requestInfo}${$t('menu.passiveDialog.requestAreaControlMode')}` }}</span>
|
||||||
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%" height="250" center
|
<el-table
|
||||||
size="mini" highlight-current-row>
|
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="$t('menu.passiveDialog.operatingArea')">
|
<el-table-column prop="operate" :label="$t('menu.passiveDialog.operatingArea')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
|
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
|
||||||
@ -22,7 +40,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="agree" :label="$t('menu.passiveDialog.isAgree')" width="140">
|
<el-table-column prop="agree" :label="$t('menu.passiveDialog.isAgree')" width="140">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled"></el-checkbox>
|
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -36,13 +54,12 @@
|
|||||||
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">{{ $t('menu.passiveDialog.refuse') }}</el-button>
|
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">{{ $t('menu.passiveDialog.refuse') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
|
||||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -65,8 +82,8 @@
|
|||||||
timer: null,
|
timer: null,
|
||||||
timeout: 61,
|
timeout: 61,
|
||||||
count: 0,
|
count: 0,
|
||||||
commandId: '',
|
commandId: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
targetStatus() {
|
targetStatus() {
|
||||||
@ -74,8 +91,9 @@
|
|||||||
return '01';
|
return '01';
|
||||||
}
|
}
|
||||||
if (this.$store.state.training.prdType == '02') {
|
if (this.$store.state.training.prdType == '02') {
|
||||||
return '02'
|
return '02';
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -104,12 +122,12 @@
|
|||||||
this.commandId = elem.commandId;
|
this.commandId = elem.commandId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
createTimer() {
|
createTimer() {
|
||||||
@ -120,7 +138,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.count = this.count - 1;
|
this.count = this.count - 1;
|
||||||
}, 1000)
|
}, 1000);
|
||||||
},
|
},
|
||||||
clearTimer() {
|
clearTimer() {
|
||||||
if (this.timer) {
|
if (this.timer) {
|
||||||
@ -129,16 +147,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
checkTableDataSelction(data) {
|
checkTableDataSelction(data) {
|
||||||
let selection = [];
|
const selection = [];
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
data.forEach(row => {
|
data.forEach(row => {
|
||||||
if (row.agree && !row.disabled) {
|
if (row.agree && !row.disabled) {
|
||||||
selection.push(row);
|
selection.push(row);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.disabledSend = selection.length ? false : true;
|
this.disabledSend = !selection.length;
|
||||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||||
this.handleChooseChange(selection);
|
this.handleChooseChange(selection);
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
@ -148,24 +166,24 @@
|
|||||||
updateTableData(code) {
|
updateTableData(code) {
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
|
|
||||||
let model = {
|
const model = {
|
||||||
code: code,
|
code: code,
|
||||||
operate: '',
|
operate: '',
|
||||||
control: { code: '', name: '' },
|
control: { code: '', name: '' },
|
||||||
target: { code: '', name: '' },
|
target: { code: '', name: '' },
|
||||||
agree: false,
|
agree: false,
|
||||||
disabled: false,
|
disabled: false
|
||||||
}
|
};
|
||||||
|
|
||||||
let device = this.$store.getters['map/getDeviceByCode'](code);
|
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
if (device) {
|
if (device) {
|
||||||
let control = (device || {}).state;
|
const control = (device || {}).state;
|
||||||
if (control) {
|
if (control) {
|
||||||
model.control = { status: control.status, name: this.controlProps[control.status] };
|
model.control = { status: control.status, name: this.controlProps[control.status] };
|
||||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||||
}
|
}
|
||||||
|
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
model.operate = station.name || '';
|
model.operate = station.name || '';
|
||||||
}
|
}
|
||||||
@ -183,10 +201,10 @@
|
|||||||
this.createTimer();
|
this.createTimer();
|
||||||
this.updateTableData(msgHead.stationControlCode);
|
this.updateTableData(msgHead.stationControlCode);
|
||||||
|
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
type: MapDeviceType.StationControl.type,
|
type: MapDeviceType.StationControl.type,
|
||||||
operation: OperationEvent.StationControl.controlResponse.menu.operation,
|
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
@ -210,35 +228,35 @@
|
|||||||
this.$refs.multipleTable.setCurrentRow();
|
this.$refs.multipleTable.setCurrentRow();
|
||||||
},
|
},
|
||||||
serializeCodeListWithSeparator(sep) {
|
serializeCodeListWithSeparator(sep) {
|
||||||
let codeList = [];
|
const codeList = [];
|
||||||
if (this.selection && this.selection.length) {
|
if (this.selection && this.selection.length) {
|
||||||
this.selection.forEach(elem => {
|
this.selection.forEach(elem => {
|
||||||
codeList.push(elem.code);
|
codeList.push(elem.code);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
return codeList.join(sep);
|
return codeList.join(sep);
|
||||||
},
|
},
|
||||||
handleChooseChange(selection) {
|
handleChooseChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
if (selection && selection.length) {
|
if (selection && selection.length) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationControl.type,
|
type: MapDeviceType.StationControl.type,
|
||||||
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
||||||
val: this.serializeCodeListWithSeparator('::'),
|
val: this.serializeCodeListWithSeparator('::')
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else if (!selection) {
|
} else if (!selection) {
|
||||||
this.$messageBox(this.$t('menu.passiveDialog.selectData'));
|
this.$messageBox(this.$t('menu.passiveDialog.selectData'));
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
agree() {
|
agree() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
over: true,
|
over: true,
|
||||||
type: MapDeviceType.StationControl.type,
|
type: MapDeviceType.StationControl.type,
|
||||||
@ -246,7 +264,7 @@
|
|||||||
code: this.selection[0].code,
|
code: this.selection[0].code,
|
||||||
val: this.commandId,
|
val: this.commandId,
|
||||||
prdType: this.$store.state.training.prdType
|
prdType: this.$store.state.training.prdType
|
||||||
}
|
};
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
this.disabledAgree = true;
|
this.disabledAgree = true;
|
||||||
@ -255,12 +273,12 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
refuse() {
|
refuse() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
over: true,
|
over: true,
|
||||||
type: MapDeviceType.StationControl.type,
|
type: MapDeviceType.StationControl.type,
|
||||||
@ -268,7 +286,7 @@
|
|||||||
code: this.selection.length ? this.selection[0].code : '',
|
code: this.selection.length ? this.selection[0].code : '',
|
||||||
val: this.commandId,
|
val: this.commandId,
|
||||||
prdType: this.$store.state.training.prdType
|
prdType: this.$store.state.training.prdType
|
||||||
}
|
};
|
||||||
if (!operate.code) {
|
if (!operate.code) {
|
||||||
operate.code = this.tableData[0].code;
|
operate.code = this.tableData[0].code;
|
||||||
}
|
}
|
||||||
@ -279,12 +297,12 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm cmd-notice" :title="$t('menu.passiveDialog.operationCommandTips')" :visible.sync="show" width="400px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="fuzhou-01__systerm cmd-notice"
|
||||||
|
:title="$t('menu.passiveDialog.operationCommandTips')"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<span>{{ name }},{{ msg }}!</span>
|
<span>{{ name }},{{ msg }}!</span>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{ $t('menu.passiveDialog.operationConfirm') }}</el-button>
|
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{ $t('menu.passiveDialog.operationConfirm') }}</el-button>
|
||||||
@ -9,7 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
export default {
|
export default {
|
||||||
name: 'CmdNotice',
|
name: 'CmdNotice',
|
||||||
data() {
|
data() {
|
||||||
@ -19,7 +28,7 @@
|
|||||||
operate: null,
|
operate: null,
|
||||||
name: '',
|
name: '',
|
||||||
msg: ''
|
msg: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -27,18 +36,18 @@
|
|||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.socket.msgHead': function (elem) {
|
'$store.state.socket.msgHead': function (elem) {
|
||||||
if (elem && elem.type == 'resp' && (elem.timeout || !elem.agree)) {
|
if (elem && elem.type == 'resp' && (elem.timeout || !elem.agree)) {
|
||||||
let operate = this.$store.state.training.operate;
|
const operate = this.$store.state.training.operate;
|
||||||
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||||
let newOperate = {
|
const newOperate = {
|
||||||
type: operate.type,
|
type: operate.type,
|
||||||
name: station.name,
|
name: station.name
|
||||||
}
|
};
|
||||||
|
|
||||||
if (elem.timeout) {
|
if (elem.timeout) {
|
||||||
newOperate['msg'] = this.$t('menu.passiveDialog.requestTimedOut');
|
newOperate['msg'] = this.$t('menu.passiveDialog.requestTimedOut');
|
||||||
@ -48,12 +57,12 @@
|
|||||||
this.doShow(newOperate);
|
this.doShow(newOperate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -73,34 +82,34 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
operation: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.notice.operation,
|
operation: OperationEvent.Command.close.notice.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
operation: OperationEvent.Command.close.notice.operation,
|
operation: OperationEvent.Command.close.notice.operation
|
||||||
}
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
isClose() {
|
isClose() {
|
||||||
return this.dialogShow;
|
return this.dialogShow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="statusDownTrainDetail"></div>
|
<div id="statusDownTrainDetail" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -7,25 +7,17 @@
|
|||||||
name: 'StatusDownTrainDetail',
|
name: 'StatusDownTrainDetail',
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
#statusDownTrainDetail {
|
|
||||||
z-index: 1000;
|
|
||||||
position: absolute;
|
|
||||||
height: $height;
|
|
||||||
line-height: $height;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="statusUpTrainDetail"></div>
|
<div id="statusUpTrainDetail" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -7,25 +7,18 @@
|
|||||||
name: 'StatusUpTrainDetail',
|
name: 'StatusUpTrainDetail',
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
#statusUpTrainDetail {
|
|
||||||
z-index: 1000;
|
|
||||||
position: absolute;
|
|
||||||
height: $height;
|
|
||||||
line-height: $height;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
@ -3,23 +3,23 @@
|
|||||||
<div class="nav">
|
<div class="nav">
|
||||||
<template v-for="(item,i) in menu">
|
<template v-for="(item,i) in menu">
|
||||||
<template v-if="noShowingChildren(item.children)">
|
<template v-if="noShowingChildren(item.children)">
|
||||||
<li class="nav-li" @click="hookClick(item)">
|
<li :key="i" class="nav-li" @click="hookClick(item)">
|
||||||
<span class="nav-li-text">{{ item.title }}</span>
|
<span class="nav-li-text">{{ item.title }}</span>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<li class="nav-li" @click.stop="popupMenuA(item, i)">
|
<li :key="i" class="nav-li" @click.stop="popupMenuA(item, i)">
|
||||||
<span class="nav-li-text">{{ item.title }}</span>
|
<span class="nav-li-text">{{ item.title }}</span>
|
||||||
<ul class="nav-ul" :class="{'active' :i==classA}">
|
<ul class="nav-ul" :class="{'active' :i==classA}">
|
||||||
<template v-for="(child,j) in item.children">
|
<template v-for="(child,j) in item.children">
|
||||||
<template
|
<template
|
||||||
v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)"
|
v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)"
|
||||||
>
|
>
|
||||||
<li v-if="child.type === 'separator'" class="menu-separator">
|
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
<span class="separator"> </span>
|
<span class="separator"> </span>
|
||||||
</li>
|
</li>
|
||||||
<li v-else-if="child.type === 'file'" class="menu-li">
|
<li v-else-if="child.type === 'file'" :key="j" class="menu-li">
|
||||||
<div class="menu-li-block">
|
<div class="menu-li-block">
|
||||||
<span class="menu-li-text">
|
<span class="menu-li-text">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li v-else class="menu-li" @click.stop="popupMenuB(child, j)">
|
<li v-else :key="j" class="menu-li" @click.stop="popupMenuB(child, j)">
|
||||||
<div class="menu-li-block">
|
<div class="menu-li-block">
|
||||||
<span class="menu-li-text">
|
<span class="menu-li-text">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
@ -44,11 +44,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<ul class="menu-ul" :class="{'active' :j==classB}">
|
<ul class="menu-ul" :class="{'active' :j==classB}">
|
||||||
<template v-for="(grandchild,k) in child.children">
|
<template v-for="(grandchild,k) in child.children">
|
||||||
<li v-if="grandchild.type === 'separator'" class="menu-separator">
|
<li v-if="grandchild.type === 'separator'" :key="k" class="menu-separator">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
<span class="separator"> </span>
|
<span class="separator"> </span>
|
||||||
</li>
|
</li>
|
||||||
<li v-else-if="grandchild.type === 'file'" class="menu-li">
|
<li v-else-if="grandchild.type === 'file'" :key="k" class="menu-li">
|
||||||
<div class="menu-li-block">
|
<div class="menu-li-block">
|
||||||
<span class="menu-li-text">
|
<span class="menu-li-text">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
@ -68,7 +68,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li v-else class="menu-li" @click.stop="hookClick(grandchild)">
|
<li v-else :key="k" class="menu-li" @click.stop="hookClick(grandchild)">
|
||||||
<div class="menu-li-block">
|
<div class="menu-li-block">
|
||||||
<span class="menu-li-text">
|
<span class="menu-li-text">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
@ -81,11 +81,11 @@
|
|||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<li v-if="child.type === 'separator'" class="menu-separator">
|
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
<span class="separator"> </span>
|
<span class="separator"> </span>
|
||||||
</li>
|
</li>
|
||||||
<li v-else-if="child.type === 'file'" class="menu-li">
|
<li v-else-if="child.type === 'file'" :key="j" class="menu-li">
|
||||||
<div class="menu-li-block">
|
<div class="menu-li-block">
|
||||||
<span class="menu-li-text">
|
<span class="menu-li-text">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
@ -101,7 +101,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li v-else class="menu-li" @click.stop="hookClick(child)">
|
<li v-else :key="j" class="menu-li" @click.stop="hookClick(child)">
|
||||||
<div class="menu-li-block">
|
<div class="menu-li-block">
|
||||||
<span class="menu-li-text">
|
<span class="menu-li-text">
|
||||||
<span class="status"> </span>
|
<span class="status"> </span>
|
||||||
@ -119,11 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import XLSX from 'xlsx';
|
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { importRunPlan } from '@/api/runplan';
|
|
||||||
import { importData } from '../planConvert';
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -41,7 +41,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'startTime',
|
prop: 'startTime',
|
||||||
label: this.$t('menu.arrivalTime'),
|
label: this.$t('menu.arrivalTime')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'stopTime',
|
prop: 'stopTime',
|
||||||
|
Loading…
Reference in New Issue
Block a user