Ver código fonte

fix:标讯收藏及搜索问题处理

yangfeng 1 ano atrás
pai
commit
09717207d7

+ 3 - 2
apps/bigmember_pc/src/components/filter-items/CollectTagSelector.vue

@@ -257,8 +257,8 @@ export default {
     .j-button-item{
       display: flex;
       align-items: center;
-      margin: 0 5px;
-      padding: 1px 8px;
+      margin: 0 16px 16px 0;
+      padding: 0 8px;
       line-height: 20px;
       border-radius: 4px;
       font-size: 14px;
@@ -282,6 +282,7 @@ export default {
     display: flex;
     align-items: center;
     padding: 4px 17px;
+    height: 30px;
     line-height: 22px;
     border-radius: 4px;
     font-size: 14px;

+ 1 - 1
apps/bigmember_pc/src/components/filter-items/EstablishTimeSelector.vue

@@ -88,7 +88,7 @@ export default {
           if (label === '自定义') {
             let start = time.split('-')[0]
             let end = time.split('-')[1]
-            return dateFormatter(Number(start), 'yyyy-MM-dd') + '-' + dateFormatter(Number(end), 'yyyy-MM-dd')
+            return dateFormatter(Number(start), 'yyyy-MM-dd') + '~' + dateFormatter(Number(end), 'yyyy-MM-dd')
           } else {
             return label || ''
           }

+ 0 - 1
apps/bigmember_pc/src/components/search-input/SearchInput.vue

@@ -22,7 +22,6 @@
     <slot name="suffix"></slot>
     <div
       class="pre-search-list"
-      style="display: none"
       v-show="preSearchListShow"
       @mouseout="preSearch.hover = false"
       @mouseover="preSearch.hover = true"

+ 6 - 0
apps/bigmember_pc/src/components/selector/TimeSelectorContent.vue

@@ -184,6 +184,7 @@ const timeSelectMap = {
       selected: false
     }
   ],
+  // 最近3天最近7天最近30天近3个月
   supplySearch: [
      {
       name: '全部',
@@ -195,6 +196,11 @@ const timeSelectMap = {
       value: 'today',
       selected: false
     },
+    {
+      name: '最近3天',
+      value: 'lately3',
+      selected: false
+    },
     {
       name: '最近7天',
       value: 'lately7',

+ 1 - 0
apps/bigmember_pc/src/router/modules/search.js

@@ -35,6 +35,7 @@ export default [
   // 供应搜索
   {
     path: '/search/supply',
+    alias: ['/swordfish/page_web_pc/search/issued'],
     name: 'supply-search',
     component: () => import('@/views/search/supply/index.vue')
   },

+ 6 - 2
apps/bigmember_pc/src/utils/format/search-bid-filter.js

@@ -562,8 +562,12 @@ export class FilterHistoryViewModel2AjaxModel {
    * {
    *    机械设备: ['工程机械', '车辆', '其他机械设备', '办公家具']
    * }
+   * isApi:因该格式化函数在已存筛选地方有调用,因此为了区分调用需要加上isApi参数 意为仅在 提交查询的时候需要该参数
+   * 需求及后端接口订制:传参的时候需要把二级分类中的其他再生成一个“其它”当作参数传递到后端
+   * 数据归类有其他和其它,但在前端要求只展示其他
+   * 
    */
-  static formatIndustry(val = {}, split = ',') {
+  static formatIndustry(val = {}, split = ',', isApi = false) {
     let industry = ''
     if (!val || Object.keys(val).length === 0) return industry
 
@@ -572,7 +576,7 @@ export class FilterHistoryViewModel2AjaxModel {
     for (const key in val) {
       if (Array.isArray(val[key])) {
         // 行业分类 其他还是展示其他筛选项。传参的时候需要把其他和其它都当作参数传递到后端
-        if (val[key].includes('其他')) {
+        if (isApi && val[key].includes('其他')) {
           val[key].push('其它')
         }
         val[key].forEach((item) => {

+ 1 - 1
apps/bigmember_pc/src/views/collection/components/search-list-table.vue

@@ -1,6 +1,6 @@
 <script setup>
 import { ref, computed } from 'vue'
-import { SearchBidModel } from '../model'
+import { SearchBidModel } from '../model/index'
 const { onClickDataExport } = SearchBidModel
 import {
   dateFromNow,

+ 10 - 2
apps/bigmember_pc/src/views/collection/index.vue

@@ -2,7 +2,7 @@
 import { onMounted, ref } from 'vue'
 import SearchFilter from '@/views/collection/components/search-filter.vue'
 import SearchList from '@/views/search/layout/search-list.vue'
-import SearchListTable from '@/views/search/bidding/components/search-list-table.vue'
+import SearchListTable from '@/views/collection/components/search-list-table.vue'
 import ArticleItem from '@/components/article-item/ArticleItem.vue'
 import Empty from '@/components/common/Empty.vue'
 import CustomDialog from '@/components/dialog/Dialog.vue'
@@ -44,7 +44,8 @@ const {
   onAddInfoOfBI,
   onSingleAddInfo,
   getLabelQuery,
-  isDefaultParams
+  isDefaultParams,
+  filterState
 } = SearchBidModel
 
 // 开通超级订阅
@@ -112,6 +113,7 @@ const articleRef = ref({
               :model="activeItemStyleType"
               :class="{ visited: item.visited || item.ca_isvisit }"
               :article="item"
+              :matchKeys="[filterState.keyWords]"
               :index="index"
               :tag-click-list="['area', 'subtype']"
               @onClick="toDetail(item)"
@@ -307,6 +309,12 @@ const articleRef = ref({
     .search-header-container{
       border-bottom: 1px solid #ececec;
     }
+    .search-schema-filter-item:nth-child(3){
+      align-items: center;
+    }
+    .a-i-detail{
+      padding-left: 0;
+    }
   }
 }
 </style>

+ 3 - 0
apps/bigmember_pc/src/views/collection/model/base.js

@@ -114,6 +114,9 @@ export default function () {
     updateInputKeywordsState(obj)
   })
 
+  $bus.$on('bidding:updateCollect', function (obj) {
+    doQuery()
+  })
 
   /**
    * 筛选条件动态配置处理

+ 11 - 9
apps/bigmember_pc/src/views/collection/model/modules/data-collect-tag.js

@@ -2,9 +2,10 @@ import { computed, onMounted, ref, watch } from 'vue'
 import { useStore } from '@/store'
 import { getEventTarget } from '@/utils/jq-help'
 import $bus from '@/utils/bus'
-import { getBidCollTagList, saveBidCollAddTag, createBidTag } from '@/api/modules/'
+import { saveBidCollAddTag, createBidTag } from '@/api/modules/'
 // API 业务模型
 import usePersonalTagsModel from '@jy/data-models/modules/quick-collect-bid/model/tags'
+import { showToast } from '@/components/toast'
 // 解构基础业务
 const APIModel = usePersonalTagsModel({})
 const {
@@ -67,13 +68,13 @@ export function dataCollectTagModel (params) {
       lids: value,
       lname: name
     }
-    await deleteLabelQuery(formatParams)
-    // const { success, data, msg } = await deleteLabelQuery(formatParams)
-    // if (success && data) {
-    //   this.$toast('标签已删除')
-    // } else {
-    //   that.$toast(msg)
-    // }
+    const { success, data, msg } = await deleteLabelQuery(formatParams)
+    if (success && data) {
+      showToast('标签已删除')
+      $bus.$emit('bidding:updateCollect')
+    } else {
+      showToast(msg)
+    }
   }
 
   async function ajaxForEditTagsChange(reParams, callback) {
@@ -220,6 +221,7 @@ export function dataCollectTagModel (params) {
 
     // 渲染标签列表数据
     function renderTagsList(data) {
+      console.log(data, 'data')
       if (data && data.length > 0) {
         var ht = ''
         data.forEach(function (v, i) {
@@ -227,7 +229,7 @@ export function dataCollectTagModel (params) {
             '<span class="tags-item" data-count=' +
             v.count +
             ' data-id=' +
-            v.id +
+            v.value +
             '>' +
             v.name +
             '</span>'

+ 1 - 2
apps/bigmember_pc/src/views/collection/model/modules/data-export-actions.js

@@ -24,7 +24,6 @@ export function dataExportActionsModel () {
 
   async function dataExport (config) {
     const { listState, selectCheckboxCount, selectIds, filter } = config
-    console.log(filter, '11111')
     // 未登录跳转登录
     if (!isLogin.value) {
       $bus.$emit('bidding:goLogin')
@@ -32,7 +31,7 @@ export function dataExportActionsModel () {
     }
     if (!listState.total) return
 
-    filterFormatParams.value = FilterHistoryViewModel2AjaxModel.formatAll(filter)
+    filterFormatParams.value = filter
     const _expand = filter._expand || {}
     Object.assign(filterFormatParams.value, _expand)
     exportLoading.value = true

+ 1 - 1
apps/bigmember_pc/src/views/collection/model/modules/filter.js

@@ -42,7 +42,7 @@ export function useSearchFilterModel(conf) {
     const { selectTime, publishTime, regionMap, industry, buyerclass, subtype, _expand } = filterState.value
     const { area, city, district } = FilterHistoryViewModel2AjaxModel.formatAreaCity(regionMap)
     const rPublishTime = publishTime?.indexOf('_') > -1 ? FilterHistoryViewModel2AjaxModel.formatExactTime(publishTime, '-') :  FilterHistoryViewModel2AjaxModel.formatTime(publishTime, true, '-')
-    const rIndustry = FilterHistoryViewModel2AjaxModel.formatIndustry(industry)
+    const rIndustry = FilterHistoryViewModel2AjaxModel.formatIndustry(industry, ',', true)
     const rBuyerClass = FilterHistoryViewModel2AjaxModel.formatBuyerClass(buyerclass)
     // 信息类型:一级分类为空数组则只显示一级分类,二级分类长度不同长度只显示二级分类
     const rSubtype = infoTypeMapFormat(subtype)

+ 4 - 0
apps/bigmember_pc/src/views/search/bidding/constant/search-filters.js

@@ -134,11 +134,15 @@ function createSearchBidBaseSchema(conf = {}) {
           return beforeChangeHandle($event, 'publishTime', isLogin)
         },
         options: ['lately7', 'lately30', 'sinceLastYear'],
+        startPlaceholder: '开始日期',
+        endPlaceholder: '结束日期'
       },
       vipConf: {
         exactCanHalf: true,
         showConfirmButton: true,
         options: ['sinceLastThreeYear', 'sinceLastFiveYear', 'exact'],
+        startPlaceholder: '开始日期',
+        endPlaceholder: '结束日期'
       }
     },
     hooks: {

+ 2 - 1
apps/bigmember_pc/src/views/search/bidding/model/modules/filter.js

@@ -93,10 +93,11 @@ export function useSearchFilterModel(conf) {
     console.log(filterState.value)
     const { area, city, district } = FilterHistoryViewModel2AjaxModel.formatAreaCity(regionMap)
     const rPublishTime = publishTime?.indexOf('_') > -1 ? FilterHistoryViewModel2AjaxModel.formatExactTime(publishTime, '-') :  FilterHistoryViewModel2AjaxModel.formatTime(publishTime, true, '-')
-    const rIndustry = FilterHistoryViewModel2AjaxModel.formatIndustry(industry)
+    const rIndustry = FilterHistoryViewModel2AjaxModel.formatIndustry(industry, ',', true)
     const rBuyerClass = FilterHistoryViewModel2AjaxModel.formatBuyerClass(buyerclass)
     const rSubtype = FilterHistoryViewModel2AjaxModel.formatInfoType(subtype)
     const expandTag = {}
+    console.log(rIndustry, 'rIndustry')
     if(typeof (_expand) === 'object' && Object.keys(_expand).length > 0) {
       for(let key in _expand) {
         expandTag[key] = filterState.value[key]

+ 16 - 0
apps/bigmember_pc/src/views/search/ent/assets/options.js

@@ -61,6 +61,10 @@ export const entPriceList = [
 ]
 // 企业类型
 export const entTypeList = [
+  {
+    label: '全部',
+    value: ''
+  },
   {
     label: '有限责任公司',
     value: 'A'
@@ -80,6 +84,10 @@ export const entTypeList = [
 ]
 // 企业状态
 export const entStateList = [
+  {
+    label: '全部',
+    value: ''
+  },
   {
     label: '存续(在营、开业、在业)',
     value: 'A'
@@ -99,6 +107,10 @@ export const entStateList = [
 ]
 // 单位类型
 export const unitTypeList = [
+  {
+    label: '全部',
+    value: ''
+  },
   {
       label: '采购单位',
       value: '1'
@@ -118,6 +130,10 @@ export const unitTypeList = [
 ]
 // 联系方式
 export const contactList = [
+  {
+    label: '全部',
+    value: ''
+  },
   {
       label: '固定电话',
       value: '1'

+ 13 - 4
apps/bigmember_pc/src/views/search/ent/index.vue

@@ -129,7 +129,7 @@ function toBuySvip () {
               检索
             </div>
             <!--  标准筛选  -->
-            <div class="m-t-12px">
+            <div>
               <search-schema-filter
                 v-model="filterState"
                 :schema="createSearchEntBaseSchema(conf)"
@@ -174,6 +174,7 @@ function toBuySvip () {
     </div>
     <search-list
       v-bind="searchListProps"
+      :mtb60="false"
       @current-change="doChangePageNum"
       @size-change="doChangePageSize"
       class="search-ent-list-container b-rd-8px m-t-16px"
@@ -247,7 +248,7 @@ function toBuySvip () {
     padding: 16px 32px;
     .guide-go-workspace{
       position: absolute;
-      top: 24px;
+      top: 14px;
       left: 312px;
       border-radius: 4px;
       background: linear-gradient(270deg, rgba(42, 190, 209, 0.24) 1.5%, rgba(42, 190, 209, 0.12) 97.45%);
@@ -265,7 +266,15 @@ function toBuySvip () {
   }
   ::v-deep{
     .search-header{
-      padding-bottom: 0;
+      position: relative;
+      &::after{
+        position: absolute;
+        content: '';
+        left: 32px;
+        right: 20px;
+        bottom: 0;
+        border-bottom: 1px solid #ececec;
+      }
     }
     .search-header-container{
       display: none;
@@ -307,7 +316,7 @@ function toBuySvip () {
       min-width: unset;
     }
     .more-filters-container{
-      margin-top:12px;
+      margin-top:16px;
       .filter-layout {
         .select-prefix {
           background: transparent!important;

+ 5 - 1
apps/bigmember_pc/src/views/search/ent/model/base.js

@@ -304,7 +304,7 @@ export default function () {
 
   // 跳转画像详情页
   const toDetail = (item) =>{
-    const { id, nseo_id: seoId } = item
+    const { id, nseo_id: seoId, name } = item
     let BIPage = ''
     if (inResourceBI) {
       BIPage = '?resource=BI'
@@ -316,6 +316,10 @@ export default function () {
     if (cooperateCode.value) {
       return goLogin()
     } else {
+      saveViewHistoryQuery({
+        type: 'ent',
+        name: `${name}_${id}`
+      })
       if (inResourceBI && seoId) {
         window.open(seoUrl)
       } else {

+ 12 - 0
apps/bigmember_pc/src/views/search/purchase/index.vue

@@ -126,6 +126,7 @@ function onSelectEnt(data) {
     <div class="search-purchase-main">
       <search-list
         v-bind="searchListProps"
+        :mtb60="false"
         @current-change="doChangePageNum"
         @size-change="doChangePageSize"
         class="search-purchase-list-container b-rd-8px m-t-16px"
@@ -292,6 +293,17 @@ function onSelectEnt(data) {
     position: relative;
   }
   ::v-deep{
+    .search-header{
+      position: relative;
+      &::after{
+        position: absolute;
+        content: '';
+        left: 32px;
+        right: 20px;
+        bottom: 0;
+        border-bottom: 1px solid #ececec;
+      }
+    }
     .search-schema-filter-label{
       width: auto;
       min-width: 98px;

+ 1 - 0
apps/bigmember_pc/src/views/search/supply/index.vue

@@ -104,6 +104,7 @@ function goWorkSpaceCustom() {
 
     <search-list
       v-bind="searchListProps"
+      :mtb60="false"
       @current-change="doChangePageNum"
       @size-change="doChangePageSize"
       class="search-supply-list-container b-rd-8px m-t-16px"