修改参数
This commit is contained in:
parent
90a961ac81
commit
7b4c2f3fd5
@ -128,7 +128,7 @@
|
|||||||
formData: {
|
formData: {
|
||||||
breedingList: [{
|
breedingList: [{
|
||||||
landPlan: '', //土地规划
|
landPlan: '', //土地规划
|
||||||
}]
|
}, ]
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
||||||
@ -143,7 +143,9 @@
|
|||||||
},
|
},
|
||||||
// 新增种养殖
|
// 新增种养殖
|
||||||
pushBreedingList() {
|
pushBreedingList() {
|
||||||
this.formData.breedingList.push({})
|
this.formData.breedingList.push({
|
||||||
|
landPlan: '', //土地规划
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 删除种养殖
|
// 删除种养殖
|
||||||
removeBreedingList(index) {
|
removeBreedingList(index) {
|
||||||
@ -162,7 +164,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.delete {
|
.delete {
|
||||||
margin: 22rpx 0;
|
margin: 22rpx 0;
|
||||||
// margin-bottom: 40rpx;
|
// margin-bottom: 40rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -4,23 +4,23 @@
|
|||||||
<u--form labelPosition="left" :model="residents" :rules="rules" ref="uForm">
|
<u--form labelPosition="left" :model="residents" :rules="rules" ref="uForm">
|
||||||
<block value="人口">
|
<block value="人口">
|
||||||
<block value="人员信息" v-for="(item, index) in residents.family" :key="'user'+index">
|
<block value="人员信息" v-for="(item, index) in residents.family" :key="'user'+index">
|
||||||
<u-form-item label="姓名" required prop="residents.nickname" borderBottom>
|
<u-form-item label="姓名" required prop="residents.name" borderBottom>
|
||||||
<u--input v-model="item.nickname" placeholder="请输入姓名"></u--input>
|
<u--input v-model="item.name" placeholder="请输入姓名"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<picker mode="date" value="1990-01-01" @change="changeBirthday" :data-index="index">
|
<picker mode="date" value="1990-01-01" @change="changebirth_time" :data-index="index">
|
||||||
<u-form-item labelWidth="auto" label="出生日期" required prop="residents.nickname" borderBottom>
|
<u-form-item labelWidth="auto" label="出生日期" required prop="residents.name" borderBottom>
|
||||||
<u--input :value="item.birthday" placeholder="请选择出生日期" disabled disabledColor="#fff"></u--input>
|
<u--input :value="item.birth_time" placeholder="请选择出生日期" disabled disabledColor="#fff"></u--input>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</picker>
|
</picker>
|
||||||
<picker mode="selector" :range="jobTypeList" @change="changeJobType" :data-index="index">
|
<picker mode="selector" :range="situationList" @change="changesituation" :data-index="index">
|
||||||
<u-form-item labelWidth="auto" label="就业情况" required prop="residents.nickname" borderBottom>
|
<u-form-item labelWidth="auto" label="就业情况" required prop="residents.name" borderBottom>
|
||||||
<u--input :value="item.jobType" placeholder="请选择就业情况" disabled disabledColor="#fff"></u--input>
|
<u--input :value="item.situation" placeholder="请选择就业情况" disabled disabledColor="#fff"></u--input>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</picker>
|
</picker>
|
||||||
<u-form-item labelWidth="auto" label="技能特长" required prop="residents.nickname" borderBottom>
|
<u-form-item labelWidth="auto" label="技能特长" required prop="residents.name" borderBottom>
|
||||||
<u--input v-model="item.skill" placeholder="请输入技能特长"></u--input>
|
<u--input v-model="item.skills" placeholder="请输入技能特长"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<button type="primary" v-if="residents.family.length>1" class="delete"
|
<button type="primary" v-if="residents.family.length>1" class="delete"
|
||||||
@click="removeFamily(index)">删除以上信息</button>
|
@click="removeFamily(index)">删除以上信息</button>
|
||||||
@ -55,26 +55,26 @@
|
|||||||
<u--input v-model="item.grade" placeholder="请输入年级"></u--input>
|
<u--input v-model="item.grade" placeholder="请输入年级"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="是否补课" required prop="residents.child" borderBottom>
|
<u-form-item labelWidth="auto" label="是否补课" required prop="residents.child" borderBottom>
|
||||||
<u-radio-group v-model="item.is_course" style="margin: 16rpx;">
|
<u-radio-group v-model="item.is_lesson" style="margin: 16rpx;">
|
||||||
<u-radio :customStyle="{marginRight: '16px'}"
|
<u-radio :customStyle="{marginRight: '16px'}"
|
||||||
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
v-for="(item, index) in [{value:1,label:'是'},{value:0,label:'否'}]" :key="index" :label="item.label"
|
||||||
:name="item.value">
|
:name="item.value">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item v-if="item.is_course>0" label-width="auto" labelPosition="top" label="补课内容" prop="residents.child_arr.age"
|
<u-form-item v-if="item.is_lesson>0" label-width="auto" labelPosition="top" label="补课内容" prop="residents.child_arr.age"
|
||||||
borderBottom>
|
borderBottom>
|
||||||
<u--textarea v-model="item.course" autoHeight placeholder="请输入需要的课程" border="surround"
|
<u--textarea v-model="item.lesson" autoHeight placeholder="请输入需要的课程" border="surround"
|
||||||
count></u--textarea>
|
count></u--textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label-width="auto" labelPosition="top" label="备注" prop="residents.child_arr.age" borderBottom>
|
<u-form-item label-width="auto" labelPosition="top" label="备注" prop="residents.child_arr.age" borderBottom>
|
||||||
<u--textarea v-model="item.remark" autoHeight placeholder="请输入备注" border="surround" count></u--textarea>
|
<u--textarea v-model="item.notes" autoHeight placeholder="请输入备注" border="surround" count></u--textarea>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</block>
|
</block>
|
||||||
<button type="primary" v-if="residents.child_arr.length>1" class="delete"
|
<button type="primary" v-if="residents.child_arr.length>1" class="delete"
|
||||||
@click="removeChildArr(index)">删除以上信息</button>
|
@click="removeChildArr(index)">删除以上信息</button>
|
||||||
</block>
|
</block>
|
||||||
<button type="primary" class="plus" @click="pushChildArr">+</button>
|
<button type="primary" v-if="residents.child>0" class="plus" @click="pushChildArr">+</button>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
</u--form>
|
</u--form>
|
||||||
@ -85,24 +85,24 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
jobTypeList: ['公务员','国企事业单位','民营企业','自由职业','其他'],
|
situationList: ['公务员','国企事业单位','民营企业','自由职业','其他'],
|
||||||
// 常住人口
|
// 常住人口
|
||||||
residents: {
|
residents: {
|
||||||
family: [{
|
family: [{
|
||||||
nickname: '',
|
name: '',
|
||||||
birthday: '',
|
birth_time: '',
|
||||||
jobType: '', // 工作
|
situation: '', // 工作
|
||||||
skill: '', // 技能
|
skills: '', // 技能
|
||||||
}],
|
}],
|
||||||
child: '', //是否存在婴幼儿
|
child: '', //是否存在婴幼儿
|
||||||
child_arr: [ //婴幼儿列表
|
child_arr: [ //婴幼儿列表
|
||||||
{
|
{
|
||||||
age: '',
|
age: '',
|
||||||
wsfy: '', //喂养方式
|
feeding: '', //喂养方式
|
||||||
grade: '', //年级
|
grade: '', //年级
|
||||||
is_course: '', //是否补课
|
is_lesson: '', //是否补课
|
||||||
course: '', //课程
|
lesson: '', //课程
|
||||||
remark: '' //备注
|
notes: '' //备注
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -113,23 +113,23 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 选择生日
|
// 选择生日
|
||||||
changeBirthday(e){
|
changebirth_time(e){
|
||||||
let index = e.currentTarget.dataset.index;
|
let index = e.currentTarget.dataset.index;
|
||||||
this.residents.family[index].birthday = e.detail.value;
|
this.residents.family[index].birth_time = e.detail.value;
|
||||||
},
|
},
|
||||||
// 选择就业
|
// 选择就业
|
||||||
changeJobType(e){
|
changesituation(e){
|
||||||
let index = e.currentTarget.dataset.index;
|
let index = e.currentTarget.dataset.index;
|
||||||
this.residents.family[index].jobType = this.jobTypeList[e.detail.value];
|
this.residents.family[index].situation = this.situationList[e.detail.value];
|
||||||
},
|
},
|
||||||
// 添加人口
|
// 添加人口
|
||||||
pushFamily() {
|
pushFamily() {
|
||||||
this.residents.family.push({
|
this.residents.family.push({
|
||||||
nickname: '',
|
name: '',
|
||||||
birthday: '',
|
birth_time: '',
|
||||||
jobType: '',
|
situation: '', // 工作
|
||||||
skill: '',
|
skills: '', // 技能
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 删除人口
|
// 删除人口
|
||||||
removeFamily(index) {
|
removeFamily(index) {
|
||||||
@ -146,12 +146,13 @@
|
|||||||
// 添加婴幼儿
|
// 添加婴幼儿
|
||||||
pushChildArr() {
|
pushChildArr() {
|
||||||
this.residents.child_arr.push({
|
this.residents.child_arr.push({
|
||||||
age: '',
|
age: '',
|
||||||
wsfy: '', //喂养方式
|
feeding: '', //喂养方式
|
||||||
grade: '', //年级
|
grade: '', //年级
|
||||||
course: '', //课程
|
is_lesson: '', //是否补课
|
||||||
remark: '' //备注
|
lesson: '', //课程
|
||||||
})
|
notes: '' //备注
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 删除婴幼儿
|
// 删除婴幼儿
|
||||||
removeChildArr(index) {
|
removeChildArr(index) {
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
<u-form-item label="年龄" required prop="age" borderBottom>
|
||||||
|
<u--input v-model="formData.age" placeholder="请输入年龄"></u--input>
|
||||||
|
</u-form-item>
|
||||||
<u-form-item labelWidth="auto" label="身份证号" required prop="id_card" borderBottom>
|
<u-form-item labelWidth="auto" label="身份证号" required prop="id_card" borderBottom>
|
||||||
<u--input v-model="formData.id_card" placeholder="请输入身份证号" type="idcard"></u--input>
|
<u--input v-model="formData.id_card" placeholder="请输入身份证号" type="idcard"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
@ -67,9 +70,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { upLoadImage } from "@/api/file.js"
|
|
||||||
import { loginAdd } from "@/api/oaUser.js"
|
|
||||||
import { Toast } from "../../libs/uniApi"
|
import { Toast } from "../../libs/uniApi"
|
||||||
|
import { informationAdd } from "@/api/information.js"
|
||||||
import districtSelector from "@/components/districtSelector/districtSelector.vue" //地区选择器
|
import districtSelector from "@/components/districtSelector/districtSelector.vue" //地区选择器
|
||||||
import residents from "@/components/newArchives/residents.vue" // 常住人口
|
import residents from "@/components/newArchives/residents.vue" // 常住人口
|
||||||
import breeding from "@/components/newArchives/breeding.vue" // 种养殖
|
import breeding from "@/components/newArchives/breeding.vue" // 种养殖
|
||||||
@ -86,6 +88,7 @@
|
|||||||
smart_phone: '',//是否使用智能手机
|
smart_phone: '',//是否使用智能手机
|
||||||
wechat: '', //微信号
|
wechat: '', //微信号
|
||||||
address: '',//家庭地址
|
address: '',//家庭地址
|
||||||
|
age: '',//年龄
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
phone: {
|
phone: {
|
||||||
@ -125,7 +128,7 @@
|
|||||||
this.$refs.uForm.validate().then(async (e) => {
|
this.$refs.uForm.validate().then(async (e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
// uni.showLoading()
|
// uni.showLoading()
|
||||||
// let res = await loginAdd(this.formData);
|
// let res = await informationAdd(this.formData);
|
||||||
// uni.hideLoading()
|
// uni.hideLoading()
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
// icon: "none",
|
// icon: "none",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user