修改福州线国际化导致的操作问题以及eslint的问题

This commit is contained in:
ival 2019-09-23 09:46:39 +08:00
parent 39d3ee757a
commit a789f301c3
65 changed files with 9591 additions and 9118 deletions

View File

@ -1,9 +1,19 @@
<template>
<el-dialog class="fuzhou-01__systerm notice-info" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-dialog
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">
<template v-for="message in messages">
<span>{{message}}</span><br>
<template v-for="(message,index) in messages">
<div :key="index">{{ message }}</div>
</template>
</div>
<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-col>
</el-row>
</span>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'NoticeInfo',
@ -25,7 +34,7 @@
dialogShow: false,
messages: [this.$t('tip.commandFailed')],
operate: null
}
};
},
computed: {
show() {
@ -41,7 +50,7 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, messages) {
@ -66,7 +75,7 @@
this.doClose();
}
}
}
};
</script>
<style>

View File

@ -1,9 +1,19 @@
<template>
<el-dialog class="fuzhou-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-dialog
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">
<template v-for="message in messages">
<span>{{message}}</span>
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
@ -14,16 +24,19 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo'
import NoticeInfo from './childDialog/noticeInfo';
export default {
name: 'ConfirmControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
@ -31,10 +44,7 @@
operate: {},
messages: '',
operation: null
}
},
components: {
NoticeInfo
};
},
computed: {
show() {
@ -60,6 +70,7 @@
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
return this.$t('menu.setSwitchbackStrategy');
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
@ -68,7 +79,7 @@
if (this.dialogShow) {
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) {
/** 信号关灯*/
return OperationEvent.Signal.signalClose.confirm.domId;
@ -95,12 +106,13 @@
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
}
}
},
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -153,11 +165,11 @@
},
//
routeSetting() {
let operate = {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
}
operation: OperationEvent.Signal.arrangementRoute.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -165,19 +177,19 @@
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
signalClose() {
let operate = {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Signal.signalClose.confirm.operation
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -185,19 +197,19 @@
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
reopenSignal() {
let operate = {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Signal.reopenSignal.confirm.operation
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -205,19 +217,19 @@
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
cancelTrainRoute() {
let operate = {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -225,19 +237,19 @@
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
humanControl() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation,
}
operation: OperationEvent.Signal.humanControl.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -245,7 +257,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -253,11 +265,11 @@
},
// ATS
atsAutoControl() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
}
operation: OperationEvent.Signal.atsAutoControl.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -265,7 +277,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -273,12 +285,12 @@
},
//
setRunLevel() {
let operate = {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
val: this.operate.val
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -286,20 +298,20 @@
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
setStopTime() {
let operate = {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
val: this.operate.val,
}
val: this.operate.val
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -307,20 +319,20 @@
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
setBackStrategy() {
let operate = {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
val: this.operate.val,
}
val: this.operate.val
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -328,28 +340,28 @@
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>
<style>

View File

@ -1,6 +1,16 @@
<template>
<el-dialog class="fuzhou-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-dialog
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">
<span style="font-size: 18px">{{ message }}</span>
</div>
@ -16,7 +26,7 @@
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'ConfirmControlSpeed',
@ -26,8 +36,8 @@
loading: false,
type: '',
operation: '',
message: '',
}
message: ''
};
},
computed: {
show() {
@ -45,6 +55,7 @@
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
}
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
@ -65,12 +76,13 @@
return OperationEvent.Switch.cancelSpeed.confirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -92,9 +104,9 @@
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
const operate = {
type: this.type
}
};
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
/** 区段设置限速*/
@ -118,17 +130,17 @@
this.$emit('setOperate', { step: 1, success: true });
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
})
});
},
cancel() {
let operate = {
const operate = {
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('menuOperation/handleBreakFlag', { break: true });
@ -137,12 +149,12 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>
<style>

View File

@ -1,6 +1,16 @@
<template>
<el-dialog class="fuzhou-01__systerm route-unlock-confirm" :title="title" :visible.sync="show" width="500px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-dialog
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">
<span>{{ $t('menu.in') }}{{ stationName }}{{ signalName }}{{ $t('menu.signalConfirmed') }}</span>
</div>
@ -26,14 +36,14 @@
loading: false,
signalName: '',
stationName: ''
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return this.$t('menu.signalDeblocking')
return this.$t('menu.signalDeblocking');
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
@ -45,15 +55,15 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
this.stationName = ''
this.stationName = '';
this.signalName = '';
if (selected) {
this.signalName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -71,10 +81,10 @@
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.unlock.confirm.operation
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -84,17 +94,17 @@
this.$emit('setOperate', { step: 1, success: true });
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
})
});
},
cancel() {
let operate = {
const operate = {
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('menuOperation/handleBreakFlag', { break: true });
@ -102,12 +112,12 @@
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>
<style>

View File

@ -1,9 +1,19 @@
<template>
<el-dialog class="fuzhou-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-dialog
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">
<template v-for="message in messages">
<span>{{message}}</span>
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
@ -14,16 +24,19 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo'
import { OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo';
export default {
name: 'ConfirmTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
@ -31,10 +44,7 @@
operate: {},
messages: '',
operation: null
}
},
components: {
NoticeInfo
};
},
computed: {
show() {
@ -54,6 +64,7 @@
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return this.$t('menu.menuTrain.editTrainNo');
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
@ -62,30 +73,31 @@
if (this.dialogShow) {
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) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId
return OperationEvent.Train.editTrainId.confirm.domId;
} 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) {
/** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId
return OperationEvent.Train.moveTrainId.confirm.domId;
} 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) {
/** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId
return OperationEvent.Train.editTrainNo.confirm.domId;
}
}
},
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -124,11 +136,11 @@
},
//
routeSetting() {
let operate = {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Train.addTrainId.confirm.operation,
}
operation: OperationEvent.Train.addTrainId.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -136,28 +148,28 @@
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>
<style>

View File

@ -1,7 +1,16 @@
<template>
<div>
<el-dialog class="fuzhou-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="840px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
@ -9,41 +18,49 @@
<el-col :span="8">
<el-form-item :label="this.$t('menu.type')" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
:value="option.code">
</el-option>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
<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-col>
</el-row>
</el-form>
</div>
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
highlight-current-row height="200">
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')">
</el-table-column>
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')">
</el-table-column>
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')">
</el-table-column>
<el-table-column prop="result" :label="this.$t('menu.executionResult')">
</el-table-column>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<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>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<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 :span="2" :offset="1">
<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 :span="2" :offset="2">
<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 :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
@ -61,7 +79,7 @@
</el-col>
</el-row>
</el-dialog>
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate"></confirm-signal-unlock>
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
</div>
</template>
<script>
@ -91,14 +109,14 @@
timeCountConfirm: -1,
stationName: '',
signalName: ''
}
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Signal.unlock.menu.operation, name: this.$t('menu.menuSignal.signalDeblock') },
{ code: OperationEvent.Signal.guide.menu.operation, name: this.$t('menu.menuSignal.guideRouteHandle') }
]
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -113,6 +131,7 @@
return OperationEvent.Signal.guide.order.domId;
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
@ -124,6 +143,7 @@
return OperationEvent.Signal.guide.confirm1.domId;
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
@ -135,6 +155,7 @@
return OperationEvent.Signal.guide.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
@ -146,11 +167,13 @@
return OperationEvent.Signal.guide.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
@ -160,6 +183,7 @@
return '办理引导进路';
}
}
return '';
}
},
watch: {
@ -168,7 +192,7 @@
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && 1 <= index && index <= 2) {
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
@ -179,7 +203,7 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
@ -195,7 +219,7 @@
this.timeCountConfirm = -1;
}
}
}, 1000)
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
@ -207,8 +231,8 @@
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -244,13 +268,13 @@
}
},
commandHasPopUp() {
let operate = {
type: MapDeviceType.Signal.type,
}
const operate = {
type: MapDeviceType.Signal.type
};
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'));
@ -262,16 +286,16 @@
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
}
}
})
});
},
commandNoPopUp() {
let operate = {
const operate = {
type: MapDeviceType.Signal.type
}
};
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'));
@ -286,12 +310,12 @@
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
})
});
},
confirm1() {
let operate = {
type: MapDeviceType.Signal.type,
}
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
@ -315,13 +339,13 @@
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
})
});
},
confirm2() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type
}
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
@ -347,12 +371,12 @@
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
})
});
},
stop() {
let operate = {
type: MapDeviceType.Signal.type,
}
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
@ -362,7 +386,6 @@
operate.operation = OperationEvent.Signal.guide.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
@ -372,21 +395,21 @@
} else {
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') });
})
});
},
close() {
let operate = {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation,
}
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
},
@ -423,8 +446,8 @@
elem[prop] = param[prop];
}
}
})
}
});
}
}
};
</script>

View File

@ -1,16 +1,25 @@
<template>
<el-dialog class="fuzhou-01__systerm signal-control" :title="title" :visible.sync="show" width="300px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="11" :offset="2"><span>{{ $t('menu.signal') }}</span></el-col>
</el-row>
<el-row>
<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 :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-row>
<el-row justify="center" class="button-group">
@ -21,15 +30,15 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteControl',
@ -46,7 +55,7 @@
stationName: '',
signalName: ''
}
};
},
computed: {
show() {
@ -74,12 +83,13 @@
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
return this.$t('menu.menuSignal.cancelInterlockAutoTrigger');
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
@ -87,8 +97,8 @@
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -142,11 +152,11 @@
},
//
cancelTrainRouteByLocal() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -154,7 +164,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -162,11 +172,11 @@
},
//
cancelTrainRouteByCentral() {
let operate = {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
messages: [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')]
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -176,17 +186,17 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate, this.selected);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
});
},
//
signalClose() {
let operate = {
const operate = {
type: MapDeviceType.Signal.type,
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.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -196,17 +206,17 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
});
},
//
reopenSignal() {
let operate = {
const operate = {
type: MapDeviceType.Signal.type,
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.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -216,18 +226,17 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
});
},
//
setAutoInterlock() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -235,7 +244,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -243,12 +252,11 @@
},
//
cancelAutoInterlock() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -256,7 +264,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -264,12 +272,11 @@
},
//
setAutoTrigger() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.setAutoTrigger.menu.operation
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -277,7 +284,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -285,11 +292,11 @@
},
//
cancelAutoTrigger() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
}
};
this.doClose();
this.loading = true;
@ -298,7 +305,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -306,20 +313,20 @@
},
//
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation,
}
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
}
}
};
</script>

View File

@ -1,23 +1,39 @@
<template>
<div>
<el-dialog class="fuzhou-01__systerm route-detail" :title="title" :visible.sync="show" width="340px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
</el-row>
<el-row>
<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 :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-row>
<div class="table">
<span>{{ $t('menu.routeList') }}</span>
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
:height="140">
<el-table
ref="tempTable"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column :label="this.$t('menu.route')">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
@ -39,7 +55,7 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
</template>
@ -47,7 +63,7 @@
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteDetail',
@ -60,8 +76,8 @@
loading: false,
tempData: [],
stationName: '',
signalName: '',
}
signalName: ''
};
},
computed: {
...mapGetters('map', [
@ -83,7 +99,7 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected, tempData) {
@ -92,8 +108,8 @@
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -112,11 +128,11 @@
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.detail.menu.operation
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -124,26 +140,26 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>

View File

@ -1,26 +1,42 @@
<template>
<div>
<el-dialog class="fuzhou-01__systerm route-hand-control" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
</el-row>
<el-row>
<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 :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-row>
<div class="table">
<span>{{ $t('menu.routeList') }}</span>
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
:height="140">
<el-table-column prop="name" :label="this.$t('menu.route')" :id="domIdChoose" style="margin-left:30px">
<el-table
ref="tempTable"
: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">
<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>
</template>
</el-table-column>
@ -35,22 +51,28 @@
<el-table-column prop="conflictCheck" :label="this.$t('menu.conflictCheck')" :width="80">
<template slot-scope="scope">
<span
:style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.conflictCheck}}</span>
:style="{color: scope.row.disabled ? '#CBCBCB':'unset'}"
>{{ scope.row.conflictCheck }}</span>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :disabled="commitDisabled" :loading="loading"
@click="commit">{{$t('global.confirm')}}</el-button>
<el-button
:id="domIdConfirm"
type="primary"
:disabled="commitDisabled"
:loading="loading"
@click="commit"
>{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
</template>
@ -59,7 +81,7 @@
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteHandControl',
@ -75,8 +97,8 @@
operation: null,
selection: [],
stationName: '',
signalName: '',
}
signalName: ''
};
},
computed: {
...mapGetters('map', [
@ -96,6 +118,7 @@
return OperationEvent.Signal.atsAutoControl.choose.domId;
}
}
return '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
@ -106,6 +129,7 @@
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return this.$t('menu.menuSignal.atsAutoControl');
}
return '';
},
commitDisabled() {
let disabled = true;
@ -128,7 +152,7 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected, tempData) {
@ -137,8 +161,8 @@
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -154,9 +178,9 @@
elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
elem.controlType == '01') {
elem.disabled = true
elem.disabled = true;
}
})
});
}
this.tempData = tempData || [];
@ -174,13 +198,13 @@
this.$store.dispatch('training/emitTipFresh');
},
checkTableDataSelction(data) {
let selection = [];
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
})
});
}
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
@ -189,38 +213,38 @@
}
},
serializeCodeListWithSeparator(sep) {
let codeList = [];
const codeList = [];
if (this.selection && this.selection.length) {
this.selection.forEach(elem => {
codeList.push(elem.code);
})
});
}
return codeList.join(sep);
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
let operate = {
const operate = {
repeat: true,
type: MapDeviceType.Signal.type,
operation: '',
val: this.serializeCodeListWithSeparator('::'),
selection: selection
}
};
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) {
/** 自排开*/
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
} else if (!selection) {
this.$messageBox(this.$t('tip.selectAPieceOfData'));
}
@ -236,11 +260,11 @@
},
//
humanControl() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation,
}
operation: OperationEvent.Signal.humanControl.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -248,7 +272,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -256,11 +280,11 @@
},
//
atsAutoControl() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
}
operation: OperationEvent.Signal.atsAutoControl.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -268,26 +292,26 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>

