From 03547adaf528f41282e212a320174d92ff67c4fd Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Mon, 18 Mar 2024 16:10:11 +0800
Subject: [PATCH] 更新
---
subPackage/workbench/views/editExamine.vue | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/subPackage/workbench/views/editExamine.vue b/subPackage/workbench/views/editExamine.vue
index adc1cca..b0f6927 100644
--- a/subPackage/workbench/views/editExamine.vue
+++ b/subPackage/workbench/views/editExamine.vue
@@ -143,8 +143,13 @@
<view style="padding:20rpx 30rpx;">
<box-title title="从业人员信息"></box-title>
</view>
- <view class="info" v-for="(item, index) in personNum" :key="index">
- <view class="title">人员信息-#{{ index*1 + 1 }}</view>
+ <view class="info" v-for="(item, index) in personNumArr" :key="index">
+ <view class="flex a-i-c j-c-s-b" style="padding:20rpx;">
+ <view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view>
+ <view v-if="(index+1) > 1">
+ <u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
+ </view>
+ </view>
<formItem ref="formItemRef"></formItem>
</view>
@@ -294,7 +299,8 @@
genderIndex: [0],
genderValue: "",
showNationPicker: false,
- showGenderPicker: false
+ showGenderPicker: false,
+ personNumArr: [1],
}
},
onShow() {
@@ -426,6 +432,7 @@
}
this.personNum = placePractitioner.length
+ this.personNumArr = placePractitioner;
// const componetns = this.$refs.formItemRef || []
placePractitioner.forEach((item, index) => {
this.$nextTick(() => {
@@ -524,9 +531,7 @@
})
})
},
- addPerson() {
- this.personNum++
- },
+
submit() {
if (this.personNum > 0) {
const placePractitioner = []
@@ -557,7 +562,13 @@
addPerson() {
this.personNum++
+ this.personNumArr.push(1)
},
+
+ deletePerson(index) {
+ this.personNum--;
+ this.personNumArr.splice(index, 1)
+ }
}
}
</script>
--
Gitblit v1.9.3