运行计划设置框
This commit is contained in:
parent
4e0fa46cc2
commit
bb8989ba1a
@ -0,0 +1,79 @@
|
||||
// 设置运行计划
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm"
|
||||
title="Set Operation Plan"
|
||||
:visible.sync="show"
|
||||
width="660px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form>
|
||||
<div class="formRow" v-for="(item, i) in formData" :key="i">
|
||||
<el-form-item label="列车编号">
|
||||
<el-select v-model="item.trainCode"></el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="股道编号">
|
||||
<el-select v-model="item.trackCode"></el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="formRow" style="justify-content:center; margin-bottom:20px">
|
||||
<el-button v-if="formData.length < 4" @click="addRow">+</el-button>
|
||||
<el-button v-if="formData.length > 1" @click="deleteRow">-</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
<div class="formRow">
|
||||
<el-button>{{ $t('global.confirm') }}</el-button>
|
||||
<el-button>{{ $t('global.cancel') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'SetOperationPlanDialog',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
formData: [
|
||||
{
|
||||
trainCode: '',
|
||||
trackCode: '',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.dialogShow = true
|
||||
console.log(1)
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false
|
||||
this.$store.dispatch('training/emitTipFresh')
|
||||
},
|
||||
addRow() {
|
||||
this.formData.push({ trainCode: '', trackCode: '' })
|
||||
},
|
||||
deleteRow() {
|
||||
this.formData.pop()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.formRow {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user