diff --git a/src/pages/src/views/setting/data-source/ConfigList.vue b/src/pages/src/views/setting/data-source/ConfigList.vue
index 4f3b59b70..c8fac05c3 100644
--- a/src/pages/src/views/setting/data-source/ConfigList.vue
+++ b/src/pages/src/views/setting/data-source/ConfigList.vue
@@ -14,7 +14,7 @@
hover-theme="primary"
:loading="resetLoading"
@click="handleReset"
- :disabled="RUNNING_FIELDS.includes(syncStatus?.status)"
+ :disabled="disabledSyncBtn"
>
{{ $t('重置') }}
@@ -34,7 +34,7 @@
{{ dataRecordStatus[syncStatus?.status]?.text }}
@@ -42,7 +42,7 @@
{{ dataRecordStatus[syncStatus?.status]?.text }}
-
+
{{ syncStatus?.start_at }}
@@ -51,6 +51,7 @@
class="min-w-[64px]"
theme="primary"
@click="handleImport"
+ :disabled="disabledSyncBtn || resetLoading"
>
{{ $t('导入') }}
@@ -68,6 +69,7 @@
class="min-w-[64px]"
theme="primary"
@click.stop
+ :disabled="disabledSyncBtn"
>
{{ $t('同步') }}
@@ -214,6 +216,7 @@ const route = useRoute();
const userStore = useUser();
const syncStatusStore = useSyncStatus();
const syncStatus = computed(() => syncStatusStore.syncStatus);
+const disabledSyncBtn = computed(() => RUNNING_FIELDS.includes(syncStatus.value?.status));
const {
dataSourcePlugins,
dataSource,
diff --git a/src/pages/src/views/setting/data-source/HttpDetails.vue b/src/pages/src/views/setting/data-source/HttpDetails.vue
index 7e07a6bde..a00fe1da3 100644
--- a/src/pages/src/views/setting/data-source/HttpDetails.vue
+++ b/src/pages/src/views/setting/data-source/HttpDetails.vue
@@ -1,62 +1,116 @@
-
-
-
-
{{ serverConfig.server_base_url }}
-
{{ serverConfig.user_api_path }}
-
-
{{ $t('查询参数') }}:
-
-
- {{item.key}}:{{item.value}}
-
+
+
+
+
+
{{ serverConfig.server_base_url }}
+
{{ serverConfig.user_api_path }}
+
+
{{ $t('查询参数') }}:
+
+
+ {{item.key}}:{{item.value}}
+
+
-
-
{{ serverConfig.department_api_path }}
-
-
{{ $t('查询参数') }}:
-
-
- {{item.key}}:{{item.value}}
-
+
{{ serverConfig.department_api_path }}
+
+
{{ $t('查询参数') }}:
+
+
+ {{item.key}}:{{item.value}}
+
+
+
+ {{ serverConfig.request_timeout }}
+ {{ serverConfig.request_timeout }}{{ $t('秒') }}
+ {{ serverConfig.retries }}{{ $t('次') }}
+
-
- {{ serverConfig.request_timeout }}
- {{ serverConfig.request_timeout }}{{ $t('秒') }}
- {{ serverConfig.retries }}{{ $t('次') }}
-
-
-
-
- {{ authConfig.method }}
-
- ************
-
-
- {{ authConfig.username }}
- ******
-
-
-
-
-
-
{{ item.target_field }}
-
=
-
{{ item.source_field }}
+
+
+ {{ authConfig.method }}
+
+ ************
+
+
+ {{ authConfig.username }}
+ ******
+
+
+
+
+
+ {{ item.target_field }}
+ =
+ {{ item.source_field }}
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+ {{ serverConfig.server_url }}
+ {{ serverConfig.bind_dn }}
+ {{ serverConfig.bind_password }}
+ {{ serverConfig.base_dn }}
+
+
+ {{ serverConfig.page_size }}
+ {{ serverConfig.request_timeout }}{{ $t('秒') }}
+
-
-
-
-
-
- {{ item.label }}
-
-
-
+
+
+ {{ dataConfig.user_object_class }}
+
+ {{ item }}
+
+ {{ dataConfig.dept_object_class }}
+
+ {{ item }}
+
+
+
+
+
+ {{ item.target_field }}
+ =
+ {{ item.source_field }}
+
+
+
+
+ {{ userGroupConfig.object_class }}
+
+ {{ item }}
+
+ {{ userGroupConfig.group_member_field }}
+
+
+ {{ leaderConfig.leader_field }}
+
+
+
+
+ {{ item.label }}
+
+
+
+
@@ -91,15 +145,25 @@ const authConfig = ref({});
const fieldMapping = ref([]);
// 同步配置
const syncConfig = ref({});
+// 数据配置
+const dataConfig = ref({});
+// 数据配置
+const userGroupConfig = ref({});
+// 数据配置
+const leaderConfig = ref({});
const isPluginConfig = ref(true);
+const pluginId = ref('');
+
onMounted(async () => {
try {
isLoading.value = true;
const res = await getDataSourceDetails(props.dataSourceId);
const fieldList = await getFields();
+ pluginId.value = res.data?.plugin?.id;
+
res.data?.field_mapping?.forEach((item) => {
[...fieldList?.data?.builtin_fields, ...fieldList?.data?.custom_fields]?.forEach((demo) => {
if (item.target_field === demo.name) {
@@ -117,6 +181,9 @@ onMounted(async () => {
} else {
serverConfig.value = res.data?.plugin_config?.server_config;
authConfig.value = res.data?.plugin_config?.auth_config;
+ dataConfig.value = res.data?.plugin_config?.data_config;
+ userGroupConfig.value = res.data?.plugin_config?.user_group_config;
+ leaderConfig.value = res.data?.plugin_config?.leader_config;
isPluginConfig.value = true;
}
syncConfig.value = res.data?.sync_config;