a7833dac by 任超
2 parents 65d68067 04f046ec
......@@ -492,12 +492,13 @@ export default {
},
//表单选项卡事件
beforeLeave (activeName, oldActiveName) {
if (!_.isEqual(this.oldDetail, this.newDetail)) {
this.$message.error('界面内容有所变化,请先保存')
return false
} else {
if (activeName && activeName != 0) this.getFromRouter(activeName)
}
// if (!_.isEqual(this.oldDetail, this.newDetail)) {
// this.$message.error('界面内容有所变化,请先保存')
// return false
// } else {
// if (activeName && activeName != 0) this.getFromRouter(activeName)
// }
if (activeName && activeName != 0) this.getFromRouter(activeName)
},
//切换选项卡内容组件
getFromRouter (tabname) {
......
......@@ -178,8 +178,8 @@ export default {
formdata.append("bsmSldy", this.propsParam.bsmSldy);
formdata.append("djlx", this.propsParam.djlx);
Init(formdata).then((res) => {
if (res.code === 200 && res.result) {
this.ruleForm = res.result;
this.ruleForm = res.result;
if (res.code === 200 ) {
this.$store.dispatch('slxx/setQlrxxOld', {
qlrxx: this.ruleForm.qlrxx,
fj: this.ruleForm.fj,
......@@ -188,7 +188,7 @@ export default {
})
}
else{
this.$message(res.message);
this.$alert(res.message, '提示');
}
})
},
......