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