Browse Source

#I1FWLV bug:修复图片素材库批量上传多张,只会成功1-2张。

master
xwb 4 years ago
parent
commit
359029c673
  1. 20
      src/components/material/index.vue

20
src/components/material/index.vue

@ -145,12 +145,12 @@
</template>
<script>
import { getPage as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
import { getPage, addObj, delObj, putObj } from '@/api/tools/material'
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
import { getPage as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
import { getPage, addObj, delObj, putObj } from '@/api/tools/material'
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
export default {
export default {
name: 'MaterialList',
props: {
//
@ -199,6 +199,7 @@
materialgroupObj: {},
materialgroupLoading: false,
tableData: [],
resultNumber: 0,
page: {
total: 0, //
currentPage: 1, //
@ -419,6 +420,7 @@
})
},
handleProgress(event, file, fileList) {
console.log(event)
// let uploadProgress = file.percentage.toFixed(0)
// this.uploadProgress = uploadProgress
},
@ -430,8 +432,12 @@
groupId: this.groupId != '-1' ? this.groupId : null,
name: file.name,
url: response.link
}).then(function() {
}).then(() => {
this.resultNumber++
if (fileList.length === this.resultNumber) {
that.getPage(that.page)
this.resultNumber = 0
}
})
},
beforeUpload(file) {
@ -457,7 +463,7 @@
this.listDialogVisible = false
}
}
}
}
</script>
<style lang="scss" scoped>

Loading…
Cancel
Save