上传图片

This commit is contained in:
Mrtangl 2022-04-18 17:02:48 +08:00
parent 099209c484
commit 7416b97307
3 changed files with 9 additions and 6 deletions

View File

@ -10,7 +10,7 @@ export function apiFileCateEdit(params: { id: number; name: string }) {
// 文件分类删除 // 文件分类删除
export function apiFileCateDelete(params: { id: number }) { export function apiFileCateDelete(params: { id: number }) {
return request.post('/album/albumDel', params) return request.post('/album/cateDel', params)
} }
// 文件分类列表 // 文件分类列表

View File

@ -16,7 +16,7 @@ export function useCate(typeValue: Ref<any>) {
// 分组列表 // 分组列表
const cateLists: Ref<any[]> = ref([]) const cateLists: Ref<any[]> = ref([])
// 选中的分组id // 选中的分组id
const cateId = ref('') const cateId = ref('0')
// 添加分组 // 添加分组
const handleAddCate = (val: string) => { const handleAddCate = (val: string) => {
apiFileCateAdd({ apiFileCateAdd({
@ -54,14 +54,14 @@ export function useCate(typeValue: Ref<any>) {
const item: any[] = [ const item: any[] = [
{ {
name: '全部', name: '全部',
id: '' id: '0'
}, },
{ {
name: '未分组', name: '未分组',
id: 0 id: 0
} }
] ]
cateLists.value = res?.lists cateLists.value = res ?? []
cateLists.value.unshift(...item) cateLists.value.unshift(...item)
resolve(cateLists) resolve(cateLists)
}) })
@ -114,7 +114,7 @@ export function useFile(cateId: Ref<string>, type: Ref<any>, limit: Ref<number>)
let ids = select.value.map((item: any) => item.id) let ids = select.value.map((item: any) => item.id)
apiFileMove({ apiFileMove({
ids, ids,
cid: moveId.value || 0 cid: moveId.value
}).then(res => { }).then(res => {
moveId.value = 0 moveId.value = 0
getFileList() getFileList()

View File

@ -200,7 +200,10 @@ const getSystemCache = async () => {
statisticalData.commandChartOption.series[0].data = res.commandStats statisticalData.commandChartOption.series[0].data = res.commandStats
statisticalData.memoryChartOption.series[0].data = res.info.used_memory_human statisticalData.memoryChartOption.series[0].data = res.info.used_memory_human
console.log(res.info.used_memory_human, '-------------------------') console.log(
statisticalData.memoryChartOption.series[0].data,
'-------------------------+'
)
}) })
.catch((err: any) => { .catch((err: any) => {
console.log('err', err) console.log('err', err)