pyt
2025-02-25 195c9fa42adb18ae1a9cbbfa13ee8ad3ad6cade7
H5/pages/list/list.vue
@@ -8,19 +8,22 @@
            </view>
            <view v-if="searchParams.type == ''" class="bgColor1"></view>
         </view>
         <view @click="changeType('0')" class="flex1 relative" :class="searchParams.type == '0' && 'color2 font-bold'">
         <view @click="changeType('0')" class="flex1 relative"
            :class="searchParams.type == '0' && 'color2 font-bold'">
            <view class="relative zIndex1000">
               上报待审核
            </view>
            <view v-if="searchParams.type == '0'" class="bgColor1"></view>
         </view>
         <view @click="changeType('1')" class="flex1 relative" :class="searchParams.type == '1' && 'color2 font-bold'">
         <view @click="changeType('1')" class="flex1 relative"
            :class="searchParams.type == '1' && 'color2 font-bold'">
            <view class="relative zIndex1000">
               正在办理
            </view>
            <view v-if="searchParams.type == '1'" class="bgColor1"></view>
         </view>
         <view @click="changeType('2')" class="flex1 relative" :class="searchParams.type == '2' && 'color2 font-bold'">
         <view @click="changeType('2')" class="flex1 relative"
            :class="searchParams.type == '2' && 'color2 font-bold'">
            <view class="relative zIndex1000">
               办结
            </view>
@@ -34,13 +37,15 @@
         </view>
      </view>
      <view v-else class="pl-31 pr-31">
         <view class="mt-31 br-19 bgColor3 shadow2 oh pb-31" v-for="(item,index) in list" :key="item.id">
         <view class="mt-31 br-19 bgColor3 shadow2 oh pb-31" v-for="(item,index) in list" :key="item.id"
            @click="toDetail(item)">
            <view class="pt-21 pl-27 pr-27 flex a-center j-between fs-27 font-bold">
               <view class="">
                  诉求号:{{ item.serialNumber || '' }}
               </view>
               <view class="color3 flex a-center">
                  <view v-if="status == '2'" class="fs-23 font-w500 flex a-center pl-10 pr-12 mr-17 bgColor7 h-50 br-8 color8">
                  <view v-if="status == '2'"
                     class="fs-23 font-w500 flex a-center pl-10 pr-12 mr-17 bgColor7 h-50 br-8 color8">
                     <view class="w-27 h-27 color3 bgColor2 txt-center br-18 fs-20 flex a-center j-center mr-17">
                        i
                     </view>
@@ -107,8 +112,9 @@
                  描述图片
               </view>
               <view class="mt-19 flex wrap a-center">
                  <image v-for="(item1,index) in item.images" :key="index" :src="item1" @click="previewImage(item.images,index)"
                     class="br-19 w-142 h-154 mr-13 mb-10 shrink0" mode="aspectFill"></image>
                  <image v-for="(item1,index) in item.images" :key="index" :src="item1"
                     @click="previewImage(item.images,index)" class="br-19 w-142 h-154 mr-13 mb-10 shrink0"
                     mode="aspectFill"></image>
               </view>
            </view>
            <view class="mt-31 border1">
@@ -128,7 +134,7 @@
            </view>
         </view>
      </view>
      <view class="safe-b pt-20"></view>
   </view>
</template>
@@ -145,9 +151,9 @@
            searchParams: {
               pageNum: 1,
               pageSize: 10,
               type: '',//全部:不传,上报待审核:0,正在办理:1, 办结:2
               type: '', //全部:不传,上报待审核:0,正在办理:1, 办结:2
            },
            list:[],
            list: [],
            status: 'loadMore',
            statusObj: {
               // 0-正在办理 1-延期办理 2-超时办理 3-已办结 4-群众撤销 5-上报待审核 6-上级驳回
@@ -164,8 +170,8 @@
      onReachBottom() {
         if (this.status == 'loadMore') {
            this.searchParams.pageNum += 1
            this.fetchList(this.searchParams,(e)=>{
               this.list = [...this.list,...e.records]
            this.fetchList(this.searchParams, (e) => {
               this.list = [...this.list, ...e.records]
               if (this.list.length == e.total) {
                  this.status = 'noMore'
               } else {
@@ -182,7 +188,7 @@
      },
      onShow() {
         this.searchParams.pageNum = 1
         this.fetchList(this.searchParams,(e)=>{
         this.fetchList(this.searchParams, (e) => {
            this.list = e.records || []
            if (this.list.length == e.total) {
               this.status = 'noMore'
@@ -192,12 +198,12 @@
         })
      },
      methods: {
         fetchList(params,callback) {
         fetchList(params, callback) {
            if (this.status == 'loading') return
            this.status = 'loading'
            getList(params).then(res=>{
            getList(params).then(res => {
               if (res.code == 200) {
                  res.data.records.map(item=>{
                  res.data.records.map(item => {
                     if (item.images) {
                        item.images = item.images.split(',')
                     }
@@ -209,23 +215,23 @@
         // 添加办理进度
         addProgress(id) {
            uni.navigateTo({
               url:`/pages/progress/progress?id=${id}`
               url: `/pages/progress/progress?id=${id}`
            })
         },
         // 办理结果录入
         addResult(id) {
            uni.navigateTo({
               url:`/pages/result-entry/index?id=${id}`
               url: `/pages/result-entry/index?id=${id}`
            })
         },
         // 切换状态筛选
         changeType(type) {
            this.searchParams = {
               pageNum: 1,
               pageSize: 10,
               type,//全部:不传,上报待审核:0,正在办理:1, 办结:2
            this.searchParams = {
               pageNum: 1,
               pageSize: 10,
               type, //全部:不传,上报待审核:0,正在办理:1, 办结:2
            }
            this.fetchList(this.searchParams,(e)=>{
            this.fetchList(this.searchParams, (e) => {
               this.list = e.records || []
               if (this.list.length == e.total) {
                  this.status = 'noMore'
@@ -235,12 +241,17 @@
            })
         },
         // 预览图片
         previewImage(list,index) {
         previewImage(list, index) {
            uni.previewImage({
               urls: list,
               current: index,
            });
         },
         toDetail(item) {
            uni.navigateTo({
               url: `/pages/work-detail/work-detail?id=${item.id}`
            })
         }
      }
   }
</script>
@@ -303,7 +314,7 @@
   .color8 {
      color: #fff;
   }
   .color9 {
      color: #999999;
   }
@@ -339,7 +350,7 @@
   .bgColor6 {
      background: linear-gradient(270deg, #FC8D55 0%, #FF4948 100%);
   }
   .bgColor7 {
      background: #FF4948;
   }