|
@@ -1,15 +1,8 @@
|
|
|
-import { computed, reactive, ref, toRefs, onMounted,onBeforeMount, onBeforeUnmount, getCurrentInstance } from 'vue'
|
|
|
-import { without, throttle } from 'lodash'
|
|
|
+import { computed, reactive, ref, toRefs, onMounted, getCurrentInstance } from 'vue'
|
|
|
+import { without } from 'lodash'
|
|
|
import { useStore } from '@/store'
|
|
|
import { useRoute, useRouter } from 'vue-router/composables'
|
|
|
-import { MessageBox } from 'element-ui'
|
|
|
-import {
|
|
|
- FilterHistoryAjaxModelRestore,
|
|
|
- FilterHistoryAjaxModel2ViewModel,
|
|
|
- getParam,
|
|
|
- openLinkInWorkspace,
|
|
|
- InContainer
|
|
|
-} from '@/utils'
|
|
|
+import { openLinkInWorkspace, InContainer } from '@/utils'
|
|
|
import $bus from '@/utils/bus'
|
|
|
// 筛选条件动态组件方法
|
|
|
import { getCreateSearchSchema } from '@/views/collection/constant/index'
|
|
@@ -17,35 +10,26 @@ import { getCreateSearchSchema } from '@/views/collection/constant/index'
|
|
|
import useQuickCollectBidModel from '@jy/data-models/modules/quick-collect-bid/model'
|
|
|
// 扩展业务模型
|
|
|
import { useSearchFilterModel } from './modules/filter'
|
|
|
-import { useSearchListHeaderActionsModel } from './modules/list-header-actions'
|
|
|
-// 数据导出业务
|
|
|
-import { dataExportActionsModel } from './modules/data-export-actions'
|
|
|
-// 标讯收藏业务
|
|
|
+// 标讯取消收藏业务
|
|
|
import { dataCollectActionModel } from './modules/data-collect-actions'
|
|
|
-// 添加业务
|
|
|
-import { dataAddActionsModel } from './modules/data-add-actions'
|
|
|
// 标签业务
|
|
|
import { dataCollectTagModel } from './modules/data-collect-tag'
|
|
|
+// 添加业务
|
|
|
+import { dataAddActionsModel } from '@/views/search/bidding/model/modules/data-add-actions'
|
|
|
// 参标业务
|
|
|
-import { joinBidActionsModel } from './modules/join-bid-actions'
|
|
|
+import { joinBidActionsModel } from '@/views/search/bidding/model/modules/join-bid-actions'
|
|
|
+// 数据导出业务
|
|
|
+import { dataExportActionsModel } from '@/views/search/bidding/model/modules/data-export-actions'
|
|
|
+import { useSearchListHeaderActionsModel } from '@/views/search/bidding/model/modules/list-header-actions'
|
|
|
|
|
|
|
|
|
export default function () {
|
|
|
const that = getCurrentInstance().proxy
|
|
|
|
|
|
- const router = useRouter()
|
|
|
// 是否是免费用户
|
|
|
const isFree = computed(() => {
|
|
|
return useStore().getters['user/isFree']
|
|
|
})
|
|
|
- // 企业管理员
|
|
|
- const isEntAdmin = computed(() => {
|
|
|
- return useStore().getters['user/isEntAdmin']
|
|
|
- })
|
|
|
- // 部门管理员
|
|
|
- const isDepartmentAdmin = computed(() => {
|
|
|
- return useStore().getters['user/isDepartmentAdmin']
|
|
|
- })
|
|
|
// 是否登录
|
|
|
const isLogin = computed(() => {
|
|
|
return useStore().getters['user/loginFlag']
|
|
@@ -79,6 +63,7 @@ export default function () {
|
|
|
})
|
|
|
|
|
|
onMounted(() => {
|
|
|
+ doQuery()
|
|
|
window.addEventListener('scroll', watchScroll)
|
|
|
})
|
|
|
|
|
@@ -102,12 +87,9 @@ export default function () {
|
|
|
doToggleItemSelection,
|
|
|
doToggleListSelection,
|
|
|
doClearAllSelection,
|
|
|
- doQuery: doRunQuery,
|
|
|
- getLabelQuery,
|
|
|
- tagsList
|
|
|
+ doQuery: doRunQuery
|
|
|
} = APIModel
|
|
|
- console.log(APIModel, 'APIModel')
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 筛选v-model数据
|
|
|
*/
|
|
@@ -178,7 +160,6 @@ export default function () {
|
|
|
searchBidMoreVipSchema.value = SearchBidMoreSchema.value?.filter(
|
|
|
(s) => s.vipMark
|
|
|
)
|
|
|
- console.log(searchBidMoreFreeSchema.value, searchBidMoreVipSchema.value, 'base')
|
|
|
|
|
|
|
|
|
function doUpdateData(schema, type) {
|
|
@@ -321,18 +302,6 @@ export default function () {
|
|
|
onClickCancelCollect($event)
|
|
|
break
|
|
|
}
|
|
|
- // case 'collect-bid' : {
|
|
|
- // onClickDataCollect($event)
|
|
|
- // break
|
|
|
- // }
|
|
|
- // case 'distribute-bid': {
|
|
|
- // onClickDataDistribute()
|
|
|
- // break
|
|
|
- // }
|
|
|
- // case 'employ-bid' : {
|
|
|
- // onClickDataEmploy()
|
|
|
- // break
|
|
|
- // }
|
|
|
}
|
|
|
}
|
|
|
function detailListClick (key) {
|
|
@@ -488,10 +457,6 @@ export default function () {
|
|
|
if(isLogin.value) {
|
|
|
// 获取参标的数据
|
|
|
getJoinBidInfo(listIds.value)
|
|
|
- // BI 是否批量收录,获取收录数据
|
|
|
- // if(inBIPropertyIframe || inResourceBIIframe) {
|
|
|
- // getEmployData(listIds.value)
|
|
|
- // }
|
|
|
// 个人报告嵌套BI页面
|
|
|
if(inInjectBI) {
|
|
|
getBidAddInfos()
|
|
@@ -612,9 +577,8 @@ export default function () {
|
|
|
/*******数据导出 end ***********/
|
|
|
|
|
|
/*******修改标签 start ***********/
|
|
|
- const { onEditTags } = dataCollectTagModel({ that })
|
|
|
+ const { onEditTags, tagsList } = dataCollectTagModel({ that })
|
|
|
function onClickEditTags(e) {
|
|
|
- console.log('修改标签')
|
|
|
const config = {
|
|
|
total: listState.total,
|
|
|
isSelectSomeCheckbox: isSelectSomeCheckbox.value,
|
|
@@ -654,27 +618,11 @@ export default function () {
|
|
|
})
|
|
|
/********* 标讯收藏部分end ********/
|
|
|
|
|
|
- // 处理数据列表为空时,需要展示的提示文案包含时间
|
|
|
- const timeSelectorText = computed(() => {
|
|
|
- const publishTime = filterState.value.publishTime
|
|
|
- const split = '_'
|
|
|
- const { publishTimeText } = FilterHistoryAjaxModel2ViewModel.formatTime(publishTime, split)
|
|
|
- let result = ''
|
|
|
- if(publishTimeText) {
|
|
|
- if(publishTimeText.includes('最')) {
|
|
|
- result = publishTimeText.replace('最', '')
|
|
|
- } else if(publishTimeText.includes('以后')){
|
|
|
- result = publishTimeText.replace('以后', '')
|
|
|
- }else if(publishTimeText.includes('以前')) {
|
|
|
- result = publishTimeText.replace('以前', '')
|
|
|
- } else {
|
|
|
- result = publishTimeText
|
|
|
- }
|
|
|
- } else {
|
|
|
- result = '近一年'
|
|
|
- }
|
|
|
-
|
|
|
- return result
|
|
|
+ // 处理数据列表为空时,区分未匹配到数据和暂无收藏两种情况(是否为默认参数)
|
|
|
+ const isDefaultParams = computed(() => {
|
|
|
+ const filterParams = getFormatOfFilter()
|
|
|
+ const isParams = Object.values(filterParams).every(el => el === '')
|
|
|
+ return isParams
|
|
|
})
|
|
|
|
|
|
/********参标start *********/
|
|
@@ -805,10 +753,9 @@ export default function () {
|
|
|
onAddInfoOfBI,
|
|
|
onSingleAddInfo,
|
|
|
BidrenewalDialogRef,
|
|
|
- timeSelectorText,
|
|
|
collectElementRef,
|
|
|
onFreeTaste,
|
|
|
- getLabelQuery,
|
|
|
+ isDefaultParams,
|
|
|
tagsList
|
|
|
}
|
|
|
}
|