From fb98fffca3674294614591086ddfb3ac4d651d16 Mon Sep 17 00:00:00 2001 From: wangchengming <15110151257@163.com> Date: Fri, 14 Nov 2025 18:03:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mediaLibrary/exportPPTDialog.vue | 124 +++++++++++++++++++-- src/views/mediaLibrary/index.vue | 23 +++- src/views/mediaLibrary/mediaDetail.vue | 4 +- src/views/mediaLibrary/mediaForm.vue | 30 +++-- 4 files changed, 146 insertions(+), 35 deletions(-) diff --git a/src/views/mediaLibrary/exportPPTDialog.vue b/src/views/mediaLibrary/exportPPTDialog.vue index 59fe8ed..6d63f71 100644 --- a/src/views/mediaLibrary/exportPPTDialog.vue +++ b/src/views/mediaLibrary/exportPPTDialog.vue @@ -54,14 +54,118 @@ const exportForm = ref({ const pptFieldCheckAll = ref(false) const pptFieldIsIndeterminate = ref(true) // ppt字段 -const pptFields = ref([]) +const pptFields = ref([ + { + displayName: "媒体名称", + propertyPath: "mediaName" + }, + { + displayName: "媒体位置", + propertyPath: "address" + }, + { + displayName: "纬度", + propertyPath: "mapY" + }, + { + displayName: "经度", + propertyPath: "mapX" + }, + { + displayName: "媒体类型", + propertyPath: "mediaTypeStr" + }, + { + displayName: "媒体大类", + propertyPath: "mediaCategoryStr" + }, + { + displayName: "区域属性", + propertyPath: "businessDistrictName" + }, + { + displayName: "播放时间", + propertyPath: "playbackTime" + }, + { + displayName: "是否照明", + propertyPath: "hasLighting" + }, + { + displayName: "展示形式", + propertyPath: "displayFormStr" + }, + { + displayName: "媒体尺寸", + propertyPath: "mediaSize" + }, + { + displayName: "mr", + propertyPath: "mr" + }, + { + displayName: "媒体朝向", + propertyPath: "mediaOrientation" + }, + { + displayName: "媒体流量", + propertyPath: "dailyAvgVehicleFlow" + }, + { + displayName: "媒体优势", + propertyPath: "advantages" + }, + { + displayName: "首次制作安装费", + propertyPath: "firstInstallFee" + }, + { + displayName: "换刊制作安装费", + propertyPath: "changeInstallFee" + }, + { + displayName: "最小购买周期", + propertyPath: "minPurchaseCycle" + }, + { + displayName: "省", + propertyPath: "provinceName" + }, + { + displayName: "市", + propertyPath: "cityName" + }, + { + displayName: "区", + propertyPath: "areaName" + }, + { + displayName: "镇", + propertyPath: "townName" + }, + { + displayName: "部门", + propertyPath: "dataScopeDeptName" + }, + { + displayName: "状态", + propertyPath: "state" + }, + { + displayName: "作废原因", + propertyPath: "invalidReason" + } +]) + + + // 已选择的ppt字段 const checkedPPTFields = ref([]) // 移除已选媒体 const handleCloseTag = (tag) => { const rowIndex = chosedMediaList.value.findIndex(item => item.id == tag.id) - chosedMediaList.value.splice(rowIndex, 1) + chosedMediaList.value.splice(rowIndex, 1) // 重新计算导出媒体id exportForm.value.mediaIds = chosedMediaList.value.map(item => item.id); } @@ -85,7 +189,7 @@ const handleCheckedPPTFieldChange = (value) => { // 导出ppt实现代码 const handleSubmitExportPPT = () => { - exportForm.value.exportFields = checkedPPTFields + exportForm.value.exportFields = checkedPPTFields exportMediaPPT(exportForm.value).then(res => { const downLoadName = '媒体信息_' + getCurrentTime() + '.pptx' // 通过a标签打开新页面下载文件 @@ -114,18 +218,18 @@ const getCurrentTime = () => { return gettime } -// 获取ppt信息字段 -const getMediaExcelPPTField = () => { - mediaPPTField().then(res => { - pptFields.value = res.data - }) -} +// // 获取ppt信息字段 +// const getMediaExcelPPTField = () => { +// mediaPPTField().then(res => { +// pptFields.value = res.data +// }) +// } // 初始化 const initExportPPT = (_tempId, _mediaIds, multipleChoseArr) => { exportForm.value.templateId = _tempId exportForm.value.mediaIds = _mediaIds chosedMediaList.value = JSON.parse(JSON.stringify(multipleChoseArr)) - getMediaExcelPPTField() + // getMediaExcelPPTField() exportOpen.value = true } diff --git a/src/views/mediaLibrary/index.vue b/src/views/mediaLibrary/index.vue index ff8d63b..0a7e12d 100644 --- a/src/views/mediaLibrary/index.vue +++ b/src/views/mediaLibrary/index.vue @@ -186,7 +186,7 @@ {{ scope.row.mediaName - }} + }} @@ -246,6 +246,8 @@ v-hasPermi="['mediaLibrary:historicalData']">历史数据