mirror of
https://github.com/dataease/dataease.git
synced 2026-06-16 20:42:07 +08:00
feat(X-Pack): [数据填报]内置数据源增加支持数据填报功能配置
This commit is contained in:
@@ -6,6 +6,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
@Getter
|
||||
@@ -58,4 +59,8 @@ public class CoreDeEngine {
|
||||
@Column(name = "status", length = 45)
|
||||
private String status;
|
||||
|
||||
@ColumnDefault("1")
|
||||
@Comment("启用数据填报功能")
|
||||
@Column(name = "enable_data_fill")
|
||||
private Boolean enableDataFill;
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ i18n_df_end=End
|
||||
i18n_df_datasource_not_found=No data source found
|
||||
i18n_df_datasource_does_not_enable_data_filling=This data source has not enabled data reporting configuration
|
||||
i18n_df_builtin_datasource=Built-in database
|
||||
i18n_df_default=Default
|
||||
i18n_df_folder_required=Folder is required
|
||||
i18n_df_form_not_exists=Form does not exist
|
||||
i18n_df_name_can_not_empty=Name cannot be empty
|
||||
|
||||
@@ -97,6 +97,7 @@ i18n_df_end=\u7ED3\u675F
|
||||
i18n_df_datasource_not_found=\u6CA1\u6709\u627E\u5230\u6570\u636E\u6E90
|
||||
i18n_df_datasource_does_not_enable_data_filling=\u8BE5\u6570\u636E\u6E90\u6CA1\u6709\u542F\u7528\u6570\u636E\u586B\u62A5\u914D\u7F6E
|
||||
i18n_df_builtin_datasource=\u5185\u5EFA\u6570\u636E\u5E93
|
||||
i18n_df_default=\u9ED8\u8BA4
|
||||
i18n_df_folder_required=\u76EE\u5F55\u5FC5\u9009
|
||||
i18n_df_form_not_exists=\u8868\u5355\u4E0D\u5B58\u5728
|
||||
i18n_df_name_can_not_empty=\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A
|
||||
@@ -210,6 +211,6 @@ i18n_invalid_address=\u65E0\u6548\u7684\u5730\u5740\uFF01
|
||||
i18n_unsupported_protocol=\u4E0D\u652F\u6301\u7684\u534F\u8BAE\uFF01
|
||||
i18n_excel_error_first_row=\u9996\u884C\u884C\u4E2D\u4E0D\u5141\u8BB8\u6709\u7A7A\u5355\u5143\u683C\uFF01
|
||||
i18n_app_error_no_api=\u5F53\u524D\u4E0D\u652F\u6301API\u6570\u636E\u6E90\u3002
|
||||
i18n_sql_variable_name_empty=\u53d8\u91cf\u4e0d\u80fd\u4e3a\u7a7a\uff01
|
||||
i18n_sql_variable_name_empty=\u53D8\u91CF\u4E0D\u80FD\u4E3A\u7A7A\uFF01
|
||||
i18n_resource_not_exists=\u8D44\u6E90\u4E0D\u5B58\u5728\u6216\u5DF2\u7ECF\u88AB\u5220\u9664...
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ i18n_df_end=\u7D50\u675F
|
||||
i18n_df_datasource_not_found=\u6C92\u6709\u627E\u5230\u6578\u64DA\u6E90
|
||||
i18n_df_datasource_does_not_enable_data_filling=\u8A72\u6578\u64DA\u6E90\u6C92\u6709\u555F\u7528\u6578\u64DA\u586B\u5831\u914D\u7F6E
|
||||
i18n_df_builtin_datasource=\u5167\u5EFA\u6578\u64DA\u5EAB
|
||||
i18n_df_default=\u9ED8\u8A8D
|
||||
i18n_df_folder_required=\u76EE\u9304\u5FC5\u9078
|
||||
i18n_df_form_not_exists=\u8868\u55AE\u4E0D\u5B58\u5728
|
||||
i18n_df_name_can_not_empty=\u540D\u7A31\u4E0D\u80FD\u70BA\u7A7A
|
||||
@@ -210,6 +211,6 @@ i18n_invalid_address=\u7121\u6548\u7684\u5730\u5740\uFF01
|
||||
i18n_unsupported_protocol=\u4E0D\u652F\u63F4\u7684\u5354\u8B70\uFF01
|
||||
i18n_excel_error_first_row=\u9996\u884C\u884C\u4E2D\u4E0D\u5141\u8A31\u6709\u7A7A\u5132\u5B58\u683C\uFF01
|
||||
i18n_app_error_no_api=\u7576\u524D\u4E0D\u652F\u63F4API\u6578\u64DA\u6E90\u3002
|
||||
i18n_sql_variable_name_empty=\u8b8a\u6578\u4e0d\u80fd\u70ba\u7a7a\uff01
|
||||
i18n_sql_variable_name_empty=\u8B8A\u6578\u4E0D\u80FD\u70BA\u7A7A\uFF01
|
||||
i18n_resource_not_exists=\u8CC7\u6E90\u4E0D\u5B58\u5728\u6216\u5DF2\u7D93\u88AB\u522A\u9664...
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import { Base64 } from 'js-base64'
|
||||
import { querySymmetricKey } from '@/api/login'
|
||||
import { symmetricDecrypt } from '@/utils/encryption'
|
||||
import { Icon } from '@/components/icon-custom'
|
||||
import { XpackComponent } from '@/components/plugin'
|
||||
const { t } = useI18n()
|
||||
const dialogVisible = ref(false)
|
||||
const loadingInstance = ref(null)
|
||||
@@ -178,7 +179,8 @@ const edit = () => {
|
||||
fileName,
|
||||
size,
|
||||
description,
|
||||
lastSyncTime
|
||||
lastSyncTime,
|
||||
enableDataFill
|
||||
} = res.data
|
||||
if (configuration) {
|
||||
configuration = JSON.parse(symmetricDecrypt(configuration, response.data))
|
||||
@@ -196,7 +198,8 @@ const edit = () => {
|
||||
type,
|
||||
configuration,
|
||||
syncSetting,
|
||||
lastSyncTime
|
||||
lastSyncTime,
|
||||
enableDataFill
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -500,6 +503,11 @@ defineExpose({
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
<!-- 数据填报 -->
|
||||
<XpackComponent
|
||||
:form="nodeInfo"
|
||||
jsname="L2NvbXBvbmVudC9kYXRhLWZpbGxpbmcvRGF0YXNvdXJjZUVuYWJsZURhdGFGaWxsaW5n"
|
||||
/>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
hide-head
|
||||
:setting-data="templateListTime"
|
||||
/>
|
||||
<!-- 数据填报 -->
|
||||
<XpackComponent
|
||||
style="max-width: 100%; padding: 0 24px 8px"
|
||||
:nodeInfo="xPackInfo"
|
||||
jsname="L2NvbXBvbmVudC9kYXRhLWZpbGxpbmcvRGF0YXNvdXJjZURhdGFGaWxsaW5nSW5mbw=="
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
@@ -44,6 +50,7 @@ import { getDeEngine } from '@/api/datasource'
|
||||
import request from '@/config/axios'
|
||||
import { querySymmetricKey } from '@/api/login'
|
||||
import { symmetricDecrypt } from '@/utils/encryption'
|
||||
import { XpackComponent } from '@/components/plugin'
|
||||
const { t } = useI18n()
|
||||
const typeMap = dsTypes.reduce((pre, next) => {
|
||||
pre[next.type] = next.name
|
||||
@@ -55,10 +62,13 @@ const infoTemplate = ref()
|
||||
const infoTemplateTime = ref()
|
||||
const templateList = ref<SettingRecord[]>([])
|
||||
const templateListTime = ref<SettingRecord[]>([])
|
||||
const xPackInfo = ref({ enableDataFill: false, type: undefined })
|
||||
const getEngine = () => {
|
||||
querySymmetricKey().then(response => {
|
||||
getDeEngine().then(res => {
|
||||
let { id, type, configuration } = res.data
|
||||
xPackInfo.value.enableDataFill = !!res.data.enableDataFill
|
||||
xPackInfo.value.type = type
|
||||
if (configuration) {
|
||||
configuration = JSON.parse(symmetricDecrypt(configuration, response.data))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user