From fae5820319c45cfdca9f665deb0cd9f7297cd498 Mon Sep 17 00:00:00 2001 From: dengbf Date: Thu, 24 Apr 2025 18:40:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[=E5=85=B3=E8=81=94]#[1405917927538701]?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E6=B5=81=E6=B0=B4=E7=BA=BF-=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E5=88=97=E8=A1=A8=E8=B0=83=E6=95=B4=20http://192.168.?= =?UTF-8?q?0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947?= =?UTF-8?q?543042/1405917927538701?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deploy/pipeline/list-deployjob-dialog.vue | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/views/pages/deploy/pipeline/list-deployjob-dialog.vue b/src/views/pages/deploy/pipeline/list-deployjob-dialog.vue index e63f116d2..0d0280469 100644 --- a/src/views/pages/deploy/pipeline/list-deployjob-dialog.vue +++ b/src/views/pages/deploy/pipeline/list-deployjob-dialog.vue @@ -19,7 +19,7 @@ @changePageSize="changePageSize" > @@ -95,10 +27,8 @@ export default { name: '', components: { - TsTable: () => import('@/resources/components/TsTable/TsTable.vue'), - Liquid: () => import('@/resources/components/SimpleGraph/Liquid.vue'), - Status: () => import('@/resources/components/Status/CommonStatus.vue'), - CombineSearcher: () => import('@/resources/components/CombineSearcher/CombineSearcher.vue') + CombineSearcher: () => import('@/resources/components/CombineSearcher/CombineSearcher.vue'), + DeployPipelineTable: () => import('@/views/pages/deploy/job/publishing/deploy-pipeline-table.vue') }, props: { id: { type: Number }, @@ -107,7 +37,6 @@ export default { data() { return { isLoading: false, - jobData: {}, searchValue: {}, searchConfig: { search: true, labelPosition: 'top', @@ -158,60 +87,11 @@ export default { isShow: true, width: 'large', hasFooter: false - }, - theadList: [ - { key: 'showChildren' }, - { - title: this.$t('page.name'), - key: 'name' - }, - { - title: this.$t('page.scene'), - key: 'scenarioName' - }, - { - title: this.$t('page.status'), - key: 'status' - }, - { - title: this.$t('page.timecost'), - key: 'costTime' - }, - { - title: this.$t('page.executeuser'), - key: 'execUserVo', - type: 'user', - uuid: 'uuid' - }, - { - title: this.$t('page.source'), - key: 'sourceName' - }, - { - title: this.$t('page.plantime'), - key: 'planStartTime', - type: 'time' - }, - { - title: this.$t('page.startstoptime'), - key: 'startTime', - keyend: 'endTime' - }, - { - title: this.$t('term.autoexec.triggertype'), - key: 'triggerTypeName' - }, - { - title: this.$t('term.autoexec.executionsituation'), - key: 'completionRate' - } - ] + } }; }, beforeCreate() {}, - created() { - this.searchJob(1); - }, + created() {}, beforeMount() {}, mounted() {}, beforeUpdate() {}, @@ -221,89 +101,17 @@ export default { beforeDestroy() {}, destroyed() {}, methods: { - changePageSize(pageSize) { - this.searchParam.pageSize = pageSize; - this.searchJob(1); - }, - toggleChildJob(row, isShow) { - if (row['showChildren']) { - this.$set(row, 'showChildren', false); - for (let i = this.jobData.tbodyList.length - 1; i >= 0; i--) { - const element = this.jobData.tbodyList[i]; - if (element.parentId === row.id) { - this.jobData.tbodyList.splice(i, 1); - } - } - } else { - this.getChildrenJob(row); - } - }, - getChildrenJob(parentRow) { - this.$set(parentRow, 'loading', true); - this.$api.deploy.job.searchJobList({ parentId: parentRow.id }).then(res => { - const jobList = res.Return.tbodyList; - if (jobList && jobList.length > 0) { - const pIndex = this.jobData.tbodyList.findIndex(d => d === parentRow); - if (pIndex >= 0) { - this.$set(parentRow, 'showChildren', true); - this.$set(parentRow, 'loading', false); - this.jobData.tbodyList.splice(pIndex + 1, 0, ...jobList); - } - } - }); - }, - searchJob(currentPage) { - this.isLoading = true; - if (currentPage) { - this.searchParam.currentPage = currentPage; + searchDeployPipeline(currentPage) { + if (this.$refs.tableData) { + this.$refs.tableData.searchJob(currentPage, this.searchValue); } - const param = { ...this.searchParam, ...this.searchValue }; - this.$api.deploy.job - .searchJobList(param) - .then(res => { - this.jobData = res.Return; - if (this.jobData.tbodyList && this.jobData.tbodyList.length > 0) { - this.jobData.tbodyList.forEach(element => { - if (element.source === 'batchdeploy' || element.source === 'deployschedulepipeline') { - this.$set(element, '#expander', true); - } else { - this.$set(element, '#expander', false); - } - }); - } - }) - .finally(() => { - this.isLoading = false; - }); }, close() { this.$emit('close'); - }, - toJobDetail(row) { - this.$router.push({ - path: '/job-detail', - query: { id: row.id } - }); - }, - toBatchJobDetail(row) { - const {parentId = '', id = ''} = row || {}; - if (parentId != -1) { - this.toJobDetail(row); - } else { - window.open(HOME + '/deploy.html#/batch-job-detail?id=' + id, '_blank'); - } } }, filter: {}, computed: { - getConfig() { - return row => { - let config = {}; - config.status = row.status; - row.status == 'running' ? (config.status = 'active') : row.status == 'error' ? (config.status = 'wrong') : ''; - return config; - }; - } }, watch: {} }; -- Gitee From 12730d1e1a650dc7af3fa84d95b62d95a7a2a2bf Mon Sep 17 00:00:00 2001 From: dengbf Date: Tue, 29 Apr 2025 16:55:36 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20#[1405917927538701]?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E6=B5=81=E6=B0=B4=E7=BA=BF-=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E5=88=97=E8=A1=A8=E8=B0=83=E6=95=B4=20http://192.168.?= =?UTF-8?q?0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947?= =?UTF-8?q?543042/1405917927538701?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pages/deploy/job/job-manage.vue | 6 ++---- .../pages/deploy/job/publishing/deploy-pipeline-table.vue | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/views/pages/deploy/job/job-manage.vue b/src/views/pages/deploy/job/job-manage.vue index 28443dcdf..0a54f5269 100644 --- a/src/views/pages/deploy/job/job-manage.vue +++ b/src/views/pages/deploy/job/job-manage.vue @@ -89,6 +89,7 @@ @@ -161,7 +162,6 @@ export default { sortOrder: [{planStartTime: 'DESC'}], noConfigInfo: false, // 无配置信息,模块和环境 moduleList: [], - isLoading: false, isShowResourceLockDialog: false, appModuleData: {}, searchValue: {}, @@ -238,9 +238,7 @@ export default { } }, beforeMount() {}, - mounted() { - this.searchJob(); - }, + mounted() {}, beforeUpdate() {}, updated() {}, activated() {}, diff --git a/src/views/pages/deploy/job/publishing/deploy-pipeline-table.vue b/src/views/pages/deploy/job/publishing/deploy-pipeline-table.vue index 0a65514cf..03b88c664 100644 --- a/src/views/pages/deploy/job/publishing/deploy-pipeline-table.vue +++ b/src/views/pages/deploy/job/publishing/deploy-pipeline-table.vue @@ -104,6 +104,7 @@ export default { default: true }, defaultSearchParam: { type: Object }, + defaultSearchValue: { type: Object }, sortList: { type: Array }, sortOrder: { type: Array }, fixedHeader: { type: Boolean, default: true } @@ -170,7 +171,7 @@ export default { }, beforeCreate() {}, created() { - this.searchJob(1); + this.searchJob(1, this.defaultSearchValue); }, beforeMount() {}, mounted() {}, -- Gitee