Commit c1c28201 by 潘际乾

FunctionBtn的跳转

parent 9a4c47be
......@@ -98,6 +98,7 @@ export default {
})
.then(res => {
// this.$router.back();
this.$store.dispatch("TagsView/delView", this.$route)
this.handleExit && this.handleExit()
if (this.$route.query && this.$route.query.routeParams) {
setTimeout(() => {
......
......@@ -11,7 +11,10 @@ export default {
message: "保存成功",
type: "success",
});
this.$router.history.push("/business/trnrel");
this.$store.dispatch("TagsView/delView", this.$route)
this.$router.history.push("/taskList", () => {
this.$store.commit("setTaskListTabVal", 'trnrel')
});
} else{
this.$notify({
title: "失败",
......@@ -32,7 +35,10 @@ export default {
message: "暂存成功",
type: "success",
});
this.$router.history.push("/business/sptsel");
this.$store.dispatch("TagsView/delView", this.$route)
this.$router.history.push("/taskList", () => {
this.$store.commit("setTaskListTabVal", 'sptbrk')
});
} else {
this.$notify({
title: "失败",
......@@ -44,7 +50,15 @@ export default {
// 表单校验
async handleCheck() {
let result = await this.checkAll();
if (result.respCode == SUCCESS && Object.keys(result.fieldErrors).length == 0) {
if (result.respCode == SUCCESS) {
if (Object.keys(result.fieldErrors).length == 0) {
this.$notify({
title: "成功",
message: "校核成功",
type: "success",
});
return;
}
// 清除之前的校验状态
this.$refs.modelForm.clearValidate();
const fields = this.$refs.modelForm.fields;
......@@ -56,11 +70,6 @@ export default {
// tab切换之后,需出发tab-click的事件
this.tabClick(tab);
}
this.$notify({
title: "成功",
message: "校核成功",
type: "success",
});
} else {
this.$notify.error({ title: "错误", message: result.respMsg });
}
......
......@@ -21,7 +21,8 @@ const Status = {
check: false,
// 暂存
stash: false
}
},
taskListTabVal: ''
},
mutations: {
setMode(state, value) {
......@@ -78,6 +79,9 @@ const Status = {
},
setLoadingStash(state, value) {
state.loading.stash = value;
},
setTaskListTabVal(state, value) {
state.taskListTabVal = value;
}
}
}
......
......@@ -37,26 +37,33 @@ import Bopsel from "~/views/Business/Bopsel";
export default {
data(){
return{
tabVal:"sptsel",
}
},
computed: {
tabVal: {
get() {
return this.$store.state.Status.taskListTabVal || "sptsel"
},
set(val) {
this.$store.commit("setTaskListTabVal", val)
}
}
},
name: "TaskList",
methods: {
tabClick() {},
created() {
},
components:{
"t-sptsel" : Sptsel,
"t-sptbrk" : Sptbrk,
"t-trnrel" : Trnrel,
"t-trnfnd" : Trnfnd,
"t-diasel" : Diasel,
"t-bopsel" : Bopsel,
methods: {
tabClick(tab) {
},
},
components:{
"t-sptsel" : Sptsel,
"t-sptbrk" : Sptbrk,
"t-trnrel" : Trnrel,
"t-trnfnd" : Trnfnd,
"t-diasel" : Diasel,
"t-bopsel" : Bopsel,
},
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment