Lou
2023-12-26 c65169cebf56657dbec38088c870f0084ca08321
subPackage/workbench/views/cscj.vue
@@ -52,11 +52,7 @@
                  
               </u-form-item>
               <!-- <u-form-item class="form-item" labelWidth="100" label="经纬度:" prop="location">
               <u--input border="none" disabled disabledColor="#ffffff" v-model="form.jwd" placeholder="请输入">
               </u--input>
            </u-form-item> -->
               <u-form-item label="经纬度:" prop="location" labelWidth="100">
                  <view class="address-row flex j-c-s-b a-i-c">
@@ -93,6 +89,10 @@
               <view class="box-title">
                  <box-title title="场所照片"></box-title>
               </view>
               <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
                  :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
                  :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
@@ -156,21 +156,8 @@
               </template>
            </lineItem>
         </view>
         <!-- <view class="bottom">
         <view class="btn">
            <u-button @click="submit" type="primary" text="提交" v-if="!currentId"></u-button>
         </view>
      </view> -->
      </view>
      <footer-btn @click="submit" v-if="!currentId" />
      <!-- <uni-popup class="citys_win popup_win" ref="uniPopup" type="bottom">
         <wyh-tree-select :items="labelList" title="标签选择" :showNav="true" defaultActiveColor="#4586fe"
            :activeIds="activeIds" @clickItem="labelClick" :showCancel="false" :showConfirm="false">
         </wyh-tree-select>
      </uni-popup> -->
      <u-picker :show="showPicker" :defaultIndex="defaultIndex" ref="uPicker" keyName="name" :loading="pickerLoading"
@@ -189,7 +176,6 @@
   import uploadMixin from "@/mixin/uploadMixin";
   import lineItem from "@/subPackage/workbench/components/lineItem.vue"
   import {
      getLabelList,
      getLabelCate
   } from "@/api/label/categoryLabel.js";
   import {
@@ -400,23 +386,8 @@
            categoryValue: []
         }
      },
      // watch: {
      //    activeIds: {
      //       handler(newVal) {
      //          this.form.label = newVal.join(",")
      //       }
      //    },
      //    "form.buildingCode": {
      //       handler(newVal) {}
      //    },
      //    showLabelList(newVal) {}
      // },
      created() {
         this.buildColumn()
      },
      mounted() {
      },
      options: {
         styleIsolation: 'shared', // 解除样式隔离
@@ -429,7 +400,7 @@
            this.addressType = option.addressType
         }
         if (option.id) {    
            this.currentId = option.id
            this.currentId = option.id;
         }
         if (option.houseCode) {
            this.houseCode = option.houseCode
@@ -444,12 +415,6 @@
            })
         }
         this.getCategory();
      },
      onShow() {
         this.getLabel()
         // this.getLocation()
      },
      watch: {
@@ -611,11 +576,8 @@
                  return
               }
               const dpaEntity = data?.doorplateAddressEntity || {}
               const gridEntity = data?.grid || {}
               // this.form.buildingCode = dpaEntity?.buildingCode || ''
               let buildingNameArr = [
                  dpaEntity?.townStreetName,
                  dpaEntity?.neiName,
@@ -627,7 +589,6 @@
                  return e != null || e != ''
               })
               this.form.placeName = data['placeName'] || ''
               Object.keys(this.form).forEach(key => {
                  if (!data[key]) {
                     // this.form[key] = dpaEntity[key] || '未完善'
@@ -640,6 +601,7 @@
                     // this.form[key] = data.imageUrls
                     if (data.imageUrls) {
                        this.form.images = this.$setImageUrl(data.imageUrls, 2);
                        this.uploadConfig.maxCount = this.form.images.length;
                     } else {
                        this.form.images = []
                     }
@@ -649,14 +611,6 @@
               this.form.jwd = `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`
               this.form.building = arr.join("")
               this.firstId = data.placePoiLabelVOList[0].poiCode;
               // setTimeout(() => {
               //    data.placePoiLabelVOList.forEach(item => {
               //       let label = this.labelList[0].children.find(sl => sl.text === item
               //          .labelName) || {}
               //       label['isClose'] = false
               //       label?.text && this.showLabelList.push(label)
               //    })
               // }, 500)
               this.categoryValue = data.placePoiLabelVOList[data.placePoiLabelVOList.length-1].labelName;
               uni.$u.sleep(500).then(() => {
                  data.placePoiLabelVOList.forEach(item=>{
@@ -849,21 +803,7 @@
         },
         getLabel() {
            getLabelList({
               size: -1
            }).then(res => {
               let data = res.data.records
               data.sort((a, b) => a.sort - b.sort)
               data.forEach(label => {
                  this.labelList[0].children.push({
                     id: label.categoryNo,
                     text: label.categoryName
                  })
               })
            })
         },
         labelClick(item) {