jiangping
2023-09-14 aeab73facdc02b13474e671215bec79c8e64008a
minipro_standard/pages/index/index.vue
@@ -4,20 +4,38 @@
      <!-- {{$store.state.statusbarHeight}} -->
      
      <u-sticky>
         <view class="plr30 pb30 nav-style">
         <view class="plr30 pb30 nav-style bg_w">
            <view
               :style="{background: '#fff', zIndex: '999', paddingTop: `${statusbarHeight}px`, height: `${navHeight}px`, lineHeight:`${navHeight}px`, textAlign: 'center'}">
               待办</view>
            <div class="content_search">
               <v-Search @searchInput="searchInput" @submit="search" @reset="reset" :isShow="true"
               <v-Search @searchInput="searchInput" @submit="confirm" @reset="resetType" :isShow="true"
                  placeholder="搜索关键字">
                  <template v-slot:content>
                     <view class="rp contanir">
                        <view class="c2 b">类型</view>
                        <view class="content">
                           <u-grid col="2" :border="false">
                              <u-grid-item v-for="item in types" :key="item.id">
                                 <view class="ptb20 f26 c9 type-style tc rd10" :class="type===item.id?'sbtn_green':'sbtn_gray'"
                                    @click="type=item.id">{{ item.name }}</view>
                              </u-grid-item>
                           </u-grid>
                        </view>
                        <!-- <view class="flex ap tc bottom-view">
                           <view class="fx1 ptb20 sbtn_gray c9" @click="resetType">重置</view>
                           <view class="fx1 ml20 ptb20 sbtn_green" @click="confirm">确定</view>
                        </view> -->
                     </view>
                  </template>
               </v-Search>
               <div class="content_search_x"></div>
               <LabelSelection :TagList="tagList" :isShow="true" @change="clickTag"></LabelSelection>
            </div>
         </view>
      </u-sticky>
      <scroll-view v-if="projectList.length" scroll-y refresher-enabled="true" :refresher-triggered="triggered" @scrolltolower="loadMore"
      </u-sticky>
      <scroll-view :style="{height: height}" v-if="projectList.length" scroll-y refresher-enabled="true" :refresher-triggered="triggered" @scrolltolower="loadMore"
         @refresherrefresh="refresh"
      >
         <view v-for="(item, index) in projectList" :key="index">
@@ -79,7 +97,9 @@
         LabelSelection
      },
      data() {
         return {
         return {
            height: '',
            top: '',
            code: '',
            windowHeight: '',
            show: false,
@@ -154,12 +174,29 @@
         await this.$store.dispatch('getUpcomingNum')
         this.tagList[0].num = this.$store.state.upcomingNum.d
         this.tagList[1].num = this.$store.state.upcomingNum.y
      },
      onReady() {
         var that = this
         this.$nextTick(() => {
            uni.createSelectorQuery()
               .in(this)
               .select('.content_search')
               .boundingClientRect((rect) => {
                  that.height = `calc(100vh - ${rect.height + 80}px)`
                  that.top = `${rect.height}px`
               })
               .exec()
         })
      },
      onLoad() {
         uni.getSystemInfo({
            success: res => {
               this.windowHeight = res.windowHeight
            }
         })
         uni.$on('success', () => {
            this.search();
         })
         this.loadData()
      },
@@ -168,7 +205,6 @@
         searchInput(val) {
            this.searchForm.mixParam = val;
            this.search();
            this.getPageCount()
         },
         getPageCount() {
            pageCount({mixParam: this.searchForm.mixParam})
@@ -202,8 +238,10 @@
         refresh() {
            if (this.triggered) return
            this.triggered = true;
            this.page.page = 1
            this.loadData()
            this.search()
            // this.page.page = 1
            // this.loadData()
            // this.getPageCount()
         },
         loadMore() {
            this.page.page += 1
@@ -215,13 +253,15 @@
            this.search()
         },
         jump(item) {
            console.log(item.type);
            switch(item.type) {
               case 0: case 2: case 5: {
                  if (item.status === 0) {
                     uni.navigateTo({
                        url: `/pages/OutOperation/OutOperation?id=${item.objId}&dbid=${item.id}&type=7`
                        url: `/pages_inspect/pages/OutOperation/OutOperation?id=${item.objId}&dbid=${item.id}&type=7`
                     })
                  } else {
                     debugger
                     uni.navigateTo({
                        url: `/pages_adjust/pages/warehousingDetails/warehousingDetails?id=${item.objId}&status=${item.status}&type=${item.type}&dbid=${item.id}`
                     })
@@ -244,7 +284,7 @@
               case 1: case 6: {
                  if (item.status === 0) {
                     uni.navigateTo({
                        url: `/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=7`
                        url: `/pages_inspect/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=7`
                     })
                  } else {
                     uni.navigateTo({
@@ -256,7 +296,7 @@
               case 9: {
                  if (item.status === 0) {
                     uni.navigateTo({
                        url: `/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=9`
                        url: `/pages_inspect/pages/InOperation/InOperation?id=${item.objId}&dbid=${item.id}&type=9`
                     })
                  } else{
                     uni.navigateTo({
@@ -370,7 +410,8 @@
         resetType() {
            this.type = ''
            this.searchForm.type = ''
            this.confirm()
            this.confirm()
         },
         confirm() {
            this.searchForm.type = this.type
@@ -380,6 +421,7 @@
         search() {
            this.page.page = 1
            this.loadData()
            this.getPageCount()
         }
      }
   }