Commit 2b66ad5c authored by 罗林杰's avatar 罗林杰

修改元模型

parent a743c390
......@@ -9,6 +9,7 @@
:fieldNames="{ key: 'businessId', title: 'modelName' }"
@select="handleSelect"
/>
<ModelDetailModal @register="registerModal" />
</div>
</template>
<script lang="ts" setup>
......@@ -16,6 +17,8 @@
import { BasicTree, TreeActionType, TreeItem } from '@/components/Tree';
import { Nullable } from '@vben/types';
import { TreeData } from '@/views/metaModel/knowledgeModel/modelData';
import ModelDetailModal from './modelDetailModal.vue';
import { useModal } from '@/components/Modal';
defineOptions({ name: 'DeptTree' });
......@@ -30,7 +33,7 @@
}
return tree;
}
const [registerModal, { openModal }] = useModal();
async function fetch() {
const data = TreeData;
treeData.value = handleTree(data, 'businessId', undefined, undefined, undefined);
......@@ -68,7 +71,12 @@
}
function handleSelect(keys) {
emit('select', keys[0]);
// emit('select', keys[0]);
if (keys[0] >= 200) {
openModal(true, {
isUpdate: false,
});
}
}
onMounted(() => {
......
import { getAllRoleList } from '@/api/system/role/role';
import { BasicColumn, FormSchema } from '@/components/Table';
import { h } from 'vue';
import { Tag, Switch } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage';
import { changeFlagApi } from '@/api/system/user/user';
// 引入开关组件
type CheckedType = boolean | string | number;
export const columns: BasicColumn[] = [
{
title: '属性名称',
dataIndex: 'name',
width: 150,
},
{
title: '描述',
dataIndex: 'description',
width: 150,
},
{
title: '属性英文名',
dataIndex: 'englishName',
width: 150,
},
{
title: '是否必填',
dataIndex: 'isWrite',
width: 150,
customRender: ({ record }) => (record.isWrite === '1' ? '是' : '否'),
},
{
title: '是否显示',
dataIndex: 'isShow',
width: 150,
customRender: ({ record }) => (record.isShow === '1' ? '是' : '否'),
},
{
title: '类型',
dataIndex: 'type',
width: 200,
customRender: ({ record }) => {
const typeMap = {
'1': '字符串',
'2': '布尔',
'3': '整型',
'4': '浮点型',
};
return typeMap[record.type];
},
},
];
......@@ -69,79 +69,79 @@ export const TreeData: any[] = [
updateDate: '2024-10-24 10:04:04',
},
{
"delFlag" : "0",
"flag" : "1",
"businessId" : 201,
"modelName" : "argodb元模型",
"parentId" : 101,
"code:": "002",
"ancestors" : "0,100,101",
"orderNum" : 1,
delFlag: '0',
flag: '1',
businessId: 201,
modelName: 'argodb元模型',
parentId: 101,
'code:': '002',
ancestors: '0,100,101',
orderNum: 1,
// "children" : [ ],
"selectType" : null,
"holder":"admin",
"createDate": "2024-10-24 10:04:04",
"updateDate": "2024-10-24 10:04:04",
},
{
"delFlag" : "0",
"flag" : "1",
"businessId" : 202,
"modelName" : "inceptor元模型",
"parentId" : 101,
"code:": "002",
"ancestors" : "0,100,101",
"orderNum" : 1,
selectType: null,
holder: 'admin',
createDate: '2024-10-24 10:04:04',
updateDate: '2024-10-24 10:04:04',
},
{
delFlag: '0',
flag: '1',
businessId: 202,
modelName: 'inceptor元模型',
parentId: 101,
'code:': '002',
ancestors: '0,100,101',
orderNum: 1,
// "children" : [ ],
"selectType" : null,
"holder":"admin",
"createDate": "2024-10-24 10:04:04",
"updateDate": "2024-10-24 10:04:04",
},
{
"delFlag" : "0",
"flag" : "1",
"businessId" : 203,
"modelName" : "acc元模型",
"parentId" : 102,
"code:": "002",
"ancestors" : "0,100,102",
"orderNum" : 1,
selectType: null,
holder: 'admin',
createDate: '2024-10-24 10:04:04',
updateDate: '2024-10-24 10:04:04',
},
{
delFlag: '0',
flag: '1',
businessId: 203,
modelName: 'acc元模型',
parentId: 102,
'code:': '002',
ancestors: '0,100,102',
orderNum: 1,
// "children" : [ ],
"selectType" : null,
"holder":"admin",
"createDate": "2024-10-24 10:04:04",
"updateDate": "2024-10-24 10:04:04",
},
{
"delFlag" : "0",
"flag" : "1",
"businessId" : 204,
"modelName" : "ctor元模型",
"parentId" : 102,
"code:": "002",
"ancestors" : "0,100,102",
"orderNum" : 1,
selectType: null,
holder: 'admin',
createDate: '2024-10-24 10:04:04',
updateDate: '2024-10-24 10:04:04',
},
{
delFlag: '0',
flag: '1',
businessId: 204,
modelName: 'ctor元模型',
parentId: 102,
'code:': '002',
ancestors: '0,100,102',
orderNum: 1,
// "children" : [ ],
"selectType" : null,
"holder":"admin",
"createDate": "2024-10-24 10:04:04",
"updateDate": "2024-10-24 10:04:04",
},
{
"delFlag" : "0",
"flag" : "1",
"businessId" : 205,
"modelName" : "octp元模型",
"parentId" : 103,
"code:": "002",
"ancestors" : "0,100,103",
"orderNum" : 1,
selectType: null,
holder: 'admin',
createDate: '2024-10-24 10:04:04',
updateDate: '2024-10-24 10:04:04',
},
{
delFlag: '0',
flag: '1',
businessId: 205,
modelName: 'octp元模型',
parentId: 103,
'code:': '002',
ancestors: '0,100,103',
orderNum: 1,
// "children" : [ ],
"selectType" : null,
"holder":"admin",
"createDate": "2024-10-24 10:04:04",
"updateDate": "2024-10-24 10:04:04",
selectType: null,
holder: 'admin',
createDate: '2024-10-24 10:04:04',
updateDate: '2024-10-24 10:04:04',
},
];
......@@ -247,108 +247,117 @@ export const editTableData: any[] = [
businessId: 1,
name: '数据源',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_DATASOURCE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '库名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_DB_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '资产类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_DS_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表注释',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_COMMENT',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表中文名',
description: '',
englishName: 'MD_TAB_DESC',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '存储类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_STORE_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '是否为事务表',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_IS_TRANS',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '创建时间',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_CREATE_TIME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '创建者',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_CREATE_USER',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '发布时间',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_PUBLISH_TIME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '发布者',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_PUBLISH_USER',
isWrite: '0',
isShow: '0',
type: '1',
},
];
......@@ -357,63 +366,63 @@ export const editColumnData: any[] = [
businessId: 1,
name: '列名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '字段类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '字段类型参数',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_TYPE_PARAM',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '长度',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_LENGTH',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '精度',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_PRECISION',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '是否可为空',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_IS_BULL',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '字段注释',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_COMMENT',
isWrite: '0',
isShow: '0',
type: '1',
},
];
......@@ -422,36 +431,36 @@ export const editBucketData: any[] = [
businessId: 1,
name: '分桶数',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_NUM',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分桶字段',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_KEY',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '排序字段',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_SORTED',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '排序方式',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_SORTED',
isWrite: '0',
isShow: '0',
type: '1',
},
];
......@@ -460,36 +469,36 @@ export const editAreaData: any[] = [
businessId: 1,
name: '分区类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_PARTITION_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分区字段',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_PARTITION_COL_KEY',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分区名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_PARTITION_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分区值',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_PARTITION_VALUE',
isWrite: '0',
isShow: '0',
type: '1',
},
];
<template>
<BasicModal
width="80%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<PageWrapper title="" class="content-padding" contentBackground>
<template #footer>
<div
style="
display: flex;
justify-content: space-between;
align-items: flex-end;
background-color: white;
padding: 0 5px 20px;
"
>
<div
style="
display: flex;
flex-direction: column;
justify-content: flex-start;
padding-left: 5px;
margin-top: -100px;
"
>
<div style="font-weight: bold">关联资产类型</div>
<div style="margin-top: 20px">数据资产类型:Inceptor表</div>
</div>
<div style="cursor: pointer">
<Icon
icon="ant-design:appstore-outlined"
style="margin-right: 10px"
:size="30"
@click="handleSetButton"
:color="'#1091FE'"
/>
<Icon
icon="ant-design:edit-outlined"
:size="30"
@click="handleUpdateButton"
:color="'#1091FE'"
/>
</div>
</div>
</template>
<BasicTable @register="registerTable1" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="表信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
<BasicTable @register="registerTable2" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="分桶信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
<BasicTable @register="registerTable3" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="分区信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
<BasicTable @register="registerTable4" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="列信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
</PageWrapper>
</BasicModal>
</template>
<script lang="ts" setup>
import { PageWrapper } from '@/components/Page';
import { ref, computed, onMounted } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { router } from '@/router';
import { useTable, BasicTable } from '@/components/Table';
import { columns } from '@/views/metaModel/knowledgeModel/detailModel.data';
import {
editAreaData,
editColumnData,
editBucketData,
editTableData,
} from '@/views/metaModel/knowledgeModel/modelData';
import Icon from '@/components/Icon/Icon.vue';
import { useGo } from '@/hooks/web/usePage';
defineOptions({ name: 'ModelModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const isMove = ref(false);
const rowId = ref('');
const tableData = ref([]);
const columnTableData = ref([]);
const bucketTableData = ref([]);
const areaTableData = ref([]);
const go = useGo();
const getTitle = computed(() => 'Inceptor元模型');
const [registerTable1, { reload1, getForm1 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: tableData.value.length,
code: '',
message: '',
data: [],
};
console.log('tableData.value:', tableData.value);
return { ...response, data: tableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
const [registerTable2, { reload2, getForm2 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: bucketTableData.value.length,
code: '',
message: '',
data: bucketTableData.value,
};
return { ...response, data: bucketTableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
const [registerTable3, { reload3, getForm3 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: areaTableData.value.length,
code: '',
message: '',
data: areaTableData.value,
};
return { ...response, data: areaTableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
const [registerTable4, { reload4, getForm4 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: columnTableData.value.length,
code: '',
message: '',
data: columnTableData.value,
};
return { ...response, data: columnTableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false, showCancelBtn: false, showOkBtn: false });
});
/**确定按钮*/
async function handleSubmit() {
router.push({
path: '/metaModel/physicsModel/EditRowTable',
query: {},
});
closeModal();
}
/** 删除按钮*/
function handleDelete(record: Recordable) {
createMessage.success('删除成功!');
}
/** 配置按钮*/
function handleSetButton() {
console.log('1111');
}
/** 修改按钮*/
function handleUpdateButton() {
go('/metaModel/physicsModel/editRowTable');
}
onMounted(() => {
tableData.value = editTableData;
columnTableData.value = editColumnData;
bucketTableData.value = editBucketData;
areaTableData.value = editAreaData;
});
</script>
<style>
.height {
.ant-table-container {
.ant-table-body {
min-height: 500px;
}
}
}
</style>
......@@ -9,37 +9,40 @@
:fieldNames="{ key: 'businessId', title: 'modelName' }"
@select="handleSelect"
/>
<ModelDetailModal @register="registerModal" />
</div>
</template>
<script lang="ts" setup>
import { nextTick, onMounted, ref, unref } from 'vue';
import { BasicTree, TreeActionType, TreeItem } from '@/components/Tree';
import { Nullable } from '@vben/types';
import { TreeData } from '@/views/metaModel/logicModel/modelData';
import { nextTick, onMounted, ref, unref } from 'vue';
import { BasicTree, TreeActionType, TreeItem } from '@/components/Tree';
import { Nullable } from '@vben/types';
import { TreeData } from '@/views/metaModel/logicModel/modelData';
import ModelDetailModal from './modelDetailModal.vue';
import { useModal } from '@/components/Modal';
defineOptions({ name: 'DeptTree' });
defineOptions({ name: 'DeptTree' });
const emit = defineEmits(['select']);
const emit = defineEmits(['select']);
const treeData = ref<TreeItem[]>([]);
const treeRef = ref<Nullable<TreeActionType>>(null);
function getTree() {
const treeData = ref<TreeItem[]>([]);
const treeRef = ref<Nullable<TreeActionType>>(null);
function getTree() {
const tree = unref(treeRef);
if (!tree) {
throw new Error('tree is null!');
}
return tree;
}
async function fetch() {
}
const [registerModal, { openModal }] = useModal();
async function fetch() {
const data = TreeData;
treeData.value = handleTree(data, 'businessId', undefined, undefined, undefined);
await nextTick(() => {
getTree().expandAll(true);
});
}
}
function handleTree(data, id, parentId, children, rootId) {
function handleTree(data, id, parentId, children, rootId) {
id = id || 'id';
parentId = parentId || 'parentId';
children = children || 'children';
......@@ -65,13 +68,18 @@
return father[parentId] === rootId;
});
return treeData !== '' ? treeData : data;
}
}
function handleSelect(keys) {
emit('select', keys[0]);
function handleSelect(keys) {
// emit('select', keys[0]);
if (keys[0] >= 200) {
openModal(true, {
isUpdate: false,
});
}
}
onMounted(() => {
onMounted(() => {
fetch();
});
});
</script>
import {getAllRoleList} from '@/api/system/role/role';
import { BasicColumn, FormSchema } from '@/components/Table';
import {h} from "vue";
import {Tag} from "ant-design-vue";
import { Switch } from 'ant-design-vue';
import {useMessage} from "@/hooks/web/useMessage";
import {changeFlagApi} from "@/api/system/user/user"; // 引入开关组件
type CheckedType = boolean | string | number;
export const columns: BasicColumn[] = [
{
title: '属性名称',
dataIndex: 'name',
width: 150,
},
{
title: '描述',
dataIndex: 'description',
width: 150,
},
{
title: '属性英文名',
dataIndex: 'englishName',
width: 150,
},
{
title: '是否必填',
dataIndex: 'isWrite',
width: 150,
customRender: ({ record }) => (record.isWrite === '1' ? '是' : '否'),
},
{
title: '是否显示',
dataIndex: 'isShow',
width: 150,
customRender: ({ record }) => (record.isShow === '1' ? '是' : '否'),
},
{
title: '类型',
dataIndex: 'type',
width: 200,
customRender: ({ record }) => {
const typeMap = {
'1': '字符串',
'2': '布尔',
'3': '整型',
'4': '浮点型',
};
return typeMap[record.type];
},
},
];
......@@ -247,108 +247,117 @@ export const editTableData: any[] = [
businessId: 1,
name: '数据源',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_DATASOURCE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '库名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_DB_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '资产类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_DS_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表注释',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_COMMENT',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表中文名',
description: '',
englishName: 'MD_TAB_DESC',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '存储类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_STORE_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '是否为事务表',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_IS_TRANS',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '创建时间',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_CREATE_TIME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '创建者',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_CREATE_USER',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '发布时间',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_PUBLISH_TIME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '发布者',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_PUBLISH_USER',
isWrite: '0',
isShow: '0',
type: '1',
},
];
......@@ -357,63 +366,63 @@ export const editColumnData: any[] = [
businessId: 1,
name: '列名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '字段类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '字段类型参数',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_TYPE_PARAM',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '长度',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_LENGTH',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '精度',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_PRECISION',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '是否可为空',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_IS_BULL',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '字段注释',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_COMMENT',
isWrite: '0',
isShow: '0',
type: '1',
},
];
......@@ -422,36 +431,36 @@ export const editBucketData: any[] = [
businessId: 1,
name: '分桶数',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_NUM',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分桶字段',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_KEY',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '排序字段',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_SORTED',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '排序方式',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_SORTED',
isWrite: '0',
isShow: '0',
type: '1',
},
];
......@@ -460,36 +469,36 @@ export const editAreaData: any[] = [
businessId: 1,
name: '分区类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_PARTITION_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分区字段',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_PARTITION_COL_KEY',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分区名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_PARTITION_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分区值',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_PARTITION_VALUE',
isWrite: '0',
isShow: '0',
type: '1',
},
];
<template>
<BasicModal
width="80%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<PageWrapper title="" class="content-padding" contentBackground>
<template #footer>
<div
style="
display: flex;
justify-content: space-between;
align-items: flex-end;
background-color: white;
padding: 0 5px 20px;
"
>
<div
style="
display: flex;
flex-direction: column;
justify-content: flex-start;
padding-left: 5px;
margin-top: -100px;
"
>
<div style="font-weight: bold">关联资产类型</div>
<div style="margin-top: 20px">数据资产类型:Inceptor表</div>
</div>
<div style="cursor: pointer">
<Icon
icon="ant-design:appstore-outlined"
style="margin-right: 10px"
:size="30"
@click="handleSetButton"
:color="'#1091FE'"
/>
<Icon
icon="ant-design:edit-outlined"
:size="30"
@click="handleUpdateButton"
:color="'#1091FE'"
/>
</div>
</div>
</template>
<BasicTable @register="registerTable1" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="表信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
<BasicTable @register="registerTable2" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="分桶信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
<BasicTable @register="registerTable3" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="分区信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
<BasicTable @register="registerTable4" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="列信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
</PageWrapper>
</BasicModal>
</template>
<script lang="ts" setup>
import { PageWrapper } from '@/components/Page';
import { ref, computed, onMounted } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { router } from '@/router';
import { useTable, BasicTable } from '@/components/Table';
import { columns } from '@/views/metaModel/logicModel/detailModel.data';
import {
editAreaData,
editColumnData,
editBucketData,
editTableData,
} from '@/views/metaModel/logicModel/modelData';
import Icon from '@/components/Icon/Icon.vue';
import { useGo } from '@/hooks/web/usePage';
defineOptions({ name: 'ModelModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const isMove = ref(false);
const rowId = ref('');
const tableData = ref([]);
const columnTableData = ref([]);
const bucketTableData = ref([]);
const areaTableData = ref([]);
const go = useGo();
const getTitle = computed(() => 'Inceptor元模型');
const [registerTable1, { reload1, getForm1 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: tableData.value.length,
code: '',
message: '',
data: [],
};
console.log('tableData.value:', tableData.value);
return { ...response, data: tableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
const [registerTable2, { reload2, getForm2 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: bucketTableData.value.length,
code: '',
message: '',
data: bucketTableData.value,
};
return { ...response, data: bucketTableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
const [registerTable3, { reload3, getForm3 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: areaTableData.value.length,
code: '',
message: '',
data: areaTableData.value,
};
return { ...response, data: areaTableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
const [registerTable4, { reload4, getForm4 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: columnTableData.value.length,
code: '',
message: '',
data: columnTableData.value,
};
return { ...response, data: columnTableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false, showCancelBtn: false, showOkBtn: false });
});
/**确定按钮*/
async function handleSubmit() {
router.push({
path: '/metaModel/physicsModel/EditRowTable',
query: {},
});
closeModal();
}
/** 删除按钮*/
function handleDelete(record: Recordable) {
createMessage.success('删除成功!');
}
/** 配置按钮*/
function handleSetButton() {
console.log('1111');
}
/** 修改按钮*/
function handleUpdateButton() {
go('/metaModel/physicsModel/editRowTable');
}
onMounted(() => {
tableData.value = editTableData;
columnTableData.value = editColumnData;
bucketTableData.value = editBucketData;
areaTableData.value = editAreaData;
});
</script>
<style>
.height {
.ant-table-container {
.ant-table-body {
min-height: 500px;
}
}
}
</style>
......@@ -9,6 +9,7 @@
:fieldNames="{ key: 'businessId', title: 'modelName' }"
@select="handleSelect"
/>
<ModelDetailModal @register="registerModal" />
</div>
</template>
<script lang="ts" setup>
......@@ -16,6 +17,8 @@
import { BasicTree, TreeActionType, TreeItem } from '@/components/Tree';
import { Nullable } from '@vben/types';
import { TreeData } from '@/views/metaModel/standardModel/modelData';
import ModelDetailModal from './modelDetailModal.vue';
import { useModal } from '@/components/Modal';
defineOptions({ name: 'DeptTree' });
......@@ -30,7 +33,7 @@
}
return tree;
}
const [registerModal, { openModal }] = useModal();
async function fetch() {
const data = TreeData;
treeData.value = handleTree(data, 'businessId', undefined, undefined, undefined);
......@@ -68,7 +71,12 @@
}
function handleSelect(keys) {
emit('select', keys[0]);
// emit('select', keys[0]);
if (keys[0] >= 200) {
openModal(true, {
isUpdate: false,
});
}
}
onMounted(() => {
......
import {getAllRoleList} from '@/api/system/role/role';
import { BasicColumn, FormSchema } from '@/components/Table';
import {h} from "vue";
import {Tag} from "ant-design-vue";
import { Switch } from 'ant-design-vue';
import {useMessage} from "@/hooks/web/useMessage";
import {changeFlagApi} from "@/api/system/user/user"; // 引入开关组件
type CheckedType = boolean | string | number;
export const columns: BasicColumn[] = [
{
title: '属性名称',
dataIndex: 'name',
width: 150,
},
{
title: '描述',
dataIndex: 'description',
width: 150,
},
{
title: '属性英文名',
dataIndex: 'englishName',
width: 150,
},
{
title: '是否必填',
dataIndex: 'isWrite',
width: 150,
customRender: ({ record }) => (record.isWrite === '1' ? '是' : '否'),
},
{
title: '是否显示',
dataIndex: 'isShow',
width: 150,
customRender: ({ record }) => (record.isShow === '1' ? '是' : '否'),
},
{
title: '类型',
dataIndex: 'type',
width: 200,
customRender: ({ record }) => {
const typeMap = {
'1': '字符串',
'2': '布尔',
'3': '整型',
'4': '浮点型',
};
return typeMap[record.type];
},
},
];
......@@ -247,108 +247,117 @@ export const editTableData: any[] = [
businessId: 1,
name: '数据源',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_DATASOURCE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '库名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_DB_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '资产类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_DS_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表注释',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_COMMENT',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '表中文名',
description: '',
englishName: 'MD_TAB_DESC',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '存储类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_STORE_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '是否为事务表',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_IS_TRANS',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '创建时间',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_CREATE_TIME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '创建者',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_CREATE_USER',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '发布时间',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_PUBLISH_TIME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '发布者',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MR_PUBLISH_USER',
isWrite: '0',
isShow: '0',
type: '1',
},
];
......@@ -357,63 +366,63 @@ export const editColumnData: any[] = [
businessId: 1,
name: '列名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '字段类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '字段类型参数',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_TYPE_PARAM',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '长度',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_LENGTH',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '精度',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_PRECISION',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '是否可为空',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_IS_BULL',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '字段注释',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_COL_COMMENT',
isWrite: '0',
isShow: '0',
type: '1',
},
];
......@@ -422,36 +431,36 @@ export const editBucketData: any[] = [
businessId: 1,
name: '分桶数',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_NUM',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分桶字段',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_KEY',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '排序字段',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_SORTED',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '排序方式',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_BUCKET_SORTED',
isWrite: '0',
isShow: '0',
type: '1',
},
];
......@@ -460,36 +469,36 @@ export const editAreaData: any[] = [
businessId: 1,
name: '分区类型',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_PARTITION_TYPE',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分区字段',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_PARTITION_COL_KEY',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分区名',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_PARTITION_NAME',
isWrite: '0',
isShow: '0',
type: '1',
},
{
businessId: 1,
name: '分区值',
description: '',
englishName: '',
isWrite: '1',
isShow: '1',
englishName: 'MD_TAB_PARTITION_VALUE',
isWrite: '0',
isShow: '0',
type: '1',
},
];
<template>
<BasicModal
width="80%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<PageWrapper title="" class="content-padding" contentBackground>
<template #footer>
<div
style="
display: flex;
justify-content: space-between;
align-items: flex-end;
background-color: white;
padding: 0 5px 20px;
"
>
<div
style="
display: flex;
flex-direction: column;
justify-content: flex-start;
padding-left: 5px;
margin-top: -100px;
"
>
<div style="font-weight: bold">关联资产类型</div>
<div style="margin-top: 20px">数据资产类型:Inceptor表</div>
</div>
<div style="cursor: pointer">
<Icon
icon="ant-design:appstore-outlined"
style="margin-right: 10px"
:size="30"
@click="handleSetButton"
:color="'#1091FE'"
/>
<Icon
icon="ant-design:edit-outlined"
:size="30"
@click="handleUpdateButton"
:color="'#1091FE'"
/>
</div>
</div>
</template>
<BasicTable @register="registerTable1" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="表信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
<BasicTable @register="registerTable2" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="分桶信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
<BasicTable @register="registerTable3" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="分区信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
<BasicTable @register="registerTable4" class="height">
<template #toolbar>
<a-input style="width: 200px; margin-right: auto" default-value="列信息" allowClear />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
</template>
</BasicTable>
</PageWrapper>
</BasicModal>
</template>
<script lang="ts" setup>
import { PageWrapper } from '@/components/Page';
import { ref, computed, onMounted } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import { router } from '@/router';
import { useTable, BasicTable } from '@/components/Table';
import { columns } from './detailModel.data';
import {
editAreaData,
editColumnData,
editBucketData,
editTableData,
} from '@/views/metaModel/standardModel/modelData';
import Icon from '@/components/Icon/Icon.vue';
import { useGo } from '@/hooks/web/usePage';
defineOptions({ name: 'ModelModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const isMove = ref(false);
const rowId = ref('');
const tableData = ref([]);
const columnTableData = ref([]);
const bucketTableData = ref([]);
const areaTableData = ref([]);
const go = useGo();
const getTitle = computed(() => 'Inceptor元模型');
const [registerTable1, { reload1, getForm1 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: tableData.value.length,
code: '',
message: '',
data: [],
};
console.log('tableData.value:', tableData.value);
return { ...response, data: tableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
const [registerTable2, { reload2, getForm2 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: bucketTableData.value.length,
code: '',
message: '',
data: bucketTableData.value,
};
return { ...response, data: bucketTableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
const [registerTable3, { reload3, getForm3 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: areaTableData.value.length,
code: '',
message: '',
data: areaTableData.value,
};
return { ...response, data: areaTableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
const [registerTable4, { reload4, getForm4 }] = useTable({
title: '',
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: columnTableData.value.length,
code: '',
message: '',
data: columnTableData.value,
};
return { ...response, data: columnTableData.value };
},
columns,
showTableSetting: false,
showIndexColumn: false,
pagination: false,
bordered: true,
actionColumn: {
width: 150,
title: '操作',
dataIndex: 'action',
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false, showCancelBtn: false, showOkBtn: false });
});
/**确定按钮*/
async function handleSubmit() {
router.push({
path: '/metaModel/physicsModel/EditRowTable',
query: {},
});
closeModal();
}
/** 删除按钮*/
function handleDelete(record: Recordable) {
createMessage.success('删除成功!');
}
/** 配置按钮*/
function handleSetButton() {
console.log('1111');
}
/** 修改按钮*/
function handleUpdateButton() {
go('/metaModel/physicsModel/editRowTable');
}
onMounted(() => {
tableData.value = editTableData;
columnTableData.value = editColumnData;
bucketTableData.value = editBucketData;
areaTableData.value = editAreaData;
});
</script>
<style>
.height {
.ant-table-container {
.ant-table-body {
min-height: 500px;
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment