磁盘容量对接
This commit is contained in:
@@ -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++
|
||||
|
||||
Reference in New Issue
Block a user