Explorar o código

Merge remote-tracking branch 'origin/feature/v1.0.29' into feature/v1.0.29

zhangyuhan hai 1 ano
pai
achega
930bf9de8a

+ 11 - 2
apps/mobile/src/components/search/Layout.vue

@@ -32,6 +32,11 @@ export default {
     event: 'input'
     event: 'input'
   },
   },
   props: {
   props: {
+    // 是否允许空值进行搜索,true表示允许,false表示不允许
+    emptySearch: {
+      type: Boolean,
+      default: false
+    },
     showButton: {
     showButton: {
       type: Boolean,
       type: Boolean,
       default: true
       default: true
@@ -62,8 +67,12 @@ export default {
       if (type === 'input') {
       if (type === 'input') {
         this.$emit('input', data)
         this.$emit('input', data)
       }
       }
-      if (type === 'submit' && (typeof data !== 'string' || data === '')) {
-        return
+
+      // 是否允许空值进行提交
+      if (!this.emptySearch) {
+        if (type === 'submit' && (typeof data !== 'string' || data === '')) {
+          return
+        }
       }
       }
       // 提交按钮防抖
       // 提交按钮防抖
       if (type === 'submit') {
       if (type === 'submit') {

+ 2 - 1
apps/mobile/src/components/search/bidding/filterHistoryDialog.vue

@@ -10,7 +10,7 @@
     :before-close="beforeClose"
     :before-close="beforeClose"
     show-cancel-button
     show-cancel-button
   >
   >
-    <CellCard>
+    <CellCard scroll>
       <template #header-left>
       <template #header-left>
         <div class="card-left-header">
         <div class="card-left-header">
           <div class="card-item">
           <div class="card-item">
@@ -90,6 +90,7 @@ export default {
 }
 }
 .card-item {
 .card-item {
   display: flex;
   display: flex;
+  padding: 0 12px;
   .item-label {
   .item-label {
     white-space: nowrap;
     white-space: nowrap;
   }
   }

+ 135 - 6
apps/mobile/src/components/search/bidding/filters.vue

@@ -237,6 +237,72 @@
               />
               />
             </template>
             </template>
           </JCell>
           </JCell>
+          <JCell
+            class="more-filter-item"
+            title="采购单位"
+            @click="checkboxGroupClick({ disabled: noLoginOrFree })"
+            v-show="isLogin"
+          >
+            <template #title v-if="noLoginOrFree">
+              <span class="mr-6">采购单位</span>
+              <van-tag plain round type="danger" @click="onNoPower">
+                开通
+              </van-tag>
+            </template>
+            <template #label>
+              <KeywordsInputGroup
+                :readonly="noLoginOrFree"
+                v-model="cacheMoreFilters.buyerList"
+                inputMaxlength="30"
+                placeholder="输入采购单位名称,找其招标项目"
+                class="buyer-filter"
+              />
+            </template>
+          </JCell>
+          <JCell
+            class="more-filter-item"
+            title="中标企业"
+            @click="checkboxGroupClick({ disabled: noLoginOrFree })"
+            v-show="isLogin"
+          >
+            <template #title v-if="noLoginOrFree">
+              <span class="mr-6">中标企业</span>
+              <van-tag plain round type="danger" @click="onNoPower">
+                开通
+              </van-tag>
+            </template>
+            <template #label>
+              <KeywordsInputGroup
+                :readonly="noLoginOrFree"
+                v-model="cacheMoreFilters.winnerList"
+                inputMaxlength="30"
+                placeholder="输入中标企业名称,找其中标项目"
+                class="winner-filter"
+              />
+            </template>
+          </JCell>
+          <JCell
+            class="more-filter-item"
+            title="招标代理机构"
+            @click="checkboxGroupClick({ disabled: noLoginOrFree })"
+            v-show="isLogin"
+          >
+            <template #title v-if="noLoginOrFree">
+              <span class="mr-6">招标代理机构</span>
+              <van-tag plain round type="danger" @click="onNoPower">
+                开通
+              </van-tag>
+            </template>
+            <template #label>
+              <KeywordsInputGroup
+                :readonly="noLoginOrFree"
+                v-model="cacheMoreFilters.agencyList"
+                inputMaxlength="30"
+                placeholder="输入代理机构名称,找其代理项目"
+                class="winner-filter"
+              />
+            </template>
+          </JCell>
         </div>
         </div>
       </DropdownLayout>
       </DropdownLayout>
     </van-dropdown-item>
     </van-dropdown-item>
@@ -406,7 +472,10 @@ export default {
           fileExists: ['0'],
           fileExists: ['0'],
           winnerConcat: [''],
           winnerConcat: [''],
           buyerConcat: [''],
           buyerConcat: [''],
-          notKey: []
+          notKey: [],
+          buyerList: [],
+          winnerList: [],
+          agencyList: []
         }
         }
       }
       }
     },
     },
@@ -431,7 +500,10 @@ export default {
           fileExists: ['0'],
           fileExists: ['0'],
           winnerConcat: [''],
           winnerConcat: [''],
           buyerConcat: [''],
           buyerConcat: [''],
-          notKey: []
+          notKey: [],
+          buyerList: [],
+          winnerList: [],
+          agencyList: []
         }
         }
       }
       }
     }
     }
