diff --git a/apps/cloud/src/init.js b/apps/cloud/src/init.js index ce92ae42b5..8583ffbfa6 100644 --- a/apps/cloud/src/init.js +++ b/apps/cloud/src/init.js @@ -1,5 +1,5 @@ import { timeStampApi } from '@tap/api' -import WSClient from '@tap/business/src/shared/ws-client' +import { WSClient } from '@tap/business/src/shared/ws-client' import { installElement, VButton, VIcon } from '@tap/component' import Time from '@tap/shared/src/time' import { ElLoading } from 'element-plus' diff --git a/apps/daas/src/App.tsx b/apps/daas/src/App.tsx deleted file mode 100644 index 1b0d86f9d8..0000000000 --- a/apps/daas/src/App.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { defineComponent, provide, ref } from 'vue' -import { workerApi } from '@tap/api' -import { provideI18n, useMessage, I18n } from './hooks' -import LockedDialog from './components/LockedDialog.vue' - -export default defineComponent({ - setup() { - const showLocked = ref(false) - const lockedFeature = - import.meta.env.VUE_APP_MODE === 'community' - ? { - sharedMiningList: true, - dataVerificationList: true, - alarmSetting: true, - roleList: true, - valid_total: true, - webhookAlerts: true, - } - : {} - - provideI18n() - provide('checkAgent', async (cb) => { - const Message = useMessage() - const data = await workerApi.getAvailableAgent() - if (!data?.result?.length) { - Message.error(I18n.$t('agent_check_error')) - } else { - cb && cb() - } - }) - provide('buried', () => {}) - provide('lockedFeature', lockedFeature) - provide('openLocked', () => { - showLocked.value = true - }) - return () => { - return ( -
- - - (showLocked.value = val), - }} - > -
- ) - } - }, -}) diff --git a/apps/daas/src/App.vue b/apps/daas/src/App.vue index 74089ed64e..78cc98b564 100644 --- a/apps/daas/src/App.vue +++ b/apps/daas/src/App.vue @@ -1,11 +1,12 @@ - +
-
+
span:empty) { + padding: 0; + } .el-message-box__message { width: 100%; } - .el-message-box__headerbtn { display: flex; justify-content: center; diff --git a/packages/business/src/components/error-message/index.jsx b/packages/business/src/components/error-message/index.jsx index 3b16a70088..ecc5381215 100644 --- a/packages/business/src/components/error-message/index.jsx +++ b/packages/business/src/components/error-message/index.jsx @@ -16,7 +16,7 @@ function renderDialog(stack) {
@@ -75,7 +75,7 @@ export function ErrorMessage(stack, message) { title: '', showClose: true, closeIcon: CloseIcon, - customClass: ' w-80 max-w-1000 rounded-lg pro-message-box', + customClass: ' w-80 max-w-1000', message: renderDialog(stack), confirmButtonText: i18n.t('public_button_close'), ...(import.meta.env.VUE_APP_PLATFORM === 'DAAS' diff --git a/packages/business/src/components/error-message/index.scss b/packages/business/src/components/error-message/index.scss index b7a465a049..e1d26416d2 100644 --- a/packages/business/src/components/error-message/index.scss +++ b/packages/business/src/components/error-message/index.scss @@ -25,10 +25,4 @@ display: block; } } -} - -.pro-message-box { - .el-message-box__header { - padding: 0 !important; - } } \ No newline at end of file diff --git a/packages/business/src/locale/lang/zh-TW.js b/packages/business/src/locale/lang/zh-TW.js index 73a4456ddf..433e710537 100644 --- a/packages/business/src/locale/lang/zh-TW.js +++ b/packages/business/src/locale/lang/zh-TW.js @@ -568,6 +568,7 @@ export default { '此操作會丟失當前正在創建(編輯)的校驗任務', packages_business_verification_backConfirmTitle: '是否放棄創建(編輯)校驗任務?', + packages_business_verification_history_source_total_rows: '源總行數', packages_business_verification_source_total_rows: '源總行數', packages_business_verification_form_label_error_save_count: '錯誤保存條數', packages_business_verification_button_auto_add_table: '自動添加表', diff --git a/packages/business/src/views/verification/Form.vue b/packages/business/src/views/verification/Form.vue index 8eaa196f2c..ad63fd74a5 100644 --- a/packages/business/src/views/verification/Form.vue +++ b/packages/business/src/views/verification/Form.vue @@ -1,491 +1,547 @@ - diff --git a/packages/form/src/components/field-select/index.jsx b/packages/form/src/components/field-select/index.jsx index 1102da5d8e..940912e24f 100644 --- a/packages/form/src/components/field-select/index.jsx +++ b/packages/form/src/components/field-select/index.jsx @@ -150,9 +150,6 @@ const DefineFieldSelect = defineComponent({ popper-class="field-select-popper" options={fieldOptions.value} dataSource={fieldOptions.value} - onUpdate:modelValue={(val) => { - console.log('onUpdate:modelValue', val) - }} > {{ option: ({ option }) => ( diff --git a/packages/form/src/components/infinite-select/InfiniteSelect.vue b/packages/form/src/components/infinite-select/InfiniteSelect.vue index 2933cc9d5c..798a39b8df 100644 --- a/packages/form/src/components/infinite-select/InfiniteSelect.vue +++ b/packages/form/src/components/infinite-select/InfiniteSelect.vue @@ -87,7 +87,7 @@ const labelContent = ref('') // 回显数据 const setCurrentLabel = async () => { - const [current] = selectRef.value.states.selected + const [current] = selectRef.value?.states.selected || [] if (!current) return diff --git a/packages/form/src/index.js b/packages/form/src/index.js index 30f31edf67..3429810878 100644 --- a/packages/form/src/index.js +++ b/packages/form/src/index.js @@ -1,13 +1,14 @@ -import i18n from '@tap/i18n' import { registerValidateRules } from '@formily/core' +import { composeExport } from '@formily/element-plus/lib/__builtins__' +import i18n from '@tap/i18n' import cronParse from 'cron-parser' import * as components from './components' -import { composeExport } from '@formily/element-plus/lib/__builtins__' import langs from './locale' +import SchemaForm from './SchemaForm.vue' +import SchemaToForm from './SchemaToForm.vue' import './style.scss' -import SchemaToForm from './SchemaToForm' -export { SchemaToForm } +export { SchemaForm, SchemaToForm } export const validateCron = (value) => { value = value?.trim() @@ -24,8 +25,8 @@ export const validateCron = (value) => { if (cronParse.parseExpression(value).hasNext()) { return true } - } catch (e) { - console.log('cron-rule', e) // eslint-disable-line + } catch (error) { + console.log('cron-rule', error) // eslint-disable-line } return false } @@ -33,11 +34,13 @@ export const validateCron = (value) => { // cron表达式校验 registerValidateRules({ cron(value, rule) { - return validateCron(value) ? '' : rule.message || i18n.t('packages_form_src_index_cronbiao') + return validateCron(value) + ? '' + : rule.message || i18n.t('packages_form_src_index_cronbiao') }, }) -export { composeExport, langs, components } +export { components, composeExport, langs } export * from './components' export * from './shared' diff --git a/packages/i18n/src/locale/lang/en.js b/packages/i18n/src/locale/lang/en.js index 3124d04973..706866ea7d 100644 --- a/packages/i18n/src/locale/lang/en.js +++ b/packages/i18n/src/locale/lang/en.js @@ -155,8 +155,10 @@ export default { public_message_401: 'Login expired, Please login again', public_message_404: 'The requested resource does not exist', public_message_5xx: 'Server Exception', - public_message_network_unconnected: 'An abnormal network connection has been detected', - public_message_network_connected: 'The network has been successfully restored to its normal operating state', + public_message_network_unconnected: + 'An abnormal network connection has been detected', + public_message_network_connected: + 'The network has been successfully restored to its normal operating state', public_message_request_timeout: 'Request Timeout', public_message_send_success: 'Send Successfully', public_message_download_ok: 'Download Successfully', @@ -228,7 +230,8 @@ export default { public_connection_type_source_and_target: 'Source&Target', public_connection_information: 'Address', public_connection_schema_status: 'Schema', - public_connection_schema_status_tip: 'The connection can only be created normally once the Schema has been loaded.', + public_connection_schema_status_tip: + 'The connection can only be created normally once the Schema has been loaded.', public_connection_table_structure_update_time: 'Schema Load Time', public_connection_button_create: 'Create Connection', public_connection_button_copy: 'Copy Connection', @@ -242,7 +245,8 @@ export default { public_connection_form_account: 'Account', public_connection_form_password: 'Password', public_connection_form_schema: 'Schema', - public_connection_form_other_connection_string: 'Other connection string parameters', + public_connection_form_other_connection_string: + 'Other connection string parameters', public_connection_form_time_zone_of_time_type: 'Time zone of time type', public_connection_form_link_plugin_source: 'Link Plugin Source', public_source_database: 'Source Database', @@ -295,7 +299,8 @@ export default { //milestone public_milestone_time_cdc_consuming: 'start time-consuming', public_milestone_time_consuming: 'time-consuming', - public_milestone_time_table_structure: 'A total of migration {val} table structure', + public_milestone_time_table_structure: + 'A total of migration {val} table structure', public_milestone_time_scheduling: 'Task is scheduled to {val}', public_milestone_connection_succeeded: 'Connection succeeded', // 外存 @@ -357,10 +362,12 @@ export default { public_configuration_task: 'Configuration Task', public_need_help: 'Need Help?', public_test_and_continue: 'Test Connection and Continue', - menu_tour_instance: 'Here you can subscribe to the semi-managed engine deployed locally', + menu_tour_instance: + 'Here you can subscribe to the semi-managed engine deployed locally', menu_tour_instance_link: 'Learn More About Semi-Managed Engines', menu_tour_connection: 'Manage and Add Your Data Sources/Targets Here', - menu_tour_create_task: 'Click Here to Try Creating Advanced Replication and Synchronization Tasks', + menu_tour_create_task: + 'Click Here to Try Creating Advanced Replication and Synchronization Tasks', public_task_count: '{val} tasks', public_retrying: 'Retrying', public_next_retry_time: 'next retry scheduled for', @@ -371,7 +378,8 @@ export default { public_file_name: 'File Name', public_file_size: 'File Size', public_log_download: 'Log Download', - public_alert_401_tip: 'Your session has expired or logged in on another device. Please log in again to continue.', + public_alert_401_tip: + 'Your session has expired or logged in on another device. Please log in again to continue.', public_alert_401: 'Session Expired Reminder', public_document: 'Document', public_array: 'Array', @@ -381,5 +389,9 @@ export default { public_store_type: 'Store Type', public_from_db_type: 'From DB Type', public_sample_size: 'Sample Size', - public_foreign_key_tip: 'Foreign key {name} to {val}' + public_foreign_key_tip: 'Foreign key {name} to {val}', + public_form_design: 'Form Design', + public_code_edit: 'Code Edit', + public_preview_form: 'Preview Form', + public_template_example: 'Template Example', } diff --git a/packages/i18n/src/locale/lang/zh-CN.js b/packages/i18n/src/locale/lang/zh-CN.js index ac1fa1eb99..656212488e 100644 --- a/packages/i18n/src/locale/lang/zh-CN.js +++ b/packages/i18n/src/locale/lang/zh-CN.js @@ -277,7 +277,8 @@ export default { public_task_copy: '复制任务', public_task_import: '导入任务', public_task_export: '导出任务', - public_task_error_schedule_limit: '您的在线Agent已达最大任务限制,请启动离线的Agent。', + public_task_error_schedule_limit: + '您的在线Agent已达最大任务限制,请启动离线的Agent。', // 节点 public_node_name: '节点名称', public_node_type: '节点类型', @@ -368,7 +369,8 @@ export default { public_file_name: '文件名', public_file_size: '文件大小', public_log_download: '日志下载', - public_alert_401_tip: '您的会话已过期或者已在其他地方登录,请重新登录后继续操作', + public_alert_401_tip: + '您的会话已过期或者已在其他地方登录,请重新登录后继续操作', public_alert_401: '会话过期提醒', public_store_type: '存储类型', public_from_db_type: '来源数据库类型', @@ -378,5 +380,9 @@ export default { public_load_more: '加载更多', public_loading: '拼命加载中', public_load_end: '到底了', - public_foreign_key_tip: '外键 {name} 指向 {val}' + public_foreign_key_tip: '外键 {name} 指向 {val}', + public_form_design: '表单设计', + public_code_edit: '代码编辑', + public_preview_form: '预览表单', + public_template_example: '模板示例', } diff --git a/packages/i18n/src/locale/lang/zh-TW.js b/packages/i18n/src/locale/lang/zh-TW.js index 9bd6006d79..b67bdb3120 100644 --- a/packages/i18n/src/locale/lang/zh-TW.js +++ b/packages/i18n/src/locale/lang/zh-TW.js @@ -276,7 +276,8 @@ export default { public_task_copy: '複製任務', public_task_import: '導入任務', public_task_export: '導出任務', - public_task_error_schedule_limit: '您的線上Agent已達最大任務限制,請啟動離線的Agent。', + public_task_error_schedule_limit: + '您的線上Agent已達最大任務限制,請啟動離線的Agent。', // 任節點 public_node_name: '節點名稱', public_node_type: '節點類型', @@ -366,7 +367,8 @@ export default { public_file_name: '文件名', public_file_size: '文件大小', public_log_download: '日誌下載', - public_alert_401_tip: '您的會話已過期或者已在其他地方登錄,請重新登錄後繼續操作', + public_alert_401_tip: + '您的會話已過期或者已在其他地方登錄,請重新登錄後繼續操作', public_alert_401: '會話過期提醒', public_store_type: '存儲類型', public_from_db_type: '來源數據庫類型', @@ -376,5 +378,9 @@ export default { public_load_more: '加載更多', public_loading: '拼命加載中', public_load_end: '到底了', - public_foreign_key_tip: '外鍵 {name} 指向 {val}' + public_foreign_key_tip: '外鍵 {name} 指向 {val}', + public_form_design: '表單設計', + public_code_edit: '代碼編輯', + public_preview_form: '預覽表單', + public_template_example: '模板示例', } diff --git a/packages/node-design/src/components/StudioHeader.jsx b/packages/node-design/src/components/StudioHeader.jsx index efc9933317..fcb64c22c8 100644 --- a/packages/node-design/src/components/StudioHeader.jsx +++ b/packages/node-design/src/components/StudioHeader.jsx @@ -8,18 +8,19 @@ import { IconWidget } from './widgets' import { observer } from '@formily/reactive-vue' import { TextEditable } from '@tap/component' import { useRouter } from 'vue-router' -import i18n from '@tap/i18n' +import { useI18n } from '@tap/i18n' export const StudioHeader = observer( defineComponent({ directives: { focusSelect }, - setup: (props) => { + setup: () => { const workbenchRef = useWorkbench() const designerRef = useDesigner() const customNodeRef = useCustomNode() const saving = ref(false) const router = useRouter() - + const { t } = useI18n() + watch( router.currentRoute, async (route) => { @@ -40,7 +41,7 @@ export const StudioHeader = observer( const save = async () => { const customNode = customNodeRef.value if (!customNode.name) { - ElMessage.warning(i18n.global.t('packages_nodeDesign_custom_node_name_required')) + ElMessage.warning(t('packages_nodeDesign_custom_node_name_required')) return } saving.value = true @@ -54,7 +55,7 @@ export const StudioHeader = observer( params: { id: data.id, action: 'nodeSave' }, }) } - ElMessage.success(i18n.global.t('public_message_save_ok')) + ElMessage.success(t('public_message_save_ok')) } catch (e) { // eslint-disable-next-line no-console console.log('CustomNode save error', e) @@ -82,7 +83,7 @@ export const StudioHeader = observer(
{ customNodeRef.value.name = val @@ -90,7 +91,7 @@ export const StudioHeader = observer( />
- + - + - +
- 保存 + {t('public_button_save')}