From 1829751e1acf54cd4d2cdbec6923b57f7d244e14 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 28 Jul 2023 17:39:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AD=97=E6=AE=B5=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/newArchives/residents.vue | 58 ++++++++++++++-------------- subpkg/newArchives/newArchives.vue | 29 +++++++------- 2 files changed, 44 insertions(+), 43 deletions(-) diff --git a/components/newArchives/residents.vue b/components/newArchives/residents.vue index 117d926..0687a9b 100644 --- a/components/newArchives/residents.vue +++ b/components/newArchives/residents.vue @@ -3,7 +3,7 @@ - + @@ -22,26 +22,26 @@ - + - + - - + + - - + + - + - + - + - - + - + - + @@ -88,14 +88,14 @@ jobTypeList: ['公务员','国企事业单位','民营企业','自由职业','其他'], // 常住人口 residents: { - userList: [{ + family: [{ nickname: '', birthday: '', jobType: '', // 工作 skill: '', // 技能 }], - infant: '', //是否存在婴幼儿 - infantList: [ //婴幼儿列表 + child: '', //是否存在婴幼儿 + child_arr: [ //婴幼儿列表 { age: '', wsfy: '', //喂养方式 @@ -115,16 +115,16 @@ // 选择生日 changeBirthday(e){ let index = e.currentTarget.dataset.index; - this.residents.userList[index].birthday = e.detail.value; + this.residents.family[index].birthday = e.detail.value; }, // 选择就业 changeJobType(e){ let index = e.currentTarget.dataset.index; - this.residents.userList[index].jobType = this.jobTypeList[e.detail.value]; + this.residents.family[index].jobType = this.jobTypeList[e.detail.value]; }, // 添加人口 - pushUserList() { - this.residents.userList.push({ + pushFamily() { + this.residents.family.push({ nickname: '', birthday: '', jobType: '', @@ -132,20 +132,20 @@ }) }, // 删除人口 - removeUserList(index) { + removeFamily(index) { uni.showModal({ confirmColor: '#f56c6c', content: '确定删除吗?', success: (res) => { if (res.confirm) { - this.residents.userList.splice(index, 1); + this.residents.family.splice(index, 1); } } }) }, // 添加婴幼儿 - pushInfantList() { - this.residents.infantList.push({ + pushChildArr() { + this.residents.child_arr.push({ age: '', wsfy: '', //喂养方式 grade: '', //年级 @@ -154,13 +154,13 @@ }) }, // 删除婴幼儿 - removeInfantList(index) { + removeChildArr(index) { uni.showModal({ confirmColor: '#f56c6c', content: '确定删除吗?', success: (res) => { if (res.confirm) { - this.residents.infantList.splice(index, 1); + this.residents.child_arr.splice(index, 1); } } }) diff --git a/subpkg/newArchives/newArchives.vue b/subpkg/newArchives/newArchives.vue index 0159dd4..6adeeb5 100644 --- a/subpkg/newArchives/newArchives.vue +++ b/subpkg/newArchives/newArchives.vue @@ -4,8 +4,8 @@ 基本信息 - - + + @@ -18,8 +18,8 @@ - - + + @@ -28,8 +28,8 @@ - - + + @@ -38,14 +38,14 @@ - + - + @@ -80,14 +80,15 @@ formData: { id_card: '', sex: '', - nickname: '', - account: '', //电话 - is_car: '',//汽车是否能到家 - is_smartphone: '',//是否使用智能手机 + name: '', + phone: '', //电话 + highway: '',//汽车是否能到家 + smart_phone: '',//是否使用智能手机 wechat: '', //微信号 + address: '',//家庭地址 }, rules: { - account: { + phone: { required: true, pattern: /^(1[3456789]\d{9})$/, message: '请输入正确的手机号码', @@ -106,7 +107,7 @@ message: '请选择男或女', trigger: ['blur', 'change'] }, - nickname: { + name: { type: 'string', required: true, message: '姓名不能为空',