diff --git a/src/api/mediaLibrary.js b/src/api/mediaLibrary.js
index a9116e8..e8806e0 100644
--- a/src/api/mediaLibrary.js
+++ b/src/api/mediaLibrary.js
@@ -87,7 +87,8 @@ export function exportMediaExcel(query) {
url: '/media/export/dynamic/excel',
method: 'post',
data: query,
- responseType: 'blob'
+ responseType: 'blob',
+ timeout: 3600000, // 3600秒 = 60分钟,根据文件大小调整
})
}
// 获取导出PPT字段
diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss
index ce37d59..caa1c03 100644
--- a/src/assets/styles/ruoyi.scss
+++ b/src/assets/styles/ruoyi.scss
@@ -493,8 +493,8 @@ h6 {
}
.myImg_popover {
- width: 476px !important;
- height: 284px !important;
+ width: 414px !important;
+ // height: 314px !important;
border-radius: 6px !important;
padding: 8px !important;
background: #d1e3f9cc !important;
diff --git a/src/utils/request.js b/src/utils/request.js
index e2e7e49..93442e3 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -17,7 +17,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL: import.meta.env.VITE_APP_BASE_API,
// 超时
- timeout: 10000
+ timeout: 1800000
})
// request拦截器
diff --git a/src/views/mediaLibrary/exportDialog.vue b/src/views/mediaLibrary/exportDialog.vue
index 35c2def..a510c4d 100644
--- a/src/views/mediaLibrary/exportDialog.vue
+++ b/src/views/mediaLibrary/exportDialog.vue
@@ -1319,6 +1319,8 @@ const exportForm = ref({
hasFiles: false
})
+const filterPriceFieldArr = ref([])
+
// 基础字段是否全选
const baseFieldCheckAll = ref(false)
const baseFieldIsIndeterminate = ref(false)
@@ -1457,11 +1459,55 @@ const handleClick = (tab, event) => {
// 执行导出
const handleSubmitExport = () => {
exportForm.value.exportBaseFields = checkedBaseFields
- exportForm.value.mediaTypeExport = exportForm.value.mediaTypeExport.filter(item => item.exportPriceFields.length > 0)
+ filterPriceFieldArr.value = []
+ exportForm.value.mediaTypeExport.forEach(item => {
+ // 0'优势报价', 1'门禁', 2'候车厅', 3'道闸', 4'地铁', 5'高铁', 6'写字楼', 7'车库灯箱'
+ if (item.type == 0) {
+ const result = ysPriceFild.value.filter(field => item.exportPriceFields.includes(field.propertyPath));
+ const propertyPaths = result.map(res => res.propertyPath);
+ filterPriceFieldArr.value.push({ type: item.type, exportPriceFields: propertyPaths })
+ }
+ if (item.type == 1) {
+ const result = mjPriceFild.value.filter(field => item.exportPriceFields.includes(field.propertyPath));
+ const propertyPaths = result.map(res => res.propertyPath);
+ filterPriceFieldArr.value.push({ type: item.type, exportPriceFields: propertyPaths })
+ }
+ if (item.type == 2) {
+ const result = hctPriceFild.value.filter(field => item.exportPriceFields.includes(field.propertyPath));
+ const propertyPaths = result.map(res => res.propertyPath);
+ filterPriceFieldArr.value.push({ type: item.type, exportPriceFields: propertyPaths })
+ }
+ if (item.type == 3) {
+ const result = dzPriceFild.value.filter(field => item.exportPriceFields.includes(field.propertyPath));
+ const propertyPaths = result.map(res => res.propertyPath);
+ filterPriceFieldArr.value.push({ type: item.type, exportPriceFields: propertyPaths })
+ }
+ if (item.type == 4) {
+ const result = dtPriceFild.value.filter(field => item.exportPriceFields.includes(field.propertyPath));
+ const propertyPaths = result.map(res => res.propertyPath);
+ filterPriceFieldArr.value.push({ type: item.type, exportPriceFields: propertyPaths })
+ }
+ if (item.type == 5) {
+ const result = gtPriceFild.value.filter(field => item.exportPriceFields.includes(field.propertyPath));
+ const propertyPaths = result.map(res => res.propertyPath);
+ filterPriceFieldArr.value.push({ type: item.type, exportPriceFields: propertyPaths })
+ }
+ if (item.type == 6) {
+ const result = xzlPriceFild.value.filter(field => item.exportPriceFields.includes(field.propertyPath));
+ const propertyPaths = result.map(res => res.propertyPath);
+ filterPriceFieldArr.value.push({ type: item.type, exportPriceFields: propertyPaths })
+ }
+ if (item.type == 7) {
+ const result = ckdxPriceFild.value.filter(field => item.exportPriceFields.includes(field.propertyPath));
+ const propertyPaths = result.map(res => res.propertyPath);
+ filterPriceFieldArr.value.push({ type: item.type, exportPriceFields: propertyPaths })
+ }
+ })
+ exportForm.value.mediaTypeExport = filterPriceFieldArr.value.filter(item => item.exportPriceFields.length > 0)
proxy.$modal.loading(`正在执行导出,请耐心等待...`)
- exportMediaExcel(exportForm.value).then(res => {
+ exportMediaExcel(exportForm.value).then(res => {
proxy.$modal.closeLoading()
const downLoadName = '媒体信息_' + getCurrentTime() + '.xlsx'
// 通过a标签打开新页面下载文件
@@ -1500,6 +1546,9 @@ const getMediaExcelBaseField = () => {
} else {
baseFields.value = ysBaseFild.value
}
+ } else {
+ // 默认导出全部时的字段
+ baseFields.value = ysBaseFild.value
}
}
// 获取报价信息字段
@@ -1522,6 +1571,12 @@ const getMediaExcelPriceField = () => {
priceFields.value = ysPriceFild.value
handleCheckPriceField(0)
}
+ } else {
+ // 默认导出全部时的报价
+ ToolOptions.value = ['优势报价', '门禁', '候车厅', '道闸', '地铁', '高铁', '写字楼', '车库灯箱']
+ activeIndex.value = 0
+ priceFields.value = ysPriceFild.value
+ handleCheckPriceField(0)
}
}
// 判断报价信息是否存在指定类型数据
diff --git a/src/views/mediaLibrary/exportPPTDialog.vue b/src/views/mediaLibrary/exportPPTDialog.vue
index b295a75..ed778f0 100644
--- a/src/views/mediaLibrary/exportPPTDialog.vue
+++ b/src/views/mediaLibrary/exportPPTDialog.vue
@@ -157,9 +157,7 @@ const pptFields = ref([
propertyPath: "invalidReason"
}
])
-
-
-
+
// 已选择的ppt字段
const checkedPPTFields = ref([])
@@ -189,8 +187,10 @@ const handleCheckedPPTFieldChange = (value) => {
}
// 导出ppt实现代码
-const handleSubmitExportPPT = () => {
- exportForm.value.exportFields = checkedPPTFields
+const handleSubmitExportPPT = () => {
+ const result = pptFields.value.filter(field => checkedPPTFields.value.includes(field.propertyPath));
+ const propertyPaths = result.map(res => res.propertyPath);
+ exportForm.value.exportFields = propertyPaths
proxy.$modal.loading(`正在执行导出,请耐心等待...`)
exportMediaPPT(exportForm.value).then(res => {
diff --git a/src/views/mediaLibrary/historyData.vue b/src/views/mediaLibrary/historyData.vue
index 55e43b7..e3d7d50 100644
--- a/src/views/mediaLibrary/historyData.vue
+++ b/src/views/mediaLibrary/historyData.vue
@@ -227,7 +227,7 @@ const initHistoryCharLine = () => {
}
},
grid: {
- left: '3%',
+ left: '5%',
right: '3%', // 右侧留更多空间显示长数值
top: '14%',
bottom: '10%',
@@ -301,9 +301,10 @@ const initHistoryCharLine = () => {
}
]
})
- // window.addEventListener("resize", () => {
- // _historyChar.value.resize()
- // })
+ window.addEventListener("resize", () => {
+ // _historyChar.value.resize()
+ initHistoryCharLine()
+ })
}
// 柱状图
const initHistoryCharBar = () => {
@@ -322,7 +323,7 @@ const initHistoryCharBar = () => {
}
},
grid: {
- left: '3%',
+ left: '5%',
right: '3%', // 右侧留更多空间显示长数值
top: '14%',
bottom: '10%',
@@ -399,9 +400,10 @@ const initHistoryCharBar = () => {
}
}]
})
- // window.addEventListener("resize", () => {
- // _historyChar.value.resize()
- // })
+ window.addEventListener("resize", () => {
+ // _historyChar.value.resize()
+ initHistoryCharBar()
+ })
}
const handleChangeMediaType = (val) => {
getMediaPriceList()
@@ -428,18 +430,21 @@ const getMediaPriceList = () => {
xData.value = []
yData.value = []
historyList.value.forEach(item => {
- xData.value.push(item.supplier)
+ xData.value.push(item.supplier ? item.supplier : '')
let itemYDate = null;
- const convertIntTotalRegularPrice = parseFloat(item.totalRegularPrice.replace(/,/g, ''))
- if (readonly.value) itemYDate = (convertIntTotalRegularPrice / item.buyCycle).toFixed(2)
- else {
- // 判断是否纯数字
- const convertIntValue = safeParseInt(item.buyCycle)
- if (typeof convertIntValue === 'number' && Number.isFinite(convertIntValue)) {
- itemYDate = (convertIntTotalRegularPrice / (item.buyCycle * 7)).toFixed(2)
- } else {
- const repliceValue = parseInt(item.buyCycle.replace('个月', '').replace('月', ''))
- itemYDate = (convertIntTotalRegularPrice / (repliceValue * 31)).toFixed(2)
+ console.log('item.totalRegularPrice', item.totalRegularPrice)
+ if (item.totalRegularPrice) {
+ const convertIntTotalRegularPrice = parseFloat(item.totalRegularPrice.replace(/,/g, ''))
+ if (readonly.value) itemYDate = (convertIntTotalRegularPrice / item.buyCycle).toFixed(2)
+ else {
+ // 判断是否纯数字
+ const convertIntValue = safeParseInt(item.buyCycle)
+ if (typeof convertIntValue === 'number' && Number.isFinite(convertIntValue)) {
+ itemYDate = (convertIntTotalRegularPrice / (item.buyCycle * 7)).toFixed(2)
+ } else {
+ const repliceValue = parseInt(item.buyCycle.replace('个月', '').replace('月', ''))
+ itemYDate = (convertIntTotalRegularPrice / (repliceValue * 31)).toFixed(2)
+ }
}
}
yData.value.push(itemYDate)
diff --git a/src/views/mediaLibrary/index.vue b/src/views/mediaLibrary/index.vue
index 0a7e12d..48d0d55 100644
--- a/src/views/mediaLibrary/index.vue
+++ b/src/views/mediaLibrary/index.vue
@@ -180,16 +180,19 @@
-
-
+
+ 加载中...
+
+ 暂无图片
+
{{
scope.row.mediaName
- }}
+ }}
-
@@ -280,7 +283,7 @@