diff --git a/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/NoviceStatistics.java b/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/NoviceStatistics.java index 7f3e432ccd..7ee58dc217 100644 --- a/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/NoviceStatistics.java +++ b/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/NoviceStatistics.java @@ -13,11 +13,13 @@ public class NoviceStatistics implements Serializable { private Integer guideNum; + private String dataOption; + + private Integer status; + private Long createTime; private Long updateTime; - private String dataOption; - private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/NoviceStatisticsExample.java b/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/NoviceStatisticsExample.java index d45ab926d0..cbca4b0312 100644 --- a/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/NoviceStatisticsExample.java +++ b/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/NoviceStatisticsExample.java @@ -364,6 +364,136 @@ public class NoviceStatisticsExample { return (Criteria) this; } + public Criteria andDataOptionIsNull() { + addCriterion("data_option is null"); + return (Criteria) this; + } + + public Criteria andDataOptionIsNotNull() { + addCriterion("data_option is not null"); + return (Criteria) this; + } + + public Criteria andDataOptionEqualTo(String value) { + addCriterion("data_option =", value, "dataOption"); + return (Criteria) this; + } + + public Criteria andDataOptionNotEqualTo(String value) { + addCriterion("data_option <>", value, "dataOption"); + return (Criteria) this; + } + + public Criteria andDataOptionGreaterThan(String value) { + addCriterion("data_option >", value, "dataOption"); + return (Criteria) this; + } + + public Criteria andDataOptionGreaterThanOrEqualTo(String value) { + addCriterion("data_option >=", value, "dataOption"); + return (Criteria) this; + } + + public Criteria andDataOptionLessThan(String value) { + addCriterion("data_option <", value, "dataOption"); + return (Criteria) this; + } + + public Criteria andDataOptionLessThanOrEqualTo(String value) { + addCriterion("data_option <=", value, "dataOption"); + return (Criteria) this; + } + + public Criteria andDataOptionLike(String value) { + addCriterion("data_option like", value, "dataOption"); + return (Criteria) this; + } + + public Criteria andDataOptionNotLike(String value) { + addCriterion("data_option not like", value, "dataOption"); + return (Criteria) this; + } + + public Criteria andDataOptionIn(List values) { + addCriterion("data_option in", values, "dataOption"); + return (Criteria) this; + } + + public Criteria andDataOptionNotIn(List values) { + addCriterion("data_option not in", values, "dataOption"); + return (Criteria) this; + } + + public Criteria andDataOptionBetween(String value1, String value2) { + addCriterion("data_option between", value1, value2, "dataOption"); + return (Criteria) this; + } + + public Criteria andDataOptionNotBetween(String value1, String value2) { + addCriterion("data_option not between", value1, value2, "dataOption"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; diff --git a/framework/sdk-parent/frontend/src/api/novice.js b/framework/sdk-parent/frontend/src/api/novice.js index 1b6d12293a..249de67171 100644 --- a/framework/sdk-parent/frontend/src/api/novice.js +++ b/framework/sdk-parent/frontend/src/api/novice.js @@ -7,7 +7,11 @@ export function getSideTask() { } export function saveStep() { - return post(`/novice/save/step`,{'guideStep': localStorage.getItem('step')}); + return post(`/novice/save/step`,{'guideStep': localStorage.getItem('step'), 'dataOption': JSON.stringify(TASK_DATA)}); +} + +export function updateStatus(status) { + return post(`/novice/status`,{'status': status, 'dataOption': JSON.stringify(TASK_DATA)}); } export function saveTask(data) { diff --git a/framework/sdk-parent/frontend/src/components/guide/Guidance.vue b/framework/sdk-parent/frontend/src/components/guide/Guidance.vue index 523cced779..89aae6012b 100644 --- a/framework/sdk-parent/frontend/src/components/guide/Guidance.vue +++ b/framework/sdk-parent/frontend/src/components/guide/Guidance.vue @@ -10,7 +10,7 @@ {{ $t('commons.novice_journey') }} - + @@ -50,7 +50,7 @@ export default { } break; case "novice": - this.$refs.sideMenu.toggle(); + this.$refs.sideMenu.toggle(2); break; default: break; @@ -60,6 +60,7 @@ export default { getSideTask().then(res=> { if (res.data.length > 0 && res.data[0].guideStep) { localStorage.setItem('step', res.data[0].guideStep) + localStorage.setItem("noviceStatus", res.data[0].status) } else { localStorage.setItem('guide','0') } diff --git a/framework/sdk-parent/frontend/src/components/guide/components/Introduction.vue b/framework/sdk-parent/frontend/src/components/guide/components/Introduction.vue index 58122e5cd7..63772b5cbc 100644 --- a/framework/sdk-parent/frontend/src/components/guide/components/Introduction.vue +++ b/framework/sdk-parent/frontend/src/components/guide/components/Introduction.vue @@ -115,15 +115,19 @@ export default { }, gotoTurn(){ this.closeDialog() - let redirectUrl = sessionStorage.getItem("redirectUrl") - if(redirectUrl.includes("track")){ - this.$emit("skipOpen", "/track/case/all") - this.$router.push("/track/case/all") + if(localStorage.getItem("noviceStatus") && localStorage.getItem("noviceStatus") === "1"){ + let redirectUrl = sessionStorage.getItem("redirectUrl") + if(redirectUrl.includes("track")){ + this.$emit("skipOpen", "/track/case/all") + this.$router.push("/track/case/all") + }else{ + this.$router.push({ + path: '/track/case/all', + query: { status: true }, + }) + } }else{ - this.$router.push({ - path: '/track/case/all', - query: { status: true }, - }) + this.$router.push("/track/case/all") } } } @@ -141,12 +145,13 @@ export default { padding: 1px 5px 0 5px; } ::v-deep .api-import-next .el-dialog__body { - padding: 12px 5px 0 5px; + padding: 24px 5px 0 5px; } ::v-deep .api-import-next .el-dialog { margin-top: 10vh !important; border-radius: 8px; + padding-bottom: 1px !important; background-image: linear-gradient(to bottom, #783887 65%, #FFF 0); } diff --git a/framework/sdk-parent/frontend/src/components/sidemenu/SideMenus.vue b/framework/sdk-parent/frontend/src/components/sidemenu/SideMenus.vue index e462da8c9f..c37047f433 100644 --- a/framework/sdk-parent/frontend/src/components/sidemenu/SideMenus.vue +++ b/framework/sdk-parent/frontend/src/components/sidemenu/SideMenus.vue @@ -1,21 +1,22 @@