diff --git a/src/views/monitor/caches/index.vue b/src/views/monitor/caches/index.vue new file mode 100644 index 0000000..ce5016c --- /dev/null +++ b/src/views/monitor/caches/index.vue @@ -0,0 +1,323 @@ + + + + + + + + + + > + + + + + + 缓存内容 + + + + + 清理全部 + + + + + + + + + + + + + + + 暂无数据 + + + + + + + diff --git a/src/views/monitor/dataSource/columns.ts b/src/views/monitor/dataSource/columns.ts new file mode 100644 index 0000000..d188d8d --- /dev/null +++ b/src/views/monitor/dataSource/columns.ts @@ -0,0 +1,89 @@ +import { h } from 'vue'; +import { NTag } from 'naive-ui'; + +export const columns = [ + { + type: 'selection', + width: 50, + fixed: 'left', + }, + { + title: 'ID', + key: 'id', + fixed: 'left', + width: 50, + }, + { + title: '数据源名称', + key: 'name', + width: 150, + }, + { + title: '数据库类型', + key: 'dbType', + width: 100, + render(record) { + let typeText = ''; + switch (record.dbType) { + case 1: + typeText = 'MySQL'; + break; + case 2: + typeText = 'PostgreSQL'; + break; + case 3: + typeText = 'SQLServer'; + break; + case 4: + typeText = 'Oracle'; + break; + case 5: + typeText = 'Sqlite'; + break; + default: + break; + } + return h('span', typeText || '-'); + }, + }, + { + title: '数据源编码', + key: 'code', + width: 100, + }, + { + title: '数据库驱动类', + key: 'dbDriver', + width: 100, + }, + { + title: '数据源地址', + key: 'dbUrl', + width: 100, + }, + { + title: '数据库名称', + key: 'dbName', + width: 100, + }, + { + title: '数据库用户名', + key: 'dbUsername', + width: 100, + }, + { + title: '备注', + key: 'note', + width: 100, + }, + { + title: '创建人', + key: 'createUser', + width: 100, + }, + { + title: '创建时间', + key: 'createTime', + width: 180, + }, +]; diff --git a/src/views/monitor/dataSource/edit.vue b/src/views/monitor/dataSource/edit.vue new file mode 100644 index 0000000..fb7611c --- /dev/null +++ b/src/views/monitor/dataSource/edit.vue @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/monitor/dataSource/index.vue b/src/views/monitor/dataSource/index.vue new file mode 100644 index 0000000..3b0dc33 --- /dev/null +++ b/src/views/monitor/dataSource/index.vue @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + 新建 + + + + + + + + + 删除 + + + + + + + + + + + + diff --git a/src/views/monitor/dataSource/querySchemas.ts b/src/views/monitor/dataSource/querySchemas.ts new file mode 100644 index 0000000..58da6d9 --- /dev/null +++ b/src/views/monitor/dataSource/querySchemas.ts @@ -0,0 +1,42 @@ +import { FormSchema } from '@/components/Form/index'; +export const schemas: FormSchema[] = [ + { + field: 'name', + component: 'NInput', + label: '数据源名称', + componentProps: { + placeholder: '请输入数据源名称', + }, + }, + { + field: 'dbType', + component: 'NSelect', + label: '数据库类型', + componentProps: { + placeholder: '请选择数据库类型', + clearable: true, + options: [ + { + label: 'MySQL', + value: 1, + }, + { + label: 'PostgreSQL', + value: 2, + }, + { + label: 'SQLServer', + value: 3, + }, + { + label: 'Oracle', + value: 4, + }, + { + label: 'Sqlite', + value: 5, + }, + ], + }, + }, +];