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