From 85b7eeedb5a52e987f6fb2429756ec0b874d892c Mon Sep 17 00:00:00 2001 From: xingyuv Date: Thu, 23 Mar 2023 14:18:16 +0800 Subject: [PATCH] feat: infra view --- .../DataSourceConfigModal.vue | 54 +++++++++++++ .../dataSourceConfig/dataSourceConfig.data.ts | 65 ++++++++++++++++ src/views/infra/dataSourceConfig/index.vue | 78 ++++++++++++++++++- src/views/infra/fileConfig/index.vue | 4 +- src/views/system/area/AreaModal.vue | 2 +- 5 files changed, 199 insertions(+), 4 deletions(-) create mode 100644 src/views/infra/dataSourceConfig/DataSourceConfigModal.vue create mode 100644 src/views/infra/dataSourceConfig/dataSourceConfig.data.ts diff --git a/src/views/infra/dataSourceConfig/DataSourceConfigModal.vue b/src/views/infra/dataSourceConfig/DataSourceConfigModal.vue new file mode 100644 index 00000000..6a9239dd --- /dev/null +++ b/src/views/infra/dataSourceConfig/DataSourceConfigModal.vue @@ -0,0 +1,54 @@ + + diff --git a/src/views/infra/dataSourceConfig/dataSourceConfig.data.ts b/src/views/infra/dataSourceConfig/dataSourceConfig.data.ts new file mode 100644 index 00000000..060cded7 --- /dev/null +++ b/src/views/infra/dataSourceConfig/dataSourceConfig.data.ts @@ -0,0 +1,65 @@ +import { BasicColumn, FormSchema, useRender } from '@/components/Table' + +export const columns: BasicColumn[] = [ + { + title: '主键编号', + dataIndex: 'id', + width: 100 + }, + { + title: '数据源名称', + dataIndex: 'name', + width: 180 + }, + { + title: '数据源连接', + dataIndex: 'url', + width: 100 + }, + { + title: '用户名', + dataIndex: 'username', + width: 120 + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: 180, + customRender: ({ text }) => { + return useRender.renderDate(text) + } + } +] + +export const formSchema: FormSchema[] = [ + { + label: '编号', + field: 'id', + show: false, + component: 'Input' + }, + { + label: '数据源名称', + field: 'name', + required: true, + component: 'Input' + }, + { + label: '数据源连接', + field: 'url', + required: true, + component: 'Input' + }, + { + label: '用户名', + field: 'username', + required: true, + component: 'Input' + }, + { + label: '密码', + field: 'password', + required: true, + component: 'Input' + } +] diff --git a/src/views/infra/dataSourceConfig/index.vue b/src/views/infra/dataSourceConfig/index.vue index 3b64cfc4..3cc8f720 100644 --- a/src/views/infra/dataSourceConfig/index.vue +++ b/src/views/infra/dataSourceConfig/index.vue @@ -1,3 +1,79 @@ + diff --git a/src/views/infra/fileConfig/index.vue b/src/views/infra/fileConfig/index.vue index d7d15aed..fe50776b 100644 --- a/src/views/infra/fileConfig/index.vue +++ b/src/views/infra/fileConfig/index.vue @@ -26,14 +26,14 @@ - +