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

后台富文本处理

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