Lou
2024-03-15 476272a06e8d465d864ec37ddf34afaaa160d34d
subPackage/workbench/views/editCscj.vue
@@ -125,13 +125,14 @@
                  <box-title title="房东信息"></box-title>
               </view>
               <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
                  label="房东姓名:" prop="landlordName">
                  label="姓名:" prop="landlordName">
                  <u--input border="none" v-model="form.placeExtEntity.landlordName" placeholder="请输入">
                  </u--input>
               </u-form-item>
               <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
                  label="房东身份证号:" prop="landlordIdCard">
                  <u--input border="none" v-model="form.placeExtEntity.landlordIdCard" placeholder="请输入">
                  label="身份证号:" prop="landlordIdCard">
                  <u--input border="none" type="idcard" v-model="form.placeExtEntity.landlordIdCard"
                     placeholder="请输入">
                  </u--input>
               </u-form-item>
               <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
@@ -142,8 +143,7 @@
               </u-form-item>
               <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
                  label="微信号:" prop="landlordWxAccount">
                  <u--input border="none" type="idcard" v-model="form.placeExtEntity.landlordWxAccount"
                     placeholder="请输入">
                  <u--input border="none" v-model="form.placeExtEntity.landlordWxAccount" placeholder="请输入">
                  </u--input>
               </u-form-item>
            </view>
@@ -154,13 +154,12 @@
               </view>
               <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
                  label="姓名:" prop="legalPerson">
                  <u--input border="none" type="number" v-model="form.placeExtEntity.legalPerson"
                     placeholder="请输入">
                  <u--input border="none" v-model="form.placeExtEntity.legalPerson" placeholder="请输入">
                  </u--input>
               </u-form-item>
               <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
                  label="身份证号:" prop="legalIdCard">
                  <u--input border="none" type="number" v-model="form.placeExtEntity.legalIdCard"
                  <u--input border="none" type="idcard" v-model="form.placeExtEntity.legalIdCard"
                     placeholder="请输入">
                  </u--input>
               </u-form-item>
@@ -230,6 +229,80 @@
               </u-upload>
            </view>
         </u-form>
         <view class="practitioner">
            <box-title title="从业人员信息"></box-title>
            <view class="info" v-for="(item, index) in personNum" :key="index">
               <view class="title">人员信息-#{{ index*1 + 1 }}</view>
               <formItem ref="formItemRef"></formItem>
            </view>
            <view class="add-person">
               <u-button type="success" plain @click="addPerson">再加一人</u-button>
            </view>
         </view>
         <view class="item" v-if="currentId">
            <view class="box-title">
               <box-title title="综治网格">
                  <template slot="titleMore">
                     <view class="title-more">
                        <view class="red item"></view>
                        <view class="orange item"></view>
                        <view class="green item"></view>
                     </view>
                  </template>
               </box-title>
            </view>
            <lineItem :dataInfo="comprehensiveData.basic">
            </lineItem>
            <!-- <view class="bgc-ff flex j-c-s-b a-i-c" @click="navTo(1)" style="padding:20rpx;">
               <text>历史事件</text>
               <u-icon name="arrow-right"></u-icon>
            </view> -->
            <lineItem :dataInfo="comprehensiveData.scene">
               <template v-slot:pic="{scope}">
                  <view class="image" v-if="scope.value !== ''">
                     <u--image @click="imgPreview(scope.value)" width="200rpx" height="200rpx"
                        :src="scope.value"></u--image>
                  </view>
                  <view class="" v-else>
                     {{scope.value}}
                  </view>
               </template>
            </lineItem>
         </view>
         <view class="item" v-if="currentId">
            <view class="box-title">
               <box-title title="公安网格">
                  <template slot="titleMore">
                     <view class="title-more">
                        <view class="red item"></view>
                        <view class="orange item"></view>
                        <view class="green item"></view>
                     </view>
                  </template>
               </box-title>
            </view>
            <lineItem :dataInfo="publicData.basic">
            </lineItem>
            <!-- <view class="bgc-ff flex j-c-s-b a-i-c" @click="navTo(2)" style="padding:20rpx;">
               <text>历史事件</text>
               <u-icon name="arrow-right"></u-icon>
            </view> -->
            <lineItem :dataInfo="publicData.scene">
               <template v-slot:pic="{scope}">
                  {{scope.value}}
               </template>
            </lineItem>
         </view>
      </view>
      <footer-btn @click="submit" text="保存" />
@@ -290,12 +363,18 @@
   import cateSelector from "../components/cateSelector.vue"
   import {
      getQrCodeDetail
   } from "@/api/system/index"
   import formItem from '../components/formItem.vue'
   export default {
      mixins: [uploadMixin],
      components: {
         lineItem,
         boxTitle,
         cateSelector
         cateSelector,
         formItem
      },
      data() {
         return {
@@ -561,7 +640,8 @@
            genderIndex: [0],
            genderValue: "",
            showNationPicker: false,
            showGenderPicker: false
            showGenderPicker: false,
            personNum: 1,
         }
      },
@@ -604,14 +684,6 @@
            },
            immediate: true
         }
         // secondId:{
         //              handler(newVal,oldVal){
         //       this.getCategory(3,this.secondId);
         //    },
         //    immediate:true
         // }
      },
      onReady() {
         this.$refs.form.setRules(this.rules)
@@ -754,7 +826,10 @@
                  })
                  return
               }
               this.houseCode = data.houseCode;
               const placePractitioner = data?.placePractitioner || []
               this.personNum = placePractitioner.length
               this.source = data.source;
               // this.houseCode = data.houseCode;
               const dpaEntity = data?.doorplateAddressEntity || {}
               const gridEntity = data?.grid || {}
               // this.form.buildingCode = dpaEntity?.buildingCode || ''
@@ -893,6 +968,29 @@
                  })
               })
               placePractitioner.forEach((item, index) => {
                  this.$nextTick(() => {
                     if (item.ethnicity) {
                        let obj = this.$getIndex(this.nationTypeList, item.ethnicity,
                           "value", "name")
                        this.$refs.formItemRef[index].nationValue = obj.name;
                        this.$refs.formItemRef[index].nationTypeIndex = obj.index;
                     }
                     if (item.gender) {
                        let obj = this.$getIndex(this.$refs.formItemRef[index]
                           .gender, item.gender, "value", "name")
                        this.$refs.formItemRef[index].genderValue = obj.name;
                        this.$refs.formItemRef[index].genderIndex = obj.index;
                     }
                     if (item.employerImg) {
                        this.$refs.formItemRef[index].employerImg = this.$setImageUrl(item
                           .employerImg, 2)
                     }
                     this.$refs.formItemRef[index].form = item
                  })
               })
            })
         },
@@ -951,6 +1049,19 @@
            this.form.lat = Number(this.form.lat).toFixed(8)
            delete this.form.images;
            if (this.personNum > 0) {
               const placePractitioner = []
               this.$refs.formItemRef.forEach(item => {
                  item.form.placeId = this.form.placeId
                  item.form.employerImg = this.$formattingUrls(item.form.employerImg);
                  placePractitioner.push(item.form)
               })
               this.form.placePractitioner = placePractitioner
            }
            add(this.form).then(res => {
               this.$showTips("提交成功", "success");
               setTimeout(() => {
@@ -1199,4 +1310,11 @@
      background-color: #fff;
      text-align: center;
   }
   .practitioner {
      background-color: #fff;
      border-radius: 8rpx;
      margin-top: 20rpx;
   }
</style>