This commit is contained in:
zoujiandong
2025-06-16 19:01:04 +08:00
parent c1309bc9fc
commit bbc99ec0dd
26 changed files with 488 additions and 260 deletions
+21 -16
View File
@@ -60,12 +60,6 @@
@focus="focusResult"
@blur="focusResult"
></sv-editor>
<!-- <up--textarea
maxlength="-1"
autoHeight
v-model="form.title"
placeholder="分享经验和心得,如:诊断与鉴别诊断易错点,治疗过程难点,病例的相关知识总结及讨论等"
></up--textarea> -->
</view>
</view>
</view>
@@ -262,7 +256,7 @@
></view>
</view>
<view class="row" v-else-if="item.exchange_summary">
<view class="smalltitle" v-if="item.exchange_summary"
<view class="smalltitle"
>总结与讨论</view
>
<view
@@ -475,6 +469,7 @@ const caseValue1 = ref("");
const caseValue2 = ref("");
const caseValue3 = ref("");
const level = ref(1);
const isPublish = ref(false);
const labelObj = reactive({
list1: [],
list2: [],
@@ -614,11 +609,12 @@ const ready = (e) => {
editorCtx.value = e;
let html =
"<br/><p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
"<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
editorCtx.value.initHtml(html);
};
const readyResult = (e) => {
editorCtxResult.value = e;
//editorCtxResult.value.initHtml("")
};
const clearMuBan = () => {
console.log("清空模板");
@@ -629,7 +625,9 @@ const focusInfo = () => {
isFocusInfo.value = true;
};
const blurInfo = () => {
setTimeout(() => {
isFocusInfo.value = false;
}, 2000)
};
const focusResult = () => {
isFocusResult.value = true;
@@ -659,7 +657,7 @@ const openTitle = () => {
};
const alertTitle = () => {
if (isFocusInfo.value) {
showTitle.value = true;
showTitle.value = true;
}
};
const pFun = (files) => {
@@ -751,9 +749,12 @@ const delDraft = (id) => {
getDraftList();
};
const alertSave = async () => {
const res = await editorCtx.value.getLastContent();
if(isPublish.value){
goBack()
}else{
const res = await editorCtx.value.getLastContent();
//let html = editorCtx.value.exportHtml(res.html);
//const initInfo= "<br/><p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
//const initInfo= "<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
const resContent = await editorCtxResult.value.getLastContent();
//let reshtml = editorCtxResult.value.exportHtml(resContent.html);
if (
@@ -770,10 +771,12 @@ const alertSave = async () => {
} else {
goBack();
}
}
};
const publish = async () => {
const initInfo =
"<br/><p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
"<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/>";
if (form.exchange_title == "") {
uni.showToast({
title: "请输入标题",
@@ -805,7 +808,7 @@ const publish = async () => {
form.exchange_content = html;
const resContent = await editorCtxResult.value.getLastContent();
let reshtml = editorCtxResult.value.exportHtml(resContent.html);
form.exchange_summary = reshtml;
form.exchange_summary = reshtml=="<p><br></p>"?'':reshtml;
api.addExchange(form).then((res) => {
uni.showToast({
title: "发布成功",
@@ -813,6 +816,8 @@ const publish = async () => {
duration: 2000,
});
isFlag.value = false;
isPublish.value = true;
uni.navigateBack()
});
};
const handleUpload = (file) => {
@@ -922,7 +927,7 @@ const HandleAddVideo = async (file) => {
return new Promise((resolve) => {
api
.getOss({
scene: 1,
scene:2,
})
.then((rep) => {
let result = rep.data;
@@ -1084,7 +1089,7 @@ onLoad(() => {
.casepop{
display: flex;
flex-direction: column;
max-height: calc(100vh - 400rpx);
max-height: calc(100vh - 750rpx);
.continue{
color: #2878ff !important;
}
@@ -1313,7 +1318,7 @@ onLoad(() => {
display: flex;
justify-content: center;
align-items: center;
background: #e5e7eb;
background: #e5e7eb78;
font-size: 24rpx;
}
}