Commit 1f63baee by 袁成

fix文件分组

parent 87db52dc
...@@ -61,10 +61,11 @@ export default { ...@@ -61,10 +61,11 @@ export default {
async getFileLList() { async getFileLList() {
const url = `/common/attachment/owner/00000000-0000-0000-0000-000000000000` const url = `/common/attachment/owner/00000000-0000-0000-0000-000000000000`
const { data } = await GMS.$http.get(url) const { data } = await GMS.$http.get(url)
if (this.groupId === 'rbc-0') {
this.fileList = data
} else {
this.fileList = data.filter(item => item.category === this.groupId) this.fileList = data.filter(item => item.category === this.groupId)
console.log('groupId', this.groupId) }
console.log('fileList', this.fileList)
console.log({ data })
}, },
handleMore() { handleMore() {
this.modalShow = true this.modalShow = true
......
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
}, },
fileGroup: [ fileGroup: [
{ {
label: '默认分组', label: '全部',
value: '0' value: '0'
}, },
{ {
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
tableData: [], tableData: [],
fileGroup: [ fileGroup: [
{ {
label: '默认分组', label: '全部',
value: '0' value: '0'
}, },
{ {
...@@ -131,13 +131,17 @@ export default { ...@@ -131,13 +131,17 @@ export default {
}, },
handleUpload(){ handleUpload(){
this.$refs.upload.modalShow = true this.$refs.upload.modalShow = true
this.$refs.upload.files = []
}, },
async getTableData() { async getTableData() {
const url = `/common/attachment/owner/00000000-0000-0000-0000-000000000000` const url = `/common/attachment/owner/00000000-0000-0000-0000-000000000000`
const { data } = await GMS.$http.get(url) const { data } = await GMS.$http.get(url)
let category = 'rbc-' + this.fileGroupId let category = 'rbc-' + this.fileGroupId
if (this.fileGroupId === '0') {
this.tableData = data
} else {
this.tableData = data.filter(item => item.category === category) this.tableData = data.filter(item => item.category === category)
console.log({ data }) }
}, },
}, },
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment