diff --git a/backend/src/main/java/io/metersphere/dto/ProjectConfig.java b/backend/src/main/java/io/metersphere/dto/ProjectConfig.java index 9c8377f422..6982777dfc 100644 --- a/backend/src/main/java/io/metersphere/dto/ProjectConfig.java +++ b/backend/src/main/java/io/metersphere/dto/ProjectConfig.java @@ -26,4 +26,7 @@ public class ProjectConfig { private Boolean cleanLoadReport = false; private String cleanLoadReportExpr; private Boolean urlRepeatable = false; + private String triggerUpdate; + private Boolean openUpdateTime = false; + private String openUpdateRuleTime; } diff --git a/frontend/src/business/components/project/menu/appmanage/AppManage.vue b/frontend/src/business/components/project/menu/appmanage/AppManage.vue index 4fc32b29cc..79408e4004 100644 --- a/frontend/src/business/components/project/menu/appmanage/AppManage.vue +++ b/frontend/src/business/components/project/menu/appmanage/AppManage.vue @@ -318,20 +318,11 @@ export default { shareReport: true, openUpdateTime: false, openUpdateRuleTime: "", + triggerUpdate: "", }, showRuleSetting: false, showSyncTimeSetting: false, - apiSyncCaseRequest: { - protocol: true, - method: true, - path: true, - headers: true, - query: true, - rest: true, - body: true, - failed: true, - unExecute: true - }, + apiSyncCaseRequest: {}, pastQuantity: '', pastUnit: '' }; @@ -395,11 +386,31 @@ export default { if (!this.config.uiQuickMenu) { this.config.uiQuickMenu = "server"; } + if (this.config.triggerUpdate) { + this.apiSyncCaseRequest = JSON.parse(this.config.triggerUpdate); + } + if (this.config.openUpdateRuleTime) { + this.pastUnit = this.config.openUpdateRuleTime.substring(this.config.openUpdateRuleTime.length - 1); + this.pastQuantity = this.config.openUpdateRuleTime.substring(0, this.config.openUpdateRuleTime.length - 1); + } } }); }, openRuleSetting() { this.showRuleSetting = true; + if (!this.apiSyncCaseRequest.protocol) { + this.apiSyncCaseRequest = { + protocol: true, + method: true, + path: true, + headers: true, + query: true, + rest: true, + body: true, + failed: true, + unExecute: true + } + } }, setSyncTime() { this.showSyncTimeSetting = !this.showSyncTimeSetting;