View File

@ -1,7 +1,16 @@
<template>
<div>
<el-dialog class="fuzhou-01__systerm section-cmd-control" :title="title" :visible.sync="show" width="840px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
@ -9,41 +18,49 @@
<el-col :span="8">
<el-form-item :label="this.$t('global.status')" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
:value="option.code">
</el-option>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
<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-col>
</el-row>
</el-form>
</div>
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
highlight-current-row height="200">
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')">
</el-table-column>
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')">
</el-table-column>
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')">
</el-table-column>
<el-table-column prop="result" :label="this.$t('menu.executionResult')">
</el-table-column>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<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>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<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 :span="2" :offset="1">
<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 :span="2" :offset="2">
<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 :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
@ -86,15 +104,15 @@
timeCountConfirm: -1,
stationName: '',
sectionName: ''
}
};
},
computed: {
typeList() {
return [
{ 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.axlePreReset.menu.operation, name: this.$t('menu.menuSection.sectionAxisPreReset') },
]
{ code: OperationEvent.Section.axlePreReset.menu.operation, name: this.$t('menu.menuSection.sectionAxisPreReset') }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -112,6 +130,7 @@
return OperationEvent.Section.axlePreReset.order.domId;
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
@ -126,6 +145,7 @@
return OperationEvent.Section.axlePreReset.confirm1.domId;
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
@ -140,6 +160,7 @@
return OperationEvent.Section.axlePreReset.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
@ -154,11 +175,13 @@
return OperationEvent.Section.axlePreReset.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
@ -170,6 +193,7 @@
return this.$t('menu.menuSection.sectionAxisPreReset');
}
}
return '';
}
},
watch: {
@ -178,7 +202,7 @@
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && 1 <= index && index <= 2) {
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
@ -189,7 +213,7 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
@ -205,7 +229,7 @@
this.timeCountConfirm = -1;
}
}
}, 1000)
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
@ -218,14 +242,14 @@
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
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) {
this.stationName = station.name;
}
@ -265,19 +289,19 @@
commandHasPopUp() {
},
commandNoPopUp() {
let operate = {
const operate = {
type: MapDeviceType.Section.type
}
};
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) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.order.operation
operate.operation = OperationEvent.Section.fault.order.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'));
@ -292,12 +316,12 @@
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
})
});
},
confirm1() {
let operate = {
type: MapDeviceType.Section.type,
}
const operate = {
type: MapDeviceType.Section.type
};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
@ -324,13 +348,13 @@
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
})
});
},
confirm2() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Section.type
}
};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
@ -359,12 +383,12 @@
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
})
});
},
stop() {
let operate = {
type: MapDeviceType.Section.type,
}
const operate = {
type: MapDeviceType.Section.type
};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
@ -386,21 +410,21 @@
} else {
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') });
})
});
},
close() {
let operate = {
const operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Command.close.menu.operation,
}
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
},
@ -426,8 +450,8 @@
elem[prop] = param[prop];
}
}
})
}
});
}
}
};
</script>

View File

@ -1,16 +1,25 @@
<template>
<el-dialog class="fuzhou-01__systerm section-control" :title="title" :visible.sync="show" width="300px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="11" :offset="2"><span>{{ $t('menu.section') }}</span></el-col>
</el-row>
<el-row>
<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 :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-row>
<el-row justify="center" class="button-group">
@ -21,13 +30,13 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'SectionControl',
@ -40,8 +49,8 @@
loading: false,
operation: '',
stationName: '',
sectionName: '',
}
sectionName: ''
};
},
computed: {
show() {
@ -61,12 +70,13 @@
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
return this.$t('menu.menuSection.orbitalSectionActive');
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
@ -75,14 +85,14 @@
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
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) {
this.stationName = station.name;
}
@ -113,11 +123,11 @@
},
//
lock() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.lock.menu.operation,
}
operation: OperationEvent.Section.lock.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -125,7 +135,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -133,11 +143,11 @@
},
//
split() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.split.menu.operation,
}
operation: OperationEvent.Section.split.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -145,7 +155,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -153,11 +163,11 @@
},
//
active() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.active.menu.operation,
}
operation: OperationEvent.Section.active.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -165,26 +175,26 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>

View File

