|
|
|
@ -1,4 +1,3 @@
@@ -1,4 +1,3 @@
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<div> |
|
|
|
|
<BasicTable @register="registerTable"> |
|
|
|
@ -65,7 +64,7 @@ const [registerModal, { openModal }] = useModal();
@@ -65,7 +64,7 @@ const [registerModal, { openModal }] = useModal();
|
|
|
|
|
const [registerTable, { reload, expandAll, collapseAll }] = useTable({ |
|
|
|
|
title: '项目列表', |
|
|
|
|
api: listProject, |
|
|
|
|
rowKey: 'projectId', |
|
|
|
|
rowKey: 'id', |
|
|
|
|
columns, |
|
|
|
|
formConfig: { |
|
|
|
|
labelWidth: 120, |
|
|
|
@ -88,7 +87,7 @@ const [registerTable, { reload, expandAll, collapseAll }] = useTable({
@@ -88,7 +87,7 @@ const [registerTable, { reload, expandAll, collapseAll }] = useTable({
|
|
|
|
|
slots: { customRender: 'action' }, |
|
|
|
|
fixed: false |
|
|
|
|
}, |
|
|
|
|
afterFetch: (result) => listToTree(result, { id: 'projectId' }) |
|
|
|
|
afterFetch: (result) => listToTree(result) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
/** 新增按钮操作,行内新增与工具栏局域新增通用 */ |
|
|
|
@ -103,7 +102,7 @@ function handleEdit(record: Recordable) {
@@ -103,7 +102,7 @@ function handleEdit(record: Recordable) {
|
|
|
|
|
|
|
|
|
|
/** 删除按钮操作,行内删除 */ |
|
|
|
|
async function handleDel(record: Recordable) { |
|
|
|
|
await delProject(record.projectId); |
|
|
|
|
await delProject(record.id); |
|
|
|
|
createMessage.success('删除成功!'); |
|
|
|
|
handleRefreshTable(); |
|
|
|
|
} |
|
|
|
|