parent
c33497ffa0
commit
47207c3bcf
@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div>
|
||||
<LxHeader
|
||||
icon="md-apps"
|
||||
:text="$route.meta.title"
|
||||
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
|
||||
text="调度指令"
|
||||
>
|
||||
</LxHeader>
|
||||
|
||||
<Card>
|
||||
<div class="step">
|
||||
<el-steps :active="currentStep" align-center process-status="finish" finish-status="success">
|
||||
<el-step title="点位选择"></el-step>
|
||||
<el-step title="调令内容"></el-step>
|
||||
<el-step title="调令预览"></el-step>
|
||||
<el-step title="完成"></el-step>
|
||||
</el-steps>
|
||||
</div>
|
||||
|
||||
<Divider></Divider>
|
||||
|
||||
<div class="content">
|
||||
<step1 v-if="currentStep === 0"></step1>
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LxHeader from "@/components/LxHeader/index.vue";
|
||||
import step1 from "@/views/order/component/step1.vue";
|
||||
export default {
|
||||
components: {
|
||||
LxHeader,
|
||||
step1
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentStep: 0,
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
computed: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .ivu-steps .ivu-steps-title,::v-deep .ivu-steps .ivu-steps-head {
|
||||
background: #0000;
|
||||
}
|
||||
|
||||
.step {
|
||||
width: 80%;
|
||||
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="select">
|
||||
<div class="select-item">
|
||||
<div class="select-item__title">
|
||||
片区
|
||||
</div>
|
||||
<el-checkbox-group size="small" v-model="select.area">
|
||||
<el-checkbox-button v-for="item in areas" :label="item.value">{{item.key}}</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
|
||||
<div class="select-item">
|
||||
<div class="select-item__title">
|
||||
类别
|
||||
</div>
|
||||
<el-checkbox-group size="small" v-model="select.type">
|
||||
<el-checkbox-button v-for="item in types" :label="item.value">{{item.key}}</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Divider></Divider>
|
||||
|
||||
<el-transfer v-model="pickedEquipments" :data="equipments()" :titles="['源列表','目标列表']" :props="{ key: 'id',label: 'name' }" :right-default-checked="pickedEquipments"></el-transfer>
|
||||
|
||||
<Button style="width: 200px;" type="primary">下一步</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { show } from "@/api/system/customFormField";
|
||||
export default {
|
||||
inject: ['equipments'],
|
||||
data() {
|
||||
return {
|
||||
areas: [],
|
||||
types: [],
|
||||
select: {
|
||||
area: '',
|
||||
type: ''
|
||||
},
|
||||
|
||||
pickedEquipments: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getArea () {
|
||||
const obj = (await show({ id: 4 },false))?.select_item;
|
||||
if (obj && typeof obj === 'object') {
|
||||
let keys = Object.keys(obj)
|
||||
if (keys.length > 0) {
|
||||
this.areas = keys.map((key) => {
|
||||
return {
|
||||
key,
|
||||
value: /^\d*$/.test(obj[key])
|
||||
? Number(obj[key])
|
||||
: obj[key],
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
async getType () {
|
||||
const obj = (await show({ id: 1 },false))?.select_item;
|
||||
if (obj && typeof obj === 'object') {
|
||||
let keys = Object.keys(obj)
|
||||
if (keys.length > 0) {
|
||||
this.types = keys.map((key) => {
|
||||
return {
|
||||
key,
|
||||
value: /^\d*$/.test(obj[key])
|
||||
? Number(obj[key])
|
||||
: obj[key],
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
created() {
|
||||
this.getArea();
|
||||
this.getType();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<div>
|
||||
<template v-if="isQuick">
|
||||
<quickCreate :equipments="equipments"></quickCreate>
|
||||
</template>
|
||||
<template v-else>
|
||||
<normalCreate></normalCreate>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import normalCreate from "@/views/order/component/normalCreate.vue";
|
||||
import quickCreate from "@/views/order/component/quickCreate.vue";
|
||||
import {index} from "@/api/system/baseForm";
|
||||
export default {
|
||||
components: {
|
||||
quickCreate,
|
||||
normalCreate
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
equipments: () => this.equipments
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
equipments: [],
|
||||
isQuick: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getEquipments () {
|
||||
this.equipments = (await index({
|
||||
table_name: 'equipments',
|
||||
page: 1,
|
||||
page_size: 9999
|
||||
},false))?.data || []
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.$confirm('选择调令创建方式','调令方式',{
|
||||
confirmButtonText: '快速调令',
|
||||
cancelButtonText: '普通调令',
|
||||
type: 'info',
|
||||
closeOnPressEscape: false,
|
||||
closeOnClickModal: false,
|
||||
showClose: false
|
||||
}).then(_ => this.isQuick = true).catch(_ => this.isQuick = false)
|
||||
},
|
||||
created() {
|
||||
this.getEquipments();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
Loading…
Reference in new issue