diff --git a/src/api/tenant/tenant.js b/src/api/tenant/tenant.js index 331f82e..dd77ebd 100644 --- a/src/api/tenant/tenant.js +++ b/src/api/tenant/tenant.js @@ -58,3 +58,62 @@ export function refreshCache() { method: "delete", }); } + +// 租户模式设置 +export function tenantSetting(params) { + return request({ + url: "/tenant/setting", + method: "put", + params, + }); +} + +/** + * 获取数据源列表 + * @return {*} + */ +export function datasourceList(tenantId) { + return request({ + url: "/tenant/datasource/list", + method: "GET", + params: { tenantId }, + }); +} + +/** + * 添加数据源 + * @param data + * @return {*} + */ +export function insertDatasource(data) { + return request({ + url: "/tenant/datasource", + method: "POST", + data, + }); +} + +/** + * 修改数据源 + * @param data + * @return {*} + */ +export function updateDatasource(data) { + return request({ + url: "/tenant/datasource", + method: "PUT", + data, + }); +} + +/** + * 删除数据源 + * @param ids + * @return {*} + */ +export function deleteDatasource(ids) { + return request({ + url: `/tenant/datasource/${ids}`, + method: "DELETE", + }); +} diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 8bb1a83..a46e486 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -32,6 +32,7 @@ - + - + diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 5123f41..d971156 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -134,7 +134,13 @@ - + diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue index 924c362..3eeb698 100644 --- a/src/views/system/dict/data.vue +++ b/src/views/system/dict/data.vue @@ -171,7 +171,13 @@ /> - + diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 72e5978..103dc7c 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -191,7 +191,13 @@ /> - + diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index dad057b..991b6e3 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -154,7 +154,13 @@ - + diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index 5dd6d1d..14aea9c 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -157,7 +157,13 @@ /> - + - + @@ -316,6 +322,7 @@ - + @@ -441,6 +447,7 @@ + + 初始化 + + - - - + + + + + + + + + - - + - - + - 字段 - 数据库 - 数据源 + {{ option.label }} + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/src/views/tenant/initialize.vue b/src/views/tenant/initialize.vue new file mode 100644 index 0000000..0f2fe38 --- /dev/null +++ b/src/views/tenant/initialize.vue @@ -0,0 +1,13 @@ + + + +