Commit c1c28201 by 潘际乾

FunctionBtn的跳转

parent 9a4c47be
...@@ -98,6 +98,7 @@ export default { ...@@ -98,6 +98,7 @@ export default {
}) })
.then(res => { .then(res => {
// this.$router.back(); // this.$router.back();
this.$store.dispatch("TagsView/delView", this.$route)
this.handleExit && this.handleExit() this.handleExit && this.handleExit()
if (this.$route.query && this.$route.query.routeParams) { if (this.$route.query && this.$route.query.routeParams) {
setTimeout(() => { setTimeout(() => {
......
...@@ -11,7 +11,10 @@ export default { ...@@ -11,7 +11,10 @@ export default {
message: "保存成功", message: "保存成功",
type: "success", 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{ } else{
this.$notify({ this.$notify({
title: "失败", title: "失败",
...@@ -32,7 +35,10 @@ export default { ...@@ -32,7 +35,10 @@ export default {
message: "暂存成功", message: "暂存成功",
type: "success", 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 { } else {
this.$notify({ this.$notify({
title: "失败", title: "失败",
...@@ -44,7 +50,15 @@ export default { ...@@ -44,7 +50,15 @@ export default {
// 表单校验 // 表单校验
async handleCheck() { async handleCheck() {
let result = await this.checkAll(); 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(); this.$refs.modelForm.clearValidate();
const fields = this.$refs.modelForm.fields; const fields = this.$refs.modelForm.fields;
...@@ -56,11 +70,6 @@ export default { ...@@ -56,11 +70,6 @@ export default {
// tab切换之后,需出发tab-click的事件 // tab切换之后,需出发tab-click的事件
this.tabClick(tab); this.tabClick(tab);
} }
this.$notify({
title: "成功",
message: "校核成功",
type: "success",
});
} else { } else {
this.$notify.error({ title: "错误", message: result.respMsg }); this.$notify.error({ title: "错误", message: result.respMsg });
} }
......
...@@ -21,7 +21,8 @@ const Status = { ...@@ -21,7 +21,8 @@ const Status = {
check: false, check: false,
// 暂存 // 暂存
stash: false stash: false
} },
taskListTabVal: ''
}, },
mutations: { mutations: {
setMode(state, value) { setMode(state, value) {
...@@ -78,6 +79,9 @@ const Status = { ...@@ -78,6 +79,9 @@ const Status = {
}, },
setLoadingStash(state, value) { setLoadingStash(state, value) {
state.loading.stash = value; state.loading.stash = value;
},
setTaskListTabVal(state, value) {
state.taskListTabVal = value;
} }
} }
} }
......
...@@ -37,26 +37,33 @@ import Bopsel from "~/views/Business/Bopsel"; ...@@ -37,26 +37,33 @@ import Bopsel from "~/views/Business/Bopsel";
export default { export default {
data(){ data(){
return{ return{
tabVal:"sptsel", }
},
computed: {
tabVal: {
get() {
return this.$store.state.Status.taskListTabVal || "sptsel"
},
set(val) {
this.$store.commit("setTaskListTabVal", val)
}
} }
}, },
name: "TaskList", name: "TaskList",
created() {
methods: {
tabClick() {},
}, },
components:{ methods: {
"t-sptsel" : Sptsel, tabClick(tab) {
"t-sptbrk" : Sptbrk,
"t-trnrel" : Trnrel,
"t-trnfnd" : Trnfnd,
"t-diasel" : Diasel,
"t-bopsel" : Bopsel,
}, },
},
components:{
"t-sptsel" : Sptsel,
"t-sptbrk" : Sptbrk,
"t-trnrel" : Trnrel,
"t-trnfnd" : Trnfnd,
"t-diasel" : Diasel,
"t-bopsel" : Bopsel,
},
}; };
</script> </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