修改福州线国际化导致的操作问题以及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,31 +1,40 @@
<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">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdSure" type="primary" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'NoticeInfo',
data() {
return {
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,29 +1,42 @@
<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">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-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 { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/noticeInfo';
export default {
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) {
@ -151,13 +163,13 @@
this.setBackStrategy();
}
},
//
//
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,19 +257,19 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//ATS
// 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,20 +277,20 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
//
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,24 +1,34 @@
<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>
<span style="font-size: 18px">{{ message }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel">{{$t('global.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'ConfirmControlSpeed',
data() {
return {
@ -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,24 +1,34 @@
<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>
<span>{{ $t('menu.in') }}{{ stationName }}{{ signalName }}{{ $t('menu.signalConfirmed') }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel">{{$t('global.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'RouteUnlockConfirm',
data() {
return {
@ -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,29 +1,42 @@
<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">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-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 {
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) {
@ -122,13 +134,13 @@
this.routeSetting();
}
},
//
//
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,75 +1,93 @@
<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>
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<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>
<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>
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
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')}}
<el-button :id="domIdConfirm1" style="width:120px;" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
</el-button>
</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>
<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>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{$t('menu.suspend')}}</el-button>
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{$t('global.close')}}</el-button>
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</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>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
export default {
export default {
name: 'RouteCmdControl',
components: {
ConfirmSignalUnlock
@ -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,37 +1,46 @@
<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-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">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.cancel') }}</el-button>
</el-col>
</el-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 { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
export default {
name: 'RouteControl',
components: {
ConfirmControl,
@ -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;
}
@ -130,7 +140,7 @@
this.cancelAutoTrigger();
}
},
//
//
cancelTrainRoute() {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
@ -140,13 +150,13 @@
this.cancelTrainRouteByCentral();
}
},
//
//
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,19 +164,19 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
//
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,20 +244,19 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
//
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,20 +264,19 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
//
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,19 +284,19 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
//
cancelAutoTrigger() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
}
};
this.doClose();
this.loading = true;
@ -298,28 +305,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.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,55 +1,71 @@
<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-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">
<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 :label="this.$t('menu.route')">
<template slot-scope="scope">
<span>{{scope.row.name}}</span>
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="status" :label="this.$t('menu.controlState')" width="180">
<template slot-scope="scope">
<span v-if="scope.row.controlType == '01'">{{$t('menu.automatic')}}</span>
<span v-else>{{$t('menu.artificial')}}</span>
<span v-if="scope.row.controlType == '01'">{{ $t('menu.automatic') }}</span>
<span v-else>{{ $t('menu.artificial') }}</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" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-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>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
export default {
name: 'RouteDetail',
components: {
NoticeInfo
@ -60,8 +76,8 @@
loading: false,
tempData: [],
stationName: '',
signalName: '',
}
signalName: ''
};
},
computed: {
...mapGetters('map', [
@ -83,17 +99,17 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected, tempData) {
//
//
if (!this.dialogShow) {
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,67 +1,89 @@
<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-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">
<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 :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>
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.name}}</span>
<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>
<el-table-column prop="controlType" :label="this.$t('menu.controlState')" :width="80">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">
<span v-if="scope.row.controlType == '01'">{{$t('menu.automatic2')}}</span>
<span v-else>{{$t('menu.artificial')}}</span>
<span v-if="scope.row.controlType == '01'">{{ $t('menu.automatic2') }}</span>
<span v-else>{{ $t('menu.artificial') }}</span>
</span>
</template>
</el-table-column>
<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-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>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
export default {
name: 'RouteHandControl',
components: {
ConfirmControl,
@ -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;
@ -117,7 +141,7 @@
}
},
watch: {
//
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
@ -128,17 +152,17 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected, tempData) {
//
//
if (!this.dialogShow) {
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;
}
@ -148,15 +172,15 @@
tempData.forEach(elem => {
elem.check = false;
elem.disabled = false;
//
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
elem.controlType != '01') {
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'));
}
@ -234,13 +258,13 @@
this.atsAutoControl();
}
},
//
//
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,19 +272,19 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
//
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

@ -12,8 +12,8 @@
: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.signalName')}}</span></el-col>
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.signalName') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
@ -24,7 +24,7 @@
</el-col>
</el-row>
<div class="table">
<span>{{$t('menu.listOfSignalButtons')}}</span>
<span>{{ $t('menu.listOfSignalButtons') }}</span>
<el-table
ref="table"
:data="tempData"
@ -40,10 +40,10 @@
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />

View File

@ -11,8 +11,8 @@
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="8"><span>{{$t('menu.stationName')}}</span></el-col>
<el-col :span="8" :offset="2"><span>{{$t('menu.startSignal')}}</span></el-col>
<el-col :span="8"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="8" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="8">
@ -40,8 +40,8 @@
</el-table-column>
<el-table-column prop="canSetting" :label="this.$t('global.status')" :width="100">
<template slot-scope="scope">
<span v-if="scope.row.canSetting">{{$t('menu.allowSelection')}}</span>
<span v-else>{{$t('menu.notAllowSelection')}}</span>
<span v-if="scope.row.canSetting">{{ $t('menu.allowSelection') }}</span>
<span v-else>{{ $t('menu.notAllowSelection') }}</span>
</template>
</el-table-column>
</el-table>
@ -57,10 +57,10 @@
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>{{$t('global.confirm')}}</el-button>
>{{ $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-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />

View File

@ -1,73 +1,91 @@
<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>
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<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>
<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>
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
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')}}
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
</el-button>
</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>
<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>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{$t('menu.suspend')}}</el-button>
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{$t('global.close')}}</el-button>
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date';
export default {
export default {
name: 'SectionCmdControl',
data() {
return {
@ -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,35 +1,44 @@
<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-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">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-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 { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
export default {
name: 'SectionControl',
components: {
NoticeInfo
@ -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;
}
@ -111,13 +121,13 @@
this.active();
}
},
//
//
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,19 +135,19 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
//
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,19 +155,19 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
//
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

@ -12,7 +12,7 @@
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">{{$t('menu.commandInformation')}}</span>
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="6">
@ -71,24 +71,24 @@
<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
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
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')}}
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
</el-button>
</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
<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>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{$t('menu.suspend')}}</el-button>
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{$t('global.close')}}</el-button>
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>

View File

@ -1,67 +1,91 @@
<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-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>
<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>
</el-table>
</div>
<el-row class="button-group">
<span v-if="isSelect && tempData.length">{{$t('menu.switchbackStrategyTip')}}</span>
<span v-if="isConfirm && tempData.length">{{$t('menu.setSwitchbackStrategyTipPrefix') + tempData[0].name + $t('menu.setSwitchbackStrategyTipSuffix')}}</span>
<span v-if="isSelect && tempData.length">{{ $t('menu.switchbackStrategyTip') }}</span>
<span v-if="isConfirm && tempData.length">{{ $t('menu.setSwitchbackStrategyTipPrefix') + tempData[0].name + $t('menu.setSwitchbackStrategyTipSuffix') }}</span>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
{{$t('global.confirm')}}</el-button>
{{ $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-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 { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
export default {
export default {
name: 'StandBackStrategy',
components: {
ConfirmControl,
@ -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,26 +1,35 @@
<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>
<span>{{ preContext }}{{ standName }}</span>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-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 { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
@ -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) {
@ -110,13 +120,13 @@
this.cancelJumpStop();
}
},
//
//
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:
}
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:
}
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,45 +1,52 @@
<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-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>
<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">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-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 { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
export default {
export default {
name: 'StandDetail',
components: {
NoticeInfo
@ -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,23 +86,22 @@
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') { //
//
//
if (index != 0) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
} else {
//
//
if (index != this.stationList.length - 1) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
@ -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

@ -11,21 +11,21 @@
:close-on-click-modal="false"
>
<el-radio-group style="padding: 10px 20px; border: 1px double lightgray;width:100%;">
<span class="base-label" style="font-size:14px;">{{$t('menu.range')}}</span>
<span class="base-label" style="font-size:14px;">{{ $t('menu.range') }}</span>
<el-row>
<el-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-radio :id="upDown == '01' ? domIdChoose : ''" label="02">{{ $t('menu.uplinkBroadly') }}</el-radio>
</el-col>
<el-col :span="11" :offset="1">
<el-radio :id="upDown == '02' ? domIdChoose : ''" label="01">{{$t('menu.downlinkBroadly')}}</el-radio>
<el-radio :id="upDown == '02' ? domIdChoose : ''" label="01">{{ $t('menu.downlinkBroadly') }}</el-radio>
</el-col>
</el-radio-group>
</el-row>
</el-radio-group>
<div class="table">
<span>{{$t('menu.detainTrainStationList')}}</span>
<span>{{ $t('menu.detainTrainStationList') }}</span>
<el-table
ref="tempData"
:data="tempData"
@ -42,11 +42,11 @@
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="disabled" @click="commit">{{$t('global.confirm')}}
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="disabled" @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-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />

View File

@ -1,63 +1,73 @@
<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-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>
<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>
</div>
<el-row class="button-group">
<span v-if="isSelect && tempData.length">{{ $t('menu.setRunLevelTip') }}</span>
<span v-if="isConfirm && tempData.length">{{ $t('menu.setRunLevelStationTip') + tempData[0].name}}</span>
<span v-if="isConfirm && tempData.length">{{ $t('menu.setRunLevelStationTip') + tempData[0].name }}</span>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
{{$t('global.confirm')}}</el-button>
{{ $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-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>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import { mapGetters } from 'vuex';
export default {
export default {
name: 'StandRunLevel',
components: {
ConfirmControl
@ -74,10 +84,10 @@
isSelect: true,
isConfirm: false,
time: ''
}
};
},
watch: {
//
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
@ -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,37 +133,36 @@
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 });
}
}
},
doShow(operate, selected, opts) {
//
//
if (!this.dialogShow) {
this.standName = '';
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('::'),
}
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('::')
};
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,66 +1,82 @@
<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-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>
<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;">
<div style=" position: relative; top:-5px;">
<el-radio-group v-model="direction">
<el-radio label="02" :disabled="disabledUp">{{$t('menu.upDirection')}}</el-radio>
<el-radio label="01" :disabled="disabledDown">{{$t('menu.downDirection')}}</el-radio>
<el-radio label="02" :disabled="disabledUp">{{ $t('menu.upDirection') }}</el-radio>
<el-radio label="01" :disabled="disabledDown">{{ $t('menu.downDirection') }}</el-radio>
</el-radio-group>
</div>
</div>
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
<span class="base-label">{{$t('menu.effectiveNumber')}}</span>
<span class="base-label">{{ $t('menu.effectiveNumber') }}</span>
<div style=" position: relative; top:-10px;">
<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>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-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 { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
export default {
name: 'StandStopTime',
components: {
ConfirmControl,
@ -76,8 +92,8 @@
effective: false,
selected: null,
standName: '',
stationName: '',
}
stationName: ''
};
},
computed: {
show() {
@ -100,21 +116,21 @@
},
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;
},
disabledInput() {
return this.control === '01'; //
return this.control === '01'; //
},
disabledTime() {
return this.control === '01'; //
return this.control === '01'; //
},
title() {
return this.$t('menu.stopTime');
@ -123,17 +139,17 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected, tempDate) {
//
//
if (!this.dialogShow) {
this.standName = '';
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,68 +1,86 @@
<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>
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<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>
<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>
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
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')}}
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
</el-button>
</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>
<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>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{$t('menu.suspend')}}</el-button>
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{$t('global.close')}}</el-button>
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date';
export default {
export default {
name: 'StationCmdControl',
data() {
return {
@ -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,36 +1,46 @@
<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>
<span>{{ title }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-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 { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
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,51 +1,60 @@
<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">
<el-row>
<el-radio :label="true">{{$t('menu.checkConflict')}}</el-radio>
<el-radio :label="true">{{ $t('menu.checkConflict') }}</el-radio>
</el-row>
<el-row style="margin-top: 20px">
<el-radio :label="false">{{$t('menu.notCheckConflict')}}</el-radio>
<el-radio :label="false">{{ $t('menu.notCheckConflict') }}</el-radio>
</el-row>
</el-radio-group>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-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 { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
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,73 +1,91 @@
<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>
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<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>
<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>
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
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')}}
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
</el-button>
</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>
<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>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{$t('menu.suspend')}}</el-button>
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{$t('global.close')}}</el-button>
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { now } from '@/utils/date';
export default {
export default {
name: 'SwitchCmdControl',
data() {
return {
@ -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,45 +1,54 @@
<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-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>
{{ $t('menu.activation') }}</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="radio" label="2" :disabled="radio == 1" style="display: block; text-align: center;">
{{$t('menu.resection')}}</el-radio>
{{ $t('menu.resection') }}</el-radio>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-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 { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
export default {
name: 'SwitchControl',
components: {
NoticeInfo
@ -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;
}
@ -135,13 +145,13 @@
this.active();
}
},
//
//
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,19 +159,19 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
//
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,19 +179,19 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
//
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,83 +199,83 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
//
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);
});
},
//
//
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);
});
},
//
//
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,30 +31,29 @@
</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>
</el-form>
<el-row>
<el-col style="text-align: right;">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{this.$t('global.confirm')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{this.$t('global.cancel')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ this.$t('global.confirm') }}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ this.$t('global.cancel') }}</el-button>
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { getPublishTrainList } from '@/api/jmap/map';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { getPublishTrainList } from '@/api/jmap/map';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
export default {
name: 'RouteCreate',
components: {
NoticeInfo
@ -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

@ -17,10 +17,10 @@
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />

View File

@ -1,27 +1,36 @@
<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">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'TrainMove',
components: {
},
@ -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%;">
<span class="base-label">{{$t('menu.sourceTrainWindow')}}</span>
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>
<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;">
<span class="base-label">{{$t('menu.targetTrainWindow')}}</span>
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>
<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>
@ -46,20 +63,20 @@
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'TrainMove',
components: {
},
@ -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%;">
<span class="base-label">{{$t('menu.sourceTrainWindow')}}</span>
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>
<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;">
<span class="base-label">{{$t('menu.targetTrainWindow')}}</span>
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>
<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>
@ -47,20 +64,20 @@
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :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-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'TrainSwitch',
components: {
},
@ -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,30 +1,43 @@
<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">
<el-col :span="10" :offset="3">
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">{{$t('menu.menuChildDialog.confirm')}}</el-button>
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.confirm') }}</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuChildDialog.close')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.close') }}</el-button>
</el-col>
</el-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 {
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,39 +1,49 @@
<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>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuChildDialog.determine')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuChildDialog.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'UserAdd',
components: {
},
@ -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,17 +90,17 @@
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) {
//
//
if (!this.dialogShow) {
this.loading = false;
this.operate = 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,27 +1,37 @@
<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">
<el-col :span="8" :offset="3">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuChildDialog.determine')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="2">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuChildDialog.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'UserDelete',
components: {
},
@ -32,12 +42,12 @@
model: {
type: 'DELETE',
jobNumber: '',
userName: '',
userName: ''
},
operation: null,
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -59,11 +69,11 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate, selected) {
//
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
@ -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,42 +1,52 @@
<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>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuChildDialog.determine')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuChildDialog.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'UserEdit',
components: {
},
@ -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,17 +98,17 @@
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) {
//
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
@ -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,36 +1,46 @@
<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>
<span style="padding-left: 60px">{{ $t('menu.menuDialog.versionName') }}</span>
<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>
<span> {{ $t('menu.menuDialog.copyright') }}</span>
</div>
</div>
</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 {
export default {
name: 'ManageUser',
data() {
return {
@ -45,8 +55,8 @@
operation: null,
dialogShow: false,
loading: false,
selected: null,
}
selected: null
};
},
computed: {
show() {
@ -59,17 +69,17 @@
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) {
//
//
if (!this.dialogShow) {
this.loading = false;
this.operate = 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,60 +1,78 @@
<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>
<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>
<span>{{ scope.row.jobNumber }}</span>
</template>
</el-table-column>
<el-table-column prop="userName" :label="$t('menu.menuDialog.userName')">
<template slot-scope="scope">
<span>{{scope.row.userName}}</span>
<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>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuDialog.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuDialog.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-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>
<script>
import { mapGetters } from 'vuex';
import UserAdd from './childDialog/userAdd';
import UserEdit from './childDialog/userEdit';
import UserDelete from './childDialog/userDelete';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import UserAdd from './childDialog/userAdd';
import UserEdit from './childDialog/userEdit';
import UserDelete from './childDialog/userDelete';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'ManageUser',
components: {
UserAdd,
@ -68,8 +86,8 @@
operation: null,
dialogShow: false,
loading: false,
selected: null,
}
selected: null
};
},
computed: {
...mapGetters('map', [
@ -100,17 +118,17 @@
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) {
//
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
@ -127,12 +145,12 @@
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
//
//
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,21 +176,21 @@
if (valid) {
this.$refs.userEdit.doShow(operate, this.selected);
}
}).catch(error => {
}).catch(() => {
this.loading = false;
})
});
} else {
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
}
},
//
//
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,58 +1,70 @@
<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>
<span slot="label">{{ $t('menu.menuDialog.userNameLabel') }}</span>
<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>
<span slot="label">{{ $t('menu.menuDialog.password') }}</span>
<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 @click="esc">{{$t('menu.menuDialog.back')}}</el-button>
<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 @click="clr">{{$t('menu.menuDialog.clear')}}</el-button>
<el-button-group v-model="key" class="right" size="mini">
<el-button @click="clr">{{ $t('menu.menuDialog.clear') }}</el-button>
</el-button-group>
</div>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuDialog.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuDialog.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-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 {
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,44 +1,56 @@
<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>
<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>
<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">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuDialog.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuDialog.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'TrainAdd',
components: {
},
@ -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,20 +93,20 @@
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) {
this.operate = operate || {};
this.operation = operate.operation;
//
//
if (!this.dialogShow) {
this.loading = false;
}
@ -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,34 +1,42 @@
<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>
<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">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuDialog.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuDialog.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'TrainAdd',
components: {
},
@ -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,20 +75,20 @@
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) {
this.operate = operate || {};
this.operation = operate.operation;
//
//
if (!this.dialogShow) {
this.loading = false;
}
@ -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,43 +1,55 @@
<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>
<span class="base-label">{{ $t('menu.menuDialog.purpose') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">{{$t('menu.menuDialog.terminalTwo')}}</span>
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
<el-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>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuDialog.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuDialog.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'TrainTranstalet',
components: {
},
@ -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,20 +92,20 @@
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) {
this.operate = operate || {};
this.operation = operate.operation;
//
//
if (!this.dialogShow) {
this.loading = false;
}
@ -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,51 +1,59 @@
<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>
<el-checkbox :label="1">{{ $t('menu.menuDialog.trainWindow') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="2">{{$t('menu.menuDialog.sectionBoundary')}}</el-checkbox>
<el-checkbox :label="2">{{ $t('menu.menuDialog.sectionBoundary') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="3">{{$t('menu.menuDialog.linkageAutoRouteShow')}}</el-checkbox>
<el-checkbox :label="3">{{ $t('menu.menuDialog.linkageAutoRouteShow') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="4">{{$t('menu.menuDialog.atsAutoTriggerShow')}}</el-checkbox>
<el-checkbox :label="4">{{ $t('menu.menuDialog.atsAutoTriggerShow') }}</el-checkbox>
</div>
</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 NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
import { OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
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,11 +71,11 @@
this.$nextTick(() => {
this.setDeviceDisplay();
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
doShow(operate) {
//
//
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
@ -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,47 +118,47 @@
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 => {
//
//
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {borderBorderShow }));
});
}
//
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 => {
//
//
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {trainWindowShow }));
});
}
//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'];
// ATS
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

@ -13,59 +13,59 @@
<el-checkbox-group v-model="nameLevels">
<el-row>
<el-col :span="10">
<el-checkbox :label="1">{{$t('menu.menuDialog.signalName')}}</el-checkbox>
<el-checkbox :label="1">{{ $t('menu.menuDialog.signalName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="2">{{$t('menu.menuDialog.standTrackName')}}</el-checkbox>
<el-checkbox :label="2">{{ $t('menu.menuDialog.standTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="3" disabled>{{$t('menu.menuDialog.buttonName')}}</el-checkbox>
<el-checkbox :label="3" disabled>{{ $t('menu.menuDialog.buttonName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="4">{{$t('menu.menuDialog.reentryTrackName')}}</el-checkbox>
<el-checkbox :label="4">{{ $t('menu.menuDialog.reentryTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="5">{{$t('menu.menuDialog.trackName')}}</el-checkbox>
<el-checkbox :label="5">{{ $t('menu.menuDialog.trackName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="6">{{$t('menu.menuDialog.transferTrackName')}}</el-checkbox>
<el-checkbox dio :label="6">{{ $t('menu.menuDialog.transferTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="7">{{$t('menu.menuDialog.turnoutName')}}</el-checkbox>
<el-checkbox :label="7">{{ $t('menu.menuDialog.turnoutName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="8">{{$t('menu.menuDialog.indicatorName')}}</el-checkbox>
<el-checkbox dio :label="8">{{ $t('menu.menuDialog.indicatorName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="9">{{$t('menu.menuDialog.turnoutSectionName')}}</el-checkbox>
<el-checkbox :label="9">{{ $t('menu.menuDialog.turnoutSectionName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="10">{{$t('menu.menuDialog.destinationName')}}</el-checkbox>
<el-checkbox dio :label="10">{{ $t('menu.menuDialog.destinationName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="11">{{$t('menu.menuDialog.axisSectionName')}}</el-checkbox>
<el-checkbox :label="11">{{ $t('menu.menuDialog.axisSectionName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="12">{{$t('menu.menuDialog.kmPost')}}</el-checkbox>
<el-checkbox dio :label="12">{{ $t('menu.menuDialog.kmPost') }}</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuDialog.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuDialog.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
@ -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

@ -11,64 +11,64 @@
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">{{$t('menu.menuDialog.plantrainDisplayMode')}}</span>
<span class="base-label">{{ $t('menu.menuDialog.plantrainDisplayMode') }}</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">{{$t('menu.menuDialog.serviceNumber')}} + {{$t('menu.menuDialog.tripNumber')}}</el-radio>
<el-radio :label="1">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">{{$t('menu.menuDialog.serviceNumber')}} + {{$t('menu.menuDialog.groupNumber')}}</el-radio>
<el-radio :label="2">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
<el-row class="elrow">
<el-col :span="10">
<el-radio :label="3">{{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.tripNumber')}}</el-radio>
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">{{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.groupNumber')}}</el-radio>
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
<el-row class="elrow">
<el-col :span="10">
<el-radio :label="5">{{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.serviceNumber')}} + {{$t('menu.menuDialog.tripNumber')}}</el-radio>
<el-radio :label="5">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">{{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.serviceNumber')}} + {{$t('menu.menuDialog.groupNumber')}}</el-radio>
<el-radio :label="6">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">{{$t('menu.menuDialog.headCodeStationDisplayMode')}}</span>
<span class="base-label">{{ $t('menu.menuDialog.headCodeStationDisplayMode') }}</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">{{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.tripNumber')}}</el-radio>
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="6" :offset="4">
<el-radio :label="4">{{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.groupNumber')}}</el-radio>
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">{{$t('menu.menuDialog.fontSize')}}</span>
<span class="base-label">{{ $t('menu.menuDialog.fontSize') }}</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">{{$t('menu.menuDialog.range')}}</span>
<span style="height:32px; line-height:32px;">{{ $t('menu.menuDialog.range') }}</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{$t('menu.menuDialog.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel">{{$t('menu.menuDialog.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />

View File

@ -1,27 +1,27 @@
<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>
<script>
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SectionCmdControl from './dialog/sectionCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import TrainCreate from './dialog/trainCreate';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SectionCmdControl from './dialog/sectionCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import TrainCreate from './dialog/trainCreate';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
export default {
export default {
name: 'SectionMenu',
components: {
PopMenu,
@ -33,7 +33,8 @@
},
props: {
selected: {
type: Object
type: Object,
required: true
}
},
data() {
@ -110,7 +111,7 @@
auth: { station: false, center: true }
},
{
label: this.$t('menu.menuSection.axisPreReset') ,
label: this.$t('menu.menuSection.axisPreReset'),
handler: this.axlePreReset,
disabledCallback: MenuDisabledState.Section.axlePreReset,
auth: { station: false, center: false }
@ -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'
])
},
methods: {
clickEvent() {
let self = this;
window.onclick = function (e) {
self.doClose();
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() {
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);
@ -213,9 +214,9 @@
this.$refs.popMenu.close();
}
},
//
//
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,
@ -269,9 +270,9 @@
}
});
},
//
//
split() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -285,9 +286,9 @@
}
});
},
//
//
active() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -301,9 +302,9 @@
}
});
},
//
//
axlePreReset() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -317,9 +318,9 @@
}
});
},
//
//
lock() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -333,9 +334,9 @@
}
});
},
//
//
unlock() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -349,9 +350,9 @@
}
});
},
//
//
setSpeed() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
@ -365,9 +366,9 @@
}
});
},
//
//
cancelSpeed() {
let operate = {
const operate = {
start: true,
send: true,
code: this.selected.code,
@ -377,15 +378,15 @@
};
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);
}
});
},
//
//
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,25 +1,25 @@
<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>
<script>
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 { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
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 { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
export default {
export default {
name: 'StationMenu',
components: {
PopMenu,
@ -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,27 +108,36 @@
'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 = [];
if (this.selected.concentrateStationCode == this.selected.code) {
//
//
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];
}
}
@ -154,9 +155,9 @@
this.$refs.popMenu.close();
}
},
//
//
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,
@ -246,9 +247,9 @@
}
});
},
//
//
execKeyOperationTest() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
@ -262,25 +263,25 @@
}
});
},
//
//
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 PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
export default {
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,25 +1,25 @@
<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>
<script>
import PopMenu from '@/components/PopMenu';
import SwitchControl from './dialog/switchControl';
import SwitchCmdControl from './dialog/switchCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import PopMenu from '@/components/PopMenu';
import SwitchControl from './dialog/switchControl';
import SwitchCmdControl from './dialog/switchCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
export default {
export default {
name: 'SwitchMenu',
components: {
PopMenu,
@ -30,7 +30,8 @@
},
props: {
selected: {
type: Object
type: Object,
required: true
}
},
data() {
@ -75,7 +76,7 @@
auth: { station: true, center: false }
},
{
label: this.$t('menu.menuSwitch.switchSectionAxisPreReset') ,
label: this.$t('menu.menuSwitch.switchSectionAxisPreReset'),
handler: this.axlePreReset,
disabledCallback: MenuDisabledState.Switch.axlePreReset,
auth: { station: true, center: false }
@ -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'
])
},
methods: {
clickEvent() {
let self = this;
window.onclick = function (e) {
self.doClose();
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() {
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);
@ -239,9 +240,9 @@
this.$refs.popMenu.close();
}
},
//
//
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,
@ -295,9 +296,9 @@
}
});
},
//
//
unlock() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -311,9 +312,9 @@
}
});
},
//
//
block() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -327,9 +328,9 @@
}
});
},
//
//
unblock() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -343,9 +344,9 @@
}
});
},
//
//
switchTurnoutForce() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -359,9 +360,9 @@
}
});
},
//
//
switchTurnout() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -378,9 +379,9 @@
});
}
},
//
//
fault() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -394,9 +395,9 @@
}
});
},
//
//
axlePreReset() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -410,9 +411,9 @@
}
});
},
//
//
split() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -426,9 +427,9 @@
}
});
},
//
//
active() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -442,9 +443,9 @@
}
});
},
//
//
setSpeed() {
let operate = {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Switch.type,
@ -458,9 +459,9 @@
}
});
},
//
//
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,85 +1,91 @@
<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>
<span slot="label">{{ $t('menu.passiveDialog.level') }}</span>
<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>
<el-row>
<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>
<span slot="label">{{ $t('menu.passiveDialog.type') }}</span>
<el-input v-model="model.type" disabled />
</el-form-item>
</el-col>
<el-col :span="15" class="alarm-child-type">
<el-form-item :label="$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>
<span>{{ $t('menu.passiveDialog.alarmDetailedDescription') }}</span><br>
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" :placeholder="$t('menu.passiveDialog.inputContent')" disabled />
</div>
</el-form>
<el-row class="button-group">
<el-col :span="3" :offset="9">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{$t('menu.passiveDialog.confirm')}}</el-button>
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{ $t('menu.passiveDialog.confirm') }}</el-button>
</el-col>
<el-col :span="10">
<span style="line-height:26px">{{$t('menu.passiveDialog.unconfirmedMessageOne')}}{{level}}{{$t('menu.passiveDialog.unconfirmedMessageTwo')}}</span>
<span style="line-height:26px">{{ $t('menu.passiveDialog.unconfirmedMessageOne') }}{{ level }}{{ $t('menu.passiveDialog.unconfirmedMessageTwo') }}</span>
</el-col>
</el-row>
</span>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
export default {
name: 'AlarmDetail',
data() {
return {
@ -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,51 +1,68 @@
<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>
<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-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-column prop="operate" :label="$t('menu.passiveDialog.operatingArea')">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.operate}}</span>
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
</template>
</el-table-column>
<el-table-column prop="control" :label="$t('menu.passiveDialog.currentControlMode')" width="120">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.control.name}}</span>
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control.name }}</span>
</template>
</el-table-column>
<el-table-column prop="target" :label="$t('menu.passiveDialog.requestControlMode')" width="120">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.target.name}}</span>
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.target.name }}</span>
</template>
</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>
<span class="control-label">{{$t('menu.passiveDialog.messageOne')}} {{count}} {{$t('menu.passiveDialog.messageTwo')}}</span>
<span class="control-label">{{ $t('menu.passiveDialog.messageOne') }} {{ count }} {{ $t('menu.passiveDialog.messageTwo') }}</span>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">{{$t('menu.passiveDialog.agree')}}
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">{{ $t('menu.passiveDialog.agree') }}
</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">{{$t('menu.passiveDialog.refuse')}}</el-button>
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">{{ $t('menu.passiveDialog.refuse') }}</el-button>
</el-col>
</el-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 NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
export default {
name: 'RequestControl',
components: {
NoticeInfo
@ -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,16 +1,25 @@
<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>
<span>{{name}}{{msg}}!</span>
<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>
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{ $t('menu.passiveDialog.operationConfirm') }}</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'CmdNotice',
data() {
return {
@ -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,31 +1,23 @@
<template>
<div id="statusDownTrainDetail"></div>
<div id="statusDownTrainDetail" />
</template>
<script>
export default {
export default {
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,31 +1,24 @@
<template>
<div id="statusUpTrainDetail"></div>
<div id="statusUpTrainDetail" />
</template>
<script>
export default {
export default {
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

@ -13,10 +13,10 @@
<div style="margin: 10px">
<el-row>
<el-col :span="3">
<el-radio v-model="model.type" label="1">{{$t('menu.addToTheFront')}}</el-radio>
<el-radio v-model="model.type" label="1">{{ $t('menu.addToTheFront') }}</el-radio>
</el-col>
<el-col :span="2" :offset="1">
<span>{{$t('menu.tripNumber') + $t('global.colon')}}</span>
<span>{{ $t('menu.tripNumber') + $t('global.colon') }}</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.tripNumber" :placeholder="this.$t('global.choose')">
@ -29,7 +29,7 @@
</el-select>
</el-col>
<el-col :span="3" :offset="1">
<span>{{$t('global.startTime') + $t('global.colon')}}</span>
<span>{{ $t('global.startTime') + $t('global.colon') }}</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.startTime" :placeholder="this.$t('global.choose')">
@ -44,10 +44,10 @@
</el-row>
<el-row>
<el-col :span="3">
<el-radio v-model="model.type" label="2">{{$t('menu.addToTheEnd')}}</el-radio>
<el-radio v-model="model.type" label="2">{{ $t('menu.addToTheEnd') }}</el-radio>
</el-col>
<el-col :span="2" :offset="1">
<span>{{$t('menu.tripNumber') + $t('global.colon')}}</span>
<span>{{ $t('menu.tripNumber') + $t('global.colon') }}</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.tripNumber" :placeholder="this.$t('global.choose')">
@ -60,7 +60,7 @@
</el-select>
</el-col>
<el-col :span="3" :offset="1">
<span>{{$t('global.startTime') + $t('global.colon')}}</span>
<span>{{ $t('global.startTime') + $t('global.colon') }}</span>
</el-col>
<el-col :span="5">
<el-select v-model="model.startTime" :placeholder="this.$t('global.choose')">
@ -75,7 +75,7 @@
</el-row>
<el-row style="margin-bottom: 5px;">
{{$t('menu.crossing') + $t('global.colon')}}
{{ $t('menu.crossing') + $t('global.colon') }}
</el-row>
<el-row>
<el-table :data="model.route" border :height="180">
@ -86,7 +86,7 @@
</el-table>
</el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
{{$t('global.details') + $t('global.colon')}}
{{ $t('global.details') + $t('global.colon') }}
</el-row>
<el-row>
<el-table :data="model.detail" border :height="180">
@ -98,13 +98,13 @@
</el-row>
<el-row>
<el-col :offset="16">
<el-checkbox v-model="model.default">{{$t('menu.displaysDefaultStopTimesAndRunLevels')}}</el-checkbox>
<el-checkbox v-model="model.default">{{ $t('menu.displaysDefaultStopTimesAndRunLevels') }}</el-checkbox>
</el-col>
</el-row>
</div>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="commit">{{$t('global.confirm')}}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
<el-button @click="commit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>

View File

@ -11,8 +11,8 @@
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" :loading="loading" @click="handleConfirm">{{$t('global.select')}}</el-button>
<el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
<el-button type="primary" :loading="loading" @click="handleConfirm">{{ $t('global.select') }}</el-button>
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>

View File

@ -11,8 +11,8 @@
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" :loading="loading" @click="handleConfirm">{{$t('menu.load')}}</el-button>
<el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
<el-button type="primary" :loading="loading" @click="handleConfirm">{{ $t('menu.load') }}</el-button>
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>

View File

@ -18,7 +18,7 @@
<el-input v-model="model.planName" :readonly="true" />
</el-col>
<el-col :span="4" :offset="1">
<el-button @click="handleChoose">{{this.$t('global.select')}}</el-button>
<el-button @click="handleChoose">{{ this.$t('global.select') }}</el-button>
</el-col>
</el-row>
</el-form-item>
@ -36,8 +36,8 @@
</el-form>
</el-row>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="create">{{$t('global.confirm')}}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
<el-button @click="create">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
<choose-template-plan ref="choose" @chooseConfirm="chooseConfirm" />
</el-dialog>

View File

@ -11,14 +11,14 @@
:close-on-click-modal="false"
>
<el-row>
<el-radio v-model="type" :label="1">{{$t('menu.deleteAllPreviousTasks')}}</el-radio>
<el-radio v-model="type" :label="1">{{ $t('menu.deleteAllPreviousTasks') }}</el-radio>
</el-row>
<el-row>
<el-radio v-model="type" :label="2">{{$t('menu.deleteAllSubsequentTasks')}}</el-radio>
<el-radio v-model="type" :label="2">{{ $t('menu.deleteAllSubsequentTasks') }}</el-radio>
</el-row>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="commit">{{$t('global.confirm')}}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
<el-button @click="commit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>

View File

@ -11,8 +11,8 @@
:close-on-click-modal="false"
>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="commit">{{$t('global.confirm')}}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
<el-button @click="commit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>

View File

@ -11,7 +11,7 @@
:close-on-click-modal="false"
>
<el-row>
<el-col :offset="10">{{$t('menu.trainLine')}}</el-col>
<el-col :offset="10">{{ $t('menu.trainLine') }}</el-col>
</el-row>
<el-row>
<el-col :span="17">
@ -24,19 +24,19 @@
</el-col>
<el-col :span="6" :offset="1">
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleAddTask">{{this.$t('menu.addTask2')}}</el-button>
<el-button class="view-button" @click="handleAddTask">{{ this.$t('menu.addTask2') }}</el-button>
</el-row>
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleReplace">{{this.$t('menu.replace')}}</el-button>
<el-button class="view-button" @click="handleReplace">{{ this.$t('menu.replace') }}</el-button>
</el-row>
<el-row type="flex" justify="center">
<el-button class="view-button" @click="handleDeleteTask">{{this.$t('menu.deleteTask2')}}</el-button>
<el-button class="view-button" @click="handleDeleteTask">{{ this.$t('menu.deleteTask2') }}</el-button>
</el-row>
<div class="view-box">
<el-row type="flex" justify="center">
<el-radio-group v-model="storeInOut">
<el-radio :label="1">{{this.$t('menu.inTheLibrary')}}</el-radio>
<el-radio :label="2">{{this.$t('menu.outOfTheLibrary')}}</el-radio>
<el-radio :label="1">{{ this.$t('menu.inTheLibrary') }}</el-radio>
<el-radio :label="2">{{ this.$t('menu.outOfTheLibrary') }}</el-radio>
</el-radio-group>
</el-row>
</div>
@ -50,21 +50,21 @@
<el-input v-model="newServiceNumber" size="small" />
</el-col>
<el-col :span="5" style="padding-left: 20px">
<el-button style="width: 150px;" @click="handleModifyingTripNumber">{{$t('menu.changeTripNumber')}}</el-button>
<el-button style="width: 150px;" @click="handleModifyingTripNumber">{{ $t('menu.changeTripNumber') }}</el-button>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col :span="4"><span class="view-label">{{$t('menu.lineStartTime')}}</span></el-col>
<el-col :span="4"><span class="view-label">{{ $t('menu.lineStartTime') }}</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceStartTime" size="small" />
</el-col>
<el-col :span="4"><span class="view-label">{{$t('menu.lineEndTime')}}</span></el-col>
<el-col :span="4"><span class="view-label">{{ $t('menu.lineEndTime') }}</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceEndTime" size="small" />
</el-col>
</el-row>
<el-row style="margin-top: 20px">
<el-col :offset="10">{{$t('menu.lineDetails')}}</el-col>
<el-col :offset="10">{{ $t('menu.lineDetails') }}</el-col>
</el-row>
<el-row>
<el-table :data="tripData" border style="width: 100%" height="200">
@ -76,11 +76,11 @@
</el-table>
</el-row>
<el-row style="margin-top: 20px">
<el-checkbox v-model="effect">{{$t('menu.affectSubsequentTasks')}}</el-checkbox>
<el-checkbox v-model="effect">{{ $t('menu.affectSubsequentTasks') }}</el-checkbox>
</el-row>
<el-row type="flex" justify="center">
<el-button @click="commit">{{$t('global.confirm')}}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
<el-button @click="commit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>

View File

@ -15,7 +15,7 @@
<el-col :span="4">
<el-row>
<el-col :span="9">
<span>{{$t('menu.tripNumber') + $t('global.colon')}}</span>
<span>{{ $t('menu.tripNumber') + $t('global.colon') }}</span>
</el-col>
<el-col :span="15">
<el-select v-model="model.tripNumber" style="display: inline-black" :placeholder="this.$t('global.choose')">
@ -32,14 +32,14 @@
<el-col :span="2">
<el-row>
<el-col :offset="4">
<el-checkbox v-model="model.trainManual">{{this.$t('menu.manual')}}</el-checkbox>
<el-checkbox v-model="model.trainManual">{{ this.$t('menu.manual') }}</el-checkbox>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="12">
<span>{{$t('menu.defaultStopTime') + $t('global.colon')}}</span>
<span>{{ $t('menu.defaultStopTime') + $t('global.colon') }}</span>
</el-col>
<el-col :span="12">
<el-select v-model="model.time" style="display: inline-black" :placeholder="this.$t('global.choose')">
@ -56,7 +56,7 @@
<el-col :span="5">
<el-row>
<el-col :span="9" :offset="2">
<span>{{$t('menu.serviceNumber') + $t('global.colon')}}</span>
<span>{{ $t('menu.serviceNumber') + $t('global.colon') }}</span>
</el-col>
<el-col :span="13">
<el-input v-model="model.serviceNumber" />
@ -68,13 +68,13 @@
<el-col :span="22" :offset="2">
<el-row>
<el-col :span="6">
<el-checkbox v-model="model.clearGuest">{{$t('menu.clearGuest')}}</el-checkbox>
<el-checkbox v-model="model.clearGuest">{{ $t('menu.clearGuest') }}</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox v-model="model.continuationPlan">{{$t('menu.continuationPlan')}}</el-checkbox>
<el-checkbox v-model="model.continuationPlan">{{ $t('menu.continuationPlan') }}</el-checkbox>
</el-col>
<el-col :span="6">
<el-checkbox v-model="model.firstTrain">{{$t('menu.firstTrain')}}</el-checkbox>
<el-checkbox v-model="model.firstTrain">{{ $t('menu.firstTrain') }}</el-checkbox>
</el-col>
</el-row>
</el-col>
@ -85,7 +85,7 @@
<el-col :span="4">
<el-row>
<el-col :span="9">
<span>{{$t('menu.serialNumber') + $t('global.colon')}}</span>
<span>{{ $t('menu.serialNumber') + $t('global.colon') }}</span>
</el-col>
<el-col :span="15">
<el-select v-model="model.serialNumber" style="display: inline-black" :placeholder="this.$t('global.choose')">
@ -102,14 +102,14 @@
<el-col :span="2">
<el-row>
<el-col :offset="4">
<el-checkbox v-model="model.serialManual">{{this.$t('menu.manual')}}</el-checkbox>
<el-checkbox v-model="model.serialManual">{{ this.$t('menu.manual') }}</el-checkbox>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<el-row>
<el-col :span="12">
<span>{{$t('menu.defaultRunLevel') + $t('global.colon')}}</span>
<span>{{ $t('menu.defaultRunLevel') + $t('global.colon') }}</span>
</el-col>
<el-col :span="12">
<el-select v-model="model.level" style="display: inline-black" :placeholder="this.$t('global.choose')">
@ -126,7 +126,7 @@
<el-col :span="5">
<el-row>
<el-col :span="9" :offset="2">
<span>{{$t('global.startTime') + $t('global.colon')}}</span>
<span>{{ $t('global.startTime') + $t('global.colon') }}</span>
</el-col>
<el-col :span="13">
<el-time-select v-model="model.startTime" :placeholder="this.$t('global.selectionTime')" :clearable="false" />
@ -152,7 +152,7 @@
</el-col>
</el-row>
<el-row style="margin-bottom: 5px;">
{{$t('menu.crossing') + $t('global.colon')}}
{{ $t('menu.crossing') + $t('global.colon') }}
</el-row>
<el-row>
<el-table :data="model.route" border :height="140">
@ -161,7 +161,7 @@
{{ formatName(scope.row.beginStationCode) }}
</template>
</el-table-column>
<el-table-column prop="beginStationStandCode" :label="this.$t('menu.startPlatform')"/>
<el-table-column prop="beginStationStandCode" :label="this.$t('menu.startPlatform')" />
<el-table-column prop="endStationCode" :label="this.$t('menu.terminal')">
<template slot-scope="scope">
{{ formatName(scope.row.endStationCode) }}
@ -173,7 +173,7 @@
</el-table>
</el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;">
{{$t('global.details') + $t('global.colon')}}
{{ $t('global.details') + $t('global.colon') }}
</el-row>
<el-row>
<el-table :data="model.detail" border :height="140">
@ -203,13 +203,13 @@
</el-row>
<el-row>
<el-col :offset="16">
<el-checkbox v-model="model.default">{{$t('menu.displaysDefaultStopTimesAndRunLevels')}}</el-checkbox>
<el-checkbox v-model="model.default">{{ $t('menu.displaysDefaultStopTimesAndRunLevels') }}</el-checkbox>
</el-col>
</el-row>
</div>
<el-row type="flex" justify="center" class="button-group">
<el-button @click="commit">{{$t('global.confirm')}}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
<el-button @click="commit">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</el-row>
</el-dialog>
</template>

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',