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

修改数据源管理

parent 975ff5e7
......@@ -19,11 +19,13 @@ export const columns: BasicColumn[any] = [
title: '数据源名称',
dataIndex: 'dataSourceName',
width: 150,
fixed: 'left',
},
{
title: '连接名称',
dataIndex: 'connectName',
width: 150,
fixed: 'left',
},
{
title: '类型',
......@@ -38,7 +40,7 @@ export const columns: BasicColumn[any] = [
{
title: '数据源ID',
dataIndex: 'dataSourceID',
width: 150,
width: 200,
},
{
title: '权属工作组',
......@@ -58,7 +60,7 @@ export const columns: BasicColumn[any] = [
{
title: '是否在元数据管理中展示',
dataIndex: 'isShow',
width: 150,
width: 180,
},
];
......@@ -225,3 +227,80 @@ export const pageConfigColumns: BasicColumn[] = [
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 = [
},
{
id: 4,
pageConfigName: '数据质量层',
name: 'DQC',
pageConfigName: '数据仓库层',
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 @@
// label: '查看详情',
onClick: handleViewDetails.bind(null, record),
},
{
icon: 'clarity:home-line',
// label: '数仓规划编辑',
onClick: handleDataWarehouse.bind(null),
},
{
icon: 'ant-design:delete-outlined',
// label: '删除',
......@@ -50,6 +55,7 @@
<ConnectModal @register="registerConnectModal" />
<RestModal @register="registerRestModal" />
<PageConfigModal @register="registerpageConfigModal" />
<DataWarehouseModal @register="registerdataWarehouseModal" />
</PageWrapper>
</template>
<script lang="ts" setup>
......@@ -64,6 +70,7 @@
import { dataSourceListData } from '@/views/dataSourceManage/dataSource/dataSourceData';
import RestModal from './resetModal.vue';
import PageConfigModal from './pageConfigModal.vue';
import DataWarehouseModal from './dataWarehouseModal.vue';
defineOptions({ name: 'AccountManagement' });
const { createMessage } = useMessage();
......@@ -73,6 +80,7 @@
const [registerConnectModal, { openModal: openConnectModal }] = useModal();
const [registerRestModal, { openModal: openRestModal }] = useModal();
const [registerpageConfigModal, { openModal: openpageConfigModal }] = useModal();
const [registerdataWarehouseModal, { openModal: opendataWarehouseModal }] = useModal();
const [registerTable, { reload, getForm }] = useTable({
api: async () => {
const response = {
......@@ -97,10 +105,10 @@
bordered: true,
showIndexColumn: false,
actionColumn: {
width: 200,
width: 250,
title: '操作',
dataIndex: 'action',
fixed: undefined,
fixed: 'right',
},
});
......@@ -111,6 +119,9 @@
function pageConfig() {
openpageConfigModal(true, {});
}
function handleDataWarehouse() {
opendataWarehouseModal(true, {});
}
/** 刷新 按钮 */
function handleReload() {
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