Skip to content

Commit ac9af5c

Browse files
committed
feat: add ignore time precision option in localization and form
- Introduced new localization entries for "Ignore time precision" and its tooltip in English, Simplified Chinese, and Traditional Chinese. - Added a toggle switch in the verification form to enable or disable time precision comparison, enhancing user control over time field synchronization.
1 parent e96a2c9 commit ac9af5c

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

packages/business/src/locale/lang/en.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,5 +1328,8 @@ export default {
13281328
packages_business_auto_fill_join_tooltip_all: '3. If there are no non-null fields, use all fields',
13291329
packages_business_nulls_first: 'NULL Priority Sort',
13301330
packages_business_nulls_first_tip:
1331-
'When the associated fields contain NULL values, the database defaults to sorting NULL values last, which may cause validation failure. Enabling this option will set NULL values first, but may not use the database index, increasing database load.'
1331+
'When the associated fields contain NULL values, the database defaults to sorting NULL values last, which may cause validation failure. Enabling this option will set NULL values first, but may not use the database index, increasing database load.',
1332+
packages_business_ignoreTimePrecision: 'Ignore time precision',
1333+
packages_business_ignoreTimePrecision_tip:
1334+
'When enabled, time will be compared up to seconds only, ignoring milliseconds. Useful for syncing high-precision and low-precision time fields.'
13321335
}

packages/business/src/locale/lang/zh-CN.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,5 +1266,8 @@ export default {
12661266
packages_business_auto_fill_join_tooltip_all: '3. 如无非空字段,则使用全部字段',
12671267
packages_business_nulls_first: 'NULL优先排序',
12681268
packages_business_nulls_first_tip:
1269-
'关联字段存在NULL值时,数据库默认将NULL排在最后,可能导致校验失败。开启此选项将NULL值排在前面,但可能无法使用数据库索引,增加数据库负载。'
1269+
'关联字段存在NULL值时,数据库默认将NULL排在最后,可能导致校验失败。开启此选项将NULL值排在前面,但可能无法使用数据库索引,增加数据库负载。',
1270+
packages_business_ignoreTimePrecision: '忽略时间精度',
1271+
packages_business_ignoreTimePrecision_tip:
1272+
'开启此开关后会忽略时间毫秒级的比较,只精确到秒级,适用于高精度时间字段同步低精度时间字段场景。'
12701273
}

packages/business/src/locale/lang/zh-TW.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,5 +1257,6 @@ export default {
12571257
packages_business_auto_fill_join_tooltip_all: '3. 如無非空字段,則使用全部字段',
12581258
packages_business_nulls_first: 'NULL優先排序',
12591259
packages_business_nulls_first_tip:
1260-
'關聯字段存在NULL值時,數據庫默認將NULL排在最後,可能導致校驗失敗。開啓此選項將NULL值排在前面,但可能無法使用數據庫索引,增加數據庫負載。'
1260+
'關聯字段存在NULL值時,數據庫默認將NULL排在最後,可能導致校驗失敗。開啓此選項將NULL值排在前面,但可能無法使用數據庫索引,增加數據庫負載。',
1261+
packages_business_ignoreTimePrecision: '忽略時間精度'
12611262
}

packages/business/src/views/verification/Form.vue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,18 @@
251251
<ElOption :value="10000" label="10000(rows)"></ElOption>
252252
</ElSelect>
253253
</ElFormItem>
254+
255+
<ElFormItem v-if="!isCountOrHash" class="form-item">
256+
<template #label>
257+
<span>{{ $t('packages_business_ignoreTimePrecision') }}</span>
258+
<el-tooltip effect="dark" placement="top" :content="$t('packages_business_ignoreTimePrecision_tip')">
259+
<i class="el-tooltip el-icon-info" style="color: #909399; font-size: 14px"></i>
260+
</el-tooltip>
261+
<span>:</span>
262+
</template>
263+
<ElSwitch v-model="form.ignoreTimePrecision"></ElSwitch>
264+
</ElFormItem>
265+
254266
<template v-if="form.inspectMethod === 'cdcCount'">
255267
<ElFormItem class="setting-item">
256268
<label class="item-label">{{ $t('packages_business_verification_create_window_duration') }}</label>
@@ -472,6 +484,9 @@ export default {
472484
computed: {
473485
saveDisabled() {
474486
return this.errorMessageLevel === 'error' || this.autoAddTableLoading || this.loading
487+
},
488+
isCountOrHash() {
489+
return this.form.inspectMethod === 'row_count' || this.form.inspectMethod === 'hash'
475490
}
476491
},
477492
created() {

0 commit comments

Comments
 (0)