导出添加等待效果

This commit is contained in:
wangchengming 2025-11-18 19:59:33 +08:00
parent fb98fffca3
commit 5a04faae5f
3 changed files with 25 additions and 15 deletions

View File

@ -74,6 +74,7 @@
import { onMounted, ref } from 'vue';
import { mediaExcelBaseField, mediaExcelPriceField, exportMediaExcel } from "@/api/mediaLibrary"
const { proxy } = getCurrentInstance()
const activeIndex = ref(0)
const ToolOptions = ref(['优势报价', '门禁', '候车厅', '道闸', '地铁', '高铁', '写字楼', '车库灯箱'])
const exportTitle = ref('导出')
@ -1457,7 +1458,11 @@ const handleClick = (tab, event) => {
const handleSubmitExport = () => {
exportForm.value.exportBaseFields = checkedBaseFields
exportForm.value.mediaTypeExport = exportForm.value.mediaTypeExport.filter(item => item.exportPriceFields.length > 0)
proxy.$modal.loading(`正在执行导出,请耐心等待...`)
exportMediaExcel(exportForm.value).then(res => {
proxy.$modal.closeLoading()
const downLoadName = '媒体信息_' + getCurrentTime() + '.xlsx'
// a
const a = document.createElement('a')

View File

@ -40,6 +40,7 @@
import { onMounted, ref } from 'vue';
import { mediaPPTField, exportMediaPPT } from "@/api/mediaLibrary"
const { proxy } = getCurrentInstance()
const exportTitle = ref('导出PPT')
const exportOpen = ref(false)
//
@ -190,7 +191,10 @@ const handleCheckedPPTFieldChange = (value) => {
// ppt
const handleSubmitExportPPT = () => {
exportForm.value.exportFields = checkedPPTFields
proxy.$modal.loading(`正在执行导出,请耐心等待...`)
exportMediaPPT(exportForm.value).then(res => {
proxy.$modal.closeLoading()
const downLoadName = '媒体信息_' + getCurrentTime() + '.pptx'
// a
const a = document.createElement('a')

View File

@ -1032,7 +1032,8 @@ const getSupplierInfo = () => {
const getMediaInfo = () => {
mediaDetail({ mediaId: ruleForm.value.id }).then(res => {
ruleForm.value = res.data
mediaFile.value = ruleForm.value.mediaFile
mediaFile.value = res.data.mediaFile
mediaPrice.value = res.data.mediaPrices
ruleForm.value.mediaCity = ruleForm.value.provinceName + '/' + ruleForm.value.cityName + '/' + ruleForm.value.areaName + '/' + ruleForm.value.townName
if (ruleForm.value.mapY && ruleForm.value.mapX) latVal.value = ruleForm.value.mapY + ',' + ruleForm.value.mapX
if (ruleForm.value.belongSupplierId) getSupplierInfo()