|
@@ -6,6 +6,8 @@ import { MessageBox } from 'element-ui'
|
|
|
import { mixinVisited } from '@/utils/mixins/visited-setup.js'
|
|
|
import { FilterHistoryAjaxModelRestore, getParam, openLinkInWorkspace, InContainer} from '@/utils'
|
|
|
import $bus from '@/utils/bus'
|
|
|
+// 筛选条件动态组件方法
|
|
|
+import { createSearchBidBaseSchema, createSearchBidMoreSchema } from '@/views/search/bidding/constant/search-filters'
|
|
|
// API 业务模型
|
|
|
import useQuickSearchModel from '@jy/data-models/modules/quick-search/model'
|
|
|
// 扩展业务模型
|
|
@@ -28,6 +30,7 @@ import { dataEmployActionsModel } from './modules/data-employ-actions'
|
|
|
// 添加业务
|
|
|
import { dataAddActionsModel } from './modules/data-add-actions'
|
|
|
|
|
|
+
|
|
|
export default function () {
|
|
|
const that = getCurrentInstance().proxy
|
|
|
|
|
@@ -44,11 +47,25 @@ export default function () {
|
|
|
const isDepartmentAdmin = computed(() => {
|
|
|
return useStore().getters['user/isDepartmentAdmin']
|
|
|
})
|
|
|
-
|
|
|
// 是否登录
|
|
|
const isLogin = computed(() => {
|
|
|
return useStore().getters['user/loginFlag']
|
|
|
})
|
|
|
+ // 用户权限
|
|
|
+ const userPowerInfo = computed(() => {
|
|
|
+ return useStore().getters['user/getInfo']
|
|
|
+ })
|
|
|
+ // 是否是vip
|
|
|
+ const isVip = computed (() => {
|
|
|
+ const { entniche, memberStatus, vipStatus } = userPowerInfo.value
|
|
|
+ return entniche || memberStatus > 0 || vipStatus > 0
|
|
|
+ })
|
|
|
+ // 是否是老用户
|
|
|
+ const isOld = computed (() => {
|
|
|
+ const { isOld } = userPowerInfo.value
|
|
|
+ return isOld
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
// 是否在工作台内
|
|
|
const isInApp = ref(InContainer.inApp)
|
|
@@ -78,7 +95,6 @@ export default function () {
|
|
|
return inResourceBIIframe || inResourceBIIframe || inInjectBI
|
|
|
})
|
|
|
|
|
|
-
|
|
|
// 解构基础业务
|
|
|
const APIModel = useQuickSearchModel({
|
|
|
type: 'search-bid'
|
|
@@ -131,6 +147,36 @@ export default function () {
|
|
|
doQuery()
|
|
|
}
|
|
|
|
|
|
+ // 筛选条件动态配置处理
|
|
|
+ function disposeFilterSchema () {
|
|
|
+ const conf = ref({
|
|
|
+ vipUser: isVip.value && isInApp.value,
|
|
|
+ oldUser: isOld.value && isInApp.value,
|
|
|
+ showVip: isLogin.value && isInApp.value,
|
|
|
+ infoType: activeTab.value
|
|
|
+ })
|
|
|
+
|
|
|
+ // 标准筛选
|
|
|
+ const SearchBidBaseSchema = ref([])
|
|
|
+ const SearchBidMoreSchema = ref([])
|
|
|
+ // 更多筛选
|
|
|
+ const searchBidMoreFreeSchema = ref([])
|
|
|
+ const searchBidMoreVipSchema = ref([])
|
|
|
+
|
|
|
+ SearchBidBaseSchema.value = createSearchBidBaseSchema(conf.value)
|
|
|
+ SearchBidMoreSchema.value = createSearchBidMoreSchema()
|
|
|
+
|
|
|
+ searchBidMoreFreeSchema.value = SearchBidMoreSchema.value?.filter((s) => !s.vipMark)
|
|
|
+ searchBidMoreVipSchema.value = SearchBidMoreSchema.value?.filter((s) => s.vipMark)
|
|
|
+
|
|
|
+ return {
|
|
|
+ SearchBidBaseSchema,
|
|
|
+ SearchBidMoreSchema,
|
|
|
+ searchBidMoreFreeSchema,
|
|
|
+ searchBidMoreVipSchema
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 列表状态
|
|
|
const listState = reactive({
|
|
|
finished,
|
|
@@ -888,6 +934,7 @@ export default function () {
|
|
|
inBIPropertyIframe,
|
|
|
inInjectBI,
|
|
|
isInBI,
|
|
|
+ isVip,
|
|
|
goLogin,
|
|
|
guideGoWorkSpace,
|
|
|
cooperateCode,
|
|
@@ -899,6 +946,7 @@ export default function () {
|
|
|
filterState,
|
|
|
listState,
|
|
|
activeItemStyleType,
|
|
|
+ disposeFilterSchema,
|
|
|
doQuery,
|
|
|
doListHeaderAction,
|
|
|
doChangeAllSelect,
|
|
@@ -906,6 +954,7 @@ export default function () {
|
|
|
doChangePageNum,
|
|
|
doChangePageSize,
|
|
|
onChangeTab,
|
|
|
+ activeTab,
|
|
|
vipDialogConf,
|
|
|
closeVipDialog,
|
|
|
onSaveFilter, // 以下存筛选条件相关
|