|
@@ -8,7 +8,7 @@ import {
|
|
|
} from '@/api/modules/'
|
|
|
|
|
|
import { useStore } from '@/store'
|
|
|
-import { FilterHistoryViewModel2AjaxModel, openOuterLink, formatFilterApiOther } from '@/utils'
|
|
|
+import { openOuterLink } from '@/utils'
|
|
|
|
|
|
// 是否登录
|
|
|
const isLogin = computed(() => {
|
|
@@ -25,19 +25,19 @@ export function dataExportActionsModel () {
|
|
|
async function dataExport (config) {
|
|
|
const { listState, selectCheckboxCount, selectIds, filter } = config
|
|
|
const { selectTime, publishTime } = filter
|
|
|
- if (selectTime.indexOf('_') > -1) {
|
|
|
- filter.selectTime = selectTime.replace('_', '-')
|
|
|
- }
|
|
|
- if(publishTime.indexOf('_') > -1) {
|
|
|
- filter.publishTime = publishTime.replace('_', '-')
|
|
|
- }
|
|
|
+ // if (selectTime.indexOf('_') > -1) {
|
|
|
+ // filter.selectTime = selectTime.replace('_', '-')
|
|
|
+ // }
|
|
|
+ // if(publishTime.indexOf('_') > -1) {
|
|
|
+ // filter.publishTime = publishTime.replace('_', '-')
|
|
|
+ // }
|
|
|
// 未登录跳转登录
|
|
|
if (!isLogin.value) {
|
|
|
$bus.$emit('bidding:goLogin')
|
|
|
return
|
|
|
}
|
|
|
if (!listState.total) return
|
|
|
- filterFormatParams.value = FilterHistoryViewModel2AjaxModel.formatAll(filter)
|
|
|
+ filterFormatParams.value = filter
|
|
|
const _expand = filter._expand || {}
|
|
|
Object.assign(filterFormatParams.value, _expand)
|
|
|
exportLoading.value = true
|
|
@@ -67,20 +67,9 @@ export function dataExportActionsModel () {
|
|
|
try {
|
|
|
// 判断是否选择过企业。未选择过调用 selectEnt 选择一个默认的企业
|
|
|
await defaultSelectEnt()
|
|
|
- const { area, city, district } = FilterHistoryViewModel2AjaxModel.formatAreaCity(filterFormatParams.value.regionMap)
|
|
|
- const dParams = {
|
|
|
- scope: area, // 地区省份(数据导出接口用到)
|
|
|
- area, // 地区省份(保存筛选接口用到)
|
|
|
- city,
|
|
|
- district,
|
|
|
- ...filterFormatParams.value
|
|
|
- }
|
|
|
- let params = Object.assign(dParams, {
|
|
|
+ let params = Object.assign(filterFormatParams.value, {
|
|
|
selectIds: selectIds ? selectIds.join(',') : null
|
|
|
})
|
|
|
- if (params.industry) {
|
|
|
- params.industry = formatFilterApiOther(params.industry)
|
|
|
- }
|
|
|
const { data } = await biddingCollectExport(params)
|
|
|
const { _id } = data
|
|
|
if (!_id) return
|
|
@@ -106,7 +95,7 @@ export function dataExportActionsModel () {
|
|
|
//携带当前检索跳转数据导出支付页面
|
|
|
function toPayDataExport (config) {
|
|
|
const { listState, selectCheckboxCount, selectIds, filter } = config
|
|
|
- filterFormatParams.value = FilterHistoryViewModel2AjaxModel.formatAll(filter)
|
|
|
+ filterFormatParams.value = filter
|
|
|
const _expand = filter._expand || {}
|
|
|
filterFormatParams.value = Object.assign(filterFormatParams.value, _expand)
|
|
|
// 未登录跳转登录
|