Commit 099b9ff8 authored by 燕南天's avatar 燕南天

后台富文本处理

parent a7fdefcf
......@@ -532,6 +532,9 @@ export default {
this.getList();
},
add() {
// 强制处理详情回显问题
this.dialogBindData.storeDetails = ""
this.dialogType = 1;
axios
.all([this.getPList(), this.getStoreAdministrators()])
......@@ -605,7 +608,7 @@ export default {
}
},
submmitFun() {
// window.location.href = 'http://localhost:9527/#/worker/workerList'
const param = Utils.deepClone(this.dialogBindData);
......@@ -669,8 +672,18 @@ export default {
type: "success"
});
this.submmitSuccess = false;
this.handleClose();
if(this.dialogType==1){
// const host = window.location.origin
// const url = `${host}/?type=1#/worker/workerList`
// setTimeout(()=>{
// window.location.href = url
// },200)
this.submmitSuccess = false;
this.handleClose();
}else{
this.submmitSuccess = false;
this.handleClose();
}
});
});
} else {
......@@ -707,19 +720,22 @@ export default {
this.dImg4 = "";
this.dImg5 = "";
this.$refs.imgComponent1.clearImg();
this.$refs.imgComponent2.clearImg();
this.$refs.imgComponent3.clearImg();
this.$refs.imgComponent4.clearImg();
this.$refs.imgComponent5.clearImg();
this.$refs.imgComponent6.clearImg();
this.$refs.imgComponent7.clearImg();
this.$refs.imgComponent1 ? this.$refs.imgComponent1.clearImg() : "";
this.$refs.imgComponent2 ? this.$refs.imgComponent2.clearImg() : "";
this.$refs.imgComponent3 ? this.$refs.imgComponent3.clearImg() : "";
this.$refs.imgComponent4 ? this.$refs.imgComponent4.clearImg() : "";
this.$refs.imgComponent5 ? this.$refs.imgComponent5.clearImg() : "";
this.$refs.imgComponent6 ? this.$refs.imgComponent6.clearImg() : "";
this.$refs.imgComponent7 ? this.$refs.imgComponent7.clearImg() : "";
// 销毁富文本编辑器的dom对象
setTimeout(() => {
this.dialogType = 0;
}, 200);
}, 500);
},
// 分页处理
handleSizeChange(val) {
......
......@@ -447,6 +447,16 @@ export default {
},
beforeMount() {
let pageOrigin = window.location.search
? window.location.search.split("=")[1]
: "";
if (!!pageOrigin) {
this.getStoreData(() => {
this.dialogType = 1;
this.dialogState = true;
});
}
this.isAdmin = this.getCookAdminType();
worker.getStores().then(res => {
this.ownStoreData = res.data.data;
......@@ -485,6 +495,9 @@ export default {
this.getList();
},
add() {
// 强制处理详情回显问题
this.dialogBindData.workerResume = "";
this.dialogType = 1;
this.getStoreData(() => {
this.dialogState = true;
......@@ -558,7 +571,6 @@ export default {
param.workerPic = this.buildWorkerPic();
let submitParam =
param.brief &&
param.matureTime &&
......@@ -587,8 +599,21 @@ export default {
message: this.dialogType === 1 ? "添加成功" : "编辑成功",
type: "success"
});
this.submmitSuccess = false;
this.handleClose();
let pageOrigin = window.location.search
? window.location.search.split("=")[1]
: "";
if(this.dialogType==1 && (!!pageOrigin)){
const host = window.location.origin
const url = `${host}/#/worker/workerList`
setTimeout(()=>{
window.location.href = url
},100)
}else{
this.submmitSuccess = false
this.handleClose()
}
});
});
} else {
......@@ -634,13 +659,14 @@ export default {
this.dImg3 = "";
this.dImg4 = "";
this.dImg5 = "";
this.$refs.imgComponent.clearImg();
this.$refs.imgComponent1.clearImg();
this.$refs.imgComponent2.clearImg();
this.$refs.imgComponent3.clearImg();
this.$refs.imgComponent4.clearImg();
this.$refs.imgComponent5.clearImg();
this.$refs.imgComponent ? this.$refs.imgComponent.clearImg() : "";
this.$refs.imgComponent1 ? this.$refs.imgComponent1.clearImg() : "";
this.$refs.imgComponent2 ? this.$refs.imgComponent2.clearImg() : "";
this.$refs.imgComponent3 ? this.$refs.imgComponent3.clearImg() : "";
this.$refs.imgComponent4 ? this.$refs.imgComponent4.clearImg() : "";
this.$refs.imgComponent5 ? this.$refs.imgComponent5.clearImg() : "";
// 销毁富文本编辑器的dom对象
setTimeout(() => {
......
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