Commit 1f63baee by 袁成

fix文件分组

parent 87db52dc
......@@ -61,10 +61,11 @@ export default {
async getFileLList() {
const url = `/common/attachment/owner/00000000-0000-0000-0000-000000000000`
const { data } = await GMS.$http.get(url)
this.fileList = data.filter(item => item.category === this.groupId)
console.log('groupId', this.groupId)
console.log('fileList', this.fileList)
console.log({ data })
if (this.groupId === 'rbc-0') {
this.fileList = data
} else {
this.fileList = data.filter(item => item.category === this.groupId)
}
},
handleMore() {
this.modalShow = true
......
......@@ -39,7 +39,7 @@ export default {
},
fileGroup: [
{
label: '默认分组',
label: '全部',
value: '0'
},
{
......
......@@ -76,7 +76,7 @@ export default {
tableData: [],
fileGroup: [
{
label: '默认分组',
label: '全部',
value: '0'
},
{
......@@ -131,13 +131,17 @@ export default {
},
handleUpload(){
this.$refs.upload.modalShow = true
this.$refs.upload.files = []
},
async getTableData() {
const url = `/common/attachment/owner/00000000-0000-0000-0000-000000000000`
const { data } = await GMS.$http.get(url)
let category = 'rbc-' + this.fileGroupId
this.tableData = data.filter(item => item.category === category)
console.log({ data })
if (this.fileGroupId === '0') {
this.tableData = data
} else {
this.tableData = data.filter(item => item.category === category)
}
},
},
}
......
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