Merge remote-tracking branch 'origin/jihan_0307_运营管理端健康咨询功能开发' into jihan_0307_运营管理端健康咨询功能开发

This commit is contained in:
闫晓茹 2023-03-10 15:54:22 +08:00
commit 7373077978
2 changed files with 82 additions and 87 deletions

View File

@ -11,8 +11,7 @@
style="display: none"
ref="upload"
v-if="this.type == 'url'"
>
</el-upload>
></el-upload>
<div class="editor" ref="editor" :style="styles"></div>
</div>
</template>
@ -30,32 +29,32 @@ export default {
/* 编辑器的内容 */
value: {
type: String,
default: "",
default: ""
},
/* 高度 */
height: {
type: Number,
default: null,
default: null
},
/* 最小高度 */
minHeight: {
type: Number,
default: null,
default: null
},
/* 只读 */
readOnly: {
type: Boolean,
default: false,
default: false
},
// (MB)
fileSize: {
type: Number,
default: 5,
default: 5
},
/* 类型base64格式、url格式 */
type: {
type: String,
default: "url",
default: "url"
}
},
data() {
@ -83,11 +82,11 @@ export default {
[{ align: [] }], //
["clean"], //
["link", "image"] //
],
]
},
placeholder: "请输入内容",
readOnly: this.readOnly,
},
readOnly: this.readOnly
}
};
},
computed: {
@ -100,7 +99,7 @@ export default {
style.height = `${this.height}px`;
}
return style;
},
}
},
watch: {
value: {
@ -112,8 +111,8 @@ export default {
}
}
},
immediate: true,
},
immediate: true
}
},
mounted() {
this.init();
@ -126,9 +125,9 @@ export default {
const editor = this.$refs.editor;
this.Quill = new Quill(editor, this.options);
//
if (this.type == 'url') {
if (this.type == "url") {
let toolbar = this.Quill.getModule("toolbar");
toolbar.addHandler("image", (value) => {
toolbar.addHandler("image", value => {
this.uploadType = "image";
if (value) {
this.$refs.upload.$children[0].$refs.input.click();
@ -176,10 +175,12 @@ export default {
//
let length = quill.getSelection().index;
// res.url
quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
quill.insertEmbed(
length,
"image",
process.env.VUE_APP_BASE_API + res.fileName
);
this.$emit("imgs", res.fileName);
//
quill.setSelection(length + 1);
} else {
@ -188,13 +189,14 @@ export default {
},
handleUploadError() {
this.$message.error("图片插入失败");
},
},
}
}
};
</script>
<style>
.editor, .ql-toolbar {
.editor,
.ql-toolbar {
white-space: pre-wrap !important;
line-height: normal !important;
}

View File

@ -25,8 +25,7 @@ export default {
innerrefund: false,
orderList: [],
refundlist: [],
orderTypelist: [
{
orderTypelist: [{
value: "INTEGRAL_EXCHANGE",
label: "积分兑换",
},
@ -157,13 +156,6 @@ export default {
this.queryParams.nurseStationId = item.id;
this.nurseStationshow = false;
},
//护理站list
info() {
getListByUser(this.getListByUserquery).then((res) => {
this.nurseStationlist = res.rows;
this.stationtotal = res.total;
});
},
//页面所属护理站
ParamsStation(item) {
console.log(this.getListByUserquery)
@ -224,7 +216,6 @@ export default {
return "微信小程序";
case "ALI_PAY_APPLET":
return "支付宝小程序";
default:
break;
}
@ -236,6 +227,8 @@ export default {
return "护理站";
case "SHOPPING_MALL":
return "商城";
case "HEALTH_CONSULTATION":
return "健康咨询";
default:
break;
}