@ -1,37 +1,61 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.stationStandStatus') }}</span></el-col>
</el-row>
<el-row>
<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 :span="10" :offset="2">
<div style="height: 32px;">
<el-radio v-model="standStatus" label="02" 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>
<el-radio
v-model="standStatus"
label="02"
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>
</el-col>
</el-row>
<div class="table">
<span>{{ $t('menu.stationStandStatus') }}</span>
<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>
<el-table-column prop="station" :label="this.$t('menu.switchbackPlatform')">
</el-table-column>
<el-table-column prop="name" :width="170" :label="this.$t('menu.switchbackStation')" />
<el-table-column prop="station" :label="this.$t('menu.switchbackPlatform')" />
<el-table-column prop="strategy" :label="this.$t('menu.switchbackStrategy')">
<template slot-scope="scope">
<el-select v-model="scope.row.strategy" size="mini" @change="strategySelectChange"
:id='domIdChoose'>
<el-option v-for="item in strategyList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
<el-select
:id="domIdChoose"
v-model="scope.row.strategy"
size="mini"
@change="strategySelectChange"
>
<el-option
v-for="item in strategyList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
@ -50,14 +74,14 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
@ -88,19 +112,19 @@
{
value: '04',
label: this.$t('menu.default')
},
}
],
stationName: '',
standStatus: '',
selection: [],
isSelect: true,
isConfirm: false,
strategy: '',
}
strategy: ''
};
},
computed: {
...mapGetters('map', [
'stationList',
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -121,13 +145,12 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
let stationList = [...this.stationList];
let station = this.stationList.find(n => n.code == selected.stationCode)
const station = this.stationList.find(n => n.code == selected.stationCode);
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
},
doShow(operate, selected, opts) {
@ -136,7 +159,7 @@
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standStatus = selected.direction;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -150,26 +173,26 @@
});
},
checkTableDataSelction(data) {
let selection = [];
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
})
});
}
this.disabledSend = selection.length ? false : true;
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
strategySelectChange(strategy) {
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
val: `${strategy}`,
}
val: `${strategy}`
};
this.strategy = strategy;
this.isSelect = false;
@ -178,7 +201,7 @@
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
},
doClose() {
this.loading = false;
@ -187,12 +210,12 @@
},
commit() {
if (this.isConfirm) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
val: `${this.strategy}`
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -200,29 +223,29 @@
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
} else {
this.doClose();
}
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>

View File

@ -1,6 +1,15 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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">
<span>{{ preContext }}{{ standName }}</span>
</div>
@ -12,13 +21,13 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandDetainTrain',
@ -32,7 +41,7 @@
standName: '',
selected: null,
operation: null
}
};
},
computed: {
show() {
@ -58,6 +67,7 @@
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
return this.$t('menu.menuStationStand.cancelJumpStop');
}
return '';
},
preContext() {
return this.title + ':';
@ -66,7 +76,7 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
@ -112,11 +122,11 @@
},
//
setDetainTrain() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
}
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -125,19 +135,19 @@
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
cancelDetainTrain() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
}
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -146,19 +156,19 @@
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
cancelDetainTrainForce() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
}
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -167,19 +177,19 @@
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
earlyDeparture() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
}
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -187,20 +197,20 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
setJumpStop() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
val: this.selected.direction // , 01: /02:
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -208,20 +218,20 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
cancelJumpStop() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
val: this.selected.direction // , 01: /02:
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -229,29 +239,29 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>
<style>
.stand-detain-train .context {

View File

@ -1,25 +1,32 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-detail" :title="title" :visible.sync="show" width="400px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</span></el-col>
</el-row>
<el-row>
<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 :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-row>
<div class="table">
<span>{{ $t('menu.stationStandStatus') }}</span>
<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>
<el-table-column prop="status" :label="this.$t('global.status')">
</el-table-column>
<el-table-column prop="item" :width="140" :label="this.$t('menu.item')" />
<el-table-column prop="status" :label="this.$t('global.status')" />
</el-table>
</div>
<el-row justify="center" class="button-group">
@ -30,7 +37,7 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
@ -57,11 +64,11 @@
'03': this.$t('menu.automaticChange'),
'04': this.$t('menu.default')
}
}
};
},
computed: {
...mapGetters('map', [
'stationList',
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -79,14 +86,13 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
let stationList = this.stationList.slice();
let index = this.stationList.findIndex(n => n.code == selected.stationCode);
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
let stationStand, station;
if (selected.direction == '01') { //
//
@ -120,7 +126,7 @@
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -138,10 +144,10 @@
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.close.confirm.operation,
}
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -149,25 +155,25 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
})
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>

View File

@ -13,7 +13,7 @@
<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>
<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-radio :id="upDown == '01' ? domIdChoose : ''" label="02">{{ $t('menu.uplinkBroadly') }}</el-radio>
</el-col>

View File

@ -1,36 +1,46 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</span></el-col>
</el-row>
<el-row>
<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 :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-row>
<div class="table">
<span>{{ $t('menu.stationStandStatus') }}</span>
<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>
<el-table-column prop="name" :width="210" :label="this.$t('menu.nextPlatform')" />
<el-table-column prop="time" :label="this.$t('menu.intervalRunningTime')">
<template slot-scope="scope">
<el-select v-model="scope.row.time" size="mini" @change="timeSelectChange" :id='domIdChoose'>
<el-option v-for="item in timeList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
<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"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="check" :label="this.$t('menu.alwaysEffective')">
<template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" @change="checkChange" :id='domIdCheck'>
</el-checkbox>
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
</template>
</el-table-column>
</el-table>
@ -48,7 +58,7 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<confirm-control ref="confirmControl" />
</el-dialog>
</template>
@ -74,7 +84,7 @@
isSelect: true,
isConfirm: false,
time: ''
}
};
},
watch: {
//
@ -109,12 +119,12 @@
return this.$t('menu.menuStationStand.setRunLevel');
},
timeList() {
let list = [
const list = [
{ value: 0, label: this.$t('menu.automatic2') },
{ value: 1, label: '1' }
];
for (var i = 60; i <= this.maxRunLevel; i++) {
list.push({ value: i, label: `${i}` })
list.push({ value: i, label: `${i}` });
}
return list;
@ -123,25 +133,24 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
let stationList = this.stationList.slice();
let index = this.stationList.findIndex(n => n.code == selected.stationCode)
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
if (selected.direction == '01') { //
//
if (index != 0) {
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
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 });
}
} else {
//
if (index != this.stationList.length) {
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
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 });
}
}
@ -153,7 +162,7 @@
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -167,26 +176,26 @@
});
},
checkTableDataSelction(data) {
let selection = [];
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
})
});
}
this.disabledSend = selection.length ? false : true;
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
timeSelectChange(time) {
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
val: time.toString(),
}
val: time.toString()
};
this.time = time.toString();
this.isSelect = false;
@ -195,20 +204,20 @@
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
},
checkChange(check) {
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.check.operation,
val: check.toString(),
}
val: check.toString()
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
},
doClose() {
this.loading = false;
@ -217,13 +226,13 @@
},
commit() {
if (this.isConfirm) {
let forver = this.tempData[0].check ? true : false;
let operate = {
const forver = !!this.tempData[0].check;
const operate = {
type: MapDeviceType.StationStand.type,
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')}`],
val: [this.time, forver].join('::'),
}
val: [this.time, forver].join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -233,28 +242,28 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
})
});
} else {
this.doClose();
}
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>

View File

@ -1,28 +1,44 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="390px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="11" :offset="2"><span>{{ $t('menu.platformName') }}</span></el-col>
</el-row>
<el-row>
<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 :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-row>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 60px;">
<span class="base-label">{{ $t('menu.controlMode') }}</span>
<div style=" position: relative; top:-10px;">
<el-radio-group v-model="control" @change='chooseControl'>
<el-radio label="01" :id="control === '01'? '': domIdChoose1">{{$t('menu.automatic2')}}</el-radio>
<el-radio label="02" :id="control === '02'? '': domIdChoose1">{{$t('menu.artificial')}}</el-radio>
<el-radio-group v-model="control" @change="chooseControl">
<el-radio :id="control === '01'? '': domIdChoose1" label="01">{{ $t('menu.automatic2') }}</el-radio>
<el-radio :id="control === '02'? '': domIdChoose1" label="02">{{ $t('menu.artificial') }}</el-radio>
</el-radio-group>
<el-input-number v-model="time" @change="inputTime" :disabled="disabledInput" :id="domIdInput"
controls-position="right" :min="0" size="mini" style="width: 130px; padding-left:30px">
</el-input-number>{{$t('global.second')}}
<el-input-number
:id="domIdInput"
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 style="padding: 0px 15px; height: 30px;">
@ -36,9 +52,9 @@
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
<span class="base-label">{{ $t('menu.effectiveNumber') }}</span>
<div style=" position: relative; top:-10px;">
<el-radio-group v-model="effective" @change="chooseEffective" :disabled="disabledTime">
<el-radio :label="false" :id="effective === false? '': domIdChoose2">{{$t('menu.onceEffective')}}</el-radio>
<el-radio :label="true" :id="effective === true? '': domIdChoose2">{{$t('menu.alwaysEffective')}}</el-radio>
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
<el-radio :id="effective === false? '': domIdChoose2" :label="false">{{ $t('menu.onceEffective') }}</el-radio>
<el-radio :id="effective === true? '': domIdChoose2" :label="true">{{ $t('menu.alwaysEffective') }}</el-radio>
</el-radio-group>
</div>
</div>
@ -50,15 +66,15 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandStopTime',
@ -76,8 +92,8 @@
effective: false,
selected: null,
standName: '',
stationName: '',
}
stationName: ''
};
},
computed: {
show() {
@ -100,13 +116,13 @@
},
disabledUp() {
if (this.selected) {
return this.selected.direction !== '02'
return this.selected.direction !== '02';
}
return true;
},
disabledDown() {
if (this.selected) {
return this.selected.direction !== '01'
return this.selected.direction !== '01';
}
return true;
},
@ -123,7 +139,7 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected, tempDate) {
@ -133,7 +149,7 @@
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -141,7 +157,7 @@
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
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.selected = selected || {};
}
@ -162,52 +178,52 @@
this.effective = true;
}
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
val: `${control}`
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
},
chooseEffective(effective) {
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
val: `${effective}`
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
},
inputTime(time) {
let operate = {
const operate = {
repeat: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.input.operation,
val: `${time}`
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
},
commit() {
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.menu.operation,
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')}`]
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -217,23 +233,23 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
})
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.close.menu.operation,
}
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -1,7 +1,16 @@
<template>
<div>
<el-dialog class="fuzhou-01__systerm station-cmd-control" :title="title" :visible.sync="show" width="840px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
@ -9,36 +18,44 @@
<el-col :span="11">
<el-form-item :label="this.$t('menu.type')" label-width="40px">
<el-select v-model="operation" size="small" disabled style="width:230px">
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
:value="option.code">
</el-option>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<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-col>
</el-row>
</el-form>
</div>
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
highlight-current-row height="200">
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')">
</el-table-column>
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')">
</el-table-column>
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')">
</el-table-column>
<el-table-column prop="result" :label="this.$t('menu.executionResult')">
</el-table-column>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<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>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<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 :span="2" :offset="1">
<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 :span="2" :offset="2">
<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 :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
@ -79,14 +97,14 @@
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: ''
}
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Station.powerUnLock.menu.operation, name: this.$t('menu.menuStation.powerUnLock') },
{ code: OperationEvent.Station.execKeyOperationTest.menu.operation, name: this.$t('menu.menuStation.execKeyOperationTest') }
]
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -101,6 +119,7 @@
return OperationEvent.Station.execKeyOperationTest.order.domId;
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
@ -112,6 +131,7 @@
return OperationEvent.Station.execKeyOperationTest.confirm1.domId;
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
@ -123,6 +143,7 @@
return OperationEvent.Station.execKeyOperationTest.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
@ -134,11 +155,13 @@
return OperationEvent.Station.execKeyOperationTest.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
@ -148,6 +171,7 @@
return this.$t('menu.menuStation.execKeyOperationTest');
}
}
return '';
}
},
watch: {
@ -156,7 +180,7 @@
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && 1 <= index && index <= 2) {
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
@ -167,7 +191,7 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
@ -183,7 +207,7 @@
this.timeCountConfirm = -1;
}
}
}, 1000)
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
@ -194,7 +218,7 @@
if (!this.dialogShow) {
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
this.stationName = selected.name
this.stationName = selected.name;
}
this.order = 0;
@ -228,16 +252,16 @@
commandHasPopUp() {
},
commandNoPopUp() {
let operate = {
const operate = {
type: MapDeviceType.Station.type
}
};
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) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation;
}
this.setMessage(this.$t('tip.firstConfirmTip'));
@ -252,12 +276,12 @@
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
})
});
},
confirm1() {
let operate = {
type: MapDeviceType.Station.type,
}
const operate = {
type: MapDeviceType.Station.type
};
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
@ -281,13 +305,13 @@
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
})
});
},
confirm2() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Station.type
}
};
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
@ -314,12 +338,12 @@
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
})
});
},
stop() {
let operate = {
type: MapDeviceType.Station.type,
}
const operate = {
type: MapDeviceType.Station.type
};
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
@ -338,21 +362,21 @@
} else {
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') });
})
});
},
close() {
let operate = {
const operate = {
type: MapDeviceType.Station.type,
operation: OperationEvent.Command.close.menu.operation,
}
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
},
@ -378,8 +402,8 @@
elem[prop] = param[prop];
}
}
})
}
});
}
}
};
</script>

