|
@@ -1,4 +1,4 @@
|
|
|
-import { computed, reactive, ref, onMounted, getCurrentInstance } from 'vue'
|
|
|
+import { computed, reactive, ref, toRefs, onMounted, getCurrentInstance } from 'vue'
|
|
|
import { without, throttle } from 'lodash'
|
|
|
import { useStore } from '@/store'
|
|
|
import { useRoute, useRouter } from 'vue-router/composables'
|
|
@@ -119,7 +119,15 @@ export default function () {
|
|
|
activeHeaderActions,
|
|
|
disabledHeaderActions
|
|
|
} = useSearchListHeaderActionsModel()
|
|
|
+
|
|
|
+ // 页面tab切换Model
|
|
|
const SearchTabsModel = useSearchTabsModel()
|
|
|
+ const { activeTab, doChangeTab } = SearchTabsModel
|
|
|
+ // tab切换处理
|
|
|
+ function onChangeTab (item) {
|
|
|
+ doChangeTab(item)
|
|
|
+ doQuery()
|
|
|
+ }
|
|
|
|
|
|
// 列表状态
|
|
|
const listState = reactive({
|
|
@@ -211,7 +219,7 @@ export default function () {
|
|
|
break
|
|
|
}
|
|
|
case 'detailed-list': {
|
|
|
- doChangeItemStyleType(key)
|
|
|
+ detailListClick(key)
|
|
|
break
|
|
|
}
|
|
|
case 'table': {
|
|
@@ -236,8 +244,13 @@ export default function () {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ function detailListClick (key) {
|
|
|
+ if(isFree.value) {
|
|
|
+ openListVipDialog()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ doChangeItemStyleType(key)
|
|
|
+ }
|
|
|
// 全选复选框事件
|
|
|
function doChangeAllSelect(type) {
|
|
|
doToggleListSelection(type)
|
|
@@ -359,7 +372,8 @@ export default function () {
|
|
|
// 合并所有模型的搜索筛选项
|
|
|
const result = Object.assign(
|
|
|
{
|
|
|
- reqType: 'lastNews',
|
|
|
+ searchGroup: activeTab.value,
|
|
|
+ reqType: 'lastNews', // cache:空搜索缓存数据;lastNews:最新数据
|
|
|
pageNum: listState.pageNum,
|
|
|
pageSize: listState.pageSize,
|
|
|
// 该接口与用户身份有关
|
|
@@ -439,6 +453,39 @@ export default function () {
|
|
|
showFilter.value = !showFilter.value
|
|
|
}
|
|
|
|
|
|
+ /******开通超级订阅弹窗start**********/
|
|
|
+
|
|
|
+ // 开通超级订阅弹窗配置
|
|
|
+ const vipDialogConfig = reactive({
|
|
|
+ type: 'filter',
|
|
|
+ show: false,
|
|
|
+ text: '立享更多搜索权限,寻找商机更精准'
|
|
|
+ })
|
|
|
+
|
|
|
+ // 筛选条件打开超级订阅弹窗
|
|
|
+ function openFilterVipDialog () {
|
|
|
+ vipDialogConfig.type = 'filter'
|
|
|
+ vipDialogConfig.show = true
|
|
|
+ vipDialogConfig.text = '立享更多搜索权限,寻找商机更精准'
|
|
|
+ }
|
|
|
+ // 关闭超级订阅弹窗
|
|
|
+ function closeVipDialog () {
|
|
|
+ vipDialogConfig.show = false
|
|
|
+ }
|
|
|
+ // 数据列表--开通超级订阅弹窗
|
|
|
+ function openListVipDialog () {
|
|
|
+ vipDialogConfig.type = 'list'
|
|
|
+ vipDialogConfig.show = true
|
|
|
+ vipDialogConfig.text = '立享列表展示更多公告关键信息,例如:采购单位、中标单位、招标代理机构等,提高公告查看效率'
|
|
|
+ }
|
|
|
+
|
|
|
+ const vipDialogConf = toRefs(vipDialogConfig)
|
|
|
+
|
|
|
+ // 筛选条件无权限提示开通超级订阅弹窗
|
|
|
+ $bus.$on('search:filter:no-power', openFilterVipDialog)
|
|
|
+
|
|
|
+ /******开通超级订阅弹窗end**********/
|
|
|
+
|
|
|
/** 保存、重置筛选条件部分 start ****/
|
|
|
|
|
|
const disposeFilterActionModel = saveFilterActionsModel()
|
|
@@ -457,7 +504,9 @@ export default function () {
|
|
|
*/
|
|
|
async function onSaveFilter() {
|
|
|
const originParams = Object.assign(
|
|
|
- {},
|
|
|
+ {
|
|
|
+ searchGroup: activeTab.value,
|
|
|
+ },
|
|
|
filterState.value,
|
|
|
inputKeywordsState.value
|
|
|
)
|
|
@@ -525,6 +574,7 @@ export default function () {
|
|
|
additionalWords: resultFilter.additionalWords,
|
|
|
selectMoreKey: resultFilter.additionalWords?.length > 0
|
|
|
}
|
|
|
+ doChangeTab({ key: resultFilter.searchGroup })
|
|
|
historyFilterDialogVisible.value = false
|
|
|
doQuery()
|
|
|
}
|
|
@@ -780,7 +830,6 @@ export default function () {
|
|
|
}
|
|
|
/*****BI添加操作end*********/
|
|
|
|
|
|
-
|
|
|
return {
|
|
|
isLogin,
|
|
|
isInApp,
|
|
@@ -803,6 +852,9 @@ export default function () {
|
|
|
doChangeSelect,
|
|
|
doChangePageNum,
|
|
|
doChangePageSize,
|
|
|
+ onChangeTab,
|
|
|
+ vipDialogConf,
|
|
|
+ closeVipDialog,
|
|
|
onSaveFilter, // 以下存筛选条件相关
|
|
|
disposeFilterActionModel,
|
|
|
historyFilterDialogVisible,
|