|
@@ -961,8 +961,11 @@
|
|
|
let privateSas = await this.$tools.getPrivateSas()
|
|
|
let privateBlobTool = new BlobTool(privateSas.url, privateSas.name, privateSas.sas,
|
|
|
'private')
|
|
|
- let toClient = privateToSchool ? this.containerClient : privateBlobTool
|
|
|
- let fromClient = privateToSchool ? privateBlobTool : this.containerClient
|
|
|
+ let schoolSas = await this.$tools.getSchoolSas()
|
|
|
+ let schoolBlobTool = new BlobTool(schoolSas.url, schoolSas.name, schoolSas.sas,
|
|
|
+ 'school')
|
|
|
+ let toClient = privateToSchool ? schoolBlobTool : privateBlobTool
|
|
|
+ let fromClient = privateToSchool ? privateBlobTool : schoolBlobTool
|
|
|
const itemJsonFile = await this.$evTools.createBlobItem(pItem);
|
|
|
let file = new File([JSON.stringify(itemJsonFile)], pItem.id + ".json", {
|
|
|
type: "",
|
|
@@ -1008,7 +1011,7 @@
|
|
|
pItem.gradeIds = [this.curVolume.gradeId + '']
|
|
|
pItem.scope = 'school'
|
|
|
pItem.code = this.$store.state.userInfo.schoolCode
|
|
|
- promiseArr.push(this.saveItemToBlob(pItem, false))
|
|
|
+ promiseArr.push(this.saveItemToBlob(pItem, true))
|
|
|
})
|
|
|
Promise.all(promiseArr).then(result => {
|
|
|
list.forEach(i => {
|
|
@@ -1040,7 +1043,7 @@
|
|
|
pItem.gradeIds = null
|
|
|
pItem.scope = 'private'
|
|
|
pItem.code = this.$store.state.userInfo.TEAMModelId
|
|
|
- promiseArr.push(this.saveItemToBlob(pItem, true))
|
|
|
+ promiseArr.push(this.saveItemToBlob(pItem, false))
|
|
|
})
|
|
|
Promise.all(promiseArr).then(result => {
|
|
|
list.forEach(i => {
|
|
@@ -1292,12 +1295,10 @@
|
|
|
this.isRelateLoading = true
|
|
|
Promise.all([this.onSelectFile(), this.onSelectQuestion(), this.onSelectPaper()]).then(result => {
|
|
|
console.log(result)
|
|
|
- setTimeout(() => {
|
|
|
- this.isRelateLoading = false
|
|
|
- this.isRelateContentModal = false
|
|
|
- this.hasModify = true
|
|
|
- this.modifyIdArr.push(this.curChapter.data.id)
|
|
|
- }, 500)
|
|
|
+ this.isRelateLoading = false
|
|
|
+ this.isRelateContentModal = false
|
|
|
+ this.hasModify = true
|
|
|
+ this.modifyIdArr.push(this.curChapter.data.id)
|
|
|
}).catch(err => {
|
|
|
console.log(err)
|
|
|
this.isRelateLoading = false
|