View File

@ -1,6 +1,16 @@
<template>
<el-dialog class="fuzhou-01__systerm station-human-control-all" :title="title" :visible.sync="show" width="430px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-dialog
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">
<span>{{ title }}</span>
</div>
@ -12,25 +22,25 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StationHumanControlAll',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: null
}
},
components: {
NoticeInfo
};
},
computed: {
show() {
@ -44,12 +54,12 @@
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
},
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -69,7 +79,7 @@
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
@ -82,28 +92,28 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Station.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>
<style>

View File

@ -1,11 +1,20 @@
<template>
<el-dialog class="fuzhou-01__systerm station-set-route-control-all" :title="title" :visible.sync="show"
width="450px" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body
v-dialogDrag>
<el-dialog
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">
<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-input v-model="stationName" size="small" disabled></el-input>
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-form>
<el-radio-group v-model="mode">
@ -25,27 +34,27 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StationSetRouteControlAll',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: null,
stationName: '',
mode: true,
}
},
components: {
NoticeInfo
mode: true
};
},
computed: {
show() {
@ -59,12 +68,12 @@
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
},
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
@ -88,7 +97,7 @@
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
@ -102,28 +111,28 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Station.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>
<style>

View File

@ -1,7 +1,16 @@
<template>
<div>
<el-dialog class="fuzhou-01__systerm switch-cmd-control" :title="title" :visible.sync="show" width="840px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
@ -9,41 +18,49 @@
<el-col :span="8">
<el-form-item :label="this.$t('menu.type')" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
:value="option.code">
</el-option>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
<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-col>
</el-row>
</el-form>
</div>
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
highlight-current-row height="200">
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')">
</el-table-column>
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')">
</el-table-column>
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')">
</el-table-column>
<el-table-column prop="result" :label="this.$t('menu.executionResult')">
</el-table-column>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<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>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<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 :span="2" :offset="1">
<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 :span="2" :offset="2">
<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 :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
@ -86,7 +104,7 @@
timeCountConfirm: -1,
stationName: '',
switchName: ''
}
};
},
computed: {
typeList() {
@ -94,8 +112,8 @@
{ 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.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() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -116,6 +134,7 @@
return OperationEvent.Switch.axlePreReset.order.domId;
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
@ -133,6 +152,7 @@
return OperationEvent.Switch.axlePreReset.confirm1.domId;
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
@ -150,6 +170,7 @@
return OperationEvent.Switch.axlePreReset.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
@ -167,11 +188,13 @@
return OperationEvent.Switch.axlePreReset.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
@ -185,6 +208,7 @@
return '道岔计轴复位';
}
}
return '';
}
},
watch: {
@ -193,7 +217,7 @@
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && 1 <= index && index <= 2) {
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
@ -204,7 +228,7 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
@ -220,7 +244,7 @@
this.timeCountConfirm = -1;
}
}
}, 1000)
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
@ -232,8 +256,8 @@
this.switchName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
this.switchName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -276,19 +300,19 @@
},
commandNoPopUp() {
let operate = {
const operate = {
type: MapDeviceType.Switch.type
}
};
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) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.order.operation
operate.operation = OperationEvent.Switch.unblock.order.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) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.order.operation;
@ -306,12 +330,12 @@
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
})
});
},
confirm1() {
let operate = {
type: MapDeviceType.Switch.type,
}
const operate = {
type: MapDeviceType.Switch.type
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
@ -321,7 +345,7 @@
operate.operation = OperationEvent.Switch.unblock.confirm1.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) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm1.operation;
@ -341,13 +365,13 @@
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
})
});
},
confirm2() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
}
type: MapDeviceType.Switch.type
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
@ -357,7 +381,7 @@
operate.operation = OperationEvent.Switch.unblock.confirm2.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) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
@ -380,12 +404,12 @@
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
})
});
},
stop() {
let operate = {
type: MapDeviceType.Switch.type,
}
const operate = {
type: MapDeviceType.Switch.type
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
@ -395,7 +419,7 @@
operate.operation = OperationEvent.Switch.unblock.stop.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) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.stop.operation;
@ -410,21 +434,21 @@
} else {
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') });
})
});
},
close() {
let operate = {
const operate = {
type: MapDeviceType.Switch.type,
operation: OperationEvent.Command.close.menu.operation,
}
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
},
@ -450,8 +474,8 @@
elem[prop] = param[prop];
}
}
})
}
});
}
}
};
</script>

View File

@ -1,19 +1,28 @@
<template>
<el-dialog class="fuzhou-01__systerm switch-control" :title="title" :visible.sync="show" width="300px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="11" :offset="2"><span>{{ $t('menu.switch') }}</span></el-col>
</el-row>
<el-row>
<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 :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-row>
<el-row style="margin-top: 10px;" v-if="activeShow">
<el-row v-if="activeShow" style="margin-top: 10px;">
<el-col :span="11">
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
{{ $t('menu.activation') }}</el-radio>
@ -31,13 +40,13 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'SwitchControl',
@ -52,8 +61,8 @@
stationName: '',
switchName: '',
radio: 1,
activeShow: false,
}
activeShow: false
};
},
computed: {
show() {
@ -83,12 +92,13 @@
this.radio = '1';
return this.$t('menu.menuSwitch.sectionActive');
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
@ -96,8 +106,8 @@
this.switchName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
this.switchName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -137,11 +147,11 @@
},
//
lock() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.lock.menu.operation,
}
operation: OperationEvent.Switch.lock.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -149,7 +159,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -157,11 +167,11 @@
},
//
block() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.block.menu.operation,
}
operation: OperationEvent.Switch.block.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -169,7 +179,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -177,11 +187,11 @@
},
//
turnout(operation) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.turnout.menu.operation,
}
operation: OperationEvent.Switch.turnout.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -189,7 +199,7 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -197,18 +207,18 @@
},
//
turnoutForce() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.turnoutForce.menu.operation,
}
operation: OperationEvent.Switch.turnoutForce.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -216,18 +226,18 @@
},
//
split() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.split.menu.operation,
}
operation: OperationEvent.Switch.split.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
@ -235,37 +245,37 @@
},
//
active() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.active.menu.operation,
}
operation: OperationEvent.Switch.active.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Switch.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>

View File

