70 lines
1.1 KiB
JavaScript
70 lines
1.1 KiB
JavaScript
import API from "@/api";
|
|
|
|
//文件选择器配置
|
|
|
|
export default {
|
|
apiObj: API.common.upload,
|
|
menuApiObj: API.common.file.menu,
|
|
listApiObj: API.common.file.list,
|
|
successCode: 200,
|
|
maxSize: 30,
|
|
max: 99,
|
|
uploadParseData: function (res) {
|
|
return {
|
|
id: res.id,
|
|
fileName: res.name,
|
|
url: res.path
|
|
}
|
|
},
|
|
listParseData: function (res) {
|
|
return {
|
|
rows: res.results,
|
|
total: res.count,
|
|
// msg: res.message,
|
|
// code: res.code
|
|
}
|
|
},
|
|
request: {
|
|
page: 'page',
|
|
pageSize: 'page_size',
|
|
keyword: 'keyword',
|
|
menuKey: 'groupId'
|
|
},
|
|
menuProps: {
|
|
key: 'id',
|
|
label: 'label',
|
|
children: 'children'
|
|
},
|
|
fileProps: {
|
|
key: 'id',
|
|
fileName: 'fileName',
|
|
url: 'url'
|
|
},
|
|
files: {
|
|
doc: {
|
|
icon: 'sc-icon-file-word-2-fill',
|
|
color: '#409eff'
|
|
},
|
|
docx: {
|
|
icon: 'sc-icon-file-word-2-fill',
|
|
color: '#409eff'
|
|
},
|
|
xls: {
|
|
icon: 'sc-icon-file-excel-2-fill',
|
|
color: '#67C23A'
|
|
},
|
|
xlsx: {
|
|
icon: 'sc-icon-file-excel-2-fill',
|
|
color: '#67C23A'
|
|
},
|
|
ppt: {
|
|
icon: 'sc-icon-file-ppt-2-fill',
|
|
color: '#F56C6C'
|
|
},
|
|
pptx: {
|
|
icon: 'sc-icon-file-ppt-2-fill',
|
|
color: '#F56C6C'
|
|
}
|
|
}
|
|
}
|