Lou
2023-12-26 56313758fb520c213b7763d1dbb43d1d4b4ab7b9
subPackage/workbench/views/examine.vue
@@ -6,25 +6,23 @@
            <lineItem :dataInfo="basicData"></lineItem>
         </view>
      </view>
      <view class="licence"  v-if="imageObj.imageUrls.length">
      <view class="licence" v-if="imageObj.imageUrls.length">
         <box-title title="营业执照" class="box-title"></box-title>
         <view class="info">
            <view class="images-box"  v-for="(i,k) in imageObj.imageUrls"  :key="k">
               <u-image  width="80" height="80" :src="i"
                  @click="preViewImg(i,imageObj.imageUrls)"></u-image>
            <view class="images-box" v-for="(i,k) in imageObj.imageUrls" :key="k">
               <u-image width="80" height="80" :src="i" @click="preViewImg(i,imageObj.imageUrls)"></u-image>
            </view>
         </view>
      </view>
      <view class="planegraph"  v-if="imageObj.planImageUrls.length" >
      <view class="planegraph" v-if="imageObj.planImageUrls.length">
         <box-title title="场所平面图" class="box-title"></box-title>
         <view class="info">
            <view class="images-box"  v-for="(i,k) in imageObj.planImageUrls"  :key="k">
               <u-image  width="80" height="80" :src="i"
                  @click="preViewImg(i,imageObj.planImageUrls)"></u-image>
            <view class="images-box" v-for="(i,k) in imageObj.planImageUrls" :key="k">
               <u-image width="80" height="80" :src="i" @click="preViewImg(i,imageObj.planImageUrls)"></u-image>
            </view>
         </view>
      </view>
      <view class="personnel"  v-if="placePersonList.length">
      <view class="personnel" v-if="placePersonList.length">
         <box-title title="从业人员" class="box-title"></box-title>
         <view class="info">
            <view class="person-box" v-for="(item, index) in placePersonList" :key="item.id">
@@ -46,7 +44,7 @@
            </view>
         </view>
      </view>
      <view class="examine">
      <!-- <view class="examine">
         <box-title title="审核信息" class="box-title"></box-title>
         <view class="info">
            <u-form labelWidth="70" :model="form" ref="form" class="form">
@@ -60,14 +58,34 @@
               </u-form-item>
            </u-form>
         </view>
      </view>
      </view> -->
      <!-- <view class="bottom-btn">
         <u-button type="primary" @click="submit">提交审核</u-button>
      </view> -->
      <footer-btn  @click="submit"  v-if="form.confirmFlag == 1"   text="提交审核" />
      <footer-btn  @click="submit"  v-if="form.confirmFlag == 3"   text="通过" />
      <view class="footer flex a-i-c j-c-s-b"  v-if="form.confirmFlag == 1">
         <button class="footer-btn" @click="submit(1)">通过</button>
         <button class="footer-btn" @click="submit(2)">驳回</button>
      </view>
      <u-modal :show="isShowModal" title="备注"    :showConfirmButton="false">
         <view class="modal-content">
            <u-textarea v-model="form.confirmNotion" placeholder="请输入驳回原因"></u-textarea>
            <view class="modal-btn flex j-c-s-b a-i-c" slot="confirmButton">
               <button class="modal-btn-item c-main f-30" @click="isShowModal = false">取消</button>
               <button class="modal-btn-item bgc-main f-30 c-ff" @click="rejectSubmit">确定</button>
            </view>
         </view>
      </u-modal>
      <u-picker :defaultIndex="[this.defaultColumns]" :closeOnClickOverlay="true" @close="isPickerShow = false"
         :show="isPickerShow" ref="uPicker" :columns="columns" keyName="name" @cancel="isPickerShow = false"
         @confirm="handleConfirm"></u-picker>
