Browse Source

Merge branch 'dev/1.0.36_zsy' of jianyu/web into feature/v1.0.36

zhangsiya 1 year ago
parent
commit
b9c2415efc

+ 4 - 3
apps/bigmember_pc/src/components/selector/InfoTypeSelector.vue

@@ -58,9 +58,10 @@ export default {
       type: Array,
       type: Array,
       default: () => []
       default: () => []
     },
     },
+    // all 是所有数据, advance 仅仅超前项目数据,base 信息类型数据(除了超前项目外数据)
     showDataType: {
     showDataType: {
       type: String,
       type: String,
-      default: 'card'
+      default: 'all'
     }
     }
   },
   },
   model: {
   model: {
@@ -68,8 +69,8 @@ export default {
     event: 'change'
     event: 'change'
   },
   },
   watch: {
   watch: {
-    value(val) {
-      if (!val || val?.length === 0) {
+    value (val) {
+      if(!val || val?.length === 0) {
         this.initList()
         this.initList()
       } else {
       } else {
         this.setInfoTypeState(val)
         this.setInfoTypeState(val)

+ 20 - 5
apps/bigmember_pc/src/components/selector/InfoTypeSelectorContent.vue

@@ -132,7 +132,8 @@
 
 
 <script>
 <script>
 import { Popover } from 'element-ui'
 import { Popover } from 'element-ui'
-import { infoTypeListExp } from '@/assets/js/selector.js'
+import { infoTypeListExp, infoTypeNotAdvancedList, infoTypeAdvancedList } from '@/assets/js/selector.js'
+
 export default {
 export default {
   name: 'info-type-selector-content',
   name: 'info-type-selector-content',
   components: {
   components: {
@@ -154,7 +155,12 @@ export default {
     oneLevelSelected: {
     oneLevelSelected: {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
-    }
+    },
+    // all 是所有数据, advance 仅仅超前项目数据,base 信息类型数据(除了超前项目外数据)
+    showDataType: {
+      type: String,
+      default: 'all'
+    },
   },
   },
   data() {
   data() {
     return {
     return {
@@ -162,12 +168,20 @@ export default {
       infoTypeListExp,
       infoTypeListExp,
       // 整理后数据
       // 整理后数据
       infoTypeList: [],
       infoTypeList: [],
-      showMore: true
+      showMore: true,
+      dataMap: {
+        all: infoTypeListExp,
+        base: infoTypeNotAdvancedList,
+        advance:  infoTypeAdvancedList
+      }
     }
     }
   },
   },
   watch: {
   watch: {
     initInfoType(newVal, oldVal) {
     initInfoType(newVal, oldVal) {
       this.setInfoTypeState(newVal)
       this.setInfoTypeState(newVal)
+    },
+    showDataType (newVal, oldVal) {
+      this.initInfoTypeFn()
     }
     }
   },
   },
   computed: {
   computed: {
@@ -194,7 +208,8 @@ export default {
   methods: {
   methods: {
     // 整理数据列表
     // 整理数据列表
     initInfoTypeFn(filter = []) {
     initInfoTypeFn(filter = []) {
-      let listBackUp = JSON.parse(JSON.stringify(this.infoTypeListExp))
+      const dataList = this.dataMap[this.showDataType]
+      let listBackUp = JSON.parse(JSON.stringify(dataList))
       if (Array.isArray(filter) && filter.length !== 0) {
       if (Array.isArray(filter) && filter.length !== 0) {
         listBackUp = JSON.parse(JSON.stringify(filter))
         listBackUp = JSON.parse(JSON.stringify(filter))
       }
       }
@@ -371,7 +386,7 @@ export default {
         if (item.value && item.selected) {
         if (item.value && item.selected) {
           arr.push(item.value)
           arr.push(item.value)
         }
         }
-        
+
         if (item.level !== 0) {
         if (item.level !== 0) {
           /**
           /**
            * P490订阅推送列表需求-要求参照招标搜索(jy)如果二级分类全部选中的话,提交时只提交一级分类,不提交二级分类
            * P490订阅推送列表需求-要求参照招标搜索(jy)如果二级分类全部选中的话,提交时只提交一级分类,不提交二级分类

+ 4 - 1
apps/bigmember_pc/src/views/search/bidding/components/search-bid-header.vue

@@ -15,7 +15,8 @@ const {
   doQuery,
   doQuery,
   onChangeTab,
   onChangeTab,
   searchModelOptions,
   searchModelOptions,
-  SearchTabsModel
+  SearchTabsModel,
+  goWorkSpace
 } = SearchBidModel
 } = SearchBidModel
 
 
 const { searchTabs } = SearchTabsModel
 const { searchTabs } = SearchTabsModel
@@ -54,6 +55,8 @@ function goToPublish () {
       @change-tab="onChangeTab"
       @change-tab="onChangeTab"
       @search="doSearch"
       @search="doSearch"
       :show-wx-qr="!cooperateCode"
       :show-wx-qr="!cooperateCode"
+      :show-workspace-button="isLogin && !isInApp"
+      @goWorkSpace="goWorkSpace"
     >
     >
       <div class="flex flex-(row items-center)">
       <div class="flex flex-(row items-center)">
         <div class="flex flex-(row items-center)">
         <div class="flex flex-(row items-center)">

+ 1 - 17
apps/bigmember_pc/src/views/search/bidding/constant/search-filters.js

@@ -29,28 +29,12 @@ const moreFiltersNeedVipKeyList = [
   'buyer',
   'buyer',
 ]
 ]
 
 
-// 处理当前信息类型--展示数据类型
-function infoTypeDataType (val) {
-  let result = 'all'
-  switch (val) {
-    case 0:
-      result = 'all'
-      break
-    case 1:
-      result = 'base'
-      break
-    case 2:
-      result = 'advance'
-      break
-  }
-  return result
-}
 
 
 function createSearchBidBaseSchema(conf = {}) {
 function createSearchBidBaseSchema(conf = {}) {
   const vipUser = conf.vipUser || false
   const vipUser = conf.vipUser || false
   const oldUser = conf.oldUser || false
   const oldUser = conf.oldUser || false
   const showVip = conf.showVip || false
   const showVip = conf.showVip || false
-  const infoType = infoTypeDataType(conf.infoType)
+  const infoType = conf.infoType
 
 
   // 发布时间
   // 发布时间
   const publishTimeExpandFree = {
   const publishTimeExpandFree = {

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

@@ -21,6 +21,7 @@ useSearchBidModel()
 
 
 // 初始化模型 解构业务所需 model \ fn
 // 初始化模型 解构业务所需 model \ fn
 const {
 const {
+  isLogin,
   isInApp,
   isInApp,
   inBIPropertyIframe,
   inBIPropertyIframe,
   inResourceBIIframe,
   inResourceBIIframe,
@@ -81,7 +82,6 @@ const articleRef = ref({
   collect: !isInBI.value,
   collect: !isInBI.value,
   push: false
   push: false
 })
 })
-
 </script>
 </script>
 
 
 <template>
 <template>

+ 51 - 24
apps/bigmember_pc/src/views/search/bidding/model/base.js

@@ -139,14 +139,42 @@ export default function () {
   } = useSearchListHeaderActionsModel()
   } = useSearchListHeaderActionsModel()
 
 
   // 页面tab切换Model
   // 页面tab切换Model
-  const SearchTabsModel = useSearchTabsModel()
+
+  const SearchTabsModel = useSearchTabsModel({ showTabs2: !isInApp.value })
   const { activeTab, doChangeTab } = SearchTabsModel
   const { activeTab, doChangeTab } = SearchTabsModel
   // tab切换处理
   // tab切换处理
   function onChangeTab (item) {
   function onChangeTab (item) {
+    filterState.value = Object.assign(filterState.value, {
+      subtype: []
+    })
     doChangeTab(item)
     doChangeTab(item)
-    doQuery()
+    if(isInApp.value) {
+      doQuery()
+    } else {
+      if(item.link) {
+        location.replace(item.link)
+      }
+    }
   }
   }
 
 
+  // 处理当前信息类型--展示数据类型
+  const  infoTypeDataType = computed(() =>  {
+    let result = 'all'
+    switch (activeTab.value) {
+      case 0:
+        result = 'all'
+        break
+      case 1:
+        result = 'base'
+        break
+      case 2:
+        result = 'advance'
+        break
+    }
+    return result
+  })
+
+
   // 筛选条件动态配置处理
   // 筛选条件动态配置处理
   function disposeFilterSchema() {
   function disposeFilterSchema() {
     const conf = computed(() => {
     const conf = computed(() => {
@@ -154,7 +182,7 @@ export default function () {
         vipUser: isVip.value && isInApp.value,
         vipUser: isVip.value && isInApp.value,
         oldUser: isOld.value && isInApp.value,
         oldUser: isOld.value && isInApp.value,
         showVip: isLogin.value && isInApp.value,
         showVip: isLogin.value && isInApp.value,
-        infoType: activeTab.value
+        infoType: infoTypeDataType.value
       }
       }
     })
     })
 
 
@@ -574,25 +602,24 @@ export default function () {
 
 
     // window.location.replace(`/page_workDesktop/work-bench/page?link=${encodeURIComponent(goHref_ + 'goback=')}`)
     // window.location.replace(`/page_workDesktop/work-bench/page?link=${encodeURIComponent(goHref_ + 'goback=')}`)
   }
   }
-
-  // onMounted(() => {
-  //   if(useRoute().query.goback) {
-  //     goBackFilter()
-  //   }
-  // })
-  //
-  // // 回显
-  // function goBackFilter () {
-  //   const sFilter = sessionStorage.getItem('search:bidding:filter')
-  //   const backFilter = sFilter ? JSON.parse(sFilter) : null
-  //   if(backFilter) {
-  //     that.$nextTick(() => {
-  //       restoreFilter(backFilter, 'pageBack')
-  //       sessionStorage.removeItem('search:bidding:filter')
-  //     })
-  //   }
-  // }
-
+  // 监听路由事件
+  onMounted(() => {
+    if(useRoute().query.goback) {
+      goBackFilter()
+    } else if(useRoute().query.searchGroup) {
+      const key = Number(useRoute().query.searchGroup)
+      doChangeTab({ key})
+    }
+  })
+  // 回显筛选条件
+  function goBackFilter () {
+    const sFilter = sessionStorage.getItem('search:bidding:filter')
+    const backFilter = sFilter ? JSON.parse(sFilter) : null
+    if(backFilter) {
+        restoreFilter(backFilter, 'pageBack')
+        sessionStorage.removeItem('search:bidding:filter')
+    }
+  }
 
 
 
 
   /** 保存、重置筛选条件部分 start ****/
   /** 保存、重置筛选条件部分 start ****/
@@ -648,7 +675,6 @@ export default function () {
     }
     }
   }
   }
   function restoreFilter (viewFilter, type) {
   function restoreFilter (viewFilter, type) {
-    onResetFilter()
     let resultFilter = {}
     let resultFilter = {}
     if(type === 'saveBack') {
     if(type === 'saveBack') {
       resultFilter = FilterHistoryAjaxModelRestore.formatAll(viewFilter)
       resultFilter = FilterHistoryAjaxModelRestore.formatAll(viewFilter)
@@ -992,6 +1018,7 @@ export default function () {
     propertyIframeSrc,
     propertyIframeSrc,
     onSingleEmploy,
     onSingleEmploy,
     onAddInfoOfBI,
     onAddInfoOfBI,
-    onSingleAddInfo
+    onSingleAddInfo,
+    goWorkSpace
   }
   }
 }
 }

+ 36 - 2
apps/bigmember_pc/src/views/search/bidding/model/modules/tabs.js

@@ -1,6 +1,7 @@
 import { computed, ref } from 'vue'
 import { computed, ref } from 'vue'
 
 
-export function useSearchTabsModel() {
+export function useSearchTabsModel(conf) {
+  const { showTabs2 } = conf
   const activeTab = ref(0)
   const activeTab = ref(0)
   const Tabs = [
   const Tabs = [
     {
     {
@@ -17,8 +18,41 @@ export function useSearchTabsModel() {
       key: 2
       key: 2
     }
     }
   ]
   ]
+  const Tabs2 = [
+    {
+      label: '招标采购公告',
+      key: 1,
+      link: '/swordfish/page_big_pc/search/bidding?searchGroup=1'
+    },
+    {
+      label: '企业搜索',
+      key: 3,
+      link: '/jylab/entSearch/index.html'
+    },
+    {
+      label: '采购单位搜索',
+      key: 4,
+      link: '/jylab/purSearch/index.html'
+    },
+    {
+      label: '供应搜索',
+      key: 5,
+      link: '/swordfish/page_web_pc/search/issued'
+    },
+    {
+      label: '超前项目查询',
+      key: 2,
+      link: '/swordfish/page_big_pc/search/bidding?searchGroup=2'
+    },
+    {
+      label: '拟在建项目查询',
+      key: 6,
+      link: '/swordfish/page_web_pc/search/construction'
+    },
+  ]
+  const resTab = showTabs2 ? Tabs2 : Tabs
   const searchTabs = computed(() => {
   const searchTabs = computed(() => {
-    return Tabs.map((v) => {
+    return resTab.map((v) => {
       v.active = activeTab.value === v.key
       v.active = activeTab.value === v.key
       return v
       return v
     })
     })

+ 28 - 0
apps/bigmember_pc/src/views/search/components/search-header-card.vue

@@ -1,5 +1,6 @@
 <script setup>
 <script setup>
 import SearchHeader from '@/views/search/components/SearchHeader.vue'
 import SearchHeader from '@/views/search/components/SearchHeader.vue'
+import WorkspaceButtonGroup from '@/components/dialog/WorkspaceButtonGroup.vue'
 
 
 const props = defineProps({
 const props = defineProps({
   tabs: {
   tabs: {
@@ -18,8 +19,20 @@ const props = defineProps({
   showWxQr:{
   showWxQr:{
     type: Boolean,
     type: Boolean,
     default: true
     default: true
+  },
+  // 是否展示返回桌面按钮
+  showWorkspaceButton: {
+    type: Boolean,
+    default: true
   }
   }
 })
 })
+
+const emit = defineEmits(['goWorkSpace'])
+
+function goWorkSpaceCustom() {
+  emit('goWorkSpace')
+}
+
 </script>
 </script>
 
 
 <template>
 <template>
@@ -35,6 +48,11 @@ const props = defineProps({
       >
       >
         {{ tab.label }}
         {{ tab.label }}
       </span>
       </span>
+      <div class="search-tab-right" v-if='showWorkspaceButton'>
+        <WorkspaceButtonGroup
+          :goWorkSpaceCustom="goWorkSpaceCustom"
+        ></WorkspaceButtonGroup>
+      </div>
     </div>
     </div>
     <search-header
     <search-header
       :placeholder="placeholder"
       :placeholder="placeholder"
@@ -71,5 +89,15 @@ const props = defineProps({
       border-bottom: 2px solid $color_main;
       border-bottom: 2px solid $color_main;
     }
     }
   }
   }
+
+  .search-tab-right {
+    display: flex;
+    align-items: center;
+    height: 48px;
+    float: right;
+    font-size: 14px;
+    color: #1d1d1d;
+    line-height: 22px;
+  }
 }
 }
 </style>
 </style>