Lou
2024-03-18 03547adaf528f41282e212a320174d92ff67c4fd
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>