@ -1,13 +1,26 @@
<template>
<el-dialog class="fuzhou-01__systerm route-create" :title="title" :visible.sync="show" width="580px"
label-position="top" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false"
v-dialogDrag>
<el-dialog
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;">
<el-form size="small" label-width="100px">
<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-option v-for="item in trainList" :key="item.code" :label="item.groupNumber"
:value="item.code"></el-option>
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.groupNumber"
:value="item.code"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="列车车次:" prop="tripNumber">
@ -18,8 +31,7 @@
</el-form-item> -->
<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-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value">
</el-option>
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
</el-select>
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数下行路线车次号选择基数)</div> -->
</el-form-item>
@ -31,7 +43,7 @@
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
@ -39,7 +51,7 @@
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { getPublishTrainList } from '@/api/jmap/map';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteCreate',
@ -66,7 +78,7 @@
tripNumber: '',
direction: '',
selected: null
}
};
},
computed: {
...mapGetters('map', [
@ -88,16 +100,16 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
loadInitData(map) {
if (Object.keys(map || {}).length) {
getPublishTrainList(map.skinCode).then(response => {
this.trainList = response.data;
}).catch(error => {
}).catch(() => {
this.$messageBox(this.$t('error.getTrainListFailed'));
})
});
}
},
doShow(operate, selected) {
@ -119,38 +131,38 @@
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.newtrain.menu.operation,
val: '' + this.direction + '::' + this.trainCode
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>

View File

@ -1,9 +1,18 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="120px" :model="addModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
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-input v-model="addModel.tripNumber"></el-input>
<el-input v-model="addModel.tripNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
@ -29,17 +38,17 @@
return {
trainNoList: [],
addModel: {
tripNumber: '',
tripNumber: ''
},
rules: {
tripNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
],
]
},
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -55,20 +64,16 @@
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return this.$t('menu.menuTrain.editTrainNo')
return this.$t('menu.menuTrain.editTrainNo');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
@ -83,11 +88,11 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainNo.menu.operation,
}
operation: OperationEvent.Train.editTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -95,29 +100,29 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {

View File

@ -1,44 +1,61 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="640px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
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%;">
<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>
</div>
<div style="overflow: hidden;">
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;">
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>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandSource">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<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"
:value="item.code">
</el-option>
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="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>
</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>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandGoal">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<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"
:value="item.code">
</el-option>
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="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>
</div>
</div>
@ -71,7 +88,7 @@
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
stationStandGoal: ''
},
rules: {
@ -89,11 +106,11 @@
],
stationStandGoal: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
],
]
},
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -115,14 +132,10 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
@ -137,11 +150,11 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.moveTrainId.menu.operation,
}
operation: OperationEvent.Train.moveTrainId.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -149,30 +162,30 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {

View File

@ -1,45 +1,62 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="640px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
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="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>
<div style="position: relative; top:-10px;">
<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 prop="stationStandSource">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<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"
:value="item.code">
</el-option>
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="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>
</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>
<div style="position: relative; top:-10px;">
<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 prop="stationStandGoal">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<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"
:value="item.code">
</el-option>
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="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>
</div>
</div>
@ -73,7 +90,7 @@
stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
trainNumberGoal: '',
trainNumberGoal: ''
},
rules: {
@ -94,11 +111,11 @@
],
stationStandGoal: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
],
]
},
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -120,14 +137,10 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
@ -142,11 +155,11 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.moveTrainId.menu.operation,
}
operation: OperationEvent.Train.moveTrainId.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -154,30 +167,30 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {

View File

@ -1,10 +1,20 @@
<template>
<el-dialog class="fuzhou-01__systerm two-confirmation" :title="$t('menu.menuChildDialog.secondaryConfirmation')" :visible.sync="show" width="360px"
:before-close="doClose" :showClose="false" :zIndex="2000" :modal="false" :close-on-click-modal="false"
append-to-body v-dialogDrag>
<el-dialog
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">
<template v-for="message in messages">
<span>{{message}}</span><br/>
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span><br>
</template>
</div>
<el-row class="button-group">
@ -15,16 +25,19 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.close') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo'
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'TwoConfirmation',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
@ -32,10 +45,7 @@
operate: '',
timer: null,
domIdConfirm: ''
}
},
components: {
NoticeInfo
};
},
computed: {
show() {
@ -48,13 +58,13 @@
if (this.operate) {
return this.operate.messages;
}
return []
return [];
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -78,10 +88,10 @@
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
const operate = {
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.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -89,22 +99,22 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
})
});
},
forEachDoHandler(selection, handler) {
selection.forEach(elem => {
handler(elem)
})
handler(elem);
});
},
commit() {
if (this.operate) {
this.loading = true;
this.forEachDoHandler(this.operate.selection || [], elem => {
let operate = {
const operate = {
send: true,
type: this.operate.type,
val: elem.code
}
};
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
@ -114,20 +124,19 @@
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
}
this.doClose();
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
})
});
this.loading = false;
}
}
}
}
};
</script>

View File