@@ -477,7 +549,10 @@ export default {
         fileExists: ['0'],
         fileExists: ['0'],
         winnerConcat: [''],
         winnerConcat: [''],
         buyerConcat: [''],
         buyerConcat: [''],
-        notKey: []
+        notKey: [],
+        buyerList: [],
+        winnerList: [],
+        agencyList: []
       }
       }
     }
     }
   },
   },
@@ -638,7 +713,10 @@ export default {
             winnerConcat,
             winnerConcat,
             buyerConcat,
             buyerConcat,
             fileExists,
             fileExists,
-            notKey
+            notKey,
+            buyerList,
+            winnerList,
+            agencyList
           } = this.defaultFilterState
           } = this.defaultFilterState
           const sameList = []
           const sameList = []
 
 
@@ -665,6 +743,29 @@ export default {
           sameList.push(deepCompare(this.filters.winnerConcat, winnerConcat))
           sameList.push(deepCompare(this.filters.winnerConcat, winnerConcat))
           sameList.push(deepCompare(this.filters.buyerConcat, buyerConcat))
           sameList.push(deepCompare(this.filters.buyerConcat, buyerConcat))
           sameList.push(deepCompare(this.filters.notKey, notKey))
           sameList.push(deepCompare(this.filters.notKey, notKey))
+          sameList.push(
+            deepCompare(this.filters.winnerConcat, winnerConcat)
+          )
+          sameList.push(
+            deepCompare(this.filters.buyerConcat, buyerConcat)
+          )
+          sameList.push(
+            deepCompare(this.filters.notKey, notKey)
+          )
+
+          // 采购单位
+          sameList.push(
+            deepCompare(this.filters.buyerList, buyerList)
+          )
+          // 中标单位
+          sameList.push(
+            deepCompare(this.filters.winnerList, winnerList)
+          )
+          // 代理机构
+          sameList.push(
+            deepCompare(this.filters.agencyList, agencyList)
+          )
+
           // 附件
           // 附件
           sameList.push(this.filters.fileExists === fileExists)
           sameList.push(this.filters.fileExists === fileExists)
           needHighlight = sameList.includes(false)
           needHighlight = sameList.includes(false)
@@ -717,7 +818,10 @@ export default {
             winnerConcat,
             winnerConcat,
             buyerConcat,
             buyerConcat,
             fileExists,
             fileExists,
-            notKey
+            notKey,
+            buyerList,
+            winnerList,
+            agencyList
           } = this.filters
           } = this.filters
 
 
           // 更多关键词
           // 更多关键词
@@ -750,6 +854,10 @@ export default {
 
 
           this.cacheMoreFilters.fileExists = fileExists
           this.cacheMoreFilters.fileExists = fileExists
           this.cacheMoreFilters.notKey = notKey
           this.cacheMoreFilters.notKey = notKey
+
+          this.cacheMoreFilters.buyerList = buyerList
+          this.cacheMoreFilters.winnerList = winnerList
+          this.cacheMoreFilters.agencyList = agencyList
           break
           break
         }
         }
       }
       }
