@@ -82,6 +82,10 @@ export default {
}
}
+ .change-secret-container {
+ min-width: 670px;
+ }
+
.switch-date-wrapper {
margin-bottom: 1.25rem;
}
@@ -114,7 +118,7 @@ export default {
.data-summary,
.card-summary,
.failed-account-summary {
- min-width: 670px;
+ min-width: unset;
}
@media (max-width: 1200px) {
From 27e2d3417148929c1430e9dcb7a94d109d8c385c Mon Sep 17 00:00:00 2001
From: w940853815 <940853815@qq.com>
Date: Tue, 18 Feb 2025 11:16:39 +0800
Subject: [PATCH 4/4] fix: Create playbook job form error
---
src/views/ops/Job/JobUpdateCreate.vue | 56 +++++++++++------------
src/views/ops/Job/components/Adhoc.vue | 9 +++-
src/views/ops/Job/components/PlayBook.vue | 14 +++---
3 files changed, 41 insertions(+), 38 deletions(-)
diff --git a/src/views/ops/Job/JobUpdateCreate.vue b/src/views/ops/Job/JobUpdateCreate.vue
index 702511c33..909d5aa3e 100644
--- a/src/views/ops/Job/JobUpdateCreate.vue
+++ b/src/views/ops/Job/JobUpdateCreate.vue
@@ -158,37 +158,33 @@ export default {
}
},
mounted() {
- if (this.$route.query && this.$route.query.type) {
- this.initial.type = 'adhoc'
- switch (this.$route.query.type) {
- case 'adhoc':
- this.initial.type = 'adhoc'
- if (this.$route.query.id) {
- this.$axios.get(`/api/v1/ops/adhocs/${this.$route.query.id}`).then((data) => {
- this.initial.module = data.module
- this.initial.args = data.args
- this.initial.instant = true
- this.initial.runAfterSave = true
- this.instantTask = true
- this.createSuccessNextRoute = { name: 'Adhoc' }
- this.ready = true
- })
- } else {
+ const type = this.$route.query['_type']
+ switch (type) {
+ case 'adhoc':
+ this.initial.type = 'adhoc'
+ if (this.$route.query.id) {
+ this.$axios.get(`/api/v1/ops/adhocs/${this.$route.query.id}`).then((data) => {
+ this.initial.module = data.module
+ this.initial.args = data.args
+ this.initial.instant = true
+ this.initial.runAfterSave = true
+ this.instantTask = true
+ this.createSuccessNextRoute = { name: 'Adhoc' }
this.ready = true
- }
- break
- case 'playbook':
- this.initial.type = 'playbook'
- if (this.$route.query.id) {
- this.initial.playbook = this.$route.query.id
- this.ready = true
- } else {
- this.ready = true
- }
- break
- }
- } else {
- this.ready = true
+ })
+ } else {
+ this.ready = true
+ }
+ break
+ case 'playbook':
+ this.initial.type = 'playbook'
+ if (this.$route.query.id) {
+ this.initial.playbook = this.$route.query.id
+ this.ready = true
+ } else {
+ this.ready = true
+ }
+ break
}
},
methods: {}
diff --git a/src/views/ops/Job/components/Adhoc.vue b/src/views/ops/Job/components/Adhoc.vue
index dc2ab8763..cfc86bbbf 100644
--- a/src/views/ops/Job/components/Adhoc.vue
+++ b/src/views/ops/Job/components/Adhoc.vue
@@ -1,6 +1,7 @@
import('@/views/ops/Job/JobUpdateCreate.vue'),
@@ -113,7 +115,12 @@ export default {
}
},
headerActions: {
- createRoute: 'JobCreate',
+ onCreate: () => {
+ vm.$router.push({
+ query: { _type: 'adhoc' }
+ })
+ vm.$refs.ListTable.onCreate()
+ },
hasRefresh: true,
hasExport: false,
hasImport: false
diff --git a/src/views/ops/Job/components/PlayBook.vue b/src/views/ops/Job/components/PlayBook.vue
index 43eee0d5a..d766779d0 100644
--- a/src/views/ops/Job/components/PlayBook.vue
+++ b/src/views/ops/Job/components/PlayBook.vue
@@ -1,6 +1,7 @@
import('@/views/ops/Job/JobUpdateCreate.vue'),
detailDrawer: () => import('@/views/ops/Job/JobDetail/index.vue'),
@@ -117,13 +119,11 @@ export default {
hasRefresh: true,
hasExport: false,
hasImport: false,
- createRoute: () => {
- return {
- name: 'JobCreate',
- query: {
- type: 'playbook'
- }
- }
+ onCreate: () => {
+ vm.$router.push({
+ query: { _type: 'playbook' }
+ })
+ vm.$refs.ListTable.onCreate()
}
},
showJobRunDialog: false