GULIMMO
2023-11-08 4dd7f57d196fdf3f455acacb5963c39183a70ea8
subPackage/workbench/views/cshw.vue
@@ -13,24 +13,20 @@
         </view>
      </u-sticky>
      <view class="list">
         <view class="list-item bgc-ff mb-20" v-for="i in 3" @click="pushPage">
         <view class="list-item bgc-ff mb-20" v-for="item in siteList" :key="item.id" @click="pushPage(item.id)">
            <view class="item-title flex a-i-c j-c-s-b mb-20">
               <text class="f-32 fw">名称</text>
               <text class="f-32 fw">{{ item.placeName ? item.placeName : '场所信息未完善' }}</text>
               <!-- <u-tag text="待审批" type="warning" plain plainFill></u-tag> -->
               <u-tag class="u_tag" size="mini" text="审核通过" type="success" plain plainFill></u-tag>
               <u-tag class="u_tag" size="mini" :text="findObjValue(item.confirmFlag, tabList).name" :type="findObjValue(item.confirmFlag, tabList).type" plain plainFill></u-tag>
               <!-- <u-tag text="审核拒绝" type="error" plain plainFill></u-tag> -->
            </view>
            <view class="item-row flex a-i-c j-c-s-b">
               <text class="f-28">场所名称</text>
               <text class="f-28 c-66">xxxxx</text>
            </view>
            <view class="item-row flex a-i-c j-c-s-b">
               <text class="f-28">标签</text>
               <text class="f-28 c-66">打金店</text>
            </view>
            <view class="item-row flex a-i-c j-c-s-b">
               <text class="f-28">地址</text>
               <text class="address f-28 c-66">西市街道万达社区居民委员会滨江西路66号万达晶座11栋303室</text>
               <text class="address f-28 c-66">{{ item.localtion }}</text>
            </view>
            <view class="item-row flex a-i-c j-c-s-b">
               <text class="f-28">法人信息</text>
               <text class="f-28 c-66">{{ item.legalPerson }}</text>
            </view>
         </view>
      </view>
@@ -39,40 +35,97 @@
</template>
<script>
   import {
      getSiteMaintenanceData
   } from '@/api/placeExp/placeExp.js'
   export default {
      data() {
         return {
            siteList: [],
            pagingParams: {
               current: 1,
               size: 10
            },
            tabList: [{
                  name: "待审核",
                  status: 1
                  status: 1,
                  type: 'warning'
               },
               {
                  name: "审核通过",
                  status: 2
                  status: 2,
                  type: 'success'
               },
               {
                  name: "已拒绝",
                  status: 3
                  name: "审核不通过",
                  status: 3,
                  type: 'error'
               },
            ],
            tabIndex: 0,
            keyWord: '',
            tabStatus: 1,
            keyWord: '',
            loadingStatus: 'nomore'
         }
      },
      onReachBottom() {
         console.log('没有了');
      },
      onShow() {
         this.siteList = []
         this.getSiteList()
      },
      onReachBottom() {
         this.pagingParams.current++
         this.getSiteList()
      },
      methods: {
         changeTab(e) {
            this.tabIndex = e.index;
         async getSiteList() {
            this.loadingStatus = 'loadingmore'
            const params = {
               placeName: this.keyWord,
               confirmFlag: this.tabStatus
            }
            const res = await getSiteMaintenanceData({
               ...params,
               ...this.pagingParams
            })
            const {
               code,
               data: {
                  records
               }
            } = res
            if (code !== 200) {
               uni.showToast({
                  title: '数据请求失败'
               })
               return
            }
            this.siteList = [...this.siteList, ...records]
            this.loadingStatus = 'nomore'
         },
         searchConfirm() {},
         changeTab(e) {
            this.tabStatus = e.status;
            this.resetParams()
            this.getSiteList()
         },
         searchConfirm() {
            this.resetParams()
            this.getSiteList()
         },
         clearConfirm() {
            this.keyWord = ''
         },
         pushPage() {
            this.$u.func.globalNavigator('/subPackage/workbench/views/examine')
         resetParams() {
            this.siteList = []
            this.pagingParams.current = 1
         },
         findObjValue(value, obj) {
            const res = obj.find(item => {
               return item.status == value
            })
            return res
         },
         pushPage(id) {
            this.$u.func.globalNavigator('/subPackage/workbench/views/examine?id='+id)
         }
      }
   }