@@ -800,7 +908,10 @@ export default {
             winnerConcat,
             winnerConcat,
             buyerConcat,
             buyerConcat,
             fileExists,
             fileExists,
-            notKey
+            notKey,
+            buyerList,
+            winnerList,
+            agencyList
           } = this.defaultFilterState
           } = this.defaultFilterState
           // 更多关键词
           // 更多关键词
           if (moreKeywordsMode) {
           if (moreKeywordsMode) {
@@ -855,6 +966,18 @@ export default {
             this.cacheMoreFilters.notKey = notKey
             this.cacheMoreFilters.notKey = notKey
             filters.notKey = notKey
             filters.notKey = notKey
           }
           }
+          if (Array.isArray(buyerList)) {
+            filters.buyerList = buyerList
+            this.cacheMoreFilters.buyerList = buyerList
+          }
+          if (Array.isArray(winnerList)) {
+            filters.winnerList = winnerList
+            this.cacheMoreFilters.winnerList = winnerList
+          }
+          if (Array.isArray(agencyList)) {
+            filters.agencyList = agencyList
+            this.cacheMoreFilters.agencyList = agencyList
+          }
           break
           break
         }
         }
       }
       }
@@ -907,6 +1030,9 @@ export default {
             winnerConcat,
             winnerConcat,
             buyerConcat,
             buyerConcat,
             notKey,
             notKey,
+            buyerList,
+            winnerList,
+            agencyList,
             fileExists
             fileExists
           } = this.cacheMoreFilters
           } = this.cacheMoreFilters
           const { price: defaultPrice } = this.defaultFilterState
           const { price: defaultPrice } = this.defaultFilterState
@@ -938,6 +1064,9 @@ export default {
           filters.buyerConcat = buyerConcat
           filters.buyerConcat = buyerConcat
           filters.fileExists = fileExists
           filters.fileExists = fileExists
           filters.notKey = notKey
           filters.notKey = notKey
+          filters.buyerList = buyerList
+          filters.winnerList = winnerList
+          filters.agencyList = agencyList
           break
           break
         }
         }
       }
       }

+ 4 - 4
apps/mobile/src/components/selector/keyword-input-group/index.vue

@@ -24,7 +24,7 @@
       >
       >
         <van-field
         <van-field
           class="keywords-input"
           class="keywords-input"
-          v-model="inputValue"
+          v-model.trim="inputValue"
           :formatter="formatter"
           :formatter="formatter"
           :placeholder="placeholder"
           :placeholder="placeholder"
           :maxlength="inputMaxlength"
           :maxlength="inputMaxlength"
