فهرست منبع

feat: 关键词展示逻辑调整、历史记录逻辑调整

Signed-off-by: tangshizhe <48740614+tangshizhe@users.noreply.github.com>
tangshizhe 1 سال پیش
والد
کامیت
083e33be50

+ 3 - 15
apps/bigmember_pc/src/components/selector/SelectorCascader.vue → apps/bigmember_pc/src/components/selector/KeywordSelectorCascader.vue

@@ -36,7 +36,7 @@
                   class="item_"
                   v-for="(item, index) in leftList"
                   :key="index"
-                  @click.self="leftclick(item, index)"
+                  @mouseover="leftclick(item, index)"
                   :class="{ active_: active == index }"
                 >
                   <i class="el-icon-arrow-right"></i>
@@ -51,11 +51,6 @@
                     v-text="item.label"
                     @click.self="leftclick(item, index)"
                   ></p>
-                  <el-tooltip class="item" effect="dark" placement="right">
-                    <div slot="content">
-                      "采购意向"是指提供未发布招标公告前1-3个<br />月,政府单位的采购意向信息,包含采购内<br />容、预算金额、预计采购时间、采购联系人及<br />联系方式等相关信息。
-                    </div>
-                  </el-tooltip>
                 </div>
               </div>
             </div>
@@ -104,21 +99,13 @@
 </template>
 
 <script>