@ -1,19 +1,29 @@
<template>
<el-dialog class="fuzhou-01__systerm user-add" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-dialog
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; ">
<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-input v-model="model.jobNumber"></el-input>
<el-input v-model="model.jobNumber" />
</el-form-item>
<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 :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 :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>
@ -31,7 +41,7 @@
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'UserAdd',
@ -48,7 +58,7 @@
jobNumber: '',
userName: '',
password: '',
confirm: '',
confirm: ''
},
rules: {
jobNumber: [
@ -62,9 +72,9 @@
],
confirm: [
{ required: true, message: this.$t('menu.menuChildDialog.inputPasswordAgain'), trigger: 'change' }
],
},
]
}
};
},
computed: {
...mapGetters('map', [
@ -80,13 +90,13 @@
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.addUser')
return this.$t('menu.menuChildDialog.addUser');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -113,10 +123,10 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -129,26 +139,26 @@
this.$messageBox(this.$t('menu.menuChildDialog.passwordInconsistent'));
}
}
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); this.model });
}
}).catch(() => { this.doClose(); this.model; });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {

View File

@ -1,10 +1,20 @@
<template>
<el-dialog class="fuzhou-01__systerm user-delete" :title="title" :visible.sync="show" width="260px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-dialog
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">
<i class="el-icon-info"></i>
<template v-for="message in messages">
<span>{{message}}</span>
<i class="el-icon-info" />
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
@ -19,7 +29,7 @@
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'UserDelete',
@ -32,12 +42,12 @@
model: {
type: 'DELETE',
jobNumber: '',
userName: '',
userName: ''
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -59,7 +69,7 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
@ -89,10 +99,10 @@
},
commit() {
if (this.model.userName && this.model.jobNumber) {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -101,25 +111,25 @@
this.doClose();
this.$emit('operateUser', this.model);
}
})
});
} else {
this.$messageBox(this.$t('menu.menuChildDialog.selectTips'));
}
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {

View File

@ -1,22 +1,32 @@
<template>
<el-dialog class="fuzhou-01__systerm user-edit" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-dialog
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; ">
<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-input v-model="model.jobNumber" disabled></el-input>
<el-input v-model="model.jobNumber" disabled />
</el-form-item>
<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 :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 :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 :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>
@ -34,7 +44,7 @@
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'UserEdit',
@ -53,7 +63,7 @@
userName: '',
oldPassword: '',
password: '',
confirm: '',
confirm: ''
},
rules: {
jobNumber: [
@ -70,9 +80,9 @@
],
confirm: [
{ required: true, message: this.$t('menu.menuChildDialog.inputNewAgain'), trigger: 'change' }
],
},
]
}
};
},
computed: {
...mapGetters('map', [
@ -88,13 +98,13 @@
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.userEditPage')
return this.$t('menu.menuChildDialog.userEditPage');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
@ -126,15 +136,15 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid)
if (valid) {
if (this.selected.password !== this.model.oldPassword) {
this.$messageBox(this.$t('menu.menuChildDialog.originalPasswordError'));
} else if (this.model.password !== this.model.confirm) {
@ -145,26 +155,27 @@
this.doClose();
this.$emit('operateUser', this.model);
}
})
}
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {

View File

@ -1,14 +1,27 @@
<template>
<el-dialog class="fuzhou-01__systerm manage-user" :title="title" :visible.sync="show" width="600px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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="position: relative; left: 10px;">
</div>
<div style="position: relative; left: 10px;" />
<div style="position: relative; left: 80px;">
<div style="width:100%">
<span style="padding-left: 60px">{{ $t('menu.menuDialog.versionName') }}</span>
<el-button style="position: absolute; right: 95px;" :id="domIdConfirm" type="primary"
:loading="loading" @click="commit">{{$t('menu.menuDialog.confirm')}}</el-button>
<el-button
:id="domIdConfirm"
style="position: absolute; right: 95px;"
type="primary"
:loading="loading"
@click="commit"
>{{ $t('menu.menuDialog.confirm') }}</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> {{ $t('menu.menuDialog.copyright') }}</span>
@ -17,18 +30,15 @@
</div>
<div style="padding: 10px; margin: 5px; ">
<el-table :data="tableData" style="width: 100%;" height="400">
<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>
<el-table-column prop="updateDate" :label="$t('menu.menuDialog.modifyDate')">
</el-table-column>
<el-table-column prop="moduleName" :label="$t('menu.menuDialog.moduleName')" 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>
</div>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'ManageUser',
@ -45,8 +55,8 @@
operation: null,
dialogShow: false,
loading: false,
selected: null,
}
selected: null
};
},
computed: {
show() {
@ -59,13 +69,13 @@
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return this.$t('menu.menuDialog.about')
return this.$t('menu.menuDialog.about');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -87,10 +97,10 @@
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation,
}
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -98,25 +108,25 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
})
});
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {

View File

@ -1,12 +1,31 @@
<template>
<el-dialog class="fuzhou-01__systerm manage-user" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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; ">
<span class="base-label">{{ $t('menu.menuDialog.userList') }}</span>
<el-row>
<el-col :span="18">
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%"
height="450" center size="mini" highlight-current-row @row-click="chooseUser">
<el-table
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">
<template slot-scope="scope">
<span>{{ scope.row.jobNumber }}</span>
@ -17,18 +36,17 @@
<span>{{ scope.row.userName }}</span>
</template>
</el-table-column>
<el-table-column width="20">
</el-table-column>
<el-table-column width="20" />
</el-table>
</el-col>
<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 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 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 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-col>
</el-row>
@ -41,9 +59,9 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<user-add ref="userAdd" @operateUser="operateUser"></user-add>
<user-edit ref="userEdit" @operateUser="operateUser"></user-edit>
<user-delete ref="userDelete" @operateUser="operateUser"></user-delete>
<user-add ref="userAdd" @operateUser="operateUser" />
<user-edit ref="userEdit" @operateUser="operateUser" />
<user-delete ref="userDelete" @operateUser="operateUser" />
</el-dialog>
</template>
@ -52,7 +70,7 @@
import UserAdd from './childDialog/userAdd';
import UserEdit from './childDialog/userEdit';
import UserDelete from './childDialog/userDelete';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'ManageUser',
@ -68,8 +86,8 @@
operation: null,
dialogShow: false,
loading: false,
selected: null,
}
selected: null
};
},
computed: {
...mapGetters('map', [
@ -100,13 +118,13 @@
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return this.$t('menu.menuDialog.userManage')
return this.$t('menu.menuDialog.userManage');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -129,10 +147,10 @@
},
//
addUser() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.addUser.operation,
}
operation: OperationEvent.Command.manage.addUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -140,17 +158,17 @@
if (valid) {
this.$refs.userAdd.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
})
});
},
//
editUser() {
if (this.selected) {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.editUser.operation,
}
operation: OperationEvent.Command.manage.editUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -158,9 +176,9 @@
if (valid) {
this.$refs.userEdit.doShow(operate, this.selected);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
})
});
} else {
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
}
@ -168,11 +186,11 @@
//
delUser() {
if (this.selected) {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.delUser.operation,
messages: [`${this.$t('menu.menuDialog.deleteMessageOne')} ${this.selected.userName} ${this.$t('menu.menuDialog.deleteMessageTwo')}`]
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -180,47 +198,47 @@
if (valid) {
this.$refs.userDelete.doShow(operate, this.selected);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
})
});
} else {
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
}
},
//
freshUser() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.freshUser.operation,
}
operation: OperationEvent.Command.manage.freshUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
}).catch(error => {
}).catch(() => {
this.loading = false;
})
});
},
//
chooseUser(row) {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.chooseUser.operation,
}
operation: OperationEvent.Command.manage.chooseUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.selected = row;
}).catch(error => {
}).catch(() => {
this.loading = false;
})
});
},
commit() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation,
}
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -228,27 +246,27 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
})
});
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}).catch(() => { this.doClose(); });
},
//
operateUser(data) {
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) {
this.tableData.push({
jobNumber: data.jobNumber,
@ -259,7 +277,7 @@
this.$messageBox(this.$t('menu.menuDialog.addFail'));
}
} 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) {
this.tableData[index].password = data.password;
this.tableData[index].userName = data.userName;
@ -267,7 +285,7 @@
this.$messageBox(this.$t('menu.menuDialog.modifyFail'));
}
} 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) {
this.tableData.splice(index, 1);
} else {
@ -276,7 +294,7 @@
}
}
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {

View File

@ -1,36 +1,45 @@
<template>
<el-dialog class="fuzhou-01__systerm password-box" :title="$t('menu.menuDialog.passwordBox')" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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">
<el-form label-width="80px" size="mini">
<el-form-item prop="username">
<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 prop="password">
<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>
<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(2)">2</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(5)">5</el-button>
</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-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(7)">7</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(0)">0</el-button>
</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-group>
</div>
@ -43,16 +52,19 @@
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'PasswordBox',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
@ -61,13 +73,10 @@
operation: null,
model: {
username: '',
password: '',
password: ''
},
key: ''
}
},
components: {
NoticeInfo
};
},
computed: {
show() {
@ -83,12 +92,13 @@
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
loadInitData(operate) {
@ -113,25 +123,25 @@
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.password.operation,
}
operation: OperationEvent.Command.close.password.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
});
},
commit() {
let operate = {
type: this.operate.type,
}
const operate = {
type: this.operate.type
};
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') {
@ -153,7 +163,7 @@
operation: operate.operation,
success: false
});
})
});
} else {
this.$refs.noticeInfo.doShow(operate, [this.$t('menu.menuDialog.IncorrectPassword')]);
@ -175,14 +185,12 @@
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.password-box .el-form {
margin-top: 10px !important;
margin-right: 20px !important;

View File

@ -1,26 +1,38 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
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;">
<span class="base-label">{{ $t('menu.menuDialog.addLocation') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalOne') }}</span>
<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>
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item prop="trainNumberLimber">
<span slot="label" id="frontTrainNumber">{{$t('menu.menuDialog.frontTrainNumber')}}</span>
<el-input v-model="addModel.trainNumberLimber"></el-input>
<span id="frontTrainNumber" slot="label">{{ $t('menu.menuDialog.frontTrainNumber') }}</span>
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
<el-form-item :label="$t('menu.menuDialog.addTrainNumber')" label-width="115px" prop="groupNumber" id="groupNumber">
<el-input v-model="addModel.groupNumber"></el-input>
<el-form-item id="groupNumber" :label="$t('menu.menuDialog.addTrainNumber')" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
@ -48,7 +60,7 @@
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: '',
trainNumberLimber: ''
},
rules: {
@ -60,12 +72,12 @@
// ],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
],
]
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -81,13 +93,13 @@
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.addPlanTrain')
return this.$t('menu.menuDialog.addPlanTrain');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -112,11 +124,11 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation,
}
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -126,30 +138,30 @@
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {

View File

@ -1,16 +1,24 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
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">
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
<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>
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
<el-form-item :label="$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>
<el-row justify="center" class="button-group">
@ -37,7 +45,7 @@
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
stationStandCode: ''
},
rules: {
@ -46,12 +54,12 @@
],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
],
]
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -67,13 +75,13 @@
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.deletePlanTrain')
return this.$t('menu.menuDialog.deletePlanTrain');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -98,11 +106,11 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.planTrain.delPlanTrain.operation,
}
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -112,30 +120,30 @@
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.fuzhou-01__systerm .el-dialog .base-label {

View File

@ -1,9 +1,18 @@
<template>
<el-dialog class="fuzhou-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-dialog
v-dialogDrag
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-input v-model="addModel.groupNumber"></el-input>
<el-input v-model="addModel.groupNumber" />
</el-form-item>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">{{ $t('menu.menuDialog.purpose') }}</span>
@ -11,13 +20,16 @@
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
<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>
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('menu.menuDialog.trainNumber')" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber"></el-input>
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
@ -47,7 +59,7 @@
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: '',
trainNumberLimber: ''
},
rules: {
@ -59,12 +71,12 @@
],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
],
]
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -80,13 +92,13 @@
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.panPlanCar')
return this.$t('menu.menuDialog.panPlanCar');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -111,11 +123,11 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation,
}
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -125,28 +137,28 @@
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -1,6 +1,15 @@
<template>
<el-dialog class="fuzhou-01__systerm view-display" :title="$t('menu.menuDialog.deviceDisplaySettings')" :visible.sync="show" width="340px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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">
<div>
<el-checkbox :label="1">{{ $t('menu.menuDialog.trainWindow') }}</el-checkbox>
@ -17,35 +26,34 @@
</el-checkbox-group>
<el-row class="button-group">
<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-col>
<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-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import deviceType from '@/jmap/constant/deviceType';
import { OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewDevice',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
deviceLevels: [2, 3, 4, 5],
}
},
components: {
NoticeInfo
deviceLevels: [2, 3, 4, 5]
};
},
computed: {
show() {
@ -63,7 +71,7 @@
this.$nextTick(() => {
this.setDeviceDisplay();
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -84,24 +92,24 @@
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
});
},
commit() {
let operate = {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: this.deviceLevels.sort().join('::')
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -110,16 +118,16 @@
this.doClose();
this.setDeviceDisplay();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
})
});
},
setDeviceDisplay() {
let deviceList = [];
const deviceList = [];
//
let borderBorderShow = this.deviceLevels.indexOf(2) !== -1 ? true : false;
let sectionList = this.$store.getters['map/sectionList'];
const borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
const sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
//
@ -128,8 +136,8 @@
}
//
let trainWindowShow = this.deviceLevels.indexOf(1) !== -1 ? true : false;
let trainWindowList = this.$store.getters['map/trainWindowList'];
const trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
const trainWindowList = this.$store.getters['map/trainWindowList'];
if (trainWindowList && trainWindowList.length > 0) {
trainWindowList.forEach(elem => {
//
@ -138,19 +146,19 @@
}
// ATS
let linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1 ? true : false; //
let atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1 ? true : false; //ATS
let signalList = this.$store.getters['map/signalList'];
const linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1; //
const atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1; // ATS
const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
})
});
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -126,7 +126,7 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
@ -138,7 +138,7 @@ export default {
});
},
commit() {
let operate = {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
@ -157,24 +157,21 @@ export default {
});
},
setNameDisplay() {
let deviceList = [];
const deviceList = [];
//
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) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
});
}
//
let show = this.nameLevels.indexOf(3) !== -1;
//
nameShow = this.nameLevels.indexOf(7) !== -1; //
let switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; //
let switchList = this.$store.getters['map/switchList'];
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; //
const switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) {
switchList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameShow, switchSectionNameShow }));
@ -182,8 +179,8 @@ export default {
}
//
let indicatorShow = this.nameLevels.indexOf(8) !== -1;
let control = this.$store.getters['map/stationControlList'];
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
const control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) {
control.forEach(elem => {
//
@ -196,7 +193,7 @@ export default {
let standTrackNameShow = false;
let reentryTrackNameShow = false;
let transferTrackNameShow = false;
let sectionList = this.$store.getters['map/sectionList'];
const sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
elem._type = deviceType.Section;
@ -236,8 +233,8 @@ export default {
}
//
let kmPostShow = this.nameLevels.indexOf(12) !== -1;
let stationList = this.$store.getters['map/stationList'];
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
const stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) {
stationList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //

View File

@ -1,11 +1,11 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
<section-control ref="sectionControl"></section-control>
<section-cmd-control ref="sectionCmdControl"></section-cmd-control>
<speed-cmd-control ref="speedCmdControl"></speed-cmd-control>
<train-create ref="trainCreate"></train-create>
<notice-info ref="noticeInfo"></notice-info>
<pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<section-cmd-control ref="sectionCmdControl" />
<speed-cmd-control ref="speedCmdControl" />
<train-create ref="trainCreate" />
<notice-info ref="noticeInfo" />
</div>
</template>
@ -15,9 +15,9 @@
import SectionCmdControl from './dialog/sectionCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import TrainCreate from './dialog/trainCreate';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
@ -33,7 +33,8 @@
},
props: {
selected: {
type: Object
type: Object,
required: true
}
},
data() {
@ -146,7 +147,7 @@
label: this.$t('menu.menuSection.createTrain'),
handler: this.newTrain,
disabledCallback: MenuDisabledState.Section.newTrain
},
}
],
menuForce: [
{
@ -160,16 +161,7 @@
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: {
...mapGetters('training', [
@ -180,23 +172,32 @@
'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: {
clickEvent() {
let self = this;
const self = this;
window.onclick = function (e) {
self.doClose();
}
};
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
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) {
this.menu = this.menuForce
this.menu = this.menuForce;
}
this.menu = menuConvert(this.menu);
@ -215,7 +216,7 @@
},
//
setStoppage() {
let operate = {
const operate = {
start: true,
send: true,
code: this.selected.code,
@ -229,13 +230,13 @@
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
cancelStoppage() {
let operate = {
const operate = {
start: true,
send: true,
code: this.selected.code,
@ -249,13 +250,13 @@
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
fault() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -271,7 +272,7 @@
},
//
split() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -287,7 +288,7 @@
},
//
active() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -303,7 +304,7 @@
},
//
axlePreReset() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -319,7 +320,7 @@
},
//
lock() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -335,7 +336,7 @@
},
//
unlock() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -351,7 +352,7 @@
},
//
setSpeed() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -367,7 +368,7 @@
},
//
cancelSpeed() {
let operate = {
const operate = {
start: true,
send: true,
code: this.selected.code,
@ -377,7 +378,7 @@
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempData = response.data;
const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
}
@ -385,7 +386,7 @@
},
//
newTrain() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -397,8 +398,8 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreate.doShow(operate, this.selected);
}
})
}
});
}
}
};
</script>

