Merge pull request #9012 from ulleo/dev

feat(X-Pack): 数据填报表国际化
This commit is contained in:
ulleo 2024-04-09 15:19:20 +08:00 committed by GitHub
commit e3ee104e56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 560 additions and 214 deletions

View File

@ -8,6 +8,7 @@ import io.dataease.controller.request.datafill.DataFillFormTableDataRequest;
import io.dataease.controller.response.datafill.DataFillFormTableDataResponse; import io.dataease.controller.response.datafill.DataFillFormTableDataResponse;
import io.dataease.dto.datafill.DataFillCommitLogDTO; import io.dataease.dto.datafill.DataFillCommitLogDTO;
import io.dataease.ext.ExtDataFillFormMapper; import io.dataease.ext.ExtDataFillFormMapper;
import io.dataease.i18n.Translator;
import io.dataease.plugins.common.base.domain.DataFillFormWithBLOBs; import io.dataease.plugins.common.base.domain.DataFillFormWithBLOBs;
import io.dataease.plugins.common.base.domain.Datasource; import io.dataease.plugins.common.base.domain.Datasource;
import io.dataease.plugins.common.base.mapper.DataFillFormMapper; import io.dataease.plugins.common.base.mapper.DataFillFormMapper;
@ -257,7 +258,7 @@ public class DataFillDataService {
List<TableField> tableFields = datasourceProvider.getTableFields(datasourceRequest).stream().filter(TableField::isPrimaryKey).collect(Collectors.toList()); List<TableField> tableFields = datasourceProvider.getTableFields(datasourceRequest).stream().filter(TableField::isPrimaryKey).collect(Collectors.toList());
if (CollectionUtils.isEmpty(tableFields)) { if (CollectionUtils.isEmpty(tableFields)) {
throw new RuntimeException("没有主键"); throw new RuntimeException(Translator.get("I18N_DATA_FILL_NO_PRIMARY_KEY"));
} }
TableField key = tableFields.get(0); TableField key = tableFields.get(0);

View File

@ -296,16 +296,16 @@ public class DataFillService {
DataFillUserTask task = dataFillUserTaskMapper.selectByPrimaryKey(userTaskId); DataFillUserTask task = dataFillUserTaskMapper.selectByPrimaryKey(userTaskId);
if (task == null) { if (task == null) {
DataEaseException.throwException("任务不存在"); DataEaseException.throwException(Translator.get("I18N_DATA_FILL_TASK_NOT_EXIST"));
} }
if (!AuthUtils.getUser().getUserId().equals(task.getUser())) { if (!AuthUtils.getUser().getUserId().equals(task.getUser())) {
DataEaseException.throwException("当前用户非任务用户"); DataEaseException.throwException(Translator.get("I18N_DATA_FILL_USER_NOT_TASK_USER"));
} }
if (task.getEndTime() != null) { if (task.getEndTime() != null) {
if (task.getEndTime().getTime() < System.currentTimeMillis()) { if (task.getEndTime().getTime() < System.currentTimeMillis()) {
DataEaseException.throwException("已经超过了任务截止时间"); DataEaseException.throwException(Translator.get("I18N_DATA_FILL_TASK_EXPIRED"));
} }
} }

View File

@ -240,6 +240,10 @@ I18N_ACCOUNT_LOCKED=Account\u3010%s\u3011is locked(Please contact the administra
I18N_PANEL_EXIST=The current panel name already exists under this directory I18N_PANEL_EXIST=The current panel name already exists under this directory
I18N_DATA_FILL_FORM_EXIST=The current data filling form name already exists under this directory I18N_DATA_FILL_FORM_EXIST=The current data filling form name already exists under this directory
I18N_DATA_FILL_TASK_EXIST=The current data filling task name already exists under this form I18N_DATA_FILL_TASK_EXIST=The current data filling task name already exists under this form
I18N_DATA_FILL_TASK_NOT_EXIST=Task not exists
I18N_DATA_FILL_USER_NOT_TASK_USER=Current user is not task user
I18N_DATA_FILL_TASK_EXPIRED=Task expired
I18N_DATA_FILL_NO_PRIMARY_KEY=PRIMARY KEY not exists
I18N_FOlDER_EXIST=The name already exists under this directory I18N_FOlDER_EXIST=The name already exists under this directory
I18N_DATASET_GROUP_EXIST=The current dataset grouping name already exists under this directory I18N_DATASET_GROUP_EXIST=The current dataset grouping name already exists under this directory
I18N_NOT_JAR=File is not jar! I18N_NOT_JAR=File is not jar!
@ -284,3 +288,7 @@ I18n_del_admin_tips=Forbidden to delete the admin account
I18N_NO_DRIVER_PERMISSION=Do not have permissions! I18N_NO_DRIVER_PERMISSION=Do not have permissions!
i18n_field_circular_error=Field error i18n_field_circular_error=Field error
i18n_field_circular_ref=Field has Circular Reference i18n_field_circular_ref=Field has Circular Reference
\u6570\u636E\u586B\u62A5=Data Filling
\u8868\u5355\u7BA1\u7406=From Manage
\u6211\u7684\u586B\u62A5=My Job
\u8868\u5355\u521B\u5EFA=Form Create

View File

@ -240,6 +240,10 @@ I18N_ACCOUNT_LOCKED=\u8D26\u53F7\u3010%s\u3011\u5DF2\u9501\u5B9A(\u8BF7\u8054\u7
I18N_PANEL_EXIST=\u5F53\u524D\u4EEA\u8868\u677F\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728 I18N_PANEL_EXIST=\u5F53\u524D\u4EEA\u8868\u677F\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728
I18N_DATA_FILL_FORM_EXIST=\u5F53\u524D\u6570\u636E\u586B\u62A5\u8868\u5355\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728 I18N_DATA_FILL_FORM_EXIST=\u5F53\u524D\u6570\u636E\u586B\u62A5\u8868\u5355\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728
I18N_DATA_FILL_TASK_EXIST=\u5F53\u524D\u6570\u636E\u586B\u62A5\u4EFB\u52A1\u540D\u79F0\u5728\u8BE5\u8868\u5355\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728 I18N_DATA_FILL_TASK_EXIST=\u5F53\u524D\u6570\u636E\u586B\u62A5\u4EFB\u52A1\u540D\u79F0\u5728\u8BE5\u8868\u5355\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728
I18N_DATA_FILL_TASK_NOT_EXIST=\u4EFB\u52A1\u4E0D\u5B58\u5728
I18N_DATA_FILL_USER_NOT_TASK_USER=\u5F53\u524D\u7528\u6237\u975E\u4EFB\u52A1\u7528\u6237
I18N_DATA_FILL_TASK_EXPIRED=\u5DF2\u7ECF\u8D85\u8FC7\u4E86\u4EFB\u52A1\u622A\u6B62\u65F6\u95F4
I18N_DATA_FILL_NO_PRIMARY_KEY=\u6CA1\u6709\u4E3B\u952E
I18N_FOlDER_EXIST=\u5F53\u524D\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728 I18N_FOlDER_EXIST=\u5F53\u524D\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728
I18N_DATASET_GROUP_EXIST=\u5F53\u524D\u6570\u636E\u96C6\u5206\u7EC4\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728 I18N_DATASET_GROUP_EXIST=\u5F53\u524D\u6570\u636E\u96C6\u5206\u7EC4\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728
I18N_NOT_JAR=\u6587\u4EF6\u4E0D\u662F jar \u5305! I18N_NOT_JAR=\u6587\u4EF6\u4E0D\u662F jar \u5305!
@ -274,3 +278,7 @@ I18n_del_admin_tips=\u7981\u6B62\u5220\u9664admin\u8D26\u53F7
I18N_NO_DRIVER_PERMISSION=\u6CA1\u6709\u6743\u9650\uFF01 I18N_NO_DRIVER_PERMISSION=\u6CA1\u6709\u6743\u9650\uFF01
i18n_field_circular_error=\u5B57\u6BB5\u89E3\u6790\u9519\u8BEF\uFF0C\u53EF\u80FD\u539F\u56E0\uFF1A\u5B57\u6BB5\u5DF2\u5220\u9664\u3001\u8BA1\u7B97\u5B57\u6BB5\u5F15\u7528\u5C42\u7EA7\u8FC7\u6DF1\u3001\u5B58\u5728\u5FAA\u73AF\u5F15\u7528\u7B49\uFF0C\u8BF7\u68C0\u67E5\u8868\u8282\u70B9\u548C\u5B57\u6BB5\u5E76\u91CD\u65B0\u7F16\u8F91\u3002 i18n_field_circular_error=\u5B57\u6BB5\u89E3\u6790\u9519\u8BEF\uFF0C\u53EF\u80FD\u539F\u56E0\uFF1A\u5B57\u6BB5\u5DF2\u5220\u9664\u3001\u8BA1\u7B97\u5B57\u6BB5\u5F15\u7528\u5C42\u7EA7\u8FC7\u6DF1\u3001\u5B58\u5728\u5FAA\u73AF\u5F15\u7528\u7B49\uFF0C\u8BF7\u68C0\u67E5\u8868\u8282\u70B9\u548C\u5B57\u6BB5\u5E76\u91CD\u65B0\u7F16\u8F91\u3002
i18n_field_circular_ref=\u5B57\u6BB5\u5B58\u5728\u5FAA\u73AF\u5F15\u7528 i18n_field_circular_ref=\u5B57\u6BB5\u5B58\u5728\u5FAA\u73AF\u5F15\u7528
\u6570\u636E\u586B\u62A5=\u6570\u636E\u586B\u62A5
\u8868\u5355\u7BA1\u7406=\u8868\u5355\u7BA1\u7406
\u6211\u7684\u586B\u62A5=\u6211\u7684\u586B\u62A5
\u8868\u5355\u521B\u5EFA=\u8868\u5355\u521B\u5EFA

View File

@ -36,7 +36,6 @@
\u7F16\u8F91\u89D2\u8272=\u7DE8\u8F2F\u89D2\u8272 \u7F16\u8F91\u89D2\u8272=\u7DE8\u8F2F\u89D2\u8272
\u7F16\u8F91\u8FDE\u63A5=\u7DE8\u8F2F\u93C8\u63A5 \u7F16\u8F91\u8FDE\u63A5=\u7DE8\u8F2F\u93C8\u63A5
\u83DC\u5355\u7BA1\u7406=\u83DC\u55AE\u7BA1\u7406 \u83DC\u5355\u7BA1\u7406=\u83DC\u55AE\u7BA1\u7406
\u8868\u5355\u7BA1\u7406=\u8868\u55AE\u7BA1\u7406
\u89C6\u56FE=\u8996\u5716 \u89C6\u56FE=\u8996\u5716
\u89D2\u8272\u7BA1\u7406=\u89D2\u8272\u7BA1\u7406 \u89D2\u8272\u7BA1\u7406=\u89D2\u8272\u7BA1\u7406
\u89D2\u8272\u8868\u5355=\u89D2\u8272\u8868\u55AE \u89D2\u8272\u8868\u5355=\u89D2\u8272\u8868\u55AE
@ -236,6 +235,10 @@ I18N_ACCOUNT_LOCKED=\u8CEC\u865F\u3010%s\u3011\u5DF2\u9396\u5B9A(\u8ACB\u806F\u7
I18N_PANEL_EXIST=\u7576\u524D\u5100\u9336\u95C6\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728 I18N_PANEL_EXIST=\u7576\u524D\u5100\u9336\u95C6\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728
I18N_DATA_FILL_FORM_EXIST=\u7576\u524D\u6578\u64DA\u586B\u5831\u8868\u55AE\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728 I18N_DATA_FILL_FORM_EXIST=\u7576\u524D\u6578\u64DA\u586B\u5831\u8868\u55AE\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728
I18N_DATA_FILL_TASK_EXIST=\u7576\u524D\u6578\u64DA\u586B\u5831\u4EFB\u52D9\u540D\u7A31\u5728\u8A72\u8868\u55AE\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728 I18N_DATA_FILL_TASK_EXIST=\u7576\u524D\u6578\u64DA\u586B\u5831\u4EFB\u52D9\u540D\u7A31\u5728\u8A72\u8868\u55AE\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728
I18N_DATA_FILL_TASK_NOT_EXIST=\u4EFB\u52D9\u4E0D\u5B58\u5728
I18N_DATA_FILL_USER_NOT_TASK_USER=\u7576\u524D\u7528\u6236\u975E\u4EFB\u52D9\u7528\u6236
I18N_DATA_FILL_TASK_EXPIRED=\u5DF2\u7D93\u8D85\u904E\u4E86\u4EFB\u52D9\u622A\u6B62\u6642\u9593
I18N_DATA_FILL_NO_PRIMARY_KEY=\u6C92\u6709\u4E3B\u9375
I18N_FOlDER_EXIST=\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728 I18N_FOlDER_EXIST=\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728
I18N_DATASET_GROUP_EXIST=\u7576\u524D\u6578\u64DA\u96C6\u5206\u7D44\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728 I18N_DATASET_GROUP_EXIST=\u7576\u524D\u6578\u64DA\u96C6\u5206\u7D44\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728
I18N_NOT_JAR=\u6587\u4EF6\u4E0D\u662F jar \u5305! I18N_NOT_JAR=\u6587\u4EF6\u4E0D\u662F jar \u5305!
@ -280,3 +283,7 @@ I18n_del_admin_tips=\u7981\u6B62\u522A\u9664admin\u8CEC\u865F
I18N_NO_DRIVER_PERMISSION=\u6C92\u6709\u8A31\u53EF\u6B0A\uFF01 I18N_NO_DRIVER_PERMISSION=\u6C92\u6709\u8A31\u53EF\u6B0A\uFF01
i18n_field_circular_error=\u5B57\u6BB5\u89E3\u6790\u932F\u8AA4\uFF0C\u53EF\u80FD\u539F\u56E0\uFF1A\u5B57\u6BB5\u5DF2\u522A\u9664\u3001\u8A08\u7B97\u5B57\u6BB5\u5F15\u7528\u5C64\u7D1A\u904E\u6DF1\u3001\u5B58\u5728\u5FAA\u74B0\u5F15\u7528\u7B49\uFF0C\u8ACB\u6AA2\u67E5\u8868\u7BC0\u9EDE\u548C\u5B57\u6BB5\u4E26\u91CD\u65B0\u7DE8\u8F2F\u3002 i18n_field_circular_error=\u5B57\u6BB5\u89E3\u6790\u932F\u8AA4\uFF0C\u53EF\u80FD\u539F\u56E0\uFF1A\u5B57\u6BB5\u5DF2\u522A\u9664\u3001\u8A08\u7B97\u5B57\u6BB5\u5F15\u7528\u5C64\u7D1A\u904E\u6DF1\u3001\u5B58\u5728\u5FAA\u74B0\u5F15\u7528\u7B49\uFF0C\u8ACB\u6AA2\u67E5\u8868\u7BC0\u9EDE\u548C\u5B57\u6BB5\u4E26\u91CD\u65B0\u7DE8\u8F2F\u3002
i18n_field_circular_ref=\u5B57\u6BB5\u5B58\u5728\u5FAA\u74B0\u5F15\u7528 i18n_field_circular_ref=\u5B57\u6BB5\u5B58\u5728\u5FAA\u74B0\u5F15\u7528
\u6570\u636E\u586B\u62A5=\u6578\u64DA\u586B\u5831
\u8868\u5355\u7BA1\u7406=\u8868\u55AE\u7BA1\u7406
\u6211\u7684\u586B\u62A5=\u6211\u7684\u586B\u5831
\u8868\u5355\u521B\u5EFA=\u8868\u55AE\u5275\u5EFA

View File

@ -594,12 +594,32 @@ export default {
enum_filter: 'Enum Filter' enum_filter: 'Enum Filter'
}, },
data_fill: { data_fill: {
data_fill: 'Data Filling',
new_folder: 'New Folder',
form_manage: 'Form Manage',
my_job: 'My Job',
form: { form: {
name: 'Name',
rename: 'Rename',
untitled: 'Untitled',
create_new_form: 'Create New Form',
title: 'Title',
no_form: 'Click to Create New',
form_list_name: 'Form List',
create_form: 'Create Form',
please_select: 'Please Select',
component: 'Component',
component_setting: 'Component Setting',
hint: 'Hint',
option: 'Option',
form_setting: 'Form Setting',
input_limit_50: 'No more than 50 characters',
confirm_delete: 'Confirm delete? (The tables created in database will not be deleted)', confirm_delete: 'Confirm delete? (The tables created in database will not be deleted)',
list: 'Form List', list: 'Form List',
record: 'Fill Record', record: 'Fill Record',
task_manage: 'Task Manage', task_manage: 'Task Manage',
form_name: 'Form Name', form_name: 'Form Name',
folder: 'Folder',
datasource: 'Datasource', datasource: 'Datasource',
table: 'Table', table: 'Table',
creator: 'Creator', creator: 'Creator',
@ -610,14 +630,97 @@ export default {
modify: 'Modify', modify: 'Modify',
show: 'Show', show: 'Show',
delete: 'Delete', delete: 'Delete',
show_data: 'Show Data' show_data: 'Show Data',
text: 'Text',
number: 'Number',
tel: 'Tel',
email: 'Email',
duplicate_error: 'Duplicate',
value_not_exists: 'Value Not Exists',
range_separator: 'Range Separator',
start_hint_word: 'Start Hint Word',
end_hint_word: 'End Hint Word',
input_type: 'Input Type',
check: 'Check',
set_required: 'Set Required',
set_unique: 'Set Unique',
set_multiple: 'Set Multiple',
use_datetime: 'Use Datetime',
custom: 'Custom',
option_value: 'Options',
add_option: 'Add Option',
form_name_cannot_none: 'Form name cannot be null',
form_components_cannot_null: 'Form components cannot be null',
option_list_cannot_empty: 'Option list cannot be empty',
component_setting_error: 'Component setting error',
table_name: 'Table',
form_column: 'Form Column',
column_name: 'Table Column',
column_type: 'Table Column Type',
create_index: 'Create Index',
add_index: 'Add Index',
index_name: 'Index Name',
index_column: 'Index Column',
order_asc: 'Asc',
order_desc: 'Desc',
order_none: 'Default Order',
add_column: 'Add Column',
please_insert_start: 'Start Time Column Name',
please_insert_end: 'End Time Column Name',
save_form: 'Save Form'
},
database: {
nvarchar: 'Nvarchar',
text: 'Text',
number: 'Number',
decimal: 'Decimal',
datetime: 'Datetime'
}, },
data: { data: {
confirm_delete: 'Confirm delete?' confirm_delete: 'Confirm delete?',
add_data: 'Add Data',
insert_data: 'Insert Data',
update_data: 'Update Data',
delete_data: 'Delete Data',
recent_committer: 'Recent Committer',
recent_commit_time: 'Recent Commit Time',
start: 'Start',
end: 'End',
id_is: 'ID [',
data_not_found: '] Not Found'
}, },
task: { task: {
name: 'Name',
creator: 'Creator',
create_time: 'Create Time',
rate_type: 'Rate Type',
task_status: 'Status',
add_task: 'Add Task',
task_name: 'Task Name',
task_remain_time: 'Remaining Validity',
task_sender: 'Task Sender',
start_filling: 'Start Filling',
task_distribute_time: 'Distribution Time',
task_expiration_time: 'Expiration Time',
task_finished_time: 'Finished Time',
task_end_time: 'End Time',
edit_data: 'Edit Data',
show_data: 'Show Data',
confirm_enable: 'Confirm enable task?', confirm_enable: 'Confirm enable task?',
confirm_disable: 'Confirm disable task?' confirm_disable: 'Confirm disable task?',
edit_task: 'Edit Task',
create_task: 'Create Task',
edit: 'Edit',
stop: 'Stop',
start: 'Start',
delete: 'Delete',
no_time_limit: 'No Time Limit',
todo: 'Todo',
finished: 'Finished',
expired: 'Expired',
task_finish_in: 'Task Finished in ',
task_finish_in_suffix: ''
}, },
on_the_left: 'Please select a form on the left', on_the_left: 'Please select a form on the left',
search_by_commit_name: 'Search by operator name' search_by_commit_name: 'Search by operator name'

View File

@ -190,7 +190,7 @@ export default {
unbind: '解綁', unbind: '解綁',
unlock: '解鎖', unlock: '解鎖',
unlock_success: '解鎖成功', unlock_success: '解鎖成功',
parameter_effect: '參數值僅在數集編輯時生效', parameter_effect: '參數值僅在數集編輯時生效',
uninstall: '卸載', uninstall: '卸載',
no_result: '沒有找到相關內容', no_result: '沒有找到相關內容',
@ -429,9 +429,9 @@ export default {
ukey_title: 'API Keys', ukey_title: 'API Keys',
thumbnail: '縮略圖', thumbnail: '縮略圖',
confirm_delete: '確認刪除', confirm_delete: '確認刪除',
delete_this_dashboard: '確認除該儀錶板嗎?', delete_this_dashboard: '確認除該儀錶板嗎?',
cancel_this_dashboard: '確認取消該默儀錶板嗎?', cancel_this_dashboard: '確認取消該默儀錶板嗎?',
delete_this_folder: '確認除該目錄嗎?', delete_this_folder: '確認除該目錄嗎?',
confirm_stop: '確認停止', confirm_stop: '確認停止',
stop_success: '停止成功', stop_success: '停止成功',
treeselect: { treeselect: {
@ -594,12 +594,32 @@ export default {
enum_filter: '枚舉篩選' enum_filter: '枚舉篩選'
}, },
data_fill: { data_fill: {
data_fill: '數據填報',
new_folder: '新建文件夾',
form_manage: '表單管理',
my_job: '我的填報',
form: { form: {
name: '名稱',
rename: '重命名',
untitled: '未命名表單',
create_new_form: '新建表單',
title: '標題',
no_form: '暫無表單,點擊',
form_list_name: '填報表單',
create_form: '新建表單',
please_select: '請選擇',
component: '組件',
component_setting: '組件設置',
hint: '提示詞',
input_limit_50: '不超過50個字符',
option: '選項',
form_setting: '表單設置',
confirm_delete: '確認刪除?(不會刪除已創建的數據庫表)', confirm_delete: '確認刪除?(不會刪除已創建的數據庫表)',
list: '表單數據', list: '表單數據',
record: '提交記錄', record: '提交記錄',
task_manage: '任務管理', task_manage: '任務管理',
form_name: '表單名稱', form_name: '表單名稱',
folder: '所屬文件夾',
datasource: '數據源', datasource: '數據源',
table: '數據庫表', table: '數據庫表',
creator: '創建人', creator: '創建人',
@ -610,14 +630,97 @@ export default {
modify: '修改', modify: '修改',
show: '查看', show: '查看',
delete: '刪除', delete: '刪除',
show_data: '查看數據' show_data: '查看數據',
text: '普通文本',
number: '數字',
tel: '手機號',
email: '郵箱',
duplicate_error: '重復',
value_not_exists: '值不存在',
range_separator: '分割字符',
start_hint_word: '開始提示詞',
end_hint_word: '結束提示詞',
input_type: '格式類型',
check: '校驗',
set_required: '設置為必填項',
set_unique: '不允許重復值',
set_multiple: '允許多選',
use_datetime: '使用日期時間',
custom: '自定義',
option_value: '選項值',
add_option: '添加選項值',
form_name_cannot_none: '表單名稱不能為空',
form_components_cannot_null: '請添加表單組件',
option_list_cannot_empty: '選項值不能為空',
component_setting_error: '組件設置錯誤',
table_name: '數據庫表名',
form_column: '表單字段',
column_name: '數據庫表字段名稱',
column_type: '數據庫字段類型',
create_index: '創建索引',
add_index: '新增索引',
index_name: '索引名稱',
index_column: '索引字段',
order_asc: '順序',
order_desc: '倒序',
order_none: '默認排序',
add_column: '新增字段',
please_insert_start: '請輸入開始時間',
please_insert_end: '請輸入結束時間',
save_form: '保存表單'
},
database: {
nvarchar: '字符串',
text: '長文本',
number: '整型數字',
decimal: '小數數字',
datetime: '日期'
}, },
data: { data: {
confirm_delete: '確認刪除?' confirm_delete: '確認刪除?',
add_data: '添加數據',
insert_data: '插入數據',
update_data: '更新數據',
delete_data: '刪除數據',
recent_committer: '最近提交人',
recent_commit_time: '最近提交時間',
start: '開始',
end: '結束',
id_is: 'ID為[',
data_not_found: ']的數據不存在'
}, },
task: { task: {
name: '名稱',
creator: '創建人',
create_time: '創建時間',
rate_type: '任務下發模式',
task_status: '任務狀態',
add_task: '添加任務',
task_name: '任務名稱',
task_remain_time: '任務有效期',
task_sender: '任務下發人',
start_filling: '立即填報',
task_distribute_time: '任務下發時間',
task_expiration_time: '任務過期時間',
task_finished_time: '任務完成時間',
task_end_time: '任務截止時間',
edit_data: '編輯數據',
show_data: '查看數據',
confirm_enable: '確認啟動任務?(單次任務會新建下發任務)', confirm_enable: '確認啟動任務?(單次任務會新建下發任務)',
confirm_disable: '確認停止任務?' confirm_disable: '確認停止任務?',
edit_task: '編輯任務',
create_task: '新建任務',
edit: '編輯',
stop: '停止',
start: '啟動',
delete: '刪除',
no_time_limit: '不限時',
todo: '待辦項',
finished: '已完成',
expired: '已過期',
task_finish_in: '在任務下發',
task_finish_in_suffix: '內完成填報'
}, },
on_the_left: '請在左側選擇表單', on_the_left: '請在左側選擇表單',
search_by_commit_name: '根據操作人名稱搜索' search_by_commit_name: '根據操作人名稱搜索'
@ -909,7 +1012,7 @@ export default {
proxy_account: '代理賬號', proxy_account: '代理賬號',
proxy_pwd: '代理密碼', proxy_pwd: '代理密碼',
proxy_host: '代理服務地址', proxy_host: '代理服務地址',
proxy_port: '服端口', proxy_port: '服端口',
email_server_config: '郵箱服務器配置', email_server_config: '郵箱服務器配置',
edit_success: '編輯成功', edit_success: '編輯成功',
mailbox_service_settings: '郵件設置', mailbox_service_settings: '郵件設置',
@ -974,7 +1077,7 @@ export default {
request_timeout: '請求超時時間', request_timeout: '請求超時時間',
message_retention_time: '消息保留時間', message_retention_time: '消息保留時間',
log_retention_time: '日誌保留時間', log_retention_time: '日誌保留時間',
ds_sync_log_retention_time: '数据同步日誌保留時間', ds_sync_log_retention_time: '數據同步日誌保留時間',
ds_check_time: '數據源檢測時間間隔', ds_check_time: '數據源檢測時間間隔',
test_mail_recipient: '僅用來作為測試郵件收件人', test_mail_recipient: '僅用來作為測試郵件收件人',
to_enable_tsl: '如果SMTP埠是587通常需要啟用TSL', to_enable_tsl: '如果SMTP埠是587通常需要啟用TSL',
@ -1222,8 +1325,8 @@ export default {
filter_not_empty: '非空字符串', filter_not_empty: '非空字符串',
filter_include: '包含', filter_include: '包含',
filter_not_include: '不包含', filter_not_include: '不包含',
filter_end_with: '尾是', filter_end_with: '尾是',
filter_begin_with: '开头是', filter_begin_with: '開頭是',
rose_type: '玫瑰圖模式', rose_type: '玫瑰圖模式',
radius_mode: '半徑', radius_mode: '半徑',
area_mode: '面積', area_mode: '面積',
@ -1706,13 +1809,13 @@ export default {
}, },
dataset: { dataset: {
scope_edit: '僅編輯時生效', scope_edit: '僅編輯時生效',
scope_all: '數集預覽時全域生效', scope_all: '數集預覽時全域生效',
spend_time: '耗時', spend_time: '耗時',
sql: 'SQL 語句', sql: 'SQL 語句',
sql_result: '運行結果', sql_result: '運行結果',
parse_filed: '解析字段', parse_filed: '解析字段',
field_rename: '字段重命名', field_rename: '字段重命名',
params_work: '僅編輯時生效:參數值僅在數据集編輯時生效; 全域生效:在數据集查看、預覽、以及用到數据集的視圖中均生效。', params_work: '僅編輯時生效:參數值僅在數據集編輯時生效; 全域生效:在數據集查看、預覽、以及用到數據集的視圖中均生效。',
sql_variable_limit_1: '1、SQL變數只能在WHERE條件中使用', sql_variable_limit_1: '1、SQL變數只能在WHERE條件中使用',
sql_variable_limit_2: '2、示例select * from table_name where column_name1=\'${param_name1}\' and column_name2 in ${param_name2}', sql_variable_limit_2: '2、示例select * from table_name where column_name1=\'${param_name1}\' and column_name2 in ${param_name2}',
selesql_variable_limit_2ct_year: '選擇年', selesql_variable_limit_2ct_year: '選擇年',
@ -1935,7 +2038,7 @@ export default {
disable: '禁用', disable: '禁用',
prohibit: '禁用', prohibit: '禁用',
desensitization: '脫敏', desensitization: '脫敏',
desensitization_rule: '敏規則', desensitization_rule: '敏規則',
m: 'M等於', m: 'M等於',
n: 'N等於', n: 'N等於',
mgtn: 'M 不能大於 N' mgtn: 'M 不能大於 N'
@ -2076,7 +2179,7 @@ export default {
all_compute_mode: '直連、抽取模式', all_compute_mode: '直連、抽取模式',
extra_params: '額外的JDBC連接字符串', extra_params: '額外的JDBC連接字符串',
please_input_dataPath: '請輸入 JsonPath 數據路徑', please_input_dataPath: '請輸入 JsonPath 數據路徑',
show_api_data: '查看API数据結構', show_api_data: '查看API數據結構',
warning: '包含無效數據表', warning: '包含無效數據表',
data_table: '數據表', data_table: '數據表',
data_table_name: '數據表名稱', data_table_name: '數據表名稱',
@ -2139,9 +2242,9 @@ export default {
all: '所有', all: '所有',
other: '其他', other: '其他',
this_data_source: '確定刪除該數據源嗎?', this_data_source: '確定刪除該數據源嗎?',
delete_this_dataset: '確定删除該數据集嗎?', delete_this_dataset: '確定刪除該數據集嗎?',
cannot_be_deleted_dataset: '該數据集存在如下血緣關係,删除會造成相關儀錶板的視圖失效,確定删除?', cannot_be_deleted_dataset: '該數據集存在如下血緣關係,刪除會造成相關儀錶板的視圖失效,確定刪除?',
cannot_be_deleted_datasource: '該數據源存在如下血緣關係,删除會造成相關儀錶板的視圖失效,確定删除?', cannot_be_deleted_datasource: '該數據源存在如下血緣關係,刪除會造成相關儀錶板的視圖失效,確定刪除?',
edit_folder: '編輯資料夾', edit_folder: '編輯資料夾',
click_to_check: '點擊去查看血緣關係', click_to_check: '點擊去查看血緣關係',
delete_this_item: '是否要刪除此項?', delete_this_item: '是否要刪除此項?',
@ -2171,7 +2274,7 @@ export default {
border_color_setting: '邊框配色', border_color_setting: '邊框配色',
unpublished_tips: '取消發布後,該儀表板不能被查看。確定要取消發布?', unpublished_tips: '取消發布後,該儀表板不能被查看。確定要取消發布?',
position_adjust_component: '位置調整', position_adjust_component: '位置調整',
active_font_size: '中字體大小', active_font_size: '中字體大小',
carousel: '輪播', carousel: '輪播',
enable_carousel: '啟用輪播', enable_carousel: '啟用輪播',
switch_time: '切換時間', switch_time: '切換時間',
@ -2194,7 +2297,7 @@ export default {
component_color: '組件配色', component_color: '組件配色',
chart_title: '圖表標題', chart_title: '圖表標題',
filter_component: '過濾組件', filter_component: '過濾組件',
enable_refresh_view: '数据刷新', enable_refresh_view: '數據刷新',
enable_view_loading: '視圖加載提示', enable_view_loading: '視圖加載提示',
image_size_tips: '圖片請不要大於15M', image_size_tips: '圖片請不要大於15M',
image_add_tips: '只能插入圖片', image_add_tips: '只能插入圖片',
@ -2204,7 +2307,7 @@ export default {
panel_cache_use_tips: '檢查到上次有儀表板未能正常保存,是否使用上次未保存的儀表板?', panel_cache_use_tips: '檢查到上次有儀表板未能正常保存,是否使用上次未保存的儀表板?',
template_name_tips: '儀表板名稱必填', template_name_tips: '儀表板名稱必填',
panel_background_item: '自定義儀表板背景', panel_background_item: '自定義儀表板背景',
panel_background_image_tips: '當前支持jpeg,jpg,png,gif,svg文件,大小15M', panel_background_image_tips: '當前支持jpeg,jpg,png,gif,svg文件,大小15M',
reUpload: '重新上傳', reUpload: '重新上傳',
create_by: '創建人', create_by: '創建人',
create_time: '創建時間', create_time: '創建時間',
@ -2241,8 +2344,8 @@ export default {
theme_color_dark: '深色', theme_color_dark: '深色',
theme_color_light: '淺色', theme_color_light: '淺色',
refresh_frequency: '刷新頻率', refresh_frequency: '刷新頻率',
refresh_browser_frequency: '浏览器刷新', refresh_browser_frequency: '瀏覽器刷新',
refresh_browser_tips: '仅公共链接生效', refresh_browser_tips: '僅公共鏈接生效',
card_color_matching: '卡片配色', card_color_matching: '卡片配色',
table_color_matching: '表格配色', table_color_matching: '表格配色',
background_color: '背景顏色', background_color: '背景顏色',
@ -2484,9 +2587,9 @@ export default {
link_panel: '儀表闆', link_panel: '儀表闆',
select_jump_panel: '選擇關聯的儀表闆', select_jump_panel: '選擇關聯的儀表闆',
link_view: '聯動視圖', link_view: '聯動視圖',
link_component: '聯動件', link_component: '聯動件',
link_view_field: '聯動視圖字段', link_view_field: '聯動視圖字段',
link_component_field: '聯動件字段', link_component_field: '聯動件字段',
add_jump_field: '追加跳轉聯動依賴字段', add_jump_field: '追加跳轉聯動依賴字段',
input_jump_link: '請輸入跳轉連接', input_jump_link: '請輸入跳轉連接',
select_dimension: '請選擇維度...', select_dimension: '請選擇維度...',
@ -2994,7 +3097,7 @@ export default {
user: '操作用戶', user: '操作用戶',
time: '操作時間', time: '操作時間',
export: '導出', export: '導出',
export_as: '導出', export_as: '導出',
confirm: '確定導出嗎?', confirm: '確定導出嗎?',
search_by_key: '搜索詳情', search_by_key: '搜索詳情',
ip: 'IP地址' ip: 'IP地址'
@ -3034,7 +3137,7 @@ export default {
datasource_history: '復用', datasource_history: '復用',
datasource_from: '數據來源', datasource_from: '數據來源',
apply_template: '應用模版', apply_template: '應用模版',
execution_time: '执行时间', execution_time: '執行時間',
app_manager: '應用管理', app_manager: '應用管理',
app_upload: '上傳應用', app_upload: '上傳應用',
no_apps: '暫無應用', no_apps: '暫無應用',

View File

@ -593,12 +593,32 @@ export default {
enum_filter: '枚举筛选' enum_filter: '枚举筛选'
}, },
data_fill: { data_fill: {
data_fill: '数据填报',
new_folder: '新建文件夹',
form_manage: '表单管理',
my_job: '我的填报',
form: { form: {
name: '名称',
rename: '重命名',
untitled: '未命名表单',
create_new_form: '新建表单',
title: '标题',
no_form: '暂无表单,点击',
form_list_name: '填报表单',
create_form: '新建表单',
please_select: '请选择',
component: '组件',
component_setting: '组件设置',
hint: '提示词',
input_limit_50: '不超过50个字符',
option: '选项',
form_setting: '表单设置',
confirm_delete: '确认删除?(不会删除已创建的数据库表)', confirm_delete: '确认删除?(不会删除已创建的数据库表)',
list: '表单数据', list: '表单数据',
record: '提交记录', record: '提交记录',
task_manage: '任务管理', task_manage: '任务管理',
form_name: '表单名称', form_name: '表单名称',
folder: '所属文件夹',
datasource: '数据源', datasource: '数据源',
table: '数据库表', table: '数据库表',
creator: '创建人', creator: '创建人',
@ -609,14 +629,96 @@ export default {
modify: '修改', modify: '修改',
show: '查看', show: '查看',
delete: '删除', delete: '删除',
show_data: '查看数据' show_data: '查看数据',
text: '普通文本',
number: '数字',
tel: '手机号',
email: '邮箱',
duplicate_error: '重复',
value_not_exists: '值不存在',
range_separator: '分割字符',
start_hint_word: '开始提示词',
end_hint_word: '结束提示词',
input_type: '格式类型',
check: '校验',
set_required: '设置为必填项',
set_unique: '不允许重复值',
set_multiple: '允许多选',
use_datetime: '使用日期时间',
custom: '自定义',
option_value: '选项值',
add_option: '添加选项值',
form_name_cannot_none: '表单名称不能为空',
form_components_cannot_null: '请添加表单组件',
option_list_cannot_empty: '选项值不能为空',
component_setting_error: '组件设置错误',
table_name: '数据库表名',
form_column: '表单字段',
column_name: '数据库表字段名称',
column_type: '数据库字段类型',
create_index: '创建索引',
add_index: '新增索引',
index_name: '索引名称',
index_column: '索引字段',
order_asc: '顺序',
order_desc: '倒序',
order_none: '默认排序',
add_column: '新增字段',
please_insert_start: '请输入开始时间',
please_insert_end: '请输入结束时间',
save_form: '保存表单'
},
database: {
nvarchar: '字符串',
text: '长文本',
number: '整型数字',
decimal: '小数数字',
datetime: '日期'
}, },
data: { data: {
confirm_delete: '确认删除?' confirm_delete: '确认删除?',
add_data: '添加数据',
insert_data: '插入数据',
update_data: '更新数据',
delete_data: '删除数据',
recent_committer: '最近提交人',
recent_commit_time: '最近提交时间',
start: '开始',
end: '结束',
id_is: 'ID为[',
data_not_found: ']的数据不存在'
}, },
task: { task: {
name: '名称',
creator: '创建人',
create_time: '创建时间',
rate_type: '任务下发模式',
task_status: '任务状态',
task_name: '任务名称',
add_task: '添加任务',
task_remain_time: '任务有效期',
task_sender: '任务下发人',
start_filling: '立即填报',
task_distribute_time: '任务下发时间',
task_expiration_time: '任务过期时间',
task_finished_time: '任务完成时间',
task_end_time: '任务截止时间',
edit_data: '编辑数据',
show_data: '查看数据',
confirm_enable: '确认启动任务?(单次任务会新建下发任务)', confirm_enable: '确认启动任务?(单次任务会新建下发任务)',
confirm_disable: '确认停止任务?' confirm_disable: '确认停止任务?',
edit_task: '编辑任务',
create_task: '新建任务',
edit: '编辑',
stop: '停止',
start: '启动',
delete: '删除',
no_time_limit: '不限时',
todo: '待办项',
finished: '已完成',
expired: '已过期',
task_finish_in: '在任务下发',
task_finish_in_suffix: '内完成填报'
}, },
on_the_left: '请在左侧选择表单', on_the_left: '请在左侧选择表单',
search_by_commit_name: '根据操作人名称搜索' search_by_commit_name: '根据操作人名称搜索'

View File

@ -6,7 +6,7 @@
<el-header class="de-header"> <el-header class="de-header">
<div class="panel-info-area"> <div class="panel-info-area">
<span class="text16 margin-left12"> <span class="text16 margin-left12">
{{ id? '编辑任务': '新建任务' }} {{ id? $t('data_fill.task.edit_task'): $t('data_fill.task.create_task') }}
</span> </span>
</div> </div>
@ -131,7 +131,7 @@
<span <span
class="prefix" class="prefix"
style="margin-bottom: 28px; " style="margin-bottom: 28px; "
>任务下发时间</span> >{{ $t('data_fill.task.task_distribute_time') }}</span>
<el-form-item <el-form-item
prop="publishStartTime" prop="publishStartTime"
style="flex:1" style="flex:1"
@ -154,7 +154,7 @@
<span <span
class="prefix" class="prefix"
style="margin-bottom: 28px" style="margin-bottom: 28px"
>填报截止时间</span> >{{ $t('data_fill.task.task_end_time') }}</span>
<el-form-item <el-form-item
prop="publishEndTime" prop="publishEndTime"
style="flex:1" style="flex:1"
@ -221,7 +221,7 @@
<span class="tail">{{ $t('cron.every_exec') }}</span> <span class="tail">{{ $t('cron.every_exec') }}</span>
</div> </div>
<div class="rate-type-time second-row"> <div class="rate-type-time second-row">
<span class="prefix">在任务下发</span> <span class="prefix">{{ $t('data_fill.task.task_finish_in') }}</span>
<el-input-number <el-input-number
v-model.number="form.publishRangeTime" v-model.number="form.publishRangeTime"
class="w140" class="w140"
@ -245,7 +245,7 @@
/> />
</el-select> </el-select>
<span class="tail">内完成填报</span> <span class="tail">{{ $t('data_fill.task.task_finish_in_suffix') }}</span>
</div> </div>
</template> </template>
</el-form-item> </el-form-item>

View File

@ -46,16 +46,16 @@ export default {
data() { data() {
const checkDateRangeRequireValidator = (rule, value, callback) => { const checkDateRangeRequireValidator = (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error('必填')) return callback(new Error(this.$t('commons.required')))
} }
if (value.length < 2) { if (value.length < 2) {
return callback(new Error('必填')) return callback(new Error(this.$t('commons.required')))
} }
if (!value[0]) { if (!value[0]) {
return callback(new Error('必填')) return callback(new Error(this.$t('commons.required')))
} }
if (!value[1]) { if (!value[1]) {
return callback(new Error('必填')) return callback(new Error(this.$t('commons.required')))
} }
callback() callback()
} }
@ -65,16 +65,16 @@ export default {
requiredRule: { required: true, message: this.$t('commons.required'), trigger: ['blur', 'change'] }, requiredRule: { required: true, message: this.$t('commons.required'), trigger: ['blur', 'change'] },
dateRangeRequiredRule: { validator: checkDateRangeRequireValidator, message: this.$t('commons.required'), trigger: ['blur', 'change'] }, dateRangeRequiredRule: { validator: checkDateRangeRequireValidator, message: this.$t('commons.required'), trigger: ['blur', 'change'] },
inputTypes: [ inputTypes: [
{ type: 'text', name: '普通文本', rules: [] }, { type: 'text', name: this.$t('data_fill.form.text'), rules: [] },
{ type: 'number', name: '数字', rules: [] }, { type: 'number', name: this.$t('data_fill.form.number'), rules: [] },
{ {
type: 'tel', type: 'tel',
name: '手机号', name: this.$t('data_fill.form.tel'),
rules: [{ pattern: PHONE_REGEX, message: this.$t('user.mobile_number_format_is_incorrect'), trigger: ['blur', 'change'] }] rules: [{ pattern: PHONE_REGEX, message: this.$t('user.mobile_number_format_is_incorrect'), trigger: ['blur', 'change'] }]
}, },
{ {
type: 'email', type: 'email',
name: '邮箱', name: this.$t('data_fill.form.email'),
rules: [{ pattern: EMAIL_REGEX, message: this.$t('user.email_format_is_incorrect'), trigger: ['blur', 'change'] }] rules: [{ pattern: EMAIL_REGEX, message: this.$t('user.email_format_is_incorrect'), trigger: ['blur', 'change'] }]
} }
] ]
@ -207,7 +207,7 @@ export default {
<el-header class="de-header"> <el-header class="de-header">
<div class="panel-info-area"> <div class="panel-info-area">
<span class="text16 margin-left12"> <span class="text16 margin-left12">
{{ title? title: (readonly? '查看数据': '编辑数据') }} {{ title? title: (readonly? $t('data_fill.task.show_data'): $t('data_fill.task.edit_data')) }}
</span> </span>
</div> </div>
@ -386,12 +386,12 @@ export default {
<el-footer <el-footer
class="de-footer" class="de-footer"
> >
<el-button @click="closeDrawer">取消</el-button> <el-button @click="closeDrawer">{{ $t("commons.cancel") }}</el-button>
<el-button <el-button
v-if="!readonly" v-if="!readonly"
type="primary" type="primary"
@click="doSave" @click="doSave"
>保存 >{{ $t("commons.confirm") }}
</el-button> </el-button>
</el-footer> </el-footer>
</el-container> </el-container>

View File

@ -106,7 +106,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="small" size="small"
@click="addData" @click="addData"
>添加数据</el-button> >{{ $t('data_fill.data.add_data') }}</el-button>
</div> </div>
<div style="flex: 1"> <div style="flex: 1">
<grid-table <grid-table
@ -132,8 +132,8 @@
slot-scope="scope" slot-scope="scope"
> >
{{ c.label }} {{ c.label }}
<span v-if="c.rangeIndex === 0">(开始)</span> <span v-if="c.rangeIndex === 0">({{ $t('data_fill.data.start') }})</span>
<span v-if="c.rangeIndex === 1">(结束)</span> <span v-if="c.rangeIndex === 1">({{ $t('data_fill.data.end') }})</span>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
@ -163,7 +163,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="最近提交人" :label="$t('data_fill.data.recent_committer')"
fixed="right" fixed="right"
width="100" width="100"
> >
@ -172,7 +172,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="最近提交时间" :label="$t('data_fill.data.recent_commit_time')"
fixed="right" fixed="right"
width="160" width="160"
> >
@ -225,7 +225,7 @@
<el-input <el-input
ref="search2" ref="search2"
v-model="operateName" v-model="operateName"
:placeholder="$t('data_fill.search_by_commit_name')" :placeholder="$t('data_fill.form.operator')"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
class="name-email-search" class="name-email-search"
size="small" size="small"
@ -256,13 +256,13 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.operate === 'INSERT'"> <template v-if="scope.row.operate === 'INSERT'">
插入数据 {{ $t('data_fill.data.insert_data') }}
</template> </template>
<template v-else-if="scope.row.operate === 'UPDATE'"> <template v-else-if="scope.row.operate === 'UPDATE'">
更新数据 {{ $t('data_fill.data.update_data') }}
</template> </template>
<template v-else-if="scope.row.operate === 'DELETE'"> <template v-else-if="scope.row.operate === 'DELETE'">
删除数据 {{ $t('data_fill.data.delete_data') }}
</template> </template>
<template v-else> <template v-else>
{{ scope.row.operate }} {{ scope.row.operate }}
@ -319,7 +319,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="small" size="small"
@click="addTask" @click="addTask"
>添加任务</el-button> >{{ $t('data_fill.task.add_task') }}</el-button>
</el-col> </el-col>
<el-col <el-col
:span="8" :span="8"
@ -328,7 +328,7 @@
<el-input <el-input
ref="search3" ref="search3"
v-model="taskName" v-model="taskName"
:placeholder="$t('commons.search_by_name')" :placeholder="$t('data_fill.task.name')"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
class="name-email-search" class="name-email-search"
size="small" size="small"
@ -355,7 +355,7 @@
<el-table-column <el-table-column
key="name" key="name"
prop="name" prop="name"
label="名称" :label="$t('data_fill.task.name')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.name }} {{ scope.row.name }}
@ -364,7 +364,7 @@
<el-table-column <el-table-column
key="rateType" key="rateType"
prop="rateType" prop="rateType"
label="任务下发模式" :label="$t('data_fill.task.rate_type')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.rateType === -1 ? $t('emailtask.single_task') : $t('emailtask.simple_repeat') }} {{ scope.row.rateType === -1 ? $t('emailtask.single_task') : $t('emailtask.simple_repeat') }}
@ -373,7 +373,7 @@
<el-table-column <el-table-column
key="status" key="status"
prop="status" prop="status"
label="任务状态" :label="$t('data_fill.task.task_status')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span :class="['de-status', `de-${taskStatusFormatter(scope.row.status)}`]">{{ <span :class="['de-status', `de-${taskStatusFormatter(scope.row.status)}`]">{{
@ -385,7 +385,7 @@
<el-table-column <el-table-column
key="creatorName" key="creatorName"
prop="creatorName" prop="creatorName"
label="创建人" :label="$t('data_fill.task.creator')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.creatorName }} {{ scope.row.creatorName }}
@ -394,7 +394,7 @@
<el-table-column <el-table-column
key="createTime" key="createTime"
prop="createTime" prop="createTime"
label="创建时间" :label="$t('data_fill.task.create_time')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ new Date(scope.row.createTime).format("yyyy-MM-dd hh:mm:ss") }} {{ new Date(scope.row.createTime).format("yyyy-MM-dd hh:mm:ss") }}
@ -410,27 +410,27 @@
type="text" type="text"
@click="editTask(scope.row)" @click="editTask(scope.row)"
> >
编辑 {{ $t('data_fill.task.edit') }}
</el-button> </el-button>
<el-button <el-button
v-if="!scope.row.status" v-if="!scope.row.status"
type="text" type="text"
@click="enableTask(scope.row)" @click="enableTask(scope.row)"
> >
启动 {{ $t('data_fill.task.start') }}
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.status" v-if="scope.row.status"
type="text" type="text"
@click="disableTask(scope.row)" @click="disableTask(scope.row)"
> >
停止 {{ $t('data_fill.task.stop') }}
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
@click="deleteTask(scope.row)" @click="deleteTask(scope.row)"
> >
删除 {{ $t('data_fill.task.delete') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -773,7 +773,7 @@ export default {
const obj = {} const obj = {}
if (res.data.data.length === 0) { if (res.data.data.length === 0) {
this.$message({ this.$message({
message: 'ID为[' + row.dataId + ']的数据不存在', message: this.$t('data_fill.data.id_is') + row.dataId + this.$t('data_fill.data.data_not_found'),
type: 'warning', type: 'warning',
showClose: true showClose: true
}) })
@ -817,7 +817,7 @@ export default {
this.showDrawer = true this.showDrawer = true
this.drawerReadonly = false this.drawerReadonly = false
this.createTitle = '添加数据' this.createTitle = this.$t('data_fill.data.add_data')
}, },
deleteRow(id) { deleteRow(id) {
this.$confirm( this.$confirm(

View File

@ -4,7 +4,7 @@ import DataFillingFormSave from './save.vue'
import clickoutside from 'element-ui/src/utils/clickoutside.js' import clickoutside from 'element-ui/src/utils/clickoutside.js'
import { filter, cloneDeep, find, concat } from 'lodash-es' import { filter, cloneDeep, find, concat } from 'lodash-es'
import { v4 as uuidv4 } from 'uuid' import { v4 as uuidv4 } from 'uuid'
import { PHONE_REGEX } from '@/utils/validate' import { EMAIL_REGEX, PHONE_REGEX } from '@/utils/validate'
export default { export default {
name: 'DataFillingFormCreate', name: 'DataFillingFormCreate',
@ -15,28 +15,32 @@ export default {
data: function() { data: function() {
const checkDuplicateOptionValidator = (rule, value, callback) => { const checkDuplicateOptionValidator = (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error('必填')) return callback(new Error(this.$t('commons.component.required')))
} }
const _list = filter(this.selectedComponentItem.settings.options, f => f.value === value) const _list = filter(this.selectedComponentItem.settings.options, f => f.value === value)
if (_list.length > 1) { if (_list.length > 1) {
callback(new Error('重复')) callback(new Error(this.$t('data_fill.form.duplicate_error')))
} }
callback() callback()
} }
return { return {
moveId: undefined, moveId: undefined,
showDrawer: false, showDrawer: false,
requiredRule: { required: true, message: this.$t('commons.required'), trigger: 'blur' }, requiredRule: { required: true, message: this.$t('commons.required'), trigger: ['blur', 'change'] },
duplicateOptionRule: { validator: checkDuplicateOptionValidator, trigger: 'blur' }, duplicateOptionRule: { validator: checkDuplicateOptionValidator, trigger: ['blur', 'change'] },
inputTypes: [ inputTypes: [
{ type: 'text', name: '普通文本', rules: [] }, { type: 'text', name: this.$t('data_fill.form.text'), rules: [] },
{ type: 'number', name: '数字', rules: [] }, { type: 'number', name: this.$t('data_fill.form.number'), rules: [] },
{ {
type: 'tel', type: 'tel',
name: '手机号', name: this.$t('data_fill.form.tel'),
rules: [{ pattern: PHONE_REGEX, message: this.$t('user.mobile_number_format_is_incorrect'), trigger: 'blur' }] rules: [{ pattern: PHONE_REGEX, message: this.$t('user.mobile_number_format_is_incorrect'), trigger: ['blur', 'change'] }]
}, },
{ type: 'email', name: '邮箱', rules: [] } {
type: 'email',
name: this.$t('data_fill.form.email'),
rules: [{ pattern: EMAIL_REGEX, message: this.$t('user.email_format_is_incorrect'), trigger: ['blur', 'change'] }]
}
], ],
componentList: [ componentList: [
{ {
@ -84,7 +88,8 @@ export default {
id: undefined, id: undefined,
settings: { settings: {
name: this.$t('commons.component.select'), name: this.$t('commons.component.select'),
options: [{ name: '选项1', value: '选项1' }, { name: '选项2', value: '选项2' }], options: [{ name: this.$t('data_fill.form.option') + ' 1', value: this.$t('data_fill.form.option') + ' 1' },
{ name: this.$t('data_fill.form.option') + ' 2', value: this.$t('data_fill.form.option') + ' 2' }],
optionSourceType: 1, optionSourceType: 1,
placeholder: '', placeholder: '',
multiple: false, required: false, multiple: false, required: false,
@ -103,7 +108,8 @@ export default {
id: undefined, id: undefined,
settings: { settings: {
name: this.$t('commons.component.radio'), name: this.$t('commons.component.radio'),
options: [{ name: '选项1', value: '选项1' }, { name: '选项2', value: '选项2' }], options: [{ name: this.$t('data_fill.form.option') + ' 1', value: this.$t('data_fill.form.option') + ' 1' },
{ name: this.$t('data_fill.form.option') + ' 2', value: this.$t('data_fill.form.option') + ' 2' }],
optionSourceType: 1, optionSourceType: 1,
required: false, required: false,
mapping: { mapping: {
@ -122,7 +128,8 @@ export default {
id: undefined, id: undefined,
settings: { settings: {
name: this.$t('commons.component.checkbox'), name: this.$t('commons.component.checkbox'),
options: [{ name: '选项1', value: '选项1' }, { name: '选项2', value: '选项2' }], options: [{ name: this.$t('data_fill.form.option') + ' 1', value: this.$t('data_fill.form.option') + ' 1' },
{ name: this.$t('data_fill.form.option') + ' 2', value: this.$t('data_fill.form.option') + ' 2' }],
optionSourceType: 1, optionSourceType: 1,
required: false, required: false,
mapping: { mapping: {
@ -191,7 +198,7 @@ export default {
}, },
formSettings: { formSettings: {
id: undefined, id: undefined,
name: '未命名表单', name: this.$t('data_fill.form.untitled'),
table: undefined, table: undefined,
forms: [], forms: [],
createIndex: false, createIndex: false,
@ -299,7 +306,7 @@ export default {
this.$refs['mRightForm'].validate((valid, invalidFields) => { this.$refs['mRightForm'].validate((valid, invalidFields) => {
if (showError && !valid) { if (showError && !valid) {
this.$message({ this.$message({
message: '组件设置错误', message: this.$t('data_fill.form.component_setting_error'),
type: 'error', type: 'error',
showClose: true showClose: true
}) })
@ -338,7 +345,7 @@ export default {
// //
if (this.formSettings.name === undefined || this.formSettings.name.trim() === '') { if (this.formSettings.name === undefined || this.formSettings.name.trim() === '') {
this.$message({ this.$message({
message: '表单名称不能为空', message: this.$t('data_fill.form.form_name_cannot_none'),
type: 'error', type: 'error',
showClose: true showClose: true
}) })
@ -347,7 +354,7 @@ export default {
} }
if (this.formSettings.forms.length === 0) { if (this.formSettings.forms.length === 0) {
this.$message({ this.$message({
message: '请添加表单组件', message: this.$t('data_fill.form.form_components_cannot_null'),
type: 'warning', type: 'warning',
showClose: true showClose: true
}) })
@ -370,7 +377,7 @@ export default {
if (f.settings.options.length === 0) { if (f.settings.options.length === 0) {
this.selectItem(f.id) this.selectItem(f.id)
this.$message({ this.$message({
message: '选项值不能为空', message: this.$t('data_fill.form.option_list_cannot_empty'),
type: 'error', type: 'error',
showClose: true showClose: true
}) })
@ -412,7 +419,7 @@ export default {
@click="closeCreate" @click="closeCreate"
/> />
<span class="text16 margin-left12"> <span class="text16 margin-left12">
新建表单 {{ $t('data_fill.form.create_new_form') }}
</span> </span>
</div> </div>
@ -423,7 +430,7 @@ export default {
</el-header> </el-header>
<de-container class="form-main-container"> <de-container class="form-main-container">
<div class="tools-window-left"> <div class="tools-window-left">
<el-header class="sub-title-header">组件</el-header> <el-header class="sub-title-header">{{ $t('data_fill.form.component') }}</el-header>
<div style="width: 100%; display: flex;"> <div style="width: 100%; display: flex;">
<div style="flex: 1; padding:8px 4px 8px 8px;"> <div style="flex: 1; padding:8px 4px 8px 8px;">
<draggable <draggable
@ -688,7 +695,7 @@ export default {
<el-cantainer class="tools-window-right"> <el-cantainer class="tools-window-right">
<template v-if="selectedItemId !== undefined && selectedComponentItem !== undefined"> <template v-if="selectedItemId !== undefined && selectedComponentItem !== undefined">
<el-header class="sub-title-header">组件设置</el-header> <el-header class="sub-title-header">{{ $t('data_fill.form.component_setting') }}</el-header>
<el-main style="height: calc(100vh - 60px - 56px);"> <el-main style="height: calc(100vh - 60px - 56px);">
<el-form <el-form
ref="mRightForm" ref="mRightForm"
@ -703,7 +710,7 @@ export default {
:rules="[requiredRule]" :rules="[requiredRule]"
> >
<template #label> <template #label>
标题 {{ $t('data_fill.form.title') }}
<span <span
style="color: red" style="color: red"
>*</span> >*</span>
@ -724,7 +731,7 @@ export default {
:rules="[requiredRule]" :rules="[requiredRule]"
> >
<template #label> <template #label>
分割字符 {{ $t('data_fill.form.range_separator') }}
<span <span
style="color: red" style="color: red"
>*</span> >*</span>
@ -762,13 +769,13 @@ export default {
" "
prop="placeholder" prop="placeholder"
class="form-item" class="form-item"
label="提示词" :label="$t('data_fill.form.hint')"
:rules="[ :rules="[
{ maxlength: 50, message: '不超过50个字符', trigger: 'blur' }]" { maxlength: 50, message: $t('data_fill.form.input_limit_50'), trigger: 'blur' }]"
> >
<el-input <el-input
v-model="selectedComponentItem.settings.placeholder" v-model="selectedComponentItem.settings.placeholder"
placeholder="不超过50个字符" :placeholder="$t('data_fill.form.input_limit_50')"
size="small" size="small"
maxlength="50" maxlength="50"
show-word-limit show-word-limit
@ -778,13 +785,13 @@ export default {
v-if="selectedComponentItem.type === 'dateRange' " v-if="selectedComponentItem.type === 'dateRange' "
prop="startPlaceholder" prop="startPlaceholder"
class="form-item" class="form-item"
label="开始提示词" :label="$t('data_fill.form.start_hint_word')"
:rules="[ :rules="[
{ maxlength: 50, message: '不超过50个字符', trigger: 'blur' }]" { maxlength: 50, message: $t('data_fill.form.input_limit_50'), trigger: 'blur' }]"
> >
<el-input <el-input
v-model="selectedComponentItem.settings.startPlaceholder" v-model="selectedComponentItem.settings.startPlaceholder"
placeholder="不超过50个字符" :placeholder="$t('data_fill.form.input_limit_50')"
size="small" size="small"
maxlength="50" maxlength="50"
show-word-limit show-word-limit
@ -794,13 +801,13 @@ export default {
v-if="selectedComponentItem.type === 'dateRange' " v-if="selectedComponentItem.type === 'dateRange' "
prop="endPlaceholder" prop="endPlaceholder"
class="form-item" class="form-item"
label="结束提示词" :label="$t('data_fill.form.end_hint_word')"
:rules="[ :rules="[
{ maxlength: 50, message: '不超过50个字符', trigger: 'blur' }]" { maxlength: 50, message: $t('data_fill.form.input_limit_50'), trigger: 'blur' }]"
> >
<el-input <el-input
v-model="selectedComponentItem.settings.endPlaceholder" v-model="selectedComponentItem.settings.endPlaceholder"
placeholder="不超过50个字符" :placeholder="$t('data_fill.form.input_limit_50')"
size="small" size="small"
maxlength="50" maxlength="50"
show-word-limit show-word-limit
@ -813,7 +820,7 @@ export default {
v-if="selectedComponentItem.type === 'input'" v-if="selectedComponentItem.type === 'input'"
prop="inputType" prop="inputType"
class="form-item" class="form-item"
label="格式类型" :label="$t('data_fill.form.input_type')"
:rules="[requiredRule]" :rules="[requiredRule]"
> >
<el-select <el-select
@ -833,15 +840,17 @@ export default {
<div class="right-check-div"> <div class="right-check-div">
<div class="m-label-container"> <div class="m-label-container">
<span style="width: unset"> <span style="width: unset; font-weight: bold">
校验 {{ $t('data_fill.form.check') }}
</span> </span>
</div> </div>
<el-form-item <el-form-item
prop="required" prop="required"
class="form-item" class="form-item"
> >
<el-checkbox v-model="selectedComponentItem.settings.required">设置为必填项</el-checkbox> <el-checkbox v-model="selectedComponentItem.settings.required">
{{ $t('data_fill.form.set_required') }}
</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-if="selectedComponentItem.type === 'input'" v-if="selectedComponentItem.type === 'input'"
@ -850,7 +859,8 @@ export default {
> >
<el-checkbox <el-checkbox
v-model="selectedComponentItem.settings.unique" v-model="selectedComponentItem.settings.unique"
>不允许重复值 >
{{ $t('data_fill.form.set_unique') }}
</el-checkbox> </el-checkbox>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -861,7 +871,8 @@ export default {
<el-checkbox <el-checkbox
v-model="selectedComponentItem.settings.multiple" v-model="selectedComponentItem.settings.multiple"
@change="changeSelectMultiple(selectedComponentItem, selectedComponentItem.settings.multiple)" @change="changeSelectMultiple(selectedComponentItem, selectedComponentItem.settings.multiple)"
>允许多选 >
{{ $t('data_fill.form.set_multiple') }}
</el-checkbox> </el-checkbox>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -871,7 +882,8 @@ export default {
> >
<el-checkbox <el-checkbox
v-model="selectedComponentItem.settings.enableTime" v-model="selectedComponentItem.settings.enableTime"
>使用日期时间 >
{{ $t('data_fill.form.use_datetime') }}
</el-checkbox> </el-checkbox>
</el-form-item> </el-form-item>
@ -885,21 +897,23 @@ export default {
<el-form-item <el-form-item
prop="optionSourceType" prop="optionSourceType"
label="选项值" :label="$t('data_fill.form.option_value')"
class="form-item no-margin-bottom" class="form-item no-margin-bottom"
> >
<el-radio-group <el-radio-group
v-model="selectedComponentItem.settings.optionSourceType" v-model="selectedComponentItem.settings.optionSourceType"
size="small" size="small"
> >
<el-radio :label="1">自定义</el-radio> <el-radio :label="1">
{{ $t('data_fill.form.custom') }}
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-button <el-button
type="text" type="text"
@click="addOption(selectedComponentItem.settings.options)" @click="addOption(selectedComponentItem.settings.options)"
>+ 添加选项值 >+ {{ $t('data_fill.form.add_option') }}
</el-button> </el-button>
<div <div
@ -937,7 +951,7 @@ export default {
</el-main> </el-main>
</template> </template>
<template v-else> <template v-else>
<el-header class="sub-title-header">表单设置</el-header> <el-header class="sub-title-header">{{ $t('data_fill.form.form_setting') }}</el-header>
<el-main style="height: calc(100vh - 60px - 56px);"> <el-main style="height: calc(100vh - 60px - 56px);">
<el-form <el-form
ref="mRightFormBase" ref="mRightFormBase"
@ -951,7 +965,7 @@ export default {
:rules="[requiredRule]" :rules="[requiredRule]"
> >
<template #label> <template #label>
表单名称 {{ $t('data_fill.form.form_name') }}
<span <span
style="color: red" style="color: red"
>*</span> >*</span>
@ -973,7 +987,7 @@ export default {
</de-container> </de-container>
<el-drawer <el-drawer
title="保存表单" :title="$t('data_fill.form.save_form')"
:visible.sync="showDrawer" :visible.sync="showDrawer"
direction="btt" direction="btt"
size="100%" size="100%"

View File

@ -220,7 +220,7 @@ export default {
name="my-tasks" name="my-tasks"
> >
<span slot="label"> <span slot="label">
我的填报 {{ $t('data_fill.my_job') }}
</span> </span>
</el-tab-pane> </el-tab-pane>
@ -228,13 +228,13 @@ export default {
name="forms" name="forms"
> >
<span slot="label"> <span slot="label">
表单管理 {{ $t('data_fill.form_manage') }}
</span> </span>
<div style="padding-left: 20px;padding-right: 20px;"> <div style="padding-left: 20px;padding-right: 20px;">
<div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;"> <div style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;">
填报表单 {{ $t('data_fill.form.form_list_name') }}
<el-button <el-button
icon="el-icon-plus" icon="el-icon-plus"
type="text" type="text"
@ -246,7 +246,7 @@ export default {
v-if="!formList.length && !treeLoading" v-if="!formList.length && !treeLoading"
class="no-tdata" class="no-tdata"
> >
暂无表单点击 {{ $t('data_fill.form.no_form') }}
<span <span
class="no-tdata-new" class="no-tdata-new"
@click="() => createFolder({id: '0', level: 0, firstFolder: true})" @click="() => createFolder({id: '0', level: 0, firstFolder: true})"
@ -308,16 +308,16 @@ export default {
:command="beforeData('folder',data)" :command="beforeData('folder',data)"
> >
<svg-icon icon-class="scene" /> <svg-icon icon-class="scene" />
<span style="margin-left: 5px">新建文件夹</span> <span style="margin-left: 5px">{{ $t('data_fill.new_folder') }}</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
:command="beforeData('form',data)" :command="beforeData('form',data)"
> >
<svg-icon <svg-icon
icon-class="panel" icon-class="form"
class="ds-icon-scene" class="ds-icon-scene"
/> />
<span>新建表单</span> <span>{{ $t('data_fill.form.create_form') }}</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
@ -379,7 +379,7 @@ export default {
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
append-to-body append-to-body
title="新建文件夹" :title="$t('data_fill.new_folder')"
:visible.sync="showFolderCreateForm" :visible.sync="showFolderCreateForm"
:show-close="true" :show-close="true"
width="600px" width="600px"
@ -404,7 +404,7 @@ export default {
:rules="[requiredRule]" :rules="[requiredRule]"
> >
<template #label> <template #label>
名称 {{ $t('data_fill.form.name') }}
<span <span
style="color: red" style="color: red"
>*</span> >*</span>
@ -420,11 +420,11 @@ export default {
</el-main> </el-main>
</el-form> </el-form>
<el-footer class="de-footer"> <el-footer class="de-footer">
<el-button @click="closeSaveFolder">取消</el-button> <el-button @click="closeSaveFolder">{{ $t("commons.cancel") }}</el-button>
<el-button <el-button
type="primary" type="primary"
@click="doSaveFolder" @click="doSaveFolder"
>保存 >{{ $t("commons.confirm") }}
</el-button> </el-button>
</el-footer> </el-footer>
</el-container> </el-container>
@ -433,7 +433,7 @@ export default {
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
append-to-body append-to-body
title="重命名" :title="$t('data_fill.form.rename')"
:visible.sync="showUpdateName" :visible.sync="showUpdateName"
:show-close="true" :show-close="true"
width="600px" width="600px"
@ -457,7 +457,7 @@ export default {
:rules="[requiredRule]" :rules="[requiredRule]"
> >
<template #label> <template #label>
名称 {{ $t('data_fill.form.name') }}
<span <span
style="color: red" style="color: red"
>*</span> >*</span>
@ -473,11 +473,11 @@ export default {
</el-main> </el-main>
</el-form> </el-form>
<el-footer class="de-footer"> <el-footer class="de-footer">
<el-button @click="closeUpdateForm">取消</el-button> <el-button @click="closeUpdateForm">{{ $t("commons.cancel") }}</el-button>
<el-button <el-button
type="primary" type="primary"
@click="doUpdateForm" @click="doUpdateForm"
>保存 >{{ $t("commons.confirm") }}
</el-button> </el-button>
</el-footer> </el-footer>
</el-container> </el-container>

View File

@ -18,7 +18,7 @@ export default {
data: function() { data: function() {
const checkDuplicateNameValidator = (rule, value, callback) => { const checkDuplicateNameValidator = (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error('必填')) return callback(new Error(this.$t('commons.component.required')))
} }
let count = 0 let count = 0
forEach(this.formData.forms, f => { forEach(this.formData.forms, f => {
@ -36,13 +36,13 @@ export default {
} }
}) })
if (count > 1) { if (count > 1) {
callback(new Error('重复')) callback(new Error(this.$t('data_fill.form.duplicate_error')))
} }
callback() callback()
} }
const checkDuplicateIndexNameValidator = (rule, value, callback) => { const checkDuplicateIndexNameValidator = (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error('必填')) return callback(new Error(this.$t('commons.component.required')))
} }
let count = 0 let count = 0
forEach(this.formData.tableIndexes, f => { forEach(this.formData.tableIndexes, f => {
@ -51,25 +51,25 @@ export default {
} }
}) })
if (count > 1) { if (count > 1) {
callback(new Error('重复')) callback(new Error(this.$t('data_fill.form.duplicate_error')))
} }
callback() callback()
} }
const checkInvalidColumnValidator = (rule, value, callback) => { const checkInvalidColumnValidator = (rule, value, callback) => {
if (!value) { if (!value) {
return callback(new Error('必填')) return callback(new Error(this.$t('commons.component.required')))
} }
if (this.columnsList.length === 0) { if (this.columnsList.length === 0) {
return callback(new Error('值不存在')) return callback(new Error(this.$t('data_fill.form.value_not_exists')))
} }
if (find(this.columnsList, c => c === value) === undefined) { if (find(this.columnsList, c => c === value) === undefined) {
callback(new Error('值不存在')) callback(new Error(this.$t('data_fill.form.value_not_exists')))
} }
callback() callback()
} }
const checkDuplicateIndexColumnValidator = (rule, value, callback, source) => { const checkDuplicateIndexColumnValidator = (rule, value, callback, source) => {
if (!value) { if (!value) {
return callback(new Error('必填')) return callback(new Error(this.$t('commons.component.required')))
} }
const f = split(rule.field, '.')[0] const f = split(rule.field, '.')[0]
const _list = get(this.formData, f) const _list = get(this.formData, f)
@ -81,7 +81,7 @@ export default {
} }
}) })
if (count > 1) { if (count > 1) {
callback(new Error('重复')) callback(new Error(this.$t('data_fill.form.duplicate_error')))
} }
callback() callback()
} }
@ -181,20 +181,20 @@ export default {
formOption.type !== 'checkbox' && formOption.type !== 'checkbox' &&
!(formOption.type === 'select' && formOption.settings.multiple) !(formOption.type === 'select' && formOption.settings.multiple)
) { ) {
_options.push({ value: 'nvarchar', label: '字符串' }) _options.push({ value: 'nvarchar', label: this.$t('data_fill.database.datetime') })
} }
if (formOption.type === 'checkbox' || if (formOption.type === 'checkbox' ||
formOption.type === 'select' && formOption.settings.multiple || formOption.type === 'select' && formOption.settings.multiple ||
formOption.type === 'textarea') { formOption.type === 'textarea') {
_options.push({ value: 'text', label: '长文本' }) _options.push({ value: 'text', label: this.$t('data_fill.database.text') })
} }
if (formOption.type === 'input' && formOption.settings.inputType === 'number') { if (formOption.type === 'input' && formOption.settings.inputType === 'number') {
_options.push({ value: 'number', label: '整型数字' }) _options.push({ value: 'number', label: this.$t('data_fill.database.number') })
_options.push({ value: 'decimal', label: '小数数字' }) _options.push({ value: 'decimal', label: this.$t('data_fill.database.decimal') })
} }
if (formOption.type === 'date' || formOption.type === 'dateRange') { if (formOption.type === 'date' || formOption.type === 'dateRange') {
_options.push({ value: 'datetime', label: '日期' }) _options.push({ value: 'datetime', label: this.$t('data_fill.database.datetime') })
} }
return _options return _options
}, },
@ -290,7 +290,7 @@ export default {
<el-header class="de-header"> <el-header class="de-header">
<div class="panel-info-area"> <div class="panel-info-area">
<span class="text16 margin-left12"> <span class="text16 margin-left12">
保存表单 {{ $t('data_fill.form.save_form') }}
</span> </span>
</div> </div>
@ -316,7 +316,7 @@ export default {
:rules="[requiredRule]" :rules="[requiredRule]"
> >
<template #label> <template #label>
表单名称 {{ $t('data_fill.form.form_name') }}
<span <span
style="color: red" style="color: red"
>*</span> >*</span>
@ -336,7 +336,7 @@ export default {
:rules="[requiredRule]" :rules="[requiredRule]"
> >
<template #label> <template #label>
所属文件夹 {{ $t('data_fill.form.folder') }}
<span <span
style="color: red" style="color: red"
>*</span> >*</span>
@ -368,11 +368,11 @@ export default {
</span> </span>
<span <span
style=" style="
margin-left: 6px; margin-left: 6px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
" "
:title="data.name" :title="data.name"
>{{ data.name }}</span> >{{ data.name }}</span>
</span> </span>
@ -404,7 +404,7 @@ export default {
:rules="[requiredRule]" :rules="[requiredRule]"
> >
<template #label> <template #label>
数据源 {{ $t('data_fill.form.datasource') }}
<span <span
style="color: red" style="color: red"
>*</span> >*</span>
@ -437,7 +437,7 @@ export default {
:rules="[requiredRule]" :rules="[requiredRule]"
> >
<template #label> <template #label>
数据库表名 {{ $t('data_fill.form.table_name') }}
<span <span
style="color: red" style="color: red"
>*</span> >*</span>
@ -458,7 +458,7 @@ export default {
style="width: 100%" style="width: 100%"
> >
<el-table-column <el-table-column
label="表单字段" :label="$t('data_fill.form.form_column')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.settings.name }} {{ scope.row.settings.name }}
@ -469,7 +469,7 @@ export default {
slot="header" slot="header"
slot-scope="scope" slot-scope="scope"
> >
数据库表字段名称 {{ $t('data_fill.form.column_name') }}
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item <el-form-item
@ -480,7 +480,7 @@ export default {
> >
<el-input <el-input
v-model.trim="scope.row.settings.mapping.columnName" v-model.trim="scope.row.settings.mapping.columnName"
placeholder="请输入" :placeholder="$t('fu.search_bar.please_input')"
size="small" size="small"
maxlength="50" maxlength="50"
show-word-limit show-word-limit
@ -495,7 +495,7 @@ export default {
> >
<el-input <el-input
v-model.trim="scope.row.settings.mapping.columnName1" v-model.trim="scope.row.settings.mapping.columnName1"
placeholder="请输入开始时间" :placeholder="$t('data_fill.form.please_insert_start')"
size="small" size="small"
maxlength="50" maxlength="50"
show-word-limit show-word-limit
@ -509,7 +509,7 @@ export default {
> >
<el-input <el-input
v-model.trim="scope.row.settings.mapping.columnName2" v-model.trim="scope.row.settings.mapping.columnName2"
placeholder="请输入结束时间" :placeholder="$t('data_fill.form.please_insert_end')"
size="small" size="small"
maxlength="50" maxlength="50"
show-word-limit show-word-limit
@ -520,7 +520,7 @@ export default {
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="数据库字段类型" :label="$t('data_fill.form.column_type')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item <el-form-item
@ -530,7 +530,7 @@ export default {
> >
<el-select <el-select
v-model="scope.row.settings.mapping.type" v-model="scope.row.settings.mapping.type"
placeholder="请选择" :placeholder="$t('data_fill.form.please_select')"
size="small" size="small"
required required
style="width: 100%" style="width: 100%"
@ -555,7 +555,7 @@ export default {
> >
<el-checkbox <el-checkbox
v-model="formData.createIndex" v-model="formData.createIndex"
label="创建索引" :label="$t('data_fill.form.create_index')"
size="small" size="small"
/> />
</el-form-item> </el-form-item>
@ -565,7 +565,7 @@ export default {
type="text" type="text"
style="margin-left: 20px" style="margin-left: 20px"
@click="addIndex" @click="addIndex"
>+ 新增索引 >+ {{ $t('data_fill.form.add_index') }}
</el-button> </el-button>
</div> </div>
@ -577,7 +577,7 @@ export default {
style="width: 100%" style="width: 100%"
> >
<el-table-column <el-table-column
label="索引名称" :label="$t('data_fill.form.index_name')"
width="300" width="300"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -588,7 +588,7 @@ export default {
> >
<el-input <el-input
v-model="scope.row.name" v-model="scope.row.name"
placeholder="请输入" :placeholder="$t('fu.search_bar.please_input')"
size="small" size="small"
maxlength="50" maxlength="50"
show-word-limit show-word-limit
@ -599,7 +599,7 @@ export default {
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="索引字段" :label="$t('data_fill.form.index_column')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
@ -615,7 +615,7 @@ export default {
> >
<el-select <el-select
v-model="indexRow.column" v-model="indexRow.column"
placeholder="请选择" :placeholder="$t('data_fill.form.please_select')"
size="small" size="small"
required required
style="width: 100%" style="width: 100%"
@ -637,22 +637,22 @@ export default {
> >
<el-select <el-select
v-model="indexRow.order" v-model="indexRow.order"
placeholder="请选择" :placeholder="$t('data_fill.form.please_select')"
size="small" size="small"
required required
style="width: 100%" style="width: 100%"
> >
<el-option <el-option
value="asc" value="asc"
label="顺序" :label="$t('data_fill.form.order_asc')"
/> />
<el-option <el-option
value="none" value="none"
label="默认排序" :label="$t('data_fill.form.order_none')"
/> />
<el-option <el-option
value="desc" value="desc"
label="倒序" :label="$t('data_fill.form.order_desc')"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -667,7 +667,7 @@ export default {
<el-button <el-button
type="text" type="text"
@click="addColumn(scope.row.columns)" @click="addColumn(scope.row.columns)"
>+ 新增字段 >+ {{ $t('data_fill.form.add_column') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -688,11 +688,11 @@ export default {
</el-main> </el-main>
<el-footer class="de-footer"> <el-footer class="de-footer">
<el-button @click="closeSave">取消</el-button> <el-button @click="closeSave">{{ $t("commons.cancel") }}</el-button>
<el-button <el-button
type="primary" type="primary"
@click="doSave" @click="doSave"
>保存 >{{ $t("commons.confirm") }}
</el-button> </el-button>
</el-footer> </el-footer>
</el-container> </el-container>

View File

@ -15,9 +15,9 @@ export default {
return { return {
activeName: 'my-tasks', activeName: 'my-tasks',
types: [ types: [
{ key: 'todo', name: '代办项' }, { key: 'todo', name: this.$t('data_fill.task.todo') },
{ key: 'finished', name: '已完成' }, { key: 'finished', name: this.$t('data_fill.task.finished') },
{ key: 'expired', name: '已过期' } { key: 'expired', name: this.$t('data_fill.task.expired') }
], ],
currentKey: 'todo', currentKey: 'todo',
showDrawer: false, showDrawer: false,
@ -146,13 +146,13 @@ export default {
}, },
getRestTime(time) { getRestTime(time) {
if (!time) { if (!time) {
return '不限时' return this.$t('data_fill.task.no_time_limit')
} }
const _time = new Date(time).getTime() const _time = new Date(time).getTime()
const current = new Date().getTime() const current = new Date().getTime()
if (_time < current) { if (_time < current) {
return '已过期' return this.$t('data_fill.task.expired')
} }
const dateDiff = _time - current const dateDiff = _time - current
@ -170,25 +170,25 @@ export default {
const seconds = Math.round(leave3 / 1000) const seconds = Math.round(leave3 / 1000)
if (yearDiff > 0 || monthDiff > 0) { if (yearDiff > 0 || monthDiff > 0) {
const yearStr = yearDiff > 0 ? yearDiff + '年' : '' const yearStr = yearDiff > 0 ? yearDiff + this.$t('cron.year') : ''
const monthStr = monthDiff > 0 ? monthDiff + '月' : '' const monthStr = monthDiff > 0 ? monthDiff + this.$t('cron.month') : ''
return yearStr + monthStr return yearStr + monthStr
} }
const dayStr = dayDiff > 0 ? dayDiff + '天' : '' const dayStr = dayDiff > 0 ? dayDiff + this.$t('cron.day') : ''
const hourStr = hours > 0 ? hours + '小时' : '' const hourStr = hours > 0 ? hours + this.$t('cron.hour') : ''
if (dayDiff > 0) { if (dayDiff > 0) {
return dayStr + hourStr return dayStr + hourStr
} }
const minuteStr = minutes > 0 ? minutes + '分钟' : '' const minuteStr = minutes > 0 ? minutes + this.$t('cron.minute') : ''
if (hours > 0) { if (hours > 0) {
return hourStr + minuteStr return hourStr + minuteStr
} }
const secondsStr = seconds > 0 ? seconds + '秒' : '' const secondsStr = seconds > 0 ? seconds + this.$t('cron.second') : ''
return minuteStr + secondsStr return minuteStr + secondsStr
}, },
@ -199,7 +199,7 @@ export default {
this.drawerReadonly = false this.drawerReadonly = false
} }
this.createTitle = '数据填报' this.createTitle = this.$t('data_fill.data_fill')
this.forms = [] this.forms = []
this.selectedFormId = row.formId this.selectedFormId = row.formId
@ -255,7 +255,7 @@ export default {
const obj = {} const obj = {}
if (res.data.data.length === 0) { if (res.data.data.length === 0) {
this.$message({ this.$message({
message: 'ID为[' + row.valueId + ']的数据不存在', message: this.$t('data_fill.data.id_is') + row.valueId + this.$t('data_fill.data.data_not_found'),
type: 'warning', type: 'warning',
showClose: true showClose: true
}) })
@ -331,7 +331,7 @@ export default {
<el-tab-pane <el-tab-pane
name="my-tasks" name="my-tasks"
> >
<span slot="label">我的填报</span> <span slot="label">{{ $t('data_fill.my_job') }}</span>
<div style="padding:0 24px 16px"> <div style="padding:0 24px 16px">
<div <div
@ -353,7 +353,7 @@ export default {
<span <span
slot="label" slot="label"
> >
表单管理 {{ $t('data_fill.form_manage') }}
</span> </span>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -373,7 +373,7 @@ export default {
<el-input <el-input
ref="search1" ref="search1"
v-model="myTaskName" v-model="myTaskName"
:placeholder="$t('commons.search_by_name')" :placeholder="$t('data_fill.task.task_name')"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
class="name-email-search" class="name-email-search"
size="small" size="small"
@ -400,12 +400,12 @@ export default {
<el-table-column <el-table-column
key="taskName" key="taskName"
prop="taskName" prop="taskName"
label="任务名称" :label="$t('data_fill.task.task_name')"
/> />
<el-table-column <el-table-column
key="restTime" key="restTime"
prop="restTime" prop="restTime"
label="任务有效期" :label="$t('data_fill.task.task_remain_time')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ getRestTime(scope.row.endTime) }} {{ getRestTime(scope.row.endTime) }}
@ -414,7 +414,7 @@ export default {
<el-table-column <el-table-column
key="endTime" key="endTime"
prop="endTime" prop="endTime"
label="任务截止时间" :label="$t('data_fill.task.task_end_time')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.endTime ? new Date(scope.row.endTime).format("yyyy-MM-dd hh:mm:ss") : '-' }} {{ scope.row.endTime ? new Date(scope.row.endTime).format("yyyy-MM-dd hh:mm:ss") : '-' }}
@ -423,12 +423,12 @@ export default {
<el-table-column <el-table-column
key="creatorName" key="creatorName"
prop="creatorName" prop="creatorName"
label="任务下发人" :label="$t('data_fill.task.task_sender')"
/> />
<el-table-column <el-table-column
key="startTime" key="startTime"
prop="startTime" prop="startTime"
label="任务下发时间" :label="$t('data_fill.task.task_distribute_time')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ new Date(scope.row.startTime).format("yyyy-MM-dd hh:mm:ss") }} {{ new Date(scope.row.startTime).format("yyyy-MM-dd hh:mm:ss") }}
@ -444,7 +444,7 @@ export default {
type="text" type="text"
@click="editForm(scope.row)" @click="editForm(scope.row)"
> >
立即填报 {{ $t('data_fill.task.start_filling') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -466,7 +466,7 @@ export default {
<el-input <el-input
ref="search2" ref="search2"
v-model="finishedTaskName" v-model="finishedTaskName"
:placeholder="$t('commons.search_by_name')" :placeholder="$t('data_fill.task.task_name')"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
class="name-email-search" class="name-email-search"
size="small" size="small"
@ -493,12 +493,12 @@ export default {
<el-table-column <el-table-column
key="taskName" key="taskName"
prop="taskName" prop="taskName"
label="任务名称" :label="$t('data_fill.task.task_name')"
/> />
<el-table-column <el-table-column
key="finishTime" key="finishTime"
prop="finishTime" prop="finishTime"
label="任务完成时间" :label="$t('data_fill.task.task_finished_time')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ new Date(scope.row.finishTime).format("yyyy-MM-dd hh:mm:ss") }} {{ new Date(scope.row.finishTime).format("yyyy-MM-dd hh:mm:ss") }}
@ -507,12 +507,12 @@ export default {
<el-table-column <el-table-column
key="creatorName" key="creatorName"
prop="creatorName" prop="creatorName"
label="任务下发人" :label="$t('data_fill.task.task_sender')"
/> />
<el-table-column <el-table-column
key="startTime" key="startTime"
prop="startTime" prop="startTime"
label="任务下发时间" :label="$t('data_fill.task.task_distribute_time')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ new Date(scope.row.startTime).format("yyyy-MM-dd hh:mm:ss") }} {{ new Date(scope.row.startTime).format("yyyy-MM-dd hh:mm:ss") }}
@ -528,13 +528,13 @@ export default {
type="text" type="text"
@click="editForm(scope.row)" @click="editForm(scope.row)"
> >
编辑数据 {{ $t('data_fill.task.edit_data') }}
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
@click="showForm(scope.row)" @click="showForm(scope.row)"
> >
查看数据 {{ $t('data_fill.task.show_data') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -556,7 +556,7 @@ export default {
<el-input <el-input
ref="search3" ref="search3"
v-model="expiredTaskName" v-model="expiredTaskName"
:placeholder="$t('commons.search_by_name')" :placeholder="$t('data_fill.task.task_name')"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
class="name-email-search" class="name-email-search"
size="small" size="small"
@ -583,12 +583,12 @@ export default {
<el-table-column <el-table-column
key="taskName" key="taskName"
prop="taskName" prop="taskName"
label="任务名称" :label="$t('data_fill.task.task_name')"
/> />
<el-table-column <el-table-column
key="endTime" key="endTime"
prop="endTime" prop="endTime"
label="任务过期时间" :label="$t('data_fill.task.task_expiration_time')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.endTime ? new Date(scope.row.endTime).format("yyyy-MM-dd hh:mm:ss") : '-' }} {{ scope.row.endTime ? new Date(scope.row.endTime).format("yyyy-MM-dd hh:mm:ss") : '-' }}
@ -597,12 +597,12 @@ export default {
<el-table-column <el-table-column
key="creatorName" key="creatorName"
prop="creatorName" prop="creatorName"
label="任务下发人" :label="$t('data_fill.task.task_sender')"
/> />
<el-table-column <el-table-column
key="startTime" key="startTime"
prop="startTime" prop="startTime"
label="任务下发时间" :label="$t('data_fill.task.task_distribute_time')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ new Date(scope.row.startTime).format("yyyy-MM-dd hh:mm:ss") }} {{ new Date(scope.row.startTime).format("yyyy-MM-dd hh:mm:ss") }}