-import {
-  Icon,
-  Select,
-  Checkbox,
-  Tooltip,
-  Dropdown,
-  DropdownMenu
-} from 'element-ui'
+import { Icon, Select, Checkbox, Dropdown, DropdownMenu } from 'element-ui'
 export default {
   name: 'select-cascader',
   components: {
     [Icon.name]: Icon,
     [Select.name]: Select,
     [Checkbox.name]: Checkbox,
-    [Tooltip.name]: Tooltip,
     [Dropdown.name]: Dropdown,
     [DropdownMenu.name]: DropdownMenu
   },
@@ -711,6 +698,7 @@ export default {
 .select-cascader {
   display: flex;
   align-items: center;
+  cursor: pointer;
   .valueBox {
     &.active {
       color: #2ABED1;

+ 2 - 2
apps/bigmember_pc/src/views/subscribe/constant/search-filters.js

@@ -1,6 +1,6 @@
 import BuyerTypeSelector from '@/components/filter-items/BuyerTypeSelector.vue'
 import IndustrySelector from '@/components/filter-items/IndustrySelector.vue'
-import SelectorCascader from '@/components/selector/SelectorCascader.vue'
+import KeywordSelectorCascader from '@/components/selector/KeywordSelectorCascader.vue'
 import RegionSelector from '@/components/filter-items/RegionSelector'
 import AmountRangeSelector from '@/components/filter-items/AmountRangeSelector.vue'
 import AttachmentSelector from '@/components/filter-items/AttachmentSelector.vue'
@@ -39,7 +39,7 @@ function createSubscribeMoreSchema(conf = {}) {
       _name: 'type',
       _type: 'component',
       expand: {
-        component: SelectorCascader,
+        component: KeywordSelectorCascader,
         hooks: {},
         props: {
           listData: [],

+ 0 - 145
apps/mobile/src/components/search/HistoryBrowseList.vue

@@ -1,145 +0,0 @@
-<template>
-  <div class="browse-container">
-    <div class="title-group" v-show="getList.length">
-      <slot name="header-title">
-        <span class="title">{{ title }}</span>
-      </slot>
-      <slot name="header-right">
-        <div class="delete-icon" @click="$emit('delete')">
-          <AppIcon name="dataDelete" />
-        </div>
-      </slot>
-    </div>
-    <ul class="browse-list">
-      <li
-        class="hover-css--slide jy-hairline--bottom"
-        v-for="(item, index) in getList"
-        :key="index"
-        v-html="item.html"
-        @click="$emit('click', item)"
-      ></li>
-    </ul>
-  </div>
-</template>
-
-<script>
-import { AppIcon } from '@/ui'
-export default {
-  name: 'history-browse-list',
-  components: {
-    [AppIcon.name]: AppIcon
-  },
-  /**
-   * keys 需替换的关键词或关键词组
-   * list 数据集合
-   * item.html 替换后的字符
-   * item.label 替换前字符
-   */
-  props: {
-    keys: {
-      required: true,
-      type: [String, Array],
-      default() {
-        return ''
-      }
-    },
-    searchType: {
-      type: String,
-      default: ''
-    },
-    list: {
-      type: Array,
-      default() {
-        return []
-      }
-    },
-    title: {
-      type: String,
-      default: '历史浏览'
-    }
-  },
-  computed: {
-    getList() {
-      return this.list.map((v) => {
-        console.log(v, 'v')
-        if (this.searchType === 'company') {
-          const stringItemTransform =
-            typeof v === 'string' ? { html: v.split('_')[0] } : v
-          return Object.assign(
-            {
-              html: v.label,
-              eId: v.split('_')[1]
-            },
-            stringItemTransform
-          )
-        } else {
-          const stringItemTransform = typeof v.name === 'string' ? { html: v.name } : v
-          return Object.assign(
-            {
-              html: v.label
-            },
-            stringItemTransform
-          )
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-$association-list-color: #171826;
-
-$association-list-padding: 14px;
-$association-list-size: 14px;
-$association-list-line-height: 48px;
-
-.browse-container {
-  .title-group {
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-    justify-content: space-between;
-    font-weight: 400;
-    font-size: 16px;
-    padding: 16px;
-    line-height: 24px;
-    color: #171826;
-    box-sizing: border-box;
-    .delete-icon {
-      .iconfont {
-        font-size: 20px;
-        color: #9b9ca3;
-      }
-    }
-  }
-  .browse-list {
-    margin: 0;
-    padding: 0;
-    list-style: none;
-    font-weight: 500;
-    font-size: $association-list-size;
-    line-height: $association-list-line-height;
-    color: $association-list-color;
-    li {
-      position: relative;
-      outline: none;
-      border: none;
-      z-index: 1;
-      font-size: inherit;
-      font-family: inherit;
-      color: inherit;
-      background: inherit;
-      padding: 0 $association-list-padding;
-      box-sizing: border-box;
-      overflow: hidden;
-      white-space: nowrap;
-      text-overflow: ellipsis;
-      float: unset;
-      &::after {
-        margin-left: $association-list-padding;
-      }
-    }
-  }
-}
-</style>

+ 1 - 0
apps/mobile/src/ui/history-list/index.vue

@@ -81,6 +81,7 @@ export default {
       return this.list
         .map((v) => {
           const stringItemTransform = typeof v === 'string' ? { label: v } : v
+          console.log(stringItemTransform, 'stringItemTransform')
           return Object.assign(
             {
               label: v?.label || v

+ 6 - 8
apps/mobile/src/views/search/middle/buyer/index.vue

@@ -13,20 +13,18 @@
       @delete="deleteList('4')"
     ></history-list>
     <div class="divide-line" v-if="showBrowseList && showHistoryList"></div>
-    <history-browse-list
+    <history-list
       v-if="showBrowseList"
       :list="buyerBrowseHistory"
-      :keys="getKeys"
       @click="goBrowseClick"
       @delete="deleteList('5')"
-    ></history-browse-list>
+    ></history-list>
   </div>
 </template>
 
 <script>
 import { ajaxGetBuyerAssociation } from '@/api/modules'
 import { HistoryList } from '@/ui'
-import HistoryBrowseList from '@/components/search/HistoryBrowseList'
 import AssociationList from '@/components/search/AssociationList'
 import { debounce } from 'lodash'
 import { mapActions, mapGetters } from 'vuex'
@@ -42,8 +40,7 @@ export default {
   name: 'SearchMiddleBuyer',
   components: {
     [AssociationList.name]: AssociationList,
-    [HistoryList.name]: HistoryList,
-    [HistoryBrowseList.name]: HistoryBrowseList
+    [HistoryList.name]: HistoryList
   },
   inject: {
     topSearch: {
@@ -88,7 +85,9 @@ export default {
       getHistoryQuery({ type: '4,5' }).then((res) => {
         if (res.success === true) {
           this.buyerSearchHistory = res?.search || []
-          this.buyerBrowseHistory = res?.browse || []
+          res?.browse.forEach((s) => {
+            this.buyerBrowseHistory.push(s.name)
+          })
         }
       })
     },
@@ -189,7 +188,6 @@ export default {
     },
     goBrowseClick(data) {
       if (data) {
-        data.label = data?.html
         // 缓存定位值用于产品落地页
         sessionStorage.setItem(
           'landinfo',

+ 7 - 8
apps/mobile/src/views/search/middle/company/index.vue

@@ -14,21 +14,18 @@
       @delete="deleteList('2')"
     ></history-list>
     <div class="divide-line" v-show="showBrowseList && showHistoryList"></div>
-    <history-browse-list
+    <history-list
       v-show="showBrowseList"
       :list="companyBrowseHistory"
-      :keys="getKeys"
-      searchType="company"
       @click="goBrowseClick"
       @delete="deleteList('3')"
-    ></history-browse-list>
+    ></history-list>
   </div>
 </template>
 
 <script>
 import { ajaxGetCompanyAssociation } from '@/api/modules'
 import AssociationList from '@/components/search/AssociationList'
-import HistoryBrowseList from '@/components/search/HistoryBrowseList'
 import { HistoryList } from '@/ui'
 import { debounce } from 'lodash'
 import { mapActions, mapGetters } from 'vuex'
@@ -46,8 +43,7 @@ export default {
   mixins: [mixinPoints],
   components: {
     [AssociationList.name]: AssociationList,
-    [HistoryList.name]: HistoryList,
-    [HistoryBrowseList.name]: HistoryBrowseList
+    [HistoryList.name]: HistoryList
   },
   inject: {
     topSearch: {
@@ -92,6 +88,9 @@ export default {
       getHistoryQuery({ type: '2,3' }).then((res) => {
         if (res.success === true) {
           this.companySearchHistory = res?.search || []
+          res?.browse.forEach((s) => {
+            s.label = s.name
+          })
           this.companyBrowseHistory = res?.browse || []
         }
       })
@@ -175,7 +174,7 @@ export default {
       if (data) {
         openAppOrWxPage(LINKS.企业画像页面, {
           query: {
-            eId: data.eId,
+            eId: data.id,
             ...this.fromPointTask
           }
         })

+ 4 - 4
apps/mobile/vue.config.js

@@ -51,7 +51,7 @@ module.exports = defineConfig({
     allowedHosts: 'all',
     proxy: {
       '^/jyapi': {
-        target: 'https://jybx2-webtest.jydev.jianyu360.com',
+        target: 'https://jybx3-webtest.jydev.jianyu360.com',
         // target: 'https://web-ws.jydev.jianyu360.com',
         // target: 'https://webdev-webtest.jydev.jianyu360.com',
         changeOrigin: true,
@@ -63,7 +63,7 @@ module.exports = defineConfig({
       },
       '^/api': {
         // target: 'https://app3-jytest.jydev.jianyu360.com',
-        target: 'https://jybx2-webtest.jydev.jianyu360.com',
+        target: 'https://jybx3-webtest.jydev.jianyu360.com',
         // target: 'https://webdev-webtest.jydev.jianyu360.com',
         changeOrigin: true,
         ws: false,
@@ -74,14 +74,14 @@ module.exports = defineConfig({
       },
       '^/commonFunctions': {
         // target: 'https://jybx-webtest.jydev.jianyu360.com',
-        target: 'https://jybx2-webtest.jydev.jianyu360.com',
+        target: 'https://jybx3-webtest.jydev.jianyu360.com',
         changeOrigin: true,
         logLevel: 'debug'
       },
       '^/common-module': {
         // target: 'https://app3-jytest.jydev.jianyu360.com',
         // target: 'https://jybx-webtest.jydev.jianyu360.com/',
-        target: 'https://jybx2-webtest.jydev.jianyu360.com',
+        target: 'https://jybx3-webtest.jydev.jianyu360.com',
         changeOrigin: true,
         ws: false,
         logLevel: 'debug'