|
@@ -134,7 +134,6 @@ export default {
|
|
|
} else if (this.uploadedList[index].blob) {
|
|
|
this.deleteFile(index)
|
|
|
}
|
|
|
- console.log(this.uploadedList[index])
|
|
|
},
|
|
|
//删除文件
|
|
|
deleteFile(index) {
|
|
@@ -206,7 +205,7 @@ export default {
|
|
|
let fileType = this.getFileType(file.name)
|
|
|
//上传文件
|
|
|
let fileInfo = {
|
|
|
- url: this.urlString + '/' + this.containerName + '/' + fileType + '/' + file.name,
|
|
|
+ url: '',
|
|
|
name: file.name,
|
|
|
size: file.size,
|
|
|
loadedBytes: 0,
|
|
@@ -240,7 +239,6 @@ export default {
|
|
|
return item.blob
|
|
|
})
|
|
|
blobs = blobs.filter(item => { return item })
|
|
|
- console.log('取消', blobs)
|
|
|
this.containerClient.deleteBlobBatch(blobs).then().finally(() => {
|
|
|
blobsFile.forEach((item) => {
|
|
|
if (item.type == 'image') {
|
|
@@ -310,7 +308,6 @@ export default {
|
|
|
//已完成上传操作,关闭对话框、emit
|
|
|
if (this.isComplete) {
|
|
|
//保存Blob描述信息
|
|
|
- //API设计可以优化,如果API参数为对象数据,这里可以避免for循环里面发起请求影响性能 (API已优化)
|
|
|
let requestData
|
|
|
if (this.routerScope == 'school') {
|
|
|
requestData = {
|
|
@@ -400,6 +397,7 @@ export default {
|
|
|
}).then(
|
|
|
res => {
|
|
|
this.uploadedList[index].status = 1
|
|
|
+ this.uploadedList[index].url = res.url
|
|
|
this.$set(this.uploadedList[index], 'isExist', res.isExist)
|
|
|
if (res.isExist) this.uploadedList[index].name = res.name
|
|
|
this.uploadedList[index].blob = res.blob
|
|
@@ -423,7 +421,7 @@ export default {
|
|
|
let filename = res.name.substring(0, res.name.lastIndexOf('.'))
|
|
|
this.containerClient.deleteBlob(delBlob, res.size)
|
|
|
this.uploadedList[index].blob = `/res/${filename}/index.json`
|
|
|
- this.uploadedList[index].url = `${this.urlString}/${this.containerName}/res/${filename}/index.json`
|
|
|
+ this.uploadedList[index].url = this.uploadedList[index].url.replace('.pptx','/index.json').replace('.PPTX','/index.json')
|
|
|
this.uploadedList[index].extension = 'HTEX'
|
|
|
this.uploadedList[index].name = filename + '.HTEX'
|
|
|
this.uploadedList[index].type = 'res'
|
|
@@ -438,7 +436,6 @@ export default {
|
|
|
this.counterReduce()
|
|
|
}
|
|
|
} else if (extension == 'HTEX') {
|
|
|
- console.log('HTEX', res)
|
|
|
let delBlob = res.blob
|
|
|
let parseUrl = res.url
|
|
|
this.uploadedList[index].blob = `/res/${res.name.replace('.htex', '').replace('.HTEX', '')}/index.json`
|