From ca9448b60fd8adb541f6a181f68ac909bd6dc766 Mon Sep 17 00:00:00 2001 From: 24kycj <1637269896@qq.com> Date: Wed, 13 Nov 2024 19:43:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A3=81=E7=9B=98=E5=AE=B9=E9=87=8F=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/workAdd/workAdd.vue | 35 ++++++++++++--------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/renderer/components/workAdd/workAdd.vue b/src/renderer/components/workAdd/workAdd.vue index 7a8ae44..50b7ab6 100644 --- a/src/renderer/components/workAdd/workAdd.vue +++ b/src/renderer/components/workAdd/workAdd.vue @@ -272,35 +272,42 @@ export default { task_freq: 1 } }, - // CD类型:CD:1,DVD:2, DVD_DL:3,BD:4,BD_DL:5,BD_TL:6,BD_QL:7 + // CD类型:CD 700MB:1,DVD 4.7GB:2, DVD_DL 8.5GB:3,BD 25GB:4,BD_DL 50GB:5,BD_TL 100GB:6,BD_QL 128GB:7 cd_types: [ { value: 1, - label: 'CD' + label: 'CD 700MB', + size: 700*1024*1024 }, { value: 2, - label: 'DVD' + label: 'DVD 4.7GB', + size: 4.7*1024*1024*1024 }, { value: 3, - label: 'DVD_DL' + label: 'DVD_DL 8.5GB', + size: 8.5*1024*1024*1024 }, { value: 4, - label: 'BD' + label: 'BD 25GB', + size: 25*1024*1024*1024 }, { value: 5, - label: 'BD_DL' + label: 'BD_DL 50GB', + size: 50*1024*1024*1024 }, { value: 6, - label: 'BD_TL' + label: 'BD_TL 100GB', + size: 100*1024*1024*1024 }, { value: 7, - label: 'BD_QL' + label: 'BD_QL 128GB', + size: 128*1024*1024*1024 } ], copyList: [], @@ -380,8 +387,7 @@ export default { name: '文件修改时间', desc: '按照文件修改时间进行升序分盘' } - ], - diskSize: 512*1024*1024 + ] } }, watch: { @@ -558,16 +564,17 @@ export default { return } if (this.setForm.isArrow) { + const diskSize = this.cd_types.find(item => item.value === this.form.cd_type).size let overList = [] for (let i = 0; i < fileList.length; i++) { - if (fileList[i].size > this.diskSize) { + if (fileList[i].size > diskSize) { overList.push(fileList[i].name) } } if (overList.length) { const fileNames = overList.join(',') this.$notify({ - message: `文件${fileNames} 大小超过磁盘容量${this.$filterSize(this.diskSize)},请重新选择文件!`, + message: `文件${fileNames} 大小超过磁盘容量${this.$filterSize(diskSize)},请重新选择文件!`, type: 'warning' }) return @@ -594,7 +601,7 @@ export default { path_file: [] } for (let i = 0; i < fileList.length; i++) { - if (fileList[i].size > this.diskSize) { + if (fileList[i].size > diskSize) { this.$notify({ message: `文件${fileList[i].name} 大小超过设备容量,请重新选择文件!`, type: 'warning' @@ -602,7 +609,7 @@ export default { return } total_size += fileList[i].size - if (total_size > this.diskSize) { + if (total_size > diskSize) { that.form.ass_task.push(task) total_size = 0 index++