导出添加等待效果
This commit is contained in:
parent
fb98fffca3
commit
5a04faae5f
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user