This commit is contained in:
zoujiandong
2025-07-17 17:15:28 +08:00
parent dc39275e6e
commit 75d515fbc6
92 changed files with 1718 additions and 945 deletions
+4 -1
View File
@@ -55,7 +55,7 @@ import { ref, reactive } from "vue";
import navBarSearch from "@/components/navBarSearch/navBarSearch.vue";
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
import api from "@/api/api";
import { onLoad } from "@dcloudio/uni-app";
import { onLoad,onShow } from "@dcloudio/uni-app";
import dayjs from "dayjs";
import switchImg from "@/static/switch.png";
import navTo from "@/utils/navTo.js";
@@ -94,6 +94,9 @@ onLoad((options) => {
doctor_id.value=options.doctor_id;
}
})
onShow(()=>{
paging.value?.refresh();
})
const goDetail=(url)=>{
navTo({
+11 -3
View File
@@ -28,7 +28,8 @@
<view class="iptcon" @click="open">
<up-input
@click="open"
:disabled="isH5?false:true"
disabled
:focus="false"
type="text"
placeholderClass="placeholderClass"
placeholder="对病例发表您的看法"
@@ -341,7 +342,7 @@
<view class="poptitle"></view>
<view class="wraper">
<up--textarea
focus="true"
:focus="false"
ref="commentTextarea"
height="200"
v-model="content"
@@ -1378,6 +1379,7 @@ const toggleCollect = () => {
: collectExchange(id.value);
}
};
const addArticleComment = (id, data) => {
api.addArticleComment(id, data).then((res) => {
uni.showToast({
@@ -1431,7 +1433,7 @@ const delVideoComment = (id) => {
};
const fromatImg = (val) => {
if(val){
return val.replace(/\<img/gi, '<img class="imgstyle"');
return val.replace(/\<img|\<\s+img/gi, '<img class="imgstyle"');
}else{
return '';
}
@@ -2018,6 +2020,12 @@ const readRecord=()=>{
}
.desc {
padding-bottom: 80rpx;
:deep(.imgstyle){
max-width:100%;
position: relative;
left:50%;
transform: translateX(-50%);
}
}
.bottom {
+20
View File
@@ -127,6 +127,9 @@
</view>
<tabBar></tabBar>
<view class="publish" @click="goPublish">
<u-icon name="plus" color="#fff" size="18"></u-icon>
</view>
</template>
<script setup>
@@ -220,6 +223,11 @@ const goHospital=()=>{
url:'/pages/searchList/searchList?type=hospital&name=医院&id='
})
}
const goPublish=()=>{
navTo({
url:'/pages/publish/publish'
})
}
onShow(() => {
getStatic();
getData();
@@ -357,4 +365,16 @@ onShow(() => {
}
}
}
.publish{
width: 92rpx;
height: 92rpx;
background: #3CC7C0;
border-radius: 50%;
position: fixed;
right:30rpx;
bottom:180rpx;
display: flex;
justify-content: center;
align-items: center;
}
</style>
+4 -1
View File
@@ -60,7 +60,7 @@ import { ref, reactive } from "vue";
import navBarSearch from "@/components/navBarSearch/navBarSearch.vue";
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
import api from "@/api/api";
import { onLoad } from "@dcloudio/uni-app";
import { onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from "dayjs";
import switchImg from "@/static/switch.png";
import navTo from "@/utils/navTo.js";
@@ -110,6 +110,9 @@ onLoad((options) => {
keyWord.value = options.keyWord;
};
});
onShow(()=>{
paging.value?.refresh();
})
const changetype1=(e)=>{
type1.value=e;
paging.value.reload();
+4 -2
View File
@@ -90,7 +90,7 @@ import { ref, reactive } from "vue";
import backLogoNav from "@/components/backLogoNav/backLogoNav.vue";
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
import api from "@/api/api";
import { onLoad } from "@dcloudio/uni-app";
import { onLoad,onShow } from "@dcloudio/uni-app";
import dayjs from "dayjs";
import switchImg from "@/static/switch.png";
import certImg from "@/static/cert.png";
@@ -193,7 +193,9 @@ const switchTab = (item) => {
onLoad((options) => {
});
onShow(()=>{
paging.value?.refresh();
})
const formatdate = (date) => {
return dayjs(date).format("YYYY-MM-DD");
};
+126 -53
View File
@@ -11,7 +11,7 @@
</view>
</view>
<!-- <backNav :navName="'发病例交流帖'"></backNav> -->
<view class="form">
<scroll-view class="form" id="form" scroll-y="true">
<view class="textbox">
<up--textarea
autoHeight
@@ -86,7 +86,7 @@
</view> -->
</view>
</view>
</scroll-view>
<view class="bottom">
<view class="toolbox">
<view
@@ -131,7 +131,7 @@
</view>
<view class="bottombtn">
<view class="left">
<view class="draft" @click="showDraft = true">草稿箱</view>
<view class="draft" @click="openDraftList">草稿箱</view>
<view class="vote" @click="showVote = true">
投票
<up--image
@@ -240,7 +240,18 @@
><up-icon name="close" color="#4B5563" size="20"></up-icon
></view>
</view>
<view class="draftlist">
<view class="draftlist" v-if="draftList.length==0">
<div class="nodata">
<up-empty
marginTop="120rpx"
text="草稿箱为空"
mode="list"
:icon="draftImg"
>
</up-empty>
</div>
</view>
<view class="draftlist" v-if="draftList.length>0">
<view
class="cell"
v-for="(item, index) in draftList"
@@ -254,7 +265,7 @@
<view class="smalltitle">病例信息</view>
<view
class="con ellipsis-two-lines"
v-html="item.exchange_content"
v-html="fromatImg(item.exchange_content)"
></view>
</view>
<view class="row" v-else-if="item.exchange_summary">
@@ -264,7 +275,7 @@
<view
class="con ellipsis-two-lines"
v-if="item.exchange_summary"
v-html="item.exchange_summary"
v-html="fromatImg(item.exchange_summary)"
></view>
</view>
@@ -380,8 +391,8 @@
>
<view class="right" @click="confirmCase">确定</view>
</view>
<view class="casecon">
<view v-show="level == 1" >
<scroll-view class="casecon" scroll-y="true">
<view v-show="level == 1" calss="casePadding">
<up-radio-group
v-model="caseValue1"
@@ -401,7 +412,7 @@
</view>
</up-radio-group>
</view>
<view v-show="level == 2" >
<view v-show="level == 2" calss="casePadding">
<up-radio-group
v-model="caseValue2"
iconPlacement="right"
@@ -420,7 +431,7 @@
</view>
</up-radio-group>
</view>
<view v-show="level == 3" >
<view v-show="level == 3" calss="casePadding">
<up-radio-group
v-model="caseValue3"
@@ -429,7 +440,7 @@
>
<view
class="column"
v-for="item in labelObj.list2"
v-for="item in labelObj.list3"
:key="item.app_iden"
>
<up-radio
@@ -440,7 +451,7 @@
</view>
</up-radio-group>
</view>
</view>
</scroll-view>
</view>
</up-popup>
</template>
@@ -451,6 +462,7 @@ import photoImg from "@/static/photo.png";
import addImg from "@/static/add.png";
import videoImg from "@/static/videoicon.png";
import voteImg from "@/static/vote.png";
import draftImg from "@/static/draft.png";
import api from "@/api/api";
import dayjs from "dayjs";
import { onLoad } from "@dcloudio/uni-app";
@@ -503,7 +515,7 @@ const imgList = ref([]);
const videoList = ref([]);
const editorCtx = ref(null);
const editorCtxResult = ref(null);
const isFocusInfo = ref(true);
const isFocusInfo = ref(false);
const isFocusResult = ref(false);
const labelList = ref([]);
const goBack = () => {
@@ -511,6 +523,11 @@ const goBack = () => {
delta: 1,
});
};
const openDraftList=()=>{
getDraftList();
showDraft.value=true;
}
const closeCase = () => {
showCase.value = false;
};
@@ -550,7 +567,7 @@ const clearVote = () => {
form.case_exchange_vote.valid_day = 7;
};
const saveVote = () => {
console.log(voteData);
if (voteData.vote_title == "") {
uni.showToast({
title: "请输入投票标题",
@@ -573,30 +590,31 @@ const saveVote = () => {
return false;
}
for (let i = 0; i < voteData.case_exchange_vote_option.length; i++) {
if (voteData.case_exchange_vote_option[i].option_value == "") {
uni.showToast({
title: "投票选项不能为空",
icon: "none",
});
return false;
}
if (voteData.case_exchange_vote_option[i].option_value.length > 16) {
uni.showToast({
title: "第" + (i + 1) + "个投票选项超过16个字符",
icon: "none",
});
return false;
}
}
if (voteData.case_exchange_vote_option.length < 2) {
uni.showToast({
title: "至少添加两个选项",
icon: "none",
});
return false;
}
Object.assign(form.case_exchange_vote, voteData);
// for (let i = 0; i < voteData.case_exchange_vote_option.length; i++) {
// if (voteData.case_exchange_vote_option[i].option_value == "") {
// uni.showToast({
// title: "投票选项不能为空",
// icon: "none",
// });
// return false;
// }
// if (voteData.case_exchange_vote_option[i].option_value.length > 16) {
// uni.showToast({
// title: "第" + (i + 1) + "个投票选项超过16个字符",
// icon: "none",
// });
// return false;
// }
// }
// if (voteData.case_exchange_vote_option.length < 2) {
// uni.showToast({
// title: "至少添加两个选项",
// icon: "none",
// });
// return false;
// }
//Object.assign(form.case_exchange_vote, voteData);
form.case_exchange_vote=voteData
showVote.value = false;
};
const fromatDay = (value) => {
@@ -609,13 +627,29 @@ const fromatDay = (value) => {
return dayjs(value).format("YYYY-MM-DD");
}
};
const fromatImg = (val) => {
if(val){
return val.replace(/\<img/gi, '<img class="imgstyle"');
}else{
return '';
}
};
const ready = (e) => {
console.log(e);
editorCtx.value = e;
let html =
"<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/><br/>";
editorCtx.value.initHtml(html);
// setTimeout(()=>{
uni.hideKeyboard();
uni.pageScrollTo({
scrollTop:0,
selector:"#form"
// })
})
};
const readyResult = (e) => {
editorCtxResult.value = e;
@@ -630,9 +664,16 @@ const focusInfo = () => {
isFocusInfo.value = true;
};
const blurInfo = () => {
setTimeout(() => {
isFocusInfo.value = false;
}, 2000)
// #ifdef MP-WEIXIN
isFocusInfo.value = false;
// #endif
// #ifdef H5
setTimeout(() => {
isFocusInfo.value = false;
}, 2000)
// #endif
};
const focusResult = () => {
isFocusResult.value = true;
@@ -691,7 +732,7 @@ const saveDraft = async () => {
const res = await editorCtx.value.getLastContent();
form.exchange_content = res.html;
const resResult = await editorCtx.value.getLastContent();
const resResult = await editorCtxResult.value.getLastContent();
form.exchange_summary = resResult.html;
if(labelList.value.length>0){
form.case_exchange_label = labelList.value;
@@ -721,7 +762,7 @@ const editDraft = (index) => {
labelList.value = exchange_label;
form.exchange_summary = exchange_summary;
form.case_exchange_vote = exchange_vote;
editorCtxResult.value.initHtml(exchange_content);
editorCtxResult.value.initHtml(exchange_summary);
Object.assign(voteData, draft);
showDraft.value = false;
};
@@ -732,6 +773,7 @@ const willDelDraft = (id) => {
};
const confirmDel = () => {
showModal.value = false;
console.log(delType.value);
if (delType.value == "delDraft") {
delDraft(delId.value);
} else if (delType.value == "saveDraft") {
@@ -758,14 +800,16 @@ const alertSave = async () => {
goBack()
}else{
const res = await editorCtx.value.getLastContent();
const initInfo =
"<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p>";
//let html = editorCtx.value.exportHtml(res.html);
//const initInfo= "<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/><br/>";
const resContent = await editorCtxResult.value.getLastContent();
//let reshtml = editorCtxResult.value.exportHtml(resContent.html);
if (
form.exchange_title ||
res.html ||
resContent.html ||
res.html!=initInfo ||
resContent.text ||
(form.case_exchange_vote &&
form.case_exchange_vote.vote_title &&
form.case_exchange_label &&
@@ -781,7 +825,7 @@ const alertSave = async () => {
};
const publish = async () => {
const initInfo =
"<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/><br/>";
"<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p>";
if (form.exchange_title == "") {
uni.showToast({
title: "请输入标题",
@@ -994,7 +1038,7 @@ const getDraftList = () => {
};
const getCaseLabel = (lev,pid=0) => {
api.getCaseLabel({
pid:pid
pId:pid
}).then((res) => {
if (lev == 1) {
labelObj.list1 = res.data.data;
@@ -1078,7 +1122,7 @@ const openLabelPop=()=>{
getCaseLabel(1,0);
}
onLoad(() => {
getDraftList();
//getDraftList();
});
@@ -1094,7 +1138,7 @@ onLoad(() => {
.casepop{
display: flex;
flex-direction: column;
max-height: calc(100vh - 750rpx);
max-height: calc(100vh - 400rpx);
.continue{
color: #2878ff !important;
}
@@ -1103,8 +1147,16 @@ onLoad(() => {
flex:1;
overflow-y: scroll;
padding-top: 10rpx;
max-height: calc(100vh - 700rpx);
min-height: 350rpx;
padding-bottom: 20rpx;
:deep(.u-radio){
margin-bottom: 10px!important;
margin-top: 0px!important;
}
.casePadding{
padding-bottom: 0rpx;
}
.column {
padding: 0 30rpx;
border-bottom: 2rpx solid #e5e7eb;
@@ -1329,7 +1381,7 @@ onLoad(() => {
}
}
#editor {
padding: 0 30rpx;
padding: 0 10rpx;
height: calc(100vh - 700rpx);
}
#editorRes {
@@ -1671,7 +1723,7 @@ onLoad(() => {
.sickbox {
display: flex;
padding: 25rpx 25rpx 0;
padding: 25rpx 25rpx 10rpx;
margin-bottom: 20rpx;
}
.add {
@@ -1743,4 +1795,25 @@ onLoad(() => {
}
}
}
:deep(.ql-container){
padding-bottom: 25rpx;
height: calc(100vh - 700rpx);
}
:deep(.ql-container) img{
max-width:100%;
position: relative;
left:50%;
transform: translateX(-50%);
}
:deep(.ql-container) image{
max-width:100%;
position: relative;
left:50%;
transform: translateX(-50%);
}
.con {
:deep(.imgstyle){
max-width: 100%;
}
}
</style>
+15 -6
View File
@@ -89,7 +89,7 @@
>
<view class="right" @click="confirmCase">确定</view>
</view>
<view class="casecon">
<scroll-view class="casecon" scroll-y="true">
<view v-show="level == 1" >
<up-radio-group
v-model="caseValue1"
@@ -138,7 +138,7 @@
>
<view
class="column"
v-for="item in labelObj.list2"
v-for="item in labelObj.list3"
:key="item.app_iden"
>
<up-radio
@@ -149,7 +149,7 @@
</view>
</up-radio-group>
</view>
</view>
</scroll-view>
</view>
</up-popup>
</template>
@@ -159,7 +159,7 @@ import { ref, reactive } from "vue";
import navBarSearch from "@/components/navBarSearch/navBarSearch.vue";
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
import api from "@/api/api";
import { onLoad } from "@dcloudio/uni-app";
import { onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from "dayjs";
import switchImg from "@/static/switch.png";
import caseImg from "@/static/caseIcon.png";
@@ -188,7 +188,7 @@ const options= ref([
value: 'desc',
},
]);
const isSearch=ref(false);
const isSearch=ref(true);
const order=reactive({
read_num:'',
push_date:''
@@ -313,6 +313,9 @@ onLoad((options) => {
canOpenCase.value = true;
}
});
onShow(()=>{
paging.value?.refresh();
})
const changeDate=(e)=>{
console.log(e);
order.read_num='';
@@ -585,9 +588,15 @@ const queryList = (pageNo, pageSize) => {
}
.casecon {
flex:1;
max-height: calc(100vh - 800rpx);
overflow-y: scroll;
padding-top: 10rpx;
padding-top: 22rpx;
padding-bottom: 20rpx;
min-height: 350rpx;
:deep(.u-radio){
margin-bottom: 10px!important;
margin-top: 0px!important;
}
.column {
padding: 0 30rpx;
border-bottom: 2rpx solid #e5e7eb;
+4 -1
View File
@@ -77,7 +77,7 @@ import { ref, reactive} from "vue";
import navBarSearch from "@/components/navBarSearch/navBarSearch.vue";
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
import api from "@/api/api";
import { onLoad } from "@dcloudio/uni-app";
import { onLoad,onShow } from "@dcloudio/uni-app";
import dayjs from "dayjs";
import switchImg from "@/static/switch.png";
import navTo from "@/utils/navTo.js";
@@ -125,6 +125,9 @@ onLoad((options) => {
order.read_num='desc'
};
});
onShow(()=>{
paging.value?.refresh();
})
const change=(e)=>{
paging.value.reload();
}
+5 -2
View File
@@ -83,7 +83,7 @@ import { ref, reactive} from "vue";
import navBarSearch from "@/components/navBarSearch/navBarSearch.vue";
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
import api from "@/api/api";
import { onLoad } from "@dcloudio/uni-app";
import { onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from "dayjs";
import switchImg from "@/static/switch.png";
import navTo from "@/utils/navTo.js";
@@ -132,9 +132,12 @@ onLoad((options) => {
order.article_num='desc'
};
});
onShow(()=>{
paging.value?.refresh();
})
const changeDate=(e)=>{
console.log(e);
order.read_num='';
order.article_num='';
paging.value.reload();
}
const changeRead=(e)=>{
+5 -1
View File
@@ -159,7 +159,7 @@ import headImg from "@/static/headImg.png";
import dayjs from "dayjs";
import api from "@/api/api";
import navTo from "@/utils/navTo.js";
import { onLoad } from "@dcloudio/uni-app";
import { onLoad,onShow} from "@dcloudio/uni-app";
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
const user_id = ref("");
const is_selected = ref(0);
@@ -197,6 +197,10 @@ onLoad((options) => {
is_selected.value = options.is_selected;
}
});
onShow(()=>{
paging.value?.refresh();
})
const changeDate=(e)=>{
console.log(e);
order.read_num='';
+4 -1
View File
@@ -85,7 +85,7 @@ import navBarSearch from "@/components/navBarSearch/navBarSearch.vue";
import list from "@/uni_modules/z-paging/components/z-paging/z-paging";
import api from "@/api/api";
import navTo from "@/utils/navTo.js";
import { onLoad } from "@dcloudio/uni-app";
import { onLoad,onShow} from "@dcloudio/uni-app";
import dayjs from "dayjs";
import switchImg from "@/static/switch.png";
const paging = ref(null);
@@ -152,6 +152,9 @@ onLoad((options) => {
}
});
onShow(()=>{
paging.value?.refresh();
})
const changeDate=(e)=>{
console.log(e);
order.read_num='';