@@ -81,7 +99,9 @@
      checkPlaceExtData,
      getPlaceDetail
   } from '@/api/placeExp/placeExp.js'
   import { minioBaseUrl } from "@/common/setting.js"
   import {
      minioBaseUrl
   } from "@/common/setting.js"
   export default {
      components: {
         boxTitle,
@@ -116,8 +136,8 @@
               confirmNotion: ''
            },
            imageObj: {
               imageUrls:[],
               planImageUrls:[]
               imageUrls: [],
               planImageUrls: []
            },
            isPickerShow: false,
            columns: [
@@ -140,7 +160,8 @@
               id: ''
            },
            defaultColumns: 0,
            defaultPlaceholder: '待审核'
            defaultPlaceholder: '待审核',
            isShowModal: false
         }
      },
      onLoad(option) {
@@ -174,18 +195,18 @@
            // Object.keys(this.imageObj).forEach(key => {
            //    this.imageObj[key] = data[key]
            // })
             this.form.confirmFlag = data.confirmFlag;
            if(data.imageUrls){
            this.form.confirmFlag = data.confirmFlag;
            if (data.imageUrls) {
               // let urls = data.imageUrls.split(",");
               // this.imageObj.imageUrls = `${minioBaseUrl}${data.imageUrls}`
               this.imageObj.imageUrls = this.$setImageUrl(data.imageUrls)
            }
            if(data.planImageUrls){
            if (data.planImageUrls) {
               this.imageObj.planImageUrls = this.$setImageUrl(data.planImageUrls)
            }
            this.basicData.forEach(item => {
               item.value = data[item.name] || '未完善'
            })
@@ -195,7 +216,16 @@
            this.defaultPlaceholder = columns[this.defaultColumns].name
            this.placePersonList = data.placePractitioner
         },
         async checkPlaceExt(data) {
         async checkPlaceExt() {
            let data = {
               id: this.currentData.id,
               confirmFlag: this.form.confirmFlag
            }
            if (this.form.confirmNotion) {
               data.confirmNotion = this.form.confirmNotion;
            }
            const res = await checkPlaceExtData(data)
            if (res.code !== 200) {
               uni.showToast({
@@ -204,6 +234,7 @@
               })
               return
            }
            this.isShowModal = false;
            uni.showToast({
               title: '审核成功',
               icon: 'success',
@@ -211,7 +242,7 @@
               complete() {
                  setTimeout(() => {
                     uni.navigateBack()
                  }, 1500)
                  }, 1000)
               }
            })
         },
@@ -222,25 +253,18 @@
            this.form.confirmFlag = e.value[0].status
            this.isPickerShow = false
         },
         preViewImg(current,urls) {
         preViewImg(current, urls) {
            uni.previewImage({
               current,urls
               current,
               urls
            })
         },
         submit() {
            const {
               confirmFlag,
               confirmNotion
            } = this.form
            let data = {
               id: this.currentData.id,
               // confirmFlag: this.findObjValue(confirmFlag, this.columns[0]).status
               confirmFlag:confirmFlag
         submit(type) {
            if (type == 2) {
               this.isShowModal = true;
            } else {
               this.checkPlaceExt()
            }
            confirmNotion && Object.assign(data, {
               confirmNotion
            })
            this.checkPlaceExt(data)
         },
         findObjValue(value, obj) {
            const res = obj.find(item => {
@@ -248,40 +272,52 @@
            })
            return res
         },
         rejectSubmit() {
            if(!this.form.confirmNotion){
               uni.showToast({
                  title:"请输入驳回原因",
                  icon:"none"
               })
               return
            }
            this.checkPlaceExt()
         }
      }
   }
</script>
<style>
   page {
      background-color: #f5f5f5;
   }
<style>
   page {
      background-color: #f5f5f5;
   }
</style>
<style lang="scss" scoped>
   .container {
      padding-bottom: 130rpx;
      padding: 20rpx 30rpx;
      padding-bottom: 140rpx;
      .basic,
      .licence,
      .planegraph,
      .personnel,
      .examine {
         background-color: #fff;
         padding: 30rpx;
         margin-top: 20rpx;
         border-radius: 8rpx;
      padding-bottom: 130rpx;
      padding: 20rpx 30rpx;
      padding-bottom: 140rpx;
      .basic,
      .licence,
      .planegraph,
      .personnel,
      .examine {
         background-color: #fff;
         padding: 30rpx;
         margin-top: 20rpx;
         border-radius: 8rpx;
      }
      .box-title {
         margin-bottom: 15rpx;
      }
      .info {
      .info {
         background-color: #fff;
         .title {
            font-size: 30rpx;
            padding-left: 10rpx;
@@ -304,6 +340,7 @@
            }
         }
      }
      .bottom-btn {
         position: fixed;
         left: 0;
@@ -318,15 +355,74 @@
   // /deep/ .u-form-item__body__left__content__label,
   // /deep/ .uni-input-placeholder {
   //    font-size: 30rpx;
   // }
   /deep/ .u-form {
      background-color: #fff;
      .u-form-item {
         padding: 0 20rpx;
         border-bottom: 1rpx solid #f6f6ff;
         &:last-child {
            border: 0;
         }
      }
   // }
   /deep/ .u-form {
      background-color: #fff;
      .u-form-item {
         padding: 0 20rpx;
         border-bottom: 1rpx solid #f6f6ff;
         &:last-child {
            border: 0;
         }
      }
   }
   .footer {
      width: 100%;
      padding: 20rpx 30rpx;
      box-sizing: border-box;
      position: fixed;
      bottom: 0;
      left: 0;
      background-color: #fff;
      z-index: 10;
      padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
      z-index: 999;
      background-color: #fff;
      box-shadow: 0rpx 0rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
      .footer-btn {
         width: 300rpx;
         height: 78rpx;
         border-radius: 8rpx;
         font-size: 32rpx;
         color: #fff;
         border: none;
         background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
      }
      .footer-btn:after {
         border: none;
      }
   }
   .modal-content {
         width:100%;
      .modal-btn {
         width: 100%;
         padding: 40rpx 0 0;
         .modal-btn-item {
            width: 240rpx;
            height: 74rpx;
            line-height: 74rpx;
            border-radius: 35rpx;
            border:none;
            padding:0;
            margin:0;
         }
         .modal-btn-item:first-child {
            border: 1px solid currentColor;
            background:transparent;
         }
      }
   }
   /deep/ .u-modal__content{
      padding-bottom:20rpx !important;
   }
</style>