Branch_d40a2540 V2.2.9
wangchenguang 2 years ago
parent b7747dcd9b
commit cf1bf19289
  1. 13
      src/pages/project/add/index.vue
  2. 2
      src/setting.js

@ -232,7 +232,8 @@ export default {
listLoading:false,//
submiting: false, //
updateTime: 0,
next: null
next: null,
backType: false
};
},
computed: {
@ -275,6 +276,7 @@ export default {
beforeRouteLeave(to, from, next) {
console.log(44, this.updateTime)
if(this.updateTime){
if(!this.backType) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
}).then(() => {
@ -283,6 +285,10 @@ export default {
}).catch(() => {
next()
})
}else {
next()
}
}else{
next()
}
@ -697,6 +703,7 @@ export default {
},
//
back() {
this.backType = true
//
if(this.updateTime){
this.$confirm('编辑的内容未保存,是否保存?', "提示", {
@ -704,10 +711,10 @@ export default {
}).then(() => {
this.save(this.projectManage.state)
}).catch(() => {
this.$router.back()
this.$router.push('/project/list')
})
} else {
this.$router.back()
this.$router.push('/project/list')
}
}
}

@ -26,7 +26,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服
host = "http://192.168.31.151:9000/"; // 榕
// host = "http://192.168.31.151:9000/"; // 榕
// host = 'http://192.168.31.116:9000/'; // 赓
}

Loading…
Cancel
Save