|
|
@ -237,17 +237,18 @@ export default {
|
|
|
|
backManagement () {
|
|
|
|
backManagement () {
|
|
|
|
// 给出一个确认框提示,提示如下确定返回主页面吗?未保存的配置将会丢失。3个按钮 : 留在页面 、离开页面、保存后离开页面
|
|
|
|
// 给出一个确认框提示,提示如下确定返回主页面吗?未保存的配置将会丢失。3个按钮 : 留在页面 、离开页面、保存后离开页面
|
|
|
|
this.$confirm('确定返回主页面吗?未保存的配置将会丢失。', '提示', {
|
|
|
|
this.$confirm('确定返回主页面吗?未保存的配置将会丢失。', '提示', {
|
|
|
|
|
|
|
|
distinguishCancelAndClose: true,
|
|
|
|
confirmButtonText: '保存后离开页面',
|
|
|
|
confirmButtonText: '保存后离开页面',
|
|
|
|
cancelButtonText: '离开页面',
|
|
|
|
cancelButtonText: '离开页面',
|
|
|
|
cancelButtonClass: 'cancel-btn',
|
|
|
|
cancelButtonClass: 'cancel-btn',
|
|
|
|
cancelButtonColor: '#FF6F6F',
|
|
|
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
|
|
type: 'warning',
|
|
|
|
type: 'warning',
|
|
|
|
customClass: 'bs-el-message-box'
|
|
|
|
customClass: 'bs-el-message-box'
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
this.save(true)
|
|
|
|
this.save(true)
|
|
|
|
}).catch(() => {
|
|
|
|
}).catch((action) => {
|
|
|
|
this.pageJump()
|
|
|
|
if (action === 'cancel') {
|
|
|
|
|
|
|
|
this.pageJump()
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
save (pageJump = false) {
|
|
|
|
save (pageJump = false) {
|
|
|
@ -271,12 +272,18 @@ export default {
|
|
|
|
translateBlobToBase64(res, function (e) {
|
|
|
|
translateBlobToBase64(res, function (e) {
|
|
|
|
this.form.coverPicture = e.result
|
|
|
|
this.form.coverPicture = e.result
|
|
|
|
updateBizComponent(this.form)
|
|
|
|
updateBizComponent(this.form)
|
|
|
|
.then((res) => {
|
|
|
|
.then(() => {
|
|
|
|
that.$message.success('保存成功')
|
|
|
|
this.$message({
|
|
|
|
console.log(pageJump)
|
|
|
|
message: '保存成功',
|
|
|
|
if (pageJump) {
|
|
|
|
type: 'success',
|
|
|
|
this.pageJump()
|
|
|
|
duration: 800,
|
|
|
|
}
|
|
|
|
onClose: () => {
|
|
|
|
|
|
|
|
// 此处写提示关闭后需要执行的函数
|
|
|
|
|
|
|
|
if (pageJump) {
|
|
|
|
|
|
|
|
this.pageJump()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.finally(() => {
|
|
|
|
.finally(() => {
|
|
|
|
that.loading = false
|
|
|
|
that.loading = false
|
|
|
@ -287,11 +294,17 @@ export default {
|
|
|
|
this.form.coverPicture = dataUrl
|
|
|
|
this.form.coverPicture = dataUrl
|
|
|
|
updateBizComponent(this.form)
|
|
|
|
updateBizComponent(this.form)
|
|
|
|
.then(() => {
|
|
|
|
.then(() => {
|
|
|
|
console.log(1122)
|
|
|
|
this.$message({
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
message: '保存成功',
|
|
|
|
if (pageJump) {
|
|
|
|
type: 'success',
|
|
|
|
this.pageJump()
|
|
|
|
duration: 800,
|
|
|
|
}
|
|
|
|
onClose: () => {
|
|
|
|
|
|
|
|
// 此处写提示关闭后需要执行的函数
|
|
|
|
|
|
|
|
if (pageJump) {
|
|
|
|
|
|
|
|
this.pageJump()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.finally(() => {
|
|
|
|
.finally(() => {
|
|
|
|
this.loading = false
|
|
|
|
this.loading = false
|
|
|
|