@@ -161,7 +161,7 @@ export default {
   },
   },
   methods: {
   methods: {
     formatter(value) {
     formatter(value) {
-      return value.replace(/\s{2,}/g, ' ')
+      return value.replace(/,/g, ' ').replace(/\s{2,}/g, ' ')
     },
     },
     /**
     /**
      * 设置页面状态
      * 设置页面状态
@@ -271,8 +271,8 @@ export default {
   margin-bottom: 16px;
   margin-bottom: 16px;
 }
 }
 .keywords-input-tags {
 .keywords-input-tags {
-  max-height: 160px;
-  overflow-y: scroll;
+  // max-height: 160px;
+  // overflow-y: scroll;
   ::v-deep {
   ::v-deep {
     .van-tag {
     .van-tag {
       padding: 6px 10px;
       padding: 6px 10px;

+ 18 - 4
apps/mobile/src/ui/cell-card/index.vue

@@ -13,7 +13,10 @@
     <div class="card-content-container" @click="onClickContent">
     <div class="card-content-container" @click="onClickContent">
       <div
       <div
         class="card-content"
         class="card-content"
-        :class="{ 'ellipsis inline': !expand && overflowEllipsis }"
+        :class="{
+          'ellipsis inline': !expand && overflowEllipsis,
+          'need-scroll': scroll
+        }"
       >
       >
         <slot name="default"></slot>
         <slot name="default"></slot>
       </div>
       </div>
@@ -56,6 +59,11 @@ export default {
       type: Boolean,
       type: Boolean,
       default: true
       default: true
     },
     },
+    // 是否需要滚动
+    scroll: {
+      type: Boolean,
+      default: false
+    },
     /**
     /**
      * 是否展示头部右侧箭头
      * 是否展示头部右侧箭头
      */
      */
@@ -106,7 +114,7 @@ export default {
 }
 }
 .card-content-container {
 .card-content-container {
   position: relative;
   position: relative;
-  padding: 8px 12px;
+  padding: 8px 0;
   min-height: 40px;
   min-height: 40px;
   line-height: 22px;
   line-height: 22px;
   font-size: 13px;
   font-size: 13px;
@@ -128,7 +136,13 @@ export default {
   border-radius: 4px;
   border-radius: 4px;
   z-index: 2;
   z-index: 2;
 }
 }
-.card-content.inline > * {
-  display: inline-block;
+.card-content {
+  &.need-scroll {
+    max-height: 320px;
+    overflow-y: auto;
+  }
+  &.inline > * {
+    display: inline-block;
+  }
 }
 }
 </style>
 </style>

+ 22 - 1
apps/mobile/src/utils/format/modules/filter-history-formatter.js

@@ -31,7 +31,10 @@ export function filterHistoryNotEmptyFormat(formatted) {
     winnerConcatText,
     winnerConcatText,
     buyerConcatText,
     buyerConcatText,
     fileExists,
     fileExists,
-    notKey
+    notKey,
+    buyerList,
+    winnerList,
+    agencyList
   } = formatted
   } = formatted
   let { infoTypeText } = formatted
   let { infoTypeText } = formatted
 
 
@@ -138,6 +141,24 @@ export function filterHistoryNotEmptyFormat(formatted) {
       text: notKey.split(',').join(' ')
       text: notKey.split(',').join(' ')
     })
     })
   }
   }
+  if (buyerList) {
+    formattedList.push({
+      label: '采购单位:',
+      text: buyerList.split(',').join(' ')
+    })
+  }
+  if (winnerList) {
+    formattedList.push({
+      label: '中标企业:',
+      text: winnerList.split(',').join(' ')
+    })
+  }
+  if (agencyList) {
+    formattedList.push({
+      label: '代理机构:',
+      text: agencyList.split(',').join(' ')
+    })
+  }
   return formattedList
   return formattedList
 }
 }
 
 

+ 18 - 1
apps/mobile/src/views/search/filter-history/bidding.vue

@@ -124,6 +124,12 @@
                 }}</span>
                 }}</span>
               </template>
               </template>
             </div>
             </div>
+            <div class="card-item" v-if="history.agency">
+              <template>
+                <span class="item-label">招标代理机构:</span>
+                <span class="item-text highlight-text">{{ history.agency }}</span>
+              </template>
+            </div>
           </template>
           </template>
           <template v-else>
           <template v-else>
             {{ desc_dispose(history) }}
             {{ desc_dispose(history) }}