View File

@ -39,7 +39,8 @@ export default {
},
props: {
selected: {
type: Object
type: Object,
required: true
}
},
data() {

View File

@ -1,10 +1,10 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
<station-cmd-control ref="stationCmdControl"></station-cmd-control>
<station-human-control-all ref="stationHumanControlAll"></station-human-control-all>
<station-set-route-control-all ref="stationSetRouteControlAll"></station-set-route-control-all>
<notice-info ref="noticeInfo"></notice-info>
<pop-menu ref="popMenu" :menu="menu" />
<station-cmd-control ref="stationCmdControl" />
<station-human-control-all ref="stationHumanControlAll" />
<station-set-route-control-all ref="stationSetRouteControlAll" />
<notice-info ref="noticeInfo" />
</div>
</template>
@ -12,10 +12,10 @@
import PopMenu from '@/components/PopMenu';
import StationCmdControl from './dialog/stationCmdControl';
import StationHumanControlAll from './dialog/stationHumanControlAll';
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll'
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
@ -30,7 +30,8 @@
},
props: {
selected: {
type: Object
type: Object,
required: true
}
},
data() {
@ -42,25 +43,25 @@
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
handler: this.setAutoTrigger,
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
auth: { station: true, center: false },
auth: { station: true, center: false }
},
{
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
auth: { station: true, center: false },
auth: { station: true, center: false }
},
{
label: this.$t('menu.menuStation.powerUnLock'),
handler: this.powerUnLock,
disabledCallback: MenuDisabledState.Station.powerUnLock,
auth: { station: true, center: false },
auth: { station: true, center: false }
},
{
label: this.$t('menu.menuStation.execKeyOperationTest'),
handler: this.execKeyOperationTest,
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
auth: { station: true, center: false },
auth: { station: true, center: false }
}
],
central: [
@ -68,21 +69,21 @@
label: this.$t('menu.menuStation.allHumanControl'),
handler: this.humanControlALL,
disabledCallback: MenuDisabledState.Station.humanControlALL,
auth: { station: false, center: true },
auth: { station: false, center: true }
},
{
label: this.$t('menu.menuStation.allATSAutoControl'),
handler: this.atsAutoControlALL,
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
auth: { station: false, center: true },
auth: { station: false, center: true }
},
{
label: this.$t('menu.menuStation.execKeyOperationTest'),
handler: this.execKeyOperationTest,
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
auth: { station: false, center: true },
auth: { station: false, center: true }
}
],
]
},
menuForce: [
{
@ -96,16 +97,7 @@
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: {
...mapGetters('training', [
@ -116,12 +108,21 @@
'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: {
clickEvent() {
let self = this;
const self = this;
window.onclick = function (e) {
self.doClose();
}
};
},
initMenu() {
this.menu = [];
@ -129,14 +130,14 @@
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce]
this.menu = [...this.menu, ...this.menuForce];
}
}
if (this.selected.centralized) {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce]
this.menu = [...this.menuForce];
}
}
@ -156,7 +157,7 @@
},
//
setStoppage() {
let operate = {
const operate = {
start: true,
send: true,
code: this.selected.code,
@ -170,13 +171,13 @@
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
cancelStoppage() {
let operate = {
const operate = {
start: true,
send: true,
code: this.selected.code,
@ -190,13 +191,13 @@
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
setAutoTrigger() {
let operate = {
const operate = {
start: true,
send: true,
code: this.selected.code,
@ -208,13 +209,13 @@
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
cancelAutoTrigger() {
let operate = {
const operate = {
start: true,
send: true,
code: this.selected.code,
@ -226,13 +227,13 @@
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
powerUnLock() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
@ -248,7 +249,7 @@
},
//
execKeyOperationTest() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
@ -264,23 +265,23 @@
},
//
humanControlALL() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.humanControlALL.menu.operation,
operation: OperationEvent.Station.humanControlALL.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationHumanControlAll.doShow(operate);
}
})
});
},
//
atsAutoControlALL() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
@ -292,8 +293,8 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
}
})
}
});
}
}
};
</script>

View File

@ -1,24 +1,23 @@
<template>
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
<pop-menu ref="popMenu" :menu="menu" />
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
import { DeviceMenu } from '@/scripts/ConstDic';
export default {
name: 'StationControlMenu',
props: {
selected: {
type: Object
}
},
components: {
PopMenu
},
props: {
selected: {
type: Object,
required: true
}
},
data() {
return {
menu: [],
@ -26,16 +25,7 @@
],
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: {
...mapGetters('training', [
@ -46,12 +36,21 @@
'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: {
clickEvent() {
let self = this;
const self = this;
window.onclick = function (e) {
self.doClose();
}
};
},
doShow(point) {
if (this.$refs && this.$refs.popMenu) {
@ -64,5 +63,5 @@
}
}
}
}
};
</script>

View File

@ -39,7 +39,8 @@ export default {
},
props: {
selected: {
type: Object
type: Object,
required: true
}
},
data() {

View File

@ -1,10 +1,10 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
<switch-control ref="switchControl"></switch-control>
<switch-cmd-control ref="switchCmdControl"></switch-cmd-control>
<speed-cmd-control ref="speedCmdControl"></speed-cmd-control>
<notice-info ref="noticeInfo"></notice-info>
<pop-menu ref="popMenu" :menu="menu" />
<switch-control ref="switchControl" />
<switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" />
</div>
</template>
@ -13,9 +13,9 @@
import SwitchControl from './dialog/switchControl';
import SwitchCmdControl from './dialog/switchCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
@ -30,7 +30,8 @@
},
props: {
selected: {
type: Object
type: Object,
required: true
}
},
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: {
...mapGetters('training', [
@ -206,23 +198,32 @@
'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: {
clickEvent() {
let self = this;
const self = this;
window.onclick = function (e) {
self.doClose();
}
};
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce]
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce
this.menu = this.menuForce;
}
this.menu = menuConvert(this.menu);
@ -241,7 +242,7 @@
},
//
setStoppage() {
let operate = {
const operate = {
start: true,
send: true,
code: this.selected.code,
@ -255,13 +256,13 @@
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
cancelStoppage() {
let operate = {
const operate = {
start: true,
send: true,
code: this.selected.code,
@ -275,13 +276,13 @@
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
})
});
},
//
lock() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -297,7 +298,7 @@
},
//
unlock() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -313,7 +314,7 @@
},
//
block() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -329,7 +330,7 @@
},
//
unblock() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -345,7 +346,7 @@
},
//
switchTurnoutForce() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -361,7 +362,7 @@
},
//
switchTurnout() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -380,7 +381,7 @@
},
//
fault() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -396,7 +397,7 @@
},
//
axlePreReset() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -412,7 +413,7 @@
},
//
split() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -428,7 +429,7 @@
},
//
active() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -444,7 +445,7 @@
},
//
setSpeed() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -460,7 +461,7 @@
},
//
cancelSpeed() {
let operate = {
const operate = {
start: true,
send: true,
code: this.selected.code,
@ -470,7 +471,7 @@
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempData = response.data;
const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
}
@ -478,5 +479,5 @@
}
}
}
};
</script>

View File

