|
@@ -4,7 +4,7 @@ import { useStore } from '@/store'
|
|
|
import { useRoute, useRouter } from 'vue-router/composables'
|
|
|
import { MessageBox } from 'element-ui'
|
|
|
import { mixinVisited } from '@/utils/mixins/visited-setup.js'
|
|
|
-import { FilterHistoryAjaxModelRestore, getParam, openLinkInWorkspace, InContainer} from '@/utils'
|
|
|
+import { FilterHistoryAjaxModelRestore, FilterHistoryAjaxModel2ViewModel, getParam, openLinkInWorkspace, InContainer} from '@/utils'
|
|
|
import $bus from '@/utils/bus'
|
|
|
// 筛选条件动态组件方法
|
|
|
import { getCreateSearchSchema } from '@/views/search/bidding/constant/index'
|
|
@@ -71,8 +71,8 @@ export default function () {
|
|
|
|
|
|
// 是否在工作台内
|
|
|
// 本地调试,可改为工作台内isInApp = ref(true), isInWeb = ref(false) 提交记得改回!
|
|
|
- const isInApp = ref(InContainer.inApp)
|
|
|
- const isInWeb = ref(InContainer.inWeb)
|
|
|
+ const isInApp = ref(true) || ref(InContainer.inApp)
|
|
|
+ const isInWeb = ref(false) || ref(InContainer.inWeb)
|
|
|
|
|
|
// 是否是渠道商
|
|
|
const cooperateCode = ref(false)
|
|
@@ -135,7 +135,7 @@ export default function () {
|
|
|
filterState,
|
|
|
getFormatAPIParams: getFormatOfFilter,
|
|
|
updateFilterBase
|
|
|
- } = useSearchFilterModel({ inBIPropertyIframe })
|
|
|
+ } = useSearchFilterModel({ inBIPropertyIframe, isFree })
|
|
|
|
|
|
const {
|
|
|
onTheWhiteList,
|
|
@@ -503,8 +503,11 @@ export default function () {
|
|
|
return result
|
|
|
}
|
|
|
|
|
|
- function beforeSearch () {
|
|
|
- console.log('beforesearch----------')
|
|
|
+ function beforeSearch (searchType) {
|
|
|
+ // 第一次搜索或者tab切换不校验白名单规则
|
|
|
+ if (searchType) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
// 如果在反爬白名单,则空搜索刷新搜索结果(即允许空搜索)
|
|
|
// 不在,则不允许空搜索(此处空搜索指的是主搜索框是否为空)
|
|
|
if (!onTheWhiteList.value) {
|
|
@@ -539,12 +542,9 @@ export default function () {
|
|
|
* @param [params] - 可选值,默认会和 getParams(params) 返回值进行合并
|
|
|
*/
|
|
|
function doQuery(params = {}, searchType) {
|
|
|
-
|
|
|
- if(!searchType) {
|
|
|
- const bSearch = beforeSearch()
|
|
|
- if(!bSearch) {
|
|
|
- return
|
|
|
- }
|
|
|
+ const bSearch = beforeSearch(searchType)
|
|
|
+ if(!bSearch) {
|
|
|
+ return
|
|
|
}
|
|
|
return doRunQuery(getParams(params)).then((res) => {
|
|
|
|
|
@@ -1008,6 +1008,22 @@ export default function () {
|
|
|
}
|
|
|
/*****BI添加操作end*********/
|
|
|
|
|
|
+ const timeSelectorText = computed(() => {
|
|
|
+ const publishTime =filterState.value.publishTime
|
|
|
+ const { publishTimeText } = FilterHistoryAjaxModel2ViewModel.formatTime(publishTime)
|
|
|
+ let result = ''
|
|
|
+ if(publishTimeText.includes('最')) {
|
|
|
+ result = publishTimeText.replace('最', '')
|
|
|
+ } else if(publishTimeText.includes('以后')){
|
|
|
+ result = publishTimeText.replace('以后', '')
|
|
|
+ }else if(publishTimeText.includes('以前')) {
|
|
|
+ result = publishTimeText.replace('以前', '')
|
|
|
+ } else {
|
|
|
+ result = publishTimeText
|
|
|
+ }
|
|
|
+ return result
|
|
|
+ })
|
|
|
+
|
|
|
return {
|
|
|
isLogin,
|
|
|
isInApp,
|
|
@@ -1065,6 +1081,7 @@ export default function () {
|
|
|
onSingleEmploy,
|
|
|
onAddInfoOfBI,
|
|
|
onSingleAddInfo,
|
|
|
- goWorkSpace
|
|
|
+ goWorkSpace,
|
|
|
+ timeSelectorText
|
|
|
}
|
|
|
}
|