This commit is contained in:
zyy 2020-09-08 14:26:59 +08:00
commit 5ff71d3820
8 changed files with 540 additions and 20 deletions

View File

@ -87,4 +87,11 @@ export function forceDeleteLesson(lessonId) {
method: 'delete' method: 'delete'
}); });
} }
/** 一键生成课程和试卷 */
export function aKeyGeneratingLesson(data) {
return request({
url: `/api/lesson/generating`,
method: 'post',
data: data
});
}

View File

@ -116,6 +116,9 @@
<signal-detail ref="signalDetail" /> <signal-detail ref="signalDetail" />
<init-signal-mode ref="initSignalMode" /> <init-signal-mode ref="initSignalMode" />
<signal-mode ref="signalMode" /> <signal-mode ref="signalMode" />
<system-detain ref="systemDetain" />
<running-interval ref="runningInterval" />
<adjust-strategy ref="adjustStrategy" />
</div> </div>
</template> </template>
<script> <script>
@ -154,6 +157,9 @@ import SignalBlock from './menuDialog/signalBlock';
import SignalDetail from './menuDialog/signalDetail'; import SignalDetail from './menuDialog/signalDetail';
import InitSignalMode from './menuDialog/initSignalMode'; import InitSignalMode from './menuDialog/initSignalMode';
import SignalMode from './menuDialog/signalMode'; import SignalMode from './menuDialog/signalMode';
import SystemDetain from './menuDialog/systemDetain';
import RunningInterval from './menuDialog/runningInterval';
import AdjustStrategy from './menuDialog/adjustStrategy';
export default { export default {
name: 'MenuBar', name: 'MenuBar',
@ -186,7 +192,10 @@ export default {
SectionShow, SectionShow,
SectionLock, SectionLock,
InitSignalMode, InitSignalMode,
SignalMode SignalMode,
SystemDetain,
RunningInterval,
AdjustStrategy
}, },
props: { props: {
selected: { selected: {
@ -589,7 +598,7 @@ export default {
}, },
{ {
title: '系统扣车', title: '系统扣车',
click: this.undeveloped click: this.setSystemDetain
}, },
{ {
title: '修改自动分配', title: '修改自动分配',
@ -633,11 +642,11 @@ export default {
children: [ children: [
{ {
title: '固定列车间隔', title: '固定列车间隔',
click: this.undeveloped click: this.setRunningInterval
}, },
{ {
title: '调整策略', title: '调整策略',
click: this.undeveloped click: this.adjustStrategy
} }
] ]
}, },
@ -1056,7 +1065,7 @@ export default {
}, },
{ {
title: '系统扣车', title: '系统扣车',
click: this.undeveloped click: this.setSystemDetain
}, },
{ {
title: '修改自动分配', title: '修改自动分配',
@ -1100,11 +1109,11 @@ export default {
children: [ children: [
{ {
title: '固定列车间隔', title: '固定列车间隔',
click: this.undeveloped click: this.setRunningInterval
}, },
{ {
title: '调整策略', title: '调整策略',
click: this.undeveloped click: this.adjustStrategy
} }
] ]
}, },
@ -1684,6 +1693,45 @@ export default {
this.$refs.initSignalMode.doShow(operate); this.$refs.initSignalMode.doShow(operate);
} }
}); });
},
setSystemDetain() {
const operate = {
type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.systemDetain.doShow(operate);
}
});
},
setRunningInterval() {
const operate = {
type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.runningInterval.doShow(operate);
}
});
},
adjustStrategy() {
const operate = {
type: 'bar',
operation: ''
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {barek: true});
this.$refs.adjustStrategy.doShow(operate);
}
});
} }
} }
}; };

View File

@ -0,0 +1,177 @@
<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-col :span="14">
<el-table :data="signalList" height="300px">
<el-table-column prop="startTime" label="开始时间" />
<el-table-column prop="endTime" label="结束时间" />
<el-table-column prop="strategy" label="策略" />
</el-table>
</el-col>
<el-col :span="10" style="text-align: center;padding-left: 10px;">
<div class="set-status-title">设置策略</div>
<div class="set-status-box">
<div style="display: flex;justify-content: space-between;">
<div style="display: inline-block;">开始(T)</div>
<el-time-picker
v-model="startTime"
size="mini"
style="width: 150px;"
placeholder="任意时间点"
/>
</div>
<div style="display: flex;justify-content: space-between;">
<div style="display: inline-block;">结束</div>
<el-time-picker
v-model="endTime"
size="mini"
style="width: 150px;"
placeholder="任意时间点"
/>
</div>
</div>
<el-radio v-model="radio" label="1">服务恢复(R)</el-radio>
<el-radio v-model="radio" label="2">节能(P)</el-radio>
<el-button>设置(E)</el-button>
<div class="set-status-title">复位策略</div>
<div class="set-status-box">
<el-button style="width: 130px;">复位到默认值(D)</el-button>
</div>
</el-col>
</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: {},
startTime: new Date(),
endTime: new Date(),
radio: ''
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
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: 15px 5px;
}
.set-status-title{
position: relative;
top: 15px;
background: #F0F0F0;
width: 60px;
text-align: center;
z-index: 22;
left: 10px;
}
</style>

