diff --git a/packages/business/src/views/connections/List.vue b/packages/business/src/views/connections/List.vue
index 0ce105f539..c651467f48 100644
--- a/packages/business/src/views/connections/List.vue
+++ b/packages/business/src/views/connections/List.vue
@@ -632,6 +632,7 @@ export default {
placeholder: this.$t('packages_business_connection_list_name'),
key: 'keyword',
type: 'input',
+ id: 'name-filter-input',
},
]
},
diff --git a/packages/business/src/views/shared-mining/Detail.vue b/packages/business/src/views/shared-mining/Detail.vue
index 2d1a08b710..055f8faa80 100644
--- a/packages/business/src/views/shared-mining/Detail.vue
+++ b/packages/business/src/views/shared-mining/Detail.vue
@@ -34,7 +34,7 @@
diff --git a/packages/business/src/views/shared-mining/Editor.vue b/packages/business/src/views/shared-mining/Editor.vue
index 37bb759622..ce1cb5be65 100644
--- a/packages/business/src/views/shared-mining/Editor.vue
+++ b/packages/business/src/views/shared-mining/Editor.vue
@@ -347,7 +347,7 @@ export default {
popper-class="hide-current__dateTime"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
- value-format="timestamp"
+ value-format="x"
class="ml-4"
/>
diff --git a/packages/business/src/views/task/List.vue b/packages/business/src/views/task/List.vue
index d2f89e03f9..cc75112a34 100644
--- a/packages/business/src/views/task/List.vue
+++ b/packages/business/src/views/task/List.vue
@@ -342,12 +342,14 @@ export default {
key: 'status',
type: 'select-inner',
items: this.statusOptions,
+ id: 'status-filter-select',
},
{
label: this.$t('packages_business_task_list_sync_type'),
key: 'type',
type: 'select-inner',
items: this.typeOptions,
+ id: 'type-filter-select',
},
{
label: this.$t('packages_business_task_monitor_mission_milestone'),
@@ -361,6 +363,7 @@ export default {
})),
],
width: 240,
+ id: 'sync-status-filter-select',
},
{
label: i18n.t('public_agent_name'),
@@ -402,6 +405,7 @@ export default {
placeholder: this.$t('public_task_name'),
key: 'keyword',
type: 'input',
+ id: 'name-filter-input',
},
]
@@ -1286,6 +1290,7 @@ export default {
havePermission(row, 'Start')
"
v-readonlybtn="'SYNC_job_operation'"
+ name="start-task-btn"
text
type="primary"
data-testid="start-task"
@@ -1313,6 +1318,7 @@ export default {
v-readonlybtn="'SYNC_job_operation'"
text
type="primary"
+ name="stop-task-btn"
data-testid="stop-task"
:disabled="row.btnDisabled.stop || $disabledReadonlyUserBtn()"
@click="stop([row.id], row)"
@@ -1397,6 +1403,7 @@ export default {
v-readonlybtn="'SYNC_job_edition'"
text
type="primary"
+ name="delete-task-btn"
data-testid="delete-task"
:disabled="row.btnDisabled.delete || $disabledReadonlyUserBtn()"
@click="del([row.id], row)"
diff --git a/packages/business/src/views/verification/Form.vue b/packages/business/src/views/verification/Form.vue
index ff0d3b594b..8eaa196f2c 100644
--- a/packages/business/src/views/verification/Form.vue
+++ b/packages/business/src/views/verification/Form.vue
@@ -902,8 +902,8 @@ export default {
:placeholder="
$t('packages_business_verification_form_jiaoyankaishishi')
"
- format="yyyy-MM-dd HH:mm"
- value-format="yyyy-MM-dd HH:mm"
+ format="YYYY-MM-DD HH:mm:ss"
+ value-format="YYYY-MM-DD HH:mm:ss"
/>
@@ -917,8 +917,8 @@ export default {
:placeholder="
$t('packages_business_verification_form_jiaoyanjieshushi')
"
- format="yyyy-MM-dd HH:mm"
- value-format="yyyy-MM-dd HH:mm"
+ format="YYYY-MM-DD HH:mm:ss"
+ value-format="YYYY-MM-DD HH:mm:ss"
/>
diff --git a/packages/business/src/views/verification/List.vue b/packages/business/src/views/verification/List.vue
index f63e949e8d..697583ef30 100644
--- a/packages/business/src/views/verification/List.vue
+++ b/packages/business/src/views/verification/List.vue
@@ -263,6 +263,7 @@ export default {
type: 'select-inner',
items: this.verifyTypeList,
selectedWidth: '200px',
+ id: 'type-filter-select',
},
{
label: this.$t('packages_business_verification_check_frequency'),
@@ -279,6 +280,7 @@ export default {
value: 'cron',
},
],
+ id: 'mode-filter-select',
},
{
label: this.$t('packages_business_verification_is_enabled'),
@@ -295,17 +297,20 @@ export default {
value: 2,
},
],
+ id: 'enabled-filter-select',
},
{
label: this.$t('packages_business_verification_result_title'),
key: 'result',
type: 'select-inner',
items: this.validList,
+ id: 'result-filter-select',
},
{
placeholder: this.$t('packages_business_verification_task_name'),
key: 'keyword',
type: 'input',
+ id: 'name-filter-input',
},
]
},
@@ -358,7 +363,6 @@ export default {
v-readonlybtn="'datasource_creation'"
class="btn btn-create"
type="primary"
-
@click="handleCreate('pipeline')"
>
{{
@@ -369,7 +373,6 @@ export default {
v-readonlybtn="'datasource_creation'"
class="btn btn-create"
type="primary"
-
@click="handleCreate('random')"
>
{{
@@ -401,7 +404,6 @@ export default {
}}
diff --git a/packages/business/src/views/verification/components/CollateMap.vue b/packages/business/src/views/verification/components/CollateMap.vue
index d1d91fac7b..aa58029a2c 100644
--- a/packages/business/src/views/verification/components/CollateMap.vue
+++ b/packages/business/src/views/verification/components/CollateMap.vue
@@ -24,7 +24,7 @@ export default defineComponent({
required: true,
},
},
-
+ emits: ['update:value'],
setup(props, { emit }) {
const setCharset = (value) => {
selectedFields.value.forEach((key) => {
@@ -42,7 +42,7 @@ export default defineComponent({
return acc
}, {})
- emit('input', result)
+ emit('update:value', result)
},
})
diff --git a/packages/business/src/views/verification/components/ConditionBox.vue b/packages/business/src/views/verification/components/ConditionBox.vue
index 989b8a54a3..6c1120370e 100644
--- a/packages/business/src/views/verification/components/ConditionBox.vue
+++ b/packages/business/src/views/verification/components/ConditionBox.vue
@@ -8,8 +8,14 @@ import SwitchNumber from '@tap/component/src/SwitchNumber.vue'
import { AsyncSelect, SchemaToForm } from '@tap/form'
import i18n from '@tap/i18n'
import { uuid } from '@tap/shared'
-import { cloneDeep, debounce, isEmpty, isString, merge, uniqBy } from 'lodash-es'
-import { DynamicScroller, DynamicScrollerItem } from 'vue-virtual-scroller'
+import {
+ cloneDeep,
+ debounce,
+ isEmpty,
+ isString,
+ merge,
+ uniqBy,
+} from 'lodash-es'
import { $emit } from '../../../../utils/gogocodeTransfer'
import { CONNECTION_STATUS_MAP } from '../../../shared'
@@ -24,8 +30,6 @@ export default {
components: {
DocsDrawer,
AsyncSelect,
- DynamicScroller,
- DynamicScrollerItem,
VCodeEditor,
GitBook,
FieldDialog,
@@ -71,6 +75,9 @@ export default {
jsEngineName: 'graal.js',
doc: '',
schemaData: null,
+ // Add pagination properties
+ currentPage: 1,
+ pageSize: 10,
schemaScope: {
$supportFilterFunction:
this.inspectMethod === 'row_count'
@@ -788,6 +795,16 @@ export default {
)
})
},
+ // Add paginated list computed property
+ paginatedList() {
+ const startIndex = (this.currentPage - 1) * this.pageSize
+ const endIndex = startIndex + this.pageSize
+ return this.filteredList.slice(startIndex, endIndex)
+ },
+ // Add total pages computed property
+ totalPages() {
+ return Math.ceil(this.filteredList.length / this.pageSize)
+ },
nullsLastState() {
return Object.keys(this.capabilitiesMap || {}).reduce((cur, pre) => {
const tags = this.capabilitiesMap[pre]?.tags || []
@@ -816,8 +833,17 @@ export default {
deep: true,
handler() {
this.debounceValidate()
+ // Reset to page 1 if list is empty
+ if (this.list.length === 0) {
+ this.currentPage = 1
+ }
},
},
+
+ searchValue() {
+ // Reset to page 1 when search filter changes
+ this.currentPage = 1
+ },
},
created() {
this.loadDoc()
@@ -951,8 +977,12 @@ export default {
async getConnectionsInTask(filter = {}) {
const keyword = filter.where?.name?.like
- let arr
- if (keyword) {
+ const id = filter.where?.id
+ let arr = []
+ if (id) {
+ const item = this.flowStages.find((item) => item.connectionId === id)
+ item && arr.push(item)
+ } else if (keyword) {
arr = this.flowStages.filter((t) =>
t.attrs?.connectionName.includes(filter.where?.name?.like),
)
@@ -990,6 +1020,8 @@ export default {
'value',
)
+ // Add await to ensure this is truly async
+ await Promise.resolve()
return { items: result, total: result.length }
},
@@ -1165,6 +1197,7 @@ export default {
clearList() {
this.list = []
+ this.currentPage = 1
this.validate()
},
@@ -1183,6 +1216,16 @@ export default {
addItem() {
this.list.push(this.getItemOptions())
+ // Navigate to the last page when adding a new item
+ this.currentPage = this.totalPages
+ },
+
+ removeItem(id) {
+ this.list = this.list.filter((t) => t.id !== id)
+ // If current page is now empty and it's not the first page, go to previous page
+ if (this.paginatedList.length === 0 && this.currentPage > 1) {
+ this.currentPage--
+ }
},
async autoAddTable() {
@@ -1392,12 +1435,6 @@ export default {
})
},
- removeItem(id) {
- const index = this.list.findIndex(item => item.id === id)
-
- if (~index) this.list.splice(index, 1)
- },
-
loadList() {
const data = cloneDeep(this.data)
data.forEach((el) => {
@@ -1579,12 +1616,12 @@ export default {
})
},
- handleChangeAdvanced(item, val) {
+ handleChangeAdvanced(item) {
Object.assign(item.target, {
targeFilterFalg: false,
where: '',
})
- item.showAdvancedVerification = val
+ // item.showAdvancedVerification = val
},
addScript(index) {
@@ -1614,7 +1651,7 @@ export default {
editScript(index) {
this.formIndex = index
- const task = this.list
+ const task = this.paginatedList
const script = JSON.parse(JSON.stringify(task[this.formIndex].webScript))
this.jsEngineName = JSON.parse(
JSON.stringify(task[this.formIndex].jsEngineName || 'nashorn'),
@@ -1623,7 +1660,7 @@ export default {
this.dialogAddScriptVisible = true
},
- removeScript(index) {
+ removeScript(item, index) {
this.$confirm(
this.$t('packages_business_verification_message_confirm_delete_script'),
this.$t('public_button_delete'),
@@ -1634,7 +1671,7 @@ export default {
if (!resFlag) {
return
}
- this.list[index].webScript = ''
+ item.webScript = ''
})
},
@@ -1681,7 +1718,7 @@ export default {
let index = 0
let message = ''
// const formDom = document.getElementById('data-verification-form')
-
+ const SHOW_COUNT = 20
// 检查是否选择表
const haveTableArr = tasks.filter((c) => c.source.table && c.target.table)
const noTableArr = tasks.filter((c) => !c.source.table || !c.target.table)
@@ -1711,8 +1748,6 @@ export default {
return
}
- // 检查
- const SHOW_COUNT = 20
if (['field', 'jointField'].includes(this.inspectMethod)) {
// 检查数据源的能力
message = this.validateCapabilities(
@@ -1786,10 +1821,12 @@ export default {
// 判断过滤设置是否填写完整
let schemaToFormFlag = false
for (const [i, task] of tasks.entries()) {
- await this.$refs[`schemaToForm_${task.id}`]?.validate().catch(() => {
- index = i + 1
- schemaToFormFlag = true
- })
+ await this.$refs[`schemaToForm_${task.id}`]?.[0]
+ ?.validate?.()
+ .catch(() => {
+ index = i + 1
+ schemaToFormFlag = true
+ })
}
if (schemaToFormFlag) {
message = this.$t(
@@ -1946,6 +1983,18 @@ return {result: 'failed',message: "记录不一致",data: targetRow}
)
},
+ handlePageChange(page) {
+ this.currentPage = page
+ },
+
+ handleSizeChange(size) {
+ this.pageSize = size
+ // If changing page size would put us on a non-existent page, reset to page 1
+ if (this.currentPage > this.totalPages) {
+ this.currentPage = 1
+ }
+ },
+
handleCustomFields(item, index) {
this.$refs.fieldDialog.open(item, index, {
source: this.dynamicSchemaMap[item.source.connectionId],
@@ -2071,18 +2120,15 @@ return {result: 'failed',message: "记录不一致",data: targetRow}
toggleCollate(item, value) {
if (value) {
const fields = Object.keys(item.collate || {})
+
if (fields.length || !item.sortColumn) return
const sortColumn = item.sortColumn.split(',')
- this.$set(
- item,
- 'collate',
- sortColumn.reduce((acc, key) => {
- acc[key] = ''
- return acc
- }, {}),
- )
+ item.collate = sortColumn.reduce((acc, key) => {
+ acc[key] = ''
+ return acc
+ }, {})
}
},
},
@@ -2141,352 +2187,337 @@ return {result: 'failed',message: "记录不一致",data: targetRow}
>{{ $t('packages_business_verification_clear') }}
-