优化个人中心表格显示和操作功能

This commit is contained in:
wangqiao
2025-09-13 10:17:32 +08:00
parent 2ac31bc1a3
commit 164690bcce
2 changed files with 17 additions and 7 deletions

View File

@ -4,12 +4,12 @@
<el-table-column prop="date" label="文件信息"> <el-table-column prop="date" label="文件信息">
<template #default="scope"> <template #default="scope">
<div class="flex items-center"> <div class="flex items-center">
<el-image :src="scope.row.iconUrl" fit="cover" alt="" srcset="" class="h-91px w-181px rd-4px" /> <el-image :src="scope.row.iconUrl" fit="contain" alt="" srcset="" class="h-91px w-181px rd-4px" />
<div class="ml-17px"> <div class="ml-17px">
<div class="text-16px text-[#333333] font-normal">{{ scope.row.title }}</div> <div class="text-16px text-[#333333] font-normal">{{ scope.row.title }}</div>
<div class="text-14px text-[#333333] font-normal my-10px!"> <div class="text-14px text-[#333333] font-normal my-10px!">
{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} {{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
<span class="ml-10px">{{ scope.row.sizecountry }}</span> <span class="ml-4px color-#999">{{ scope.row.isDomestic === 1 ? '中国' : scope.row.country }}</span>
</div> </div>
<div class="flex items-center"> <div class="flex items-center">
<div class="flex items-center"> <div class="flex items-center">
@ -37,7 +37,9 @@
<el-table-column prop="address" label="操作" width="100"> <el-table-column prop="address" label="操作" width="100">
<template #default="scope"> <template #default="scope">
<el-link v-if="scope.row.status === 4" type="primary" :underline="false" @click="handleXiaJia(scope.row)">下架</el-link> <el-link v-if="scope.row.status === 4" type="primary" :underline="false" @click="handleXiaJia(scope.row)">下架</el-link>
<el-link type="primary" :underline="false" @click="handleDelete(scope.row)">删除</el-link> <el-link type="danger" :underline="false" @click="handleDelete(scope.row)">删除</el-link>
<el-link type="primary" :underline="false" @click="handlePreview(scope.row)">查看</el-link>
<el-link type="primary" :underline="false" @click="handleEdit(scope.row)">编辑</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -92,11 +94,11 @@
case 1: case 1:
return '草稿' return '草稿'
case 2: case 2:
return '提交审核' return '审核'
case 3: case 3:
return '审核成功' return '发布成功'
case 4: case 4:
return '下架' return '退稿'
default: default:
return '' return ''
} }
@ -121,6 +123,14 @@
} }
}) })
} }
const handlePreview = (row: any) => {
window.open(row.url)
}
const handleEdit = (row: any) => {
window.open(`/personal-center/edit-resource?id=${row.id}`)
}
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>

View File

@ -14,7 +14,7 @@ export const generateRandomString = (length: number) => {
// QQ登录 // QQ登录
export const handleLoginQQ = () => { export const handleLoginQQ = () => {
const appId = QQ_APP_ID // APP ID const appId = QQ_APP_ID // APP ID
const redirectUri = encodeURIComponent('https://tuxixi.net/index?type=35') // 回调地址 const redirectUri = encodeURIComponent('https://tuxixi.net?type=35') // 回调地址
const state = generateRandomString(16) // 生成随机state const state = generateRandomString(16) // 生成随机state
// 存储state用于后续验证 // 存储state用于后续验证
localStorage.setItem('qq_login_state', state) localStorage.setItem('qq_login_state', state)