This commit is contained in:
dengweisheng 2023-07-12 15:58:27 +08:00
parent 583646d0a8
commit 2867719930
1 changed files with 25 additions and 21 deletions

View File

@ -4,8 +4,11 @@
ref="TableBodyRef"> ref="TableBodyRef">
<!-- 表格插槽使用 --> <!-- 表格插槽使用 -->
<template #state="{ currentCol, currentData }"> <template #isRequired="{ currentCol, currentData }">
<span>{{ currentData == '0' ? "未配置" : "已配置" }}</span> <span>{{ currentData == '0' ? "否" : "是" }}</span>
</template>
<template #isPk="{ currentCol, currentData }">
<span>{{ currentData == '0' ? "否" : "是" }}</span>
</template> </template>
</TableBody> </TableBody>
@ -86,23 +89,19 @@ const data = reactive({
// width: 100, // width: 100,
// }, // },
{ {
name: "deptId", name: "sortNo",
label: "所属部门", label: "排序",
show: true,
},
{
name: "projectId",
label: "所属项目",
show: true, show: true,
sortable: true,
}, },
{ {
name: "name", name: "name",
label: "中文名", label: "中文字段名",
show: true, show: true,
}, },
{ {
name: "ename", name: "ename",
label: "英文名", label: "英文字段名",
show: true, show: true,
}, },
{ {
@ -111,17 +110,22 @@ const data = reactive({
show: true, show: true,
}, },
{ {
type: "slot", // slot 使 name: "type",
name: "state", // name label: "字段类型",
label: "配置状态", show: true,
show: true, //
// sortable: true, // Boolean | 'custom' ( 'custom' handleTableSort )
// width: 100,
}, },
{ {
name: "dataNum", type: "slot", // slot 使
label: "数据量(只读)", name: "isPk", // name
label: "是否主键",
show: true, //
},
{
type: "slot",
name: "isRequired",
label: "是否必填",
show: true, show: true,
}, },
], ],
@ -190,7 +194,7 @@ const handleEdit = (val) => {
formDialogStatus.value = 'edit' formDialogStatus.value = 'edit'
const id = val[0].id const id = val[0].id
FormDialogData.title = '编辑' FormDialogData.title = '编辑'
http.get(`/api/system/metadata/${id}`).then(response => { http.get(`/api/metadataColumn/${id}`).then(response => {
FormDialogData.formJsonData = response.data FormDialogData.formJsonData = response.data
formDialog.value = true formDialog.value = true
}) })
@ -217,7 +221,7 @@ const handleDetail = (val) => {
formDialogStatus.value = 'detail' formDialogStatus.value = 'detail'
const id = val[0].id const id = val[0].id
FormDialogData.title = '详情' FormDialogData.title = '详情'
http.get(`/api/metadataColumn`, { id }).then(response => { http.get(`/api/metadataColumn/${id}`).then(response => {
FormDialogData.formJsonData = response.data FormDialogData.formJsonData = response.data
formDialog.value = true formDialog.value = true
FormDialogData.formJosnDisabled = true FormDialogData.formJosnDisabled = true