@ -1,40 +1,48 @@
<template>
<el-dialog class="fuzhou-01__systerm alarm-detail" :title="level+$t('menu.passiveDialog.alarmDetailInformation')" :visible.sync="show" width="760px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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-row>
<el-col :span="8">
<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-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
<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-col>
</el-row>
<el-row>
<el-col :span="9">
<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>
<el-date-picker v-model="model.alarmDate" type="datetime" :placeholder="$t('menu.passiveDialog.selectDate')" disabled />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item>
<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-col>
<el-col :span="8">
<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-col>
</el-row>
@ -42,25 +50,24 @@
<el-col :span="9" class="alarm-type">
<el-form-item>
<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-col>
<el-col :span="15" class="alarm-child-type">
<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-col>
</el-row>
<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 :label="$t('menu.passiveDialog.recommendedOperation')">
<el-input v-model="model.recommendedOperation" disabled></el-input>
<el-input v-model="model.recommendedOperation" disabled />
</el-form-item>
<div class="alarm-detail-description">
<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>
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" :placeholder="$t('menu.passiveDialog.inputContent')" disabled />
</div>
</el-form>
<el-row class="button-group">
@ -71,13 +78,12 @@
<span style="line-height:26px">{{ $t('menu.passiveDialog.unconfirmedMessageOne') }}{{ level }}{{ $t('menu.passiveDialog.unconfirmedMessageTwo') }}</span>
</el-col>
</el-row>
</span>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'AlarmDetail',
@ -104,41 +110,41 @@
recommendedOperation: '',
alarmDetail: ''
}
}
};
},
computed: {
...mapGetters('map', [
'name',
'name'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
},
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.type == 'resp' && elem.agree) {
if (elem.agree) {
let operate = this.$store.state.training.operate;
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
let newOperate = {
const operate = this.$store.state.training.operate;
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const newOperate = {
type: operate.type,
name: station.name,
currentMode: elem.currentMode
}
};
this.doShow(newOperate);
}
}
},
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -154,8 +160,8 @@
childType: this.$t('menu.passiveDialog.childTypeTips'),
timeSummary: this.$t('menu.passiveDialog.controlModeSummary'),
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.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
@ -169,41 +175,40 @@
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
const operate = {
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('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
});
},
commit() {
let operate = {
const operate = {
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('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
});
},
isClose() {
return this.dialogShow;
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.alarm-type .el-input {
width: 220px;
}

View File

@ -1,10 +1,28 @@
<template>
<el-dialog class="fuzhou-01__systerm passive-control" :title="$t('menu.passiveDialog.controlModeRequest')" :visible.sync="show" width="700px"
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
v-dialogDrag>
<el-dialog
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>
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%" height="250" center
size="mini" highlight-current-row>
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="250"
center
size="mini"
highlight-current-row
>
<el-table-column prop="operate" :label="$t('menu.passiveDialog.operatingArea')">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
@ -22,7 +40,7 @@
</el-table-column>
<el-table-column prop="agree" :label="$t('menu.passiveDialog.isAgree')" width="140">
<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>
</el-table-column>
</el-table>
@ -36,13 +54,12 @@
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">{{ $t('menu.passiveDialog.refuse') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
@ -65,8 +82,8 @@
timer: null,
timeout: 61,
count: 0,
commandId: '',
}
commandId: ''
};
},
computed: {
targetStatus() {
@ -74,8 +91,9 @@
return '01';
}
if (this.$store.state.training.prdType == '02') {
return '02'
return '02';
}
return '';
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -104,12 +122,12 @@
this.commandId = elem.commandId;
}
}
},
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
createTimer() {
@ -120,7 +138,7 @@
return;
}
this.count = this.count - 1;
}, 1000)
}, 1000);
},
clearTimer() {
if (this.timer) {
@ -129,16 +147,16 @@
}
},
checkTableDataSelction(data) {
let selection = [];
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.agree && !row.disabled) {
selection.push(row);
}
})
});
}
this.disabledSend = selection.length ? false : true;
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
@ -148,24 +166,24 @@
updateTableData(code) {
this.tableData = [];
let model = {
const model = {
code: code,
operate: '',
control: { code: '', name: '' },
target: { code: '', name: '' },
agree: false,
disabled: false,
}
disabled: false
};
let device = this.$store.getters['map/getDeviceByCode'](code);
const device = this.$store.getters['map/getDeviceByCode'](code);
if (device) {
let control = (device || {}).state;
const control = (device || {}).state;
if (control) {
model.control = { status: control.status, name: this.controlProps[control.status] };
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
}
let station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
if (station) {
model.operate = station.name || '';
}
@ -183,10 +201,10 @@
this.createTimer();
this.updateTableData(msgHead.stationControlCode);
let operate = {
const operate = {
start: true,
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.menu.operation,
operation: OperationEvent.StationControl.controlResponse.menu.operation
};
this.$store.dispatch('training/emitTipFresh');
@ -210,35 +228,35 @@
this.$refs.multipleTable.setCurrentRow();
},
serializeCodeListWithSeparator(sep) {
let codeList = [];
const codeList = [];
if (this.selection && this.selection.length) {
this.selection.forEach(elem => {
codeList.push(elem.code);
})
});
}
return codeList.join(sep);
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
let operate = {
const operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.choose.operation,
val: this.serializeCodeListWithSeparator('::'),
}
val: this.serializeCodeListWithSeparator('::')
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
} else if (!selection) {
this.$messageBox(this.$t('menu.passiveDialog.selectData'));
}
},
agree() {
let operate = {
const operate = {
send: true,
over: true,
type: MapDeviceType.StationControl.type,
@ -246,7 +264,7 @@
code: this.selection[0].code,
val: this.commandId,
prdType: this.$store.state.training.prdType
}
};
this.clearTimer();
this.disabledAgree = true;
@ -255,12 +273,12 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
})
});
},
refuse() {
let operate = {
const operate = {
send: true,
over: true,
type: MapDeviceType.StationControl.type,
@ -268,7 +286,7 @@
code: this.selection.length ? this.selection[0].code : '',
val: this.commandId,
prdType: this.$store.state.training.prdType
}
};
if (!operate.code) {
operate.code = this.tableData[0].code;
}
@ -279,12 +297,12 @@
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
})
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -1,6 +1,15 @@
<template>
<el-dialog class="fuzhou-01__systerm cmd-notice" :title="$t('menu.passiveDialog.operationCommandTips')" :visible.sync="show" width="400px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
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>
<el-row class="button-group">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{ $t('menu.passiveDialog.operationConfirm') }}</el-button>
@ -9,7 +18,7 @@
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'CmdNotice',
data() {
@ -19,7 +28,7 @@
operate: null,
name: '',
msg: ''
}
};
},
computed: {
show() {
@ -27,18 +36,18 @@
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
},
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.type == 'resp' && (elem.timeout || !elem.agree)) {
let operate = this.$store.state.training.operate;
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
let newOperate = {
const operate = this.$store.state.training.operate;
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const newOperate = {
type: operate.type,
name: station.name,
}
name: station.name
};
if (elem.timeout) {
newOperate['msg'] = this.$t('menu.passiveDialog.requestTimedOut');
@ -48,12 +57,12 @@
this.doShow(newOperate);
}
}
},
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
@ -73,34 +82,34 @@
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
operation: this.operate.type,
operation: OperationEvent.Command.close.notice.operation,
}
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
});
},
commit() {
let operate = {
const operate = {
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('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
});
},
isClose() {
return this.dialogShow;
}
}
}
};
</script>

View File

@ -1,5 +1,5 @@
<template>
<div id="statusDownTrainDetail"></div>
<div id="statusDownTrainDetail" />
</template>
<script>
@ -7,25 +7,17 @@
name: 'StatusDownTrainDetail',
props: {
selected: {
type: Object
type: Object,
required: true
}
},
data() {
return {
}
};
},
mounted() {
}
}
};
</script>
<style>
#statusDownTrainDetail {
z-index: 1000;
position: absolute;
height: $height;
line-height: $height;
border-radius: 0px !important;
top: 0px;
left: 0px;
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<div id="statusUpTrainDetail"></div>
<div id="statusUpTrainDetail" />
</template>
<script>
@ -7,25 +7,18 @@
name: 'StatusUpTrainDetail',
props: {
selected: {
type: Object
type: Object,
required: true
}
},
data() {
return {
}
};
},
mounted() {
}
}
};
</script>
<style>
#statusUpTrainDetail {
z-index: 1000;
position: absolute;
height: $height;
line-height: $height;
border-radius: 0px !important;
top: 0px;
left: 0px;
}
</style>

View File

@ -3,23 +3,23 @@
<div class="nav">
<template v-for="(item,i) in menu">
<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>
</li>
</template>
<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>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template
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">&ensp;</span>
<span class="separator">&ensp;</span>
</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">
<span class="menu-li-text">
<span class="status">&ensp;</span>
@ -35,7 +35,7 @@
</span>
</div>
</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">
<span class="menu-li-text">
<span class="status">&ensp;</span>
@ -44,11 +44,11 @@
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<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">&ensp;</span>
<span class="separator">&ensp;</span>
</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">
<span class="menu-li-text">
<span class="status">&ensp;</span>
@ -68,7 +68,7 @@
</span>
</div>
</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">
<span class="menu-li-text">
<span class="status">&ensp;</span>
@ -81,11 +81,11 @@
</li>
</template>
<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">&ensp;</span>
<span class="separator">&ensp;</span>
</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">
<span class="menu-li-text">
<span class="status">&ensp;</span>
@ -101,7 +101,7 @@
</span>
</div>
</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">
<span class="menu-li-text">
<span class="status">&ensp;</span>
@ -119,11 +119,7 @@
</div>
</template>
<script>
import XLSX from 'xlsx';
import { mapGetters } from 'vuex';
import { importRunPlan } from '@/api/runplan';
import { importData } from '../planConvert';
import { launchFullscreen } from '@/utils/screen';
import { EventBus } from '@/scripts/event-bus';
export default {

View File

@ -41,7 +41,7 @@ export default {
},
{
prop: 'startTime',
label: this.$t('menu.arrivalTime'),
label: this.$t('menu.arrivalTime')
},
{
prop: 'stopTime',