diff --git a/src/api/mediaDownRecord.js b/src/api/mediaDownRecord.js
new file mode 100644
index 0000000..5ed656b
--- /dev/null
+++ b/src/api/mediaDownRecord.js
@@ -0,0 +1,28 @@
+import request from '@/utils/request'
+
+// 分页获取下载任务
+export function busDownloadRecordPage(query) {
+ return request({
+ url: '/admin/busDownloadRecord/getBusDownloadRecordPage',
+ method: 'post',
+ data: query
+ })
+}
+
+// 批量添加任务
+export function addBusDownloadRecord(query) {
+ return request({
+ url: '/admin/busDownloadRecord/addBatch',
+ method: 'post',
+ data: query
+ })
+}
+
+// 修改下载任务状态
+export function updateBusDownloadRecord(query) {
+ return request({
+ url: '/admin/busDownloadRecord/updateBusDownloadRecord',
+ method: 'post',
+ data: query
+ })
+}
\ No newline at end of file
diff --git a/src/components/FileUpload/PdfPreview.vue b/src/components/FileUpload/PdfPreview.vue
index 8e2002c..cc117e9 100644
--- a/src/components/FileUpload/PdfPreview.vue
+++ b/src/components/FileUpload/PdfPreview.vue
@@ -36,15 +36,13 @@ const scale = ref(1)
const progress = ref(0)
const loading = ref(false)
-const handlePdfLoaded = (pdf) => {
- console.log('PDF 加载完成', pdf)
+const handlePdfLoaded = (pdf) => {
loading.value = false
pageCount.value = pdf.numPages
}
const handleProgress = (progressData) => {
- progress.value = Math.round(progressData.loaded / progressData.total * 100)
- console.log(progress.value)
+ progress.value = Math.round(progressData.loaded / progressData.total * 100)
if(progress.value < 100) loading.value = true
else loading.value = false
}
diff --git a/src/components/FileUpload/supplierDetailFile.vue b/src/components/FileUpload/supplierDetailFile.vue
index c846d04..e9d4da5 100644
--- a/src/components/FileUpload/supplierDetailFile.vue
+++ b/src/components/FileUpload/supplierDetailFile.vue
@@ -66,8 +66,7 @@ const setFileInfo = (files) => {
}
// 判断是否为图片文件
-const isImageFile = (suffix) => {
- console.log('是否图片', suffix, ['jpeg', 'jpg', 'png'].includes(suffix.toLowerCase()))
+const isImageFile = (suffix) => {
return ['jpeg', 'jpg', 'png'].includes(suffix.toLowerCase())
}
diff --git a/src/components/ViewFile/index.vue b/src/components/ViewFile/index.vue
index e7b0f17..c4d28e9 100644
--- a/src/components/ViewFile/index.vue
+++ b/src/components/ViewFile/index.vue
@@ -54,8 +54,7 @@ const viewTitle = ref('查看文件')
const viewFileOpen = ref(false)
const fileList = ref([])
// 判断是否为图片文件
-const isImageFile = (suffix) => {
- console.log('是否图片', suffix, ['jpeg', 'jpg', 'png'].includes(suffix.toLowerCase()))
+const isImageFile = (suffix) => {
return ['jpeg', 'jpg', 'png'].includes(suffix.toLowerCase())
}
// 单个文件下载
diff --git a/src/plugins/modal.js b/src/plugins/modal.js
index 3c43124..ea810ae 100644
--- a/src/plugins/modal.js
+++ b/src/plugins/modal.js
@@ -60,6 +60,14 @@ export default {
type: "warning",
})
},
+ myConfirm(content, option) {
+ return ElMessageBox.confirm(content, "系统提示", {
+ confirmButtonText: option.confirmButtonText,
+ // cancelButtonText: '取消',
+ closeOnClickModal: false, // 禁止点击遮罩层关闭
+ type: "warning",
+ })
+ },
// 提交内容
prompt(content) {
return ElMessageBox.prompt(content, "系统提示", {
diff --git a/src/views/mediaLibrary/components/accessControlPrice.vue b/src/views/mediaLibrary/components/accessControlPrice.vue
index 9e5ca34..0850cf9 100644
--- a/src/views/mediaLibrary/components/accessControlPrice.vue
+++ b/src/views/mediaLibrary/components/accessControlPrice.vue
@@ -268,8 +268,7 @@ const handleSubmit = () => {
const getMediaPrice = (_mediaId, _showOptionColumn) => {
showOptionColumn.value = _showOptionColumn
if (_mediaId) {
- mediaPrice({ mediaId: _mediaId }).then(res => {
- console.log('历史报价', res)
+ mediaPrice({ mediaId: _mediaId }).then(res => {
quotationList.value = res.data.filter(item => item.mediaType == 1)
quotationList.value.forEach(element => {
element.currentImageSrc = defaultImageSrc.value
diff --git a/src/views/mediaLibrary/components/barrierGatePrice.vue b/src/views/mediaLibrary/components/barrierGatePrice.vue
index 674bb65..3fde1f5 100644
--- a/src/views/mediaLibrary/components/barrierGatePrice.vue
+++ b/src/views/mediaLibrary/components/barrierGatePrice.vue
@@ -246,8 +246,7 @@ const handleSubmit = () => {
const getMediaPrice = (_mediaId, _showOptionColumn) => {
showOptionColumn.value = _showOptionColumn
if (_mediaId) {
- mediaPrice({ mediaId: _mediaId }).then(res => {
- console.log('历史报价', res)
+ mediaPrice({ mediaId: _mediaId }).then(res => {
quotationList.value = res.data.filter(item => item.mediaType == 3)
quotationList.value.forEach(element => {
element.currentImageSrc = defaultImageSrc.value
diff --git a/src/views/mediaLibrary/components/competitiveOffer.vue b/src/views/mediaLibrary/components/competitiveOffer.vue
index 0dae7d1..0e4ee3e 100644
--- a/src/views/mediaLibrary/components/competitiveOffer.vue
+++ b/src/views/mediaLibrary/components/competitiveOffer.vue
@@ -278,17 +278,14 @@ const handleSubmit = () => {
})
}
// 获取历史报价
-const getMediaPrice = (_mediaId, _showOptionColumn) => {
- console.log('进来了?', _mediaId, _showOptionColumn)
+const getMediaPrice = (_mediaId, _showOptionColumn) => {
showOptionColumn.value = _showOptionColumn
if (_mediaId) {
- mediaPrice({ mediaId: _mediaId }).then(res => {
- console.log('历史报价', res)
+ mediaPrice({ mediaId: _mediaId }).then(res => {
quotationList.value = res.data.filter(item => item.mediaType == 0)
quotationList.value.forEach(element => {
element.currentImageSrc = defaultImageSrc.value
- });
- console.log('历史报价结果', quotationList.value)
+ });
})
}
}
diff --git a/src/views/mediaLibrary/components/garageLightBox.vue b/src/views/mediaLibrary/components/garageLightBox.vue
index 9300c59..b5b80c8 100644
--- a/src/views/mediaLibrary/components/garageLightBox.vue
+++ b/src/views/mediaLibrary/components/garageLightBox.vue
@@ -259,8 +259,7 @@ const handleSubmit = () => {
const getMediaPrice = (_mediaId, _showOptionColumn) => {
showOptionColumn.value = _showOptionColumn
if (_mediaId) {
- mediaPrice({ mediaId: _mediaId }).then(res => {
- console.log('历史报价', res)
+ mediaPrice({ mediaId: _mediaId }).then(res => {
quotationList.value = res.data.filter(item => item.mediaType == 7)
quotationList.value.forEach(element => {
element.currentImageSrc = defaultImageSrc.value
diff --git a/src/views/mediaLibrary/components/highSpeedRailway.vue b/src/views/mediaLibrary/components/highSpeedRailway.vue
index f552bca..bb7b39d 100644
--- a/src/views/mediaLibrary/components/highSpeedRailway.vue
+++ b/src/views/mediaLibrary/components/highSpeedRailway.vue
@@ -253,8 +253,7 @@ const handleSubmit = () => {
const getMediaPrice = (_mediaId, _showOptionColumn) => {
showOptionColumn.value = _showOptionColumn
if (_mediaId) {
- mediaPrice({ mediaId: _mediaId }).then(res => {
- console.log('历史报价', res)
+ mediaPrice({ mediaId: _mediaId }).then(res => {
quotationList.value = res.data.filter(item => item.mediaType == 5)
quotationList.value.forEach(element => {
element.currentImageSrc = defaultImageSrc.value
diff --git a/src/views/mediaLibrary/components/officeBuilding.vue b/src/views/mediaLibrary/components/officeBuilding.vue
index 7149a49..ad80739 100644
--- a/src/views/mediaLibrary/components/officeBuilding.vue
+++ b/src/views/mediaLibrary/components/officeBuilding.vue
@@ -259,8 +259,7 @@ const handleSubmit = () => {
const getMediaPrice = (_mediaId, _showOptionColumn) => {
showOptionColumn.value = _showOptionColumn
if (_mediaId) {
- mediaPrice({ mediaId: _mediaId }).then(res => {
- console.log('历史报价', res)
+ mediaPrice({ mediaId: _mediaId }).then(res => {
quotationList.value = res.data.filter(item => item.mediaType == 6)
quotationList.value.forEach(element => {
element.currentImageSrc = defaultImageSrc.value
diff --git a/src/views/mediaLibrary/components/subwayPrice.vue b/src/views/mediaLibrary/components/subwayPrice.vue
index 92a1f71..66b219a 100644
--- a/src/views/mediaLibrary/components/subwayPrice.vue
+++ b/src/views/mediaLibrary/components/subwayPrice.vue
@@ -358,8 +358,7 @@ const handleSubmit = () => {
const getMediaPrice = (_mediaId, _showOptionColumn) => {
showOptionColumn.value = _showOptionColumn
if (_mediaId) {
- mediaPrice({ mediaId: _mediaId }).then(res => {
- console.log('历史报价', res)
+ mediaPrice({ mediaId: _mediaId }).then(res => {
quotationList.value = res.data.filter(item => item.mediaType == 4)
quotationList.value.forEach(element => {
element.currentImageSrc = defaultImageSrc.value
diff --git a/src/views/mediaLibrary/components/waitingHallPrice.vue b/src/views/mediaLibrary/components/waitingHallPrice.vue
index c855892..f26385d 100644
--- a/src/views/mediaLibrary/components/waitingHallPrice.vue
+++ b/src/views/mediaLibrary/components/waitingHallPrice.vue
@@ -319,8 +319,7 @@ const handleSubmit = () => {
const getMediaPrice = (_mediaId, _showOptionColumn) => {
showOptionColumn.value = _showOptionColumn
if (_mediaId) {
- mediaPrice({ mediaId: _mediaId }).then(res => {
- console.log('历史报价', res)
+ mediaPrice({ mediaId: _mediaId }).then(res => {
quotationList.value = res.data.filter(item => item.mediaType == 2)
quotationList.value.forEach(element => {
element.currentImageSrc = defaultImageSrc.value
diff --git a/src/views/mediaLibrary/downFiles.vue b/src/views/mediaLibrary/downFiles.vue
index 3fb8161..9138786 100644
--- a/src/views/mediaLibrary/downFiles.vue
+++ b/src/views/mediaLibrary/downFiles.vue
@@ -55,8 +55,10 @@ import iconTxt from '@/assets/images/iconTxt.png'
import iconPpt from '@/assets/images/iconPpt.png'
import { mediaFiles } from "@/api/mediaLibrary"
import { downFile } from "@/api/common"
+import { addBusDownloadRecord } from "@/api/mediaDownRecord"
const { proxy } = getCurrentInstance()
+const emit = defineEmits(['downBack']);
const downFileOpen = ref(false)
// 全量媒体文件列表
const allFileList = ref([])
@@ -76,8 +78,10 @@ const fileTypeArr = ref([
{ fileType: 12, fileTypeName: 'MR和制作要求', typeFileList: [] }
])
+const downloadRecords = ref([])
+
// 判断是否为图片文件
-const isImageFile = (suffix) => {
+const isImageFile = (suffix) => {
return ['jpeg', 'jpg', 'png'].includes(suffix.toLowerCase())
}
// 单个文件下载
@@ -95,7 +99,18 @@ const handleDownFile = (fileUrl, downLoadName) => {
}
// 多文件下载
const handleDownAllFile = () => {
-
+ allFileList.value.forEach(item => {
+ downloadRecords.value.push({ filePath: item.fileUrl, fileName: item.originalFileName, state: 0 })
+ })
+ if (downloadRecords.value.length > 0) {
+ addBusDownloadRecord({ downloadRecordList: downloadRecords.value }).then(res => {
+ if (res.code == 200) {
+ downloadRecords.value = []
+ emit('downBack')
+ downFileOpen.value = false
+ }
+ })
+ }
}
// 按类型获取媒体文件列表
const getMediaFileList = (_mediaId, itemFileType) => {
@@ -109,6 +124,7 @@ const getMediaFileList = (_mediaId, itemFileType) => {
// 对外暴漏方法
const initFileList = (_open, _mediaId) => {
downFileOpen.value = true
+ allFileList.value = []
nextTick(() => {
fileTypeArr.value.forEach(item => {
getMediaFileList(_mediaId, item)
diff --git a/src/views/mediaLibrary/downRecords.vue b/src/views/mediaLibrary/downRecords.vue
new file mode 100644
index 0000000..76cf17e
--- /dev/null
+++ b/src/views/mediaLibrary/downRecords.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/mediaLibrary/importPrice.vue b/src/views/mediaLibrary/importPrice.vue
index 7879fe2..dcc0b4c 100644
--- a/src/views/mediaLibrary/importPrice.vue
+++ b/src/views/mediaLibrary/importPrice.vue
@@ -39,14 +39,12 @@ const mediaType = ref(null)
const docUploadList = ref([])
// 自定义上传文件资料
-const requestDocUpload = (options) => {
- console.log('options', options)
+const requestDocUpload = (options) => {
proxy.$modal.loading('正在上传文件,请耐心等待...')
const { file } = options
var formData = new FormData();
formData.append('mediaType', mediaType.value);
- formData.append('file', file);
- console.log('formData', formData)
+ formData.append('file', file);
importPriceByExcel(formData).then(res => {
if (res.code == 200) {
proxy.$modal.msgSuccess("导入成功")
diff --git a/src/views/mediaLibrary/index.vue b/src/views/mediaLibrary/index.vue
index 01c0f99..a9c9834 100644
--- a/src/views/mediaLibrary/index.vue
+++ b/src/views/mediaLibrary/index.vue
@@ -259,18 +259,18 @@
-
+
-
-
+