优化常住人口组件,新增种养殖组件
This commit is contained in:
parent
de2dc55f3a
commit
78bedea18b
62
components/newArchives/breeding.vue
Normal file
62
components/newArchives/breeding.vue
Normal file
@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm">
|
||||
<u-form-item labelWidth="auto" label="耕地总面积" required prop="" borderBottom>
|
||||
<u--input placeholder="请输入耕地总面积"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="土地规划" required prop="" borderBottom>
|
||||
<u--input placeholder="请输入耕地总面积"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无种养殖培训" required prop="sex" borderBottom>
|
||||
<u-radio-group v-model="formData.sex" style="margin: 16rpx;">
|
||||
<u-radio :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="有无注册成立种植公司" required prop="sex" borderBottom>
|
||||
<u-radio-group v-model="formData.sex" style="margin: 16rpx;">
|
||||
<u-radio :customStyle="{marginRight: '16px'}"
|
||||
v-for="(item, index) in [{value:1,label:'有'},{value:0,label:'无'}]" :key="index" :label="item.label"
|
||||
:name="item.value">
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="备注" required prop="" borderBottom>
|
||||
<u--input placeholder="请输入耕地总面积"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="种养殖类型" required prop="" borderBottom>
|
||||
<u--input placeholder="请输入耕地总面积"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="面积" required prop="" borderBottom>
|
||||
<u--input placeholder="请输入耕地总面积"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="种养殖开始时间" required prop="" borderBottom>
|
||||
<u--input placeholder="请输入耕地总面积"></u--input>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData:{
|
||||
|
||||
},
|
||||
rules:{
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
@ -13,7 +13,7 @@
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
</picker>
|
||||
<picker mode="selector" :range="['公务员','国企事业单位','民营企业','自由职业','其他']" @change="">
|
||||
<picker mode="selector" :range="jobTypeList" @change="changeJobType" :data-index="index">
|
||||
<u-form-item labelWidth="auto" label="就业情况" required prop="residents.nickname" borderBottom>
|
||||
<u--input :value="item.jobType" placeholder="请选择就业情况" disabled disabledColor="#fff"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
@ -107,6 +107,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
jobTypeList: ['公务员','国企事业单位','民营企业','自由职业','其他'],
|
||||
// 常住人口
|
||||
residents: {
|
||||
userList: [{
|
||||
@ -136,8 +137,15 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 选择生日
|
||||
changeBirthday(e){
|
||||
console.log(e);
|
||||
let index = e.currentTarget.dataset.index;
|
||||
this.residents.userList[index].birthday = e.detail.value;
|
||||
},
|
||||
// 选择就业
|
||||
changeJobType(e){
|
||||
let index = e.currentTarget.dataset.index;
|
||||
this.residents.userList[index].jobType = this.jobTypeList[e.detail.value];
|
||||
},
|
||||
// 添加人口
|
||||
pushUserList() {
|
||||
|
@ -33,6 +33,10 @@
|
||||
<view class="title">常住人口</view>
|
||||
<residents ref="residentsRef"></residents>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="title">种养殖</view>
|
||||
<breeding ref="breedingRef"></breeding>
|
||||
</view>
|
||||
</u--form>
|
||||
<button @click="addArchives" type="primary" class="btn">创建</button>
|
||||
</view>
|
||||
@ -45,8 +49,9 @@
|
||||
import { Toast } from "../../libs/uniApi"
|
||||
import districtSelector from "@/components/districtSelector/districtSelector.vue" //地区选择器
|
||||
import residents from "@/components/newArchives/residents.vue" // 常住人口
|
||||
import breeding from "@/components/newArchives/breeding.vue" // 种养殖
|
||||
export default {
|
||||
components:{districtSelector, residents},
|
||||
components:{districtSelector, residents, breeding},
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user