资源管理页面微调

This commit is contained in:
caozehui
2026-05-28 14:37:40 +08:00
parent 0b26de20b9
commit 0090a922c6
4 changed files with 60 additions and 18 deletions

View File

@@ -16,6 +16,15 @@
>
播放
</el-button>
<el-button
v-auth.resourceManage="'edit'"
type="primary"
link
:icon="EditPen"
@click="openEditDialog(scope.row)"
>
编辑
</el-button>
</template>
</ProTable>
</div>
@@ -25,7 +34,7 @@
<script setup lang="tsx" name="resourceManage">
import { reactive, ref } from 'vue'
import { CirclePlus, VideoPlay } from '@element-plus/icons-vue'
import { CirclePlus, EditPen, VideoPlay } from '@element-plus/icons-vue'
import ProTable from '@/components/ProTable/index.vue'
import type { ColumnProps, ProTableInstance } from '@/components/ProTable/interface'
import type { ResourceManage } from '@/api/resourceManage/interface'
@@ -97,7 +106,7 @@ const columns = reactive<ColumnProps<ResourceManage.ResResourceManage>[]>([
{
prop: 'relativePath',
label: '路径',
minWidth: 260,
width: 200,
showOverflowTooltip: true
},
{
@@ -112,11 +121,15 @@ const columns = reactive<ColumnProps<ResourceManage.ResResourceManage>[]>([
width: 180,
render: scope => formatDateTime(scope.row.createTime)
},
{ prop: 'operation', label: '操作', fixed: 'right', width: 100 }
{ prop: 'operation', label: '操作', fixed: 'right', width: 180 }
])
const openAddDialog = () => {
resourceManagePopup.value?.open()
resourceManagePopup.value?.open('add')
}
const openEditDialog = (row: ResourceManage.ResResourceManage) => {
resourceManagePopup.value?.open('edit', row)
}
const handlePlay = async (row: ResourceManage.ResResourceManage) => {