@@ -326,6 +332,9 @@ export default {
       const formattedItem = {
       const formattedItem = {
         ...formatted,
         ...formatted,
         notKey: item.notkey,
         notKey: item.notkey,
+        buyerList: item.buyer,
+        winnerList: item.winner,
+        agencyList: item.agency,
         isPay: item.isPay,
         isPay: item.isPay,
         fileExists: [item.fileExists || '0'],
         fileExists: [item.fileExists || '0'],
         price: {
         price: {
@@ -610,7 +619,10 @@ export default {
       if (val.winner) {
       if (val.winner) {
         localStorage.setItem('winner', val.winner)
         localStorage.setItem('winner', val.winner)
       }
       }
-      localStorage.setItem('index', '-1')
+      if (val.agency) {
+        localStorage.setItem('agency', val.agency)
+      }
+      localStorage.setItem('index','-1')
       if (this.$envs.inWX) {
       if (this.$envs.inWX) {
         window.location.replace(
         window.location.replace(
           `${location.origin}/front/wx_dataExport/toSieve?from=filterList`
           `${location.origin}/front/wx_dataExport/toSieve?from=filterList`
@@ -636,6 +648,7 @@ export default {
       localStorage.removeItem('subTypes')
       localStorage.removeItem('subTypes')
       localStorage.removeItem('buyer')
       localStorage.removeItem('buyer')
       localStorage.removeItem('winner')
       localStorage.removeItem('winner')
+      localStorage.removeItem('agency')
     },
     },
     selectType_dispose(selectType) {
     selectType_dispose(selectType) {
       // 匹配类型转化
       // 匹配类型转化
@@ -714,6 +727,9 @@ export default {
         if (val.winner) {
         if (val.winner) {
           str += val.winner
           str += val.winner
         }
         }
+        if (val.agency) {
+          str += val.agency
+        }
       }
       }
       return str
       return str
     },
     },
@@ -883,6 +899,7 @@ export default {
 
 
 .card-item {
 .card-item {
   display: flex;
   display: flex;
+  padding: 0 12px;
 
 
   &.close {
   &.close {
     margin-right: 4px;
     margin-right: 4px;

+ 13 - 1
apps/mobile/src/views/search/middle/bidding/index.vue

@@ -180,6 +180,9 @@ export default {
         ...formatted,
         ...formatted,
         isPay: item.isPay,
         isPay: item.isPay,
         notKey: item.notkey,
         notKey: item.notkey,
+        buyerList: item.buyer,
+        winnerList: item.winner,
+        agencyList: item.agency,
         fileExists: [item.fileExists || '0'],
         fileExists: [item.fileExists || '0'],
         price: {
         price: {
           start: item.minprice,
           start: item.minprice,
@@ -204,6 +207,14 @@ export default {
         .filter((k) => !!k)
         .filter((k) => !!k)
       const allKeywordsText = allKeywordsArr.join(' ')
       const allKeywordsText = allKeywordsArr.join(' ')
       const additionalWordsText = additionalWords.join(' ')
       const additionalWordsText = additionalWords.join(' ')
+
+      // 关键词为空时兼容
+      let label = allKeywordsArr.join(',')
+      if (label) {
+        label += ':'
+      }
+      label += labelList.join(',')
+
       return {
       return {
         id: item.id,
         id: item.id,
         ...formattedItem,
         ...formattedItem,
@@ -212,7 +223,8 @@ export default {
         allKeywordsText,
         allKeywordsText,
         allKeywordsArr,
         allKeywordsArr,
         wordsModeText: additionalWordsText ? wordsModeText : '',
         wordsModeText: additionalWordsText ? wordsModeText : '',
-        label: `${allKeywordsArr.join(',')}:${labelList.join(',')}`
+        // label: `${allKeywordsArr.join(',')}:${labelList.join(',')}`
+        label
       }
       }
     },
     },
     /**
     /**

+ 43 - 4
apps/mobile/src/views/search/result/bidding/index.vue

@@ -541,7 +541,10 @@ export default {
           fileExists: ['0'],
           fileExists: ['0'],
           winnerConcat: [''],
           winnerConcat: [''],
           buyerConcat: [''],
           buyerConcat: [''],
-          notKey: []
+          notKey: [],
+          buyerList: [],
+          winnerList: [],
+          agencyList: []
         }
         }
       },
       },
       // 发送请求整理的数据
       // 发送请求整理的数据
@@ -563,7 +566,10 @@ export default {
         winnerConcat: [''],
         winnerConcat: [''],
         buyerConcat: [''],
         buyerConcat: [''],
         fileExists: ['0'],
         fileExists: ['0'],
-        notKey: []
+        notKey: [],
+        winnerList: [],
+        buyerList: [],
+        agencyList: []
       },
       },
       listState: {
       listState: {
         limit: 0,
         limit: 0,
@@ -1044,6 +1050,7 @@ export default {
     restoreStateFromRouteParams() {
     restoreStateFromRouteParams() {
       const { searchFilters = {} } = this.$refs
       const { searchFilters = {} } = this.$refs
       const { filters } = this.$route.params
       const { filters } = this.$route.params
+      console.log(filters)
       if (!filters) return
       if (!filters) return
       const { getScopeOptions = [], getTimeOptions = [] } = searchFilters
       const { getScopeOptions = [], getTimeOptions = [] } = searchFilters
       this.topSearch.input = filters.keywords.join(' ')
       this.topSearch.input = filters.keywords.join(' ')
@@ -1123,6 +1130,30 @@ export default {
           this.filters.notKey = filters.notKey.split(',')
           this.filters.notKey = filters.notKey.split(',')
         }
         }
       }
       }
+      if (filters.buyerList && !this.isFree) {
+        if (Array.isArray(filters.buyerList)) {
+          this.filters.buyerList = filters.buyerList
+        } else {
+          this.filters.buyerList = filters.buyerList.split(',')
+        }
+      }
+      if (filters.winnerList && !this.isFree) {
+        if (Array.isArray(filters.winnerList)) {
+          this.filters.winnerList = filters.winnerList
+        } else {
+          this.filters.winnerList = filters.winnerList.split(',')
+        }
+      }
+      if (filters.agencyList && !this.isFree) {
+        if (Array.isArray(filters.agencyList)) {
+          this.filters.agencyList = filters.agencyList
+        } else {
+          this.filters.agencyList = filters.agencyList.split(',')
+        }
+      }
+
+      console.log(filters.agencyList)
+
       // 信息类型
       // 信息类型
       if (filters.infoType) {
       if (filters.infoType) {
         const key = 'infoType'
         const key = 'infoType'
@@ -1255,6 +1286,9 @@ export default {
         winnerTel: this.filters.winnerConcat.join(','),
         winnerTel: this.filters.winnerConcat.join(','),
         buyerTel: this.filters.buyerConcat.join(','),
         buyerTel: this.filters.buyerConcat.join(','),
         exclusionWords: this.filters.notKey.join(','),
         exclusionWords: this.filters.notKey.join(','),
+        buyer: this.filters.buyerList.join(','),
+        winner: this.filters.winnerList.join(','),
+        agency: this.filters.agencyList.join(','),
         fileExists: this.filters.fileExists.join(','),
         fileExists: this.filters.fileExists.join(','),
         splitKeywords: this.pageState.splitKeywords
         splitKeywords: this.pageState.splitKeywords
       }
       }
@@ -1792,6 +1826,9 @@ export default {
         buyertel: this.filters.buyerConcat.join(','),
         buyertel: this.filters.buyerConcat.join(','),
         fileExists: fileExists || '0',
         fileExists: fileExists || '0',
         notkey: this.filters.notKey.join(','),
         notkey: this.filters.notKey.join(','),
+        buyer: this.filters.buyerList.join(','),
+        winner: this.filters.winnerList.join(','),
+        agency: this.filters.agencyList.join(','),
         searchGroup,
         searchGroup,
         searchMode: this.filters.searchMode.join('') - 0,
         searchMode: this.filters.searchMode.join('') - 0,
         wordsMode,
         wordsMode,
@@ -2066,14 +2103,16 @@ export default {
         done()
         done()
       }
       }
     },
     },
-    formatFilterItems(item) {
-      console.log('flag!!!!!!!!!!!!!')
+    formatFilterItems (item) {
       item.scope = item.selectType
       item.scope = item.selectType
       item.infotype = item.subtype
       item.infotype = item.subtype
       const formatted = FilterHistoryAjaxModel2ViewModel.formatAll(item)
       const formatted = FilterHistoryAjaxModel2ViewModel.formatAll(item)
       const formattedItem = {
       const formattedItem = {
         ...formatted,
         ...formatted,
         notKey: item.notkey,
         notKey: item.notkey,
+        buyerList: item.buyer,
+        winnerList: item.winner,
+        agencyList: item.agency,
         fileExists: [item.fileExists || '0'],
         fileExists: [item.fileExists || '0'],
         price: {
         price: {
           start: item.minprice,
           start: item.minprice,

+ 1 - 0
apps/mobile/vite.config.js

@@ -37,6 +37,7 @@ export default defineConfig(({ command }) => {
     base: '/jy_mobile/',
     base: '/jy_mobile/',
     build: {
     build: {
       outDir: '../../dist/jy_mobile',
       outDir: '../../dist/jy_mobile',
+      emptyOutDir: true,
       // terserOptions: {
       // terserOptions: {
       //   compress: {
       //   compress: {
       //     drop_console: false, // 默认为true
       //     drop_console: false, // 默认为true