一键生成课程、试卷响应调整

This commit is contained in:
fan 2020-09-08 15:29:45 +08:00
parent d3a7504c2a
commit cbb00efdcb
6 changed files with 198 additions and 12 deletions

View File

@ -34,7 +34,7 @@
</el-row>
<el-row>
<el-col :span="8">
<div style="border: 1px solid #6F3700; border-top: 0; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('stoppingProfile')">停站配置文件</span></div>
<div style="border: 1px solid #6F3700; border-top: 0; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('stoppingProfile')">站台停站控制</span></div>
</el-col>
<el-col :span="8">
<div style="border-bottom: 1px solid #6F3700; height: 50px; text-align: center;"><span @click="clickEvent('northbound')">向北</span><br><span @click="clickEvent('southbound')">向南</span></div>

View File

@ -119,6 +119,7 @@
<system-detain ref="systemDetain" />
<running-interval ref="runningInterval" />
<adjust-strategy ref="adjustStrategy" />
<train-depart ref="trainDepart" />
</div>
</template>
<script>
@ -160,6 +161,7 @@ import SignalMode from './menuDialog/signalMode';
import SystemDetain from './menuDialog/systemDetain';
import RunningInterval from './menuDialog/runningInterval';
import AdjustStrategy from './menuDialog/adjustStrategy';
import TrainDepart from './menuDialog/trainDepart';
export default {
name: 'MenuBar',
@ -195,7 +197,8 @@ export default {
SignalMode,
SystemDetain,
RunningInterval,
AdjustStrategy
AdjustStrategy,
TrainDepart
},
props: {
selected: {
@ -269,11 +272,11 @@ export default {
},
{
title: '班次',
click: this.undeveloped
click: this.handleTrainDistribution
},
{
title: '往返',
click: this.undeveloped
click: this.handleTrainDistribution
}
]
},
@ -283,11 +286,11 @@ export default {
children: [
{
title: '发车',
click: this.undeveloped
click: this.setTrainDepart
},
{
title: '脱离班次',
click: this.undeveloped
click: this.breakAway
},
{
title: '复位',
@ -750,11 +753,11 @@ export default {
children: [
{
title: '发车',
click: this.undeveloped
click: this.setTrainDepart
},
{
title: '脱离班次',
click: this.undeveloped
click: this.breakAway
},
{
title: '复位',
@ -1728,10 +1731,36 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {barek: true});
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.adjustStrategy.doShow(operate);
}
});
},
setTrainDepart() {
const operate = {
type: 'bar',
operation: OperationEvent.Train.setTrainDeparture.menu
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.trainDepart.doShow(operate);
}
});
},
breakAway() {
const operate = {
type: 'bar',
operation: OperationEvent.Train.breakAwayPlan.menu
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.trainDepart.doShow(operate);
}
});
}
}
};

View File

@ -0,0 +1,144 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table :data="signalList" height="300px">
<el-table-column prop="code" label="列车" />
<el-table-column prop="interval" label="班次" />
<el-table-column prop="interval" label="模式" />
<el-table-column prop="interval" label="状态" />
<el-table-column prop="interval" label="运行线" />
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
export default {
name: 'SignalBlock',
components: {
NoticeInfo
},
data() {
return {
status: false,
command: true,
allChecked: false,
dialogShow: false,
loading: false,
selected: null,
activeName: 'first',
operate: {}
};
},
computed: {
...mapGetters('map', [
'trainList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '列车发车';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
this.operate = operate;
//
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
},
handleClick() {
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.menu-li {
height: 30px;
line-height: 30px;
text-align: left;
list-style:none;
padding-left: 5px;
border-right: 2px solid #696969;
color: #000;
}
.set-status-box {
position: relative;
border: 1px solid #AFAFAF;
padding: 10px 5px;
}
.set-status-title{
position: relative;
top: 15px;
background: #F0F0F0;
width: 40px;
text-align: center;
z-index: 22;
left: 10px;
}
</style>

View File

@ -2291,6 +2291,12 @@ export const OperationEvent = {
operation: '70m',
domId: '_Tips-Train-setTrainNumber-Menu'
}
},
breakAwayPlan: {
menu: {
operation: '70n',
domId: '_Tips-Train-breakAwayPlan-Menu'
}
}
},

View File

@ -13,7 +13,7 @@
</el-select>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button type="primary" :loading="loading" @click="doCreate">{{ loading? '生成中':$t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
@ -34,7 +34,8 @@ export default {
return {
dialogVisible: false,
title: '一键生成课程和试卷',
mapId: ''
mapId: '',
loading: false
};
},
methods: {
@ -42,10 +43,16 @@ export default {
this.dialogVisible = true;
},
doCreate() {
this.loading = true;
aKeyGeneratingLesson([this.mapId]).then(resp => {
this.$message.success('生成课程、试卷成功!');
this.loading = false;
this.dialogVisible = false;
this.$emit('reloadTable');
}).catch(() => {
this.$message.error('生成课程、试卷失败!');
this.dialogVisible = false;
this.loading = false;
});
},
doClose() {

View File

@ -2,7 +2,7 @@
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<update-operate ref="updateLesson" :title="$t('publish.updateLesson')" @create="handleUpdate" />
<key-generation ref="keyGeneration" :map-list="mapList" />
<key-generation ref="keyGeneration" :map-list="mapList" @reloadTable="reloadTable" />
</div>
</template>