View File

@ -14,8 +14,8 @@
<el-tab-pane label="站台" name="first"> <el-tab-pane label="站台" name="first">
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<div style="width: 220px;border: 2px solid #696969; border-bottom: 0;color: #000;padding-left: 5px;">站台</div> <div style="width: 220px;border: 2px inset #E9E9E9; border-bottom: 0;color: #000;padding-left: 5px;">站台</div>
<div style="width: 220px;height: 350px;overflow: scroll; border: 2px solid #696969;"> <div style="width: 220px;height: 350px;overflow: scroll; border: 2px inset #E9E9E9;">
<template v-for="(stationStand, index) in stationStandList"> <template v-for="(stationStand, index) in stationStandList">
<li :key="index" class="menu-li" :style="{background: selectStandCode === stationStand.code? '#BFCDDB': '#FFF'}" @click="selectStand(stationStand)">{{ stationStand.name }}</li> <li :key="index" class="menu-li" :style="{background: selectStandCode === stationStand.code? '#BFCDDB': '#FFF'}" @click="selectStand(stationStand)">{{ stationStand.name }}</li>
</template> </template>
@ -154,7 +154,6 @@ export default {
text-align: left; text-align: left;
list-style:none; list-style:none;
padding-left: 5px; padding-left: 5px;
border-right: 2px solid #696969;
color: #000; color: #000;
} }
</style> </style>

View File

@ -0,0 +1,204 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="750px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="10">
<el-table :data="signalList" height="300px">
<el-table-column prop="runLine" label="运行线" />
<el-table-column prop="interval" label="运行间隔" />
</el-table>
</el-col>
<el-col :span="14">
<el-row>
<el-col :span="14" style="padding-left: 10px;">
<div class="set-status-title" style="width: 90px;">设置运行间隔</div>
<div class="set-status-box">
<div>
<div style="display: inline-block;">运行间隔值(W)</div>
<el-input-number v-model="intervalValue" controls-position="right" :min="1" size="mini" precision="0" style="width: 100px;" />
</div>
<div style="padding-top: 10px;text-align: center;">
<el-button style="margin-right: 20px;">设置(S)</el-button>
<el-button>清除(R)</el-button>
</div>
</div>
</el-col>
<el-col :span="10" style="padding-left: 10px;">
<div class="set-status-title" style="width: 80px;">清除间隔</div>
<div class="set-status-box"><el-button>全部清除(L)</el-button></div>
</el-col>
</el-row>
<el-row style="padding-left: 10px;">
<div class="set-status-title" style="width: 100px;">运行间隔计算器</div>
<div class="set-status-box">
<el-row>
<el-col :span="12" style="display: flex; justify-content: space-between;">
<div style="display: inline-block;">往返运行时间</div>
<el-input v-model="roundTripRunningTime" size="mini" style="width: 80px;" />
</el-col>
</el-row>
<el-row>
<el-col :span="12" style="display: flex; justify-content: space-between;">
<div style="display: inline-block;">请求间隔(Y)</div>
<el-input v-model="requestInterval" size="mini" style="width: 80px;" />
</el-col>
<el-col :span="12" style="display: flex; justify-content: space-between;">
<div style="display: inline-block;">需要的列车</div>
<el-input v-model="needTrainNumber" size="mini" :disabled="true" style="width: 80px;" />
</el-col>
</el-row>
<el-row style="text-align: center;">
</el-row>
<el-row>
<el-col :span="12" style="display: flex; justify-content: space-between;">
<div style="display: inline-block;">请求列车</div>
<el-input v-model="requestTrainNumber" size="mini" style="width: 80px;" />
</el-col>
<el-col :span="12" style="display: flex; justify-content: space-between;">
<div style="display: inline-block;">需要的间隔</div>
<el-input v-model="needInterval" size="mini" style="width: 80px;" />
</el-col>
</el-row>
</div>
</el-row>
</el-col>
</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: {},
intervalValue: 180,
roundTripRunningTime:4487,
requestInterval: 200,
needTrainNumber: 22,
requestTrainNumber: 25,
needInterval: 179
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
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

@ -2,7 +2,23 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="750px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false"> <el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="750px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row> <el-row>
<el-col :span="19"> <el-col :span="19">
<el-tabs v-model="activeName" type="border-card" style="background: #F0F0F0">
<el-tab-pane label="站台" name="first" style="height: 300px;background: #F0F0F0;">站台</el-tab-pane>
<el-tab-pane label="系统" name="second" style="height:300px;background: #F0F0F0;">
<div class="set-status-title" style="width: 80px;">系统状态</div>
<div class="set-status-box" style="padding: 20px;">
<el-input v-model="active" :disabled="true" size="mini" />
</div>
</el-tab-pane>
</el-tabs>
</el-col>
<el-col :span="4" :offset="1">
<div class="set-status-title">扣车</div>
<div class="set-status-box">
<el-radio v-model="command" :disabled="true" :label="true">设置</el-radio>
<br>
<el-radio v-model="command" :label="false">取消</el-radio>
</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -42,7 +58,9 @@ export default {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
selected: null, selected: null,
operate: {} activeName: 'first',
operate: {},
active: '未激活'
}; };
}, },
computed: { computed: {
@ -52,9 +70,6 @@ export default {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
isCbtc() {
return this.operate.operation === OperationEvent.Command.mBar.cbtcMode.operation;
},
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
@ -65,7 +80,7 @@ export default {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''; return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
}, },
title() { title() {
return this.isCbtc ? '确认/取消CBTC模式' : '确认/取消后备模式'; return '扣车';
} }
}, },
watch: { watch: {

View File

@ -0,0 +1,60 @@
<template>
<div>
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
<div style="text-align: center;">
<span>生成地图:</span>
<el-select v-model="mapId" placeholder="请选择" size="small">
<el-option
v-for="item in mapList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { aKeyGeneratingLesson } from '@/api/jmap/lesson';
export default {
name: 'Generate',
props: {
mapList: {
type: Array,
required: true
}
},
data() {
return {
dialogVisible: false,
title: '一键生成课程和试卷',
mapId: ''
};
},
methods: {
doShow() {
this.dialogVisible = true;
},
doCreate() {
aKeyGeneratingLesson([this.mapId]).then(resp => {
this.$message.success('生成课程、试卷成功!');
}).catch(() => {
this.$message.error('生成课程、试卷失败!');
});
},
doClose() {
this.dialogVisible = false;
}
}
};
</script>
<style scoped>
</style>

View File

@ -2,6 +2,7 @@
<div> <div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" /> <QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<update-operate ref="updateLesson" :title="$t('publish.updateLesson')" @create="handleUpdate" /> <update-operate ref="updateLesson" :title="$t('publish.updateLesson')" @create="handleUpdate" />
<key-generation ref="keyGeneration" :map-list="mapList" />
</div> </div>
</template> </template>
@ -9,12 +10,14 @@
import { publishLessonList, delPublishLesson, putLessonOnLine, putLessonOffLine, updatePublishLesson } from '@/api/jmap/lesson'; import { publishLessonList, delPublishLesson, putLessonOnLine, putLessonOffLine, updatePublishLesson } from '@/api/jmap/lesson';
import localStore from 'storejs'; import localStore from 'storejs';
import UpdateOperate from './draft.vue'; import UpdateOperate from './draft.vue';
import KeyGeneration from './generate';
import { getPublishMapListOnline } from '@/api/jmap/map'; import { getPublishMapListOnline } from '@/api/jmap/map';
export default { export default {
name: 'PublishMap', name: 'PublishMap',
components:{ components:{
UpdateOperate UpdateOperate,
KeyGeneration
}, },
data() { data() {
return { return {
@ -22,6 +25,7 @@ export default {
pageSize: 'pageSize', pageSize: 'pageSize',
pageIndex: 'pageNum' pageIndex: 'pageNum'
}, },
mapList:[],
queryForm: { queryForm: {
labelWidth: '80px', labelWidth: '80px',
reset: true, reset: true,
@ -91,6 +95,9 @@ export default {
} }
] ]
} }
],
actions: [
{ text: '一键生成课程&试卷', handler: this.handleGenerate }
] ]
}, },
@ -178,6 +185,9 @@ export default {
}, },
reloadTable() { reloadTable() {
this.queryList.reload(); this.queryList.reload();
},
handleGenerate() {
this.$refs.keyGeneration.doShow();
} }
} }
}; };