Commit 0e30c6b6 authored by 罗林杰's avatar 罗林杰

修改数据源管理

parent 975ff5e7
...@@ -19,11 +19,13 @@ export const columns: BasicColumn[any] = [ ...@@ -19,11 +19,13 @@ export const columns: BasicColumn[any] = [
title: '数据源名称', title: '数据源名称',
dataIndex: 'dataSourceName', dataIndex: 'dataSourceName',
width: 150, width: 150,
fixed: 'left',
}, },
{ {
title: '连接名称', title: '连接名称',
dataIndex: 'connectName', dataIndex: 'connectName',
width: 150, width: 150,
fixed: 'left',
}, },
{ {
title: '类型', title: '类型',
...@@ -38,7 +40,7 @@ export const columns: BasicColumn[any] = [ ...@@ -38,7 +40,7 @@ export const columns: BasicColumn[any] = [
{ {
title: '数据源ID', title: '数据源ID',
dataIndex: 'dataSourceID', dataIndex: 'dataSourceID',
width: 150, width: 200,
}, },
{ {
title: '权属工作组', title: '权属工作组',
...@@ -58,7 +60,7 @@ export const columns: BasicColumn[any] = [ ...@@ -58,7 +60,7 @@ export const columns: BasicColumn[any] = [
{ {
title: '是否在元数据管理中展示', title: '是否在元数据管理中展示',
dataIndex: 'isShow', dataIndex: 'isShow',
width: 150, width: 180,
}, },
]; ];
...@@ -225,3 +227,80 @@ export const pageConfigColumns: BasicColumn[] = [ ...@@ -225,3 +227,80 @@ export const pageConfigColumns: BasicColumn[] = [
edit: true, edit: true,
}, },
]; ];
export const dataWarehouseFormSchema: FormSchema[] = [
{
field: 'dataSourceName',
component: 'Input',
componentProps: {
placeholder: '输入数据库名称',
},
colProps: { span: 4 },
},
{
field: 'pageName',
component: 'Select',
componentProps: {
options: [
{ label: 'DQC', value: 'DQC' },
{ label: 'DW', value: 'DW' },
{ label: 'DM', value: 'DM' },
{ label: 'DST', value: 'DST' },
{ label: 'SRC', value: 'SRC' },
],
placeholder: '选择分层',
},
colProps: { span: 4 },
},
{
field: 'system',
component: 'Select',
componentProps: {
options: [
{ label: '人事系统', value: '人事系统' },
{ label: '考勤系统', value: '考勤系统' },
{ label: '薪资系统', value: '薪资系统' },
{ label: '订单系统', value: '订单系统' },
],
placeholder: '选择系统',
},
colProps: { span: 4 },
},
];
export const dataWarehouseColumns: BasicColumn[] = [
{
title: '数据库',
dataIndex: 'dataSourceName',
width: 150,
},
{
title: '分层名称',
dataIndex: 'pageName',
width: 150,
edit: true,
editComponent: 'Select',
editComponentProps: {
options: [
{ label: 'DQC', value: 'DQC' },
{ label: 'DW', value: 'DW' },
{ label: 'DM', value: 'DM' },
{ label: 'DST', value: 'DST' },
{ label: 'SRC', value: 'SRC' },
],
},
},
{
title: '所属系统',
dataIndex: 'system',
width: 150,
edit: true,
editComponent: 'Select',
editComponentProps: {
options: [
{ label: '人事系统', value: '人事系统' },
{ label: '考勤系统', value: '考勤系统' },
{ label: '薪资系统', value: '薪资系统' },
{ label: '订单系统', value: '订单系统' },
],
},
},
];
...@@ -319,7 +319,33 @@ export const pageConfigData = [ ...@@ -319,7 +319,33 @@ export const pageConfigData = [
}, },
{ {
id: 4, id: 4,
pageConfigName: '数据质量层', pageConfigName: '数据仓库层',
name: 'DQC', name: 'DW',
},
];
export const dataWarehouseData = [
{
id: 1,
dataSourceName: 'mysql',
system: '人事系统',
pageName: 'SRC',
},
{
id: 2,
dataSourceName: 'wdawdawd',
system: '人事系统',
pageName: 'DST',
},
{
id: 3,
dataSourceName: 'waaaa',
system: '订单系统',
pageName: 'DQC',
},
{
id: 4,
dataSourceName: 'ceshi',
system: '订单系统',
pageName: 'DW',
}, },
]; ];
<template>
<BasicModal
v-bind="$attrs"
@register="registerModal"
showFooter
:title="getTitle"
width="50%"
@ok="handleSubmit"
>
<BasicTable @register="registerTable" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { useModalInner } from '@/components/Modal';
import BasicModal from '@/components/Modal/src/BasicModal.vue';
import { useMessage } from '@/hooks/web/useMessage';
import { BasicTable, useTable } from '@/components/Table';
import { dataWarehouseData } from '@/views/dataSourceManage/dataSource/dataSourceData';
import {
dataWarehouseColumns,
dataWarehouseFormSchema,
} from '@/views/dataSourceManage/dataSource/dataSource.data';
defineOptions({ name: 'ResetNameModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
// 初始化弹窗
const [registerModal, { setModalProps, closeModal }] = useModalInner(async () => {});
const [registerTable, { reload, getForm }] = useTable({
api: async () => {
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: dataWarehouseData.length,
code: '',
message: '',
data: [],
};
return { ...response, data: dataWarehouseData };
},
columns: dataWarehouseColumns,
formConfig: {
labelWidth: 120,
schemas: dataWarehouseFormSchema,
},
pagination: false,
useSearchForm: true,
showTableSetting: false,
bordered: true,
showIndexColumn: false,
});
const getTitle = ref('数仓规划编辑');
/** 确认按钮 */
function handleSubmit() {
createMessage.success('修改成功');
reload();
closeModal();
}
</script>
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
// label: '查看详情', // label: '查看详情',
onClick: handleViewDetails.bind(null, record), onClick: handleViewDetails.bind(null, record),
}, },
{
icon: 'clarity:home-line',
// label: '数仓规划编辑',
onClick: handleDataWarehouse.bind(null),
},
{ {
icon: 'ant-design:delete-outlined', icon: 'ant-design:delete-outlined',
// label: '删除', // label: '删除',
...@@ -50,6 +55,7 @@ ...@@ -50,6 +55,7 @@
<ConnectModal @register="registerConnectModal" /> <ConnectModal @register="registerConnectModal" />
<RestModal @register="registerRestModal" /> <RestModal @register="registerRestModal" />
<PageConfigModal @register="registerpageConfigModal" /> <PageConfigModal @register="registerpageConfigModal" />
<DataWarehouseModal @register="registerdataWarehouseModal" />
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
...@@ -64,6 +70,7 @@ ...@@ -64,6 +70,7 @@
import { dataSourceListData } from '@/views/dataSourceManage/dataSource/dataSourceData'; import { dataSourceListData } from '@/views/dataSourceManage/dataSource/dataSourceData';
import RestModal from './resetModal.vue'; import RestModal from './resetModal.vue';
import PageConfigModal from './pageConfigModal.vue'; import PageConfigModal from './pageConfigModal.vue';
import DataWarehouseModal from './dataWarehouseModal.vue';
defineOptions({ name: 'AccountManagement' }); defineOptions({ name: 'AccountManagement' });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
...@@ -73,6 +80,7 @@ ...@@ -73,6 +80,7 @@
const [registerConnectModal, { openModal: openConnectModal }] = useModal(); const [registerConnectModal, { openModal: openConnectModal }] = useModal();
const [registerRestModal, { openModal: openRestModal }] = useModal(); const [registerRestModal, { openModal: openRestModal }] = useModal();
const [registerpageConfigModal, { openModal: openpageConfigModal }] = useModal(); const [registerpageConfigModal, { openModal: openpageConfigModal }] = useModal();
const [registerdataWarehouseModal, { openModal: opendataWarehouseModal }] = useModal();
const [registerTable, { reload, getForm }] = useTable({ const [registerTable, { reload, getForm }] = useTable({
api: async () => { api: async () => {
const response = { const response = {
...@@ -97,10 +105,10 @@ ...@@ -97,10 +105,10 @@
bordered: true, bordered: true,
showIndexColumn: false, showIndexColumn: false,
actionColumn: { actionColumn: {
width: 200, width: 250,
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
fixed: undefined, fixed: 'right',
}, },
}); });
...@@ -111,6 +119,9 @@ ...@@ -111,6 +119,9 @@
function pageConfig() { function pageConfig() {
openpageConfigModal(true, {}); openpageConfigModal(true, {});
} }
function handleDataWarehouse() {
opendataWarehouseModal(true, {});
}
/** 刷新 按钮 */ /** 刷新 按钮 */
function handleReload() { function handleReload() {
reload(); reload();
......
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