diff --git a/src/api/system/dataSource.ts b/src/api/system/dataSource.ts new file mode 100644 index 00000000..46a59cff --- /dev/null +++ b/src/api/system/dataSource.ts @@ -0,0 +1,11 @@ +import server from '@/utils/request'; + + +// 获取数据源列表 +export const getDataSourceList_api = (data: object) => server.post(`/datasource/config/_query/`, data); + +// 获取数据库类型字典 +export const getDataTypeDict_api = () => server.get(`/datasource/config/types`); + +// 修改数据源状态 +export const changeStatus_api = (id:string, status:'_disable'|'_enable') => server.put(`/datasource/config/${id}/${status}`); \ No newline at end of file diff --git a/src/views/system/DataSource/components/EditDialog.vue b/src/views/system/DataSource/components/EditDialog.vue new file mode 100644 index 00000000..de689045 --- /dev/null +++ b/src/views/system/DataSource/components/EditDialog.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/src/views/system/DataSource/index.vue b/src/views/system/DataSource/index.vue new file mode 100644 index 00000000..0190f7e8 --- /dev/null +++ b/src/views/system/DataSource/index.vue @@ -0,0 +1,304 @@ + + + + + diff --git a/src/views/system/DataSource/typing.d.ts b/src/views/system/DataSource/typing.d.ts new file mode 100644 index 00000000..1ece8c43 --- /dev/null +++ b/src/views/system/DataSource/typing.d.ts @@ -0,0 +1,24 @@ +export type dictItemType = { + id: string, + name: string +} +export type optionItemType = { + label: string, + value: string +} +export type sourceItemType = { + id?: string, + name: string, + state: { text: string, value: "enabled" | 'disabled' }, + typeId: string, + shareConfig:{ + url:string, + adminUrl:string, + addresses:string, + username:string, + password:string, + virtualHost:string, + schema:string + } + description: string +} \ No newline at end of file diff --git a/src/views/system/Department/components/EditPermissionDialog.vue b/src/views/system/Department/components/EditPermissionDialog.vue index 3a32b6a2..42182b6f 100644 --- a/src/views/system/Department/components/EditPermissionDialog.vue +++ b/src/views/system/Department/components/EditPermissionDialog.vue @@ -20,7 +20,7 @@