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

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

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

Loading…
Cancel
Save