111117.29

This commit is contained in:
zoujiandong
2025-07-29 15:39:33 +08:00
parent 071ab8de73
commit 4ca1b9cf42
71 changed files with 4259 additions and 652 deletions
+1 -1
View File
@@ -62,7 +62,7 @@
>{{ item.user_name }}{{ item.hospital_name }}</view
>
</view>
<view class="content" @click="goDetail(item.exchange_id)"> {{ htmlToText(item.exchange_content) }} </view>
<view class="content ellipsis-two-lines" @click="goDetail(item.exchange_id)"> {{ htmlToText(item.exchange_content) }} </view>
<view
class="imgbox"
@click="goDetail(item.exchange_id)"
+6 -2
View File
@@ -39,8 +39,8 @@
<up--image
@click="toggleCollect"
:src="info.is_collect ? collectonImg : collectImg"
width="38rpx"
height="38rpx"
width="70rpx"
height="70rpx"
></up--image>
<view class="imgboxshang" @click="openGivePop">
<up--image
@@ -355,6 +355,9 @@
:focus="false"
ref="commentTextarea"
height="200"
cursorSpacing="240"
adjustPosition
adjust-keyboard-to="bottom"
v-model="content"
:placeholder="placeholder"
></up--textarea>
@@ -1993,6 +1996,7 @@ const readRecord= async()=>{
}
.imgboxshang {
display: flex;
margin-left: 8rpx;
align-items: center;
}
.imgbox {
+7 -7
View File
@@ -17,7 +17,7 @@
</view>
</view>
<view class="databox" v-if="numInfo.article_num+numInfo.video_num>=5">
<view class="databox" v-if="numInfo.article_num+numInfo.video_num>=2">
<view class="cell">
<view class="num">{{ numInfo.article_num }}</view>
<view class="name">文章</view>
@@ -32,8 +32,8 @@
</view>
</view>
<view class="listbox">
<view class="titlename">我的临床病例库</view>
<view class="cell" @click="goDoctor(userInfo.doctor_id,userInfo.user_name)" v-if="numInfo.article_num+numInfo.video_num>=5">
<!-- <view class="titlename">我的临床病例库</view> -->
<view class="cell" @click="goDoctor(userInfo.doctor_id,userInfo.user_name)" v-if="numInfo.article_num+numInfo.video_num>=2"> <!-- 5 -->
<view class="left">
<up--image
:src="myFile"
@@ -45,7 +45,7 @@
</view>
<u-icon name="arrow-right" color="#9CA3AF" size="18"></u-icon>
</view>
<view class="cell" @click="goCert" v-if="numInfo.article_num+numInfo.video_num>=5">
<view class="cell" @click="goCert" v-if="numInfo.article_num+numInfo.video_num>=2">
<view class="left">
<up--image
:src="myDownload"
@@ -57,7 +57,7 @@
</view>
<u-icon name="arrow-right" color="#9CA3AF" size="18"></u-icon>
</view>
<view class="cell" @click="goHospital(userInfo.hospital_id,userInfo.hospital_name)" v-if="hospitalInfo.video_num+hospitalInfo.article_num>=10">
<view class="cell" @click="goHospital(userInfo.hospital_id,userInfo.hospital_name)" v-if="hospitalInfo.video_num+hospitalInfo.article_num>=2">
<view class="left">
<up--image
:src="myHospital"
@@ -168,12 +168,12 @@ const goCert = () => {
};
const goDoctor=(id,name)=>{
navTo({
url:'/pages/searchList/searchList?type=doctor&id='+id+'&name='+name
url:'/pages/search/search?doctor_id='+id+'&doctor_name='+name+"&from=myCase"
})
}
const goHospital=(id,name)=>{
navTo({
url:'/pages/searchList/searchList?type=hospital&id='+id+'&name='+name
url:'/pages/search/search?hospital_id='+id+'&hospital_name='+name
})
}
const mySpecial=()=>{
+1 -1
View File
@@ -264,7 +264,7 @@ const queryList = (pageNo, pageSize) => {
}
:deep(.u-dropdown__menu__item__text){
font-size: 14px!important;
color:rgb(60, 156, 255)!important;
color:#3CC7C0!important;
}
.deal {
margin-top: 20rpx;
+125 -20
View File
@@ -1,5 +1,6 @@
<template>
<div class="upage">
<pEditor v-if="showEditor" :editorCotent="editorCotent" :editorType="editorType" @closeEditor="closeEditor" @changeEditor="changeEditor"></pEditor>
<view class="navbox">
<view class="bg"></view>
<view class="namebox">
@@ -11,7 +12,7 @@
</view>
</view>
<!-- <backNav :navName="'发病例交流帖'"></backNav> -->
<scroll-view class="form" id="form" scroll-y="true" :style="{paddingBottom:bottomHeight+'rpx'}">
<scroll-view class="form" id="form" scroll-y="true" style="padding-bottom:150rpx">
<view class="textbox">
<up--textarea
autoHeight
@@ -21,19 +22,21 @@
</view>
<view class="row">
<view class="left"> 病例信息 </view>
<view class="right" @click="clearMuBan">
<!-- <view class="right" @click="clearMuBan">
<u-icon name="trash" color="#6B7280" size="18"></u-icon>
清除模板
</view>
</view> -->
</view>
<view class="textcon page-editor-container" id="editor">
<view class="textcon page-editor-container" id="editor" >
<view class="mask" @click="focusInfo"></view>
<sv-editor
placeholder="患者基本情况,检查结果,诊疗图片或视频"
eid="editor-id"
@ready="ready"
pasteMode="origin"
@focus="focusInfo"
@blur="blurInfo"
readOnly="true"
@changeInput="changeSv"
@epaste="epaste"
></sv-editor>
<!-- <editor
@@ -55,12 +58,13 @@
</view>
<view class="textcell">
<view class="iptbox" id="editorRes">
<view class="mask" @click="focusResult"></view>
<sv-editor
placeholder="分享经验和心得,如:诊断与鉴别诊断易错点,治疗过程难点,病例的相关知识总结及讨论等"
eid="editorResult"
@ready="readyResult"
@focus="focusResult"
@blur="focusResult"
:readOnly="true"
></sv-editor>
</view>
</view>
@@ -87,8 +91,8 @@
</view> -->
</view>
</scroll-view>
<view class="bottom" :style="{height:bottomHeight+'rpx'}">
<view class="toolbox">
<view class="bottom" style="height:140rpx">
<!-- <view class="toolbox">
<view
class="cell"
@click="insertImage"
@@ -128,11 +132,11 @@
></up--image>
<view class="name">添加小标题</view>
</view>
</view>
</view> -->
<view class="bottombtn">
<view class="left">
<view class="draft" @click="openDraftList">草稿箱</view>
<view class="vote" @click="showVote = true">
<view class="vote" @click="alertVote">
投票
<up--image
:src="voteImg"
@@ -363,7 +367,7 @@
</view>
</view>
</up-popup>
<up-overlay :show="showModal" mask-click-able>
<up-overlay :show="showModal" mask-click-able zIndex="99">
<view class="zanboxpop">
<view class="zanwraper">
<view class="title">提示</view>
@@ -490,6 +494,7 @@
</scroll-view>
</view>
</up-popup>
</template>
<script setup>
import { reactive, ref } from "vue";
@@ -502,7 +507,9 @@ import draftImg from "@/static/draft.png";
import api from "@/api/api";
import dayjs from "dayjs";
import { onLoad } from "@dcloudio/uni-app";
import throttle from "@/utils/throttle"
import svEditor from "@/uni_modules/sv-editor/components/sv-editor/sv-editor.vue";
import pEditor from "@/components/pEditor/pEditor"
//import SvEditorToolbar from "@/uni_modules/sv-editor/components/sv-editor/sv-editor-toolbar.vue";
import {
addImage,
@@ -516,7 +523,8 @@ const showModal = ref(false);
const delType = ref("delDraft"); //delDraft saveDraft
const isPublish = ref(false);
const exchange_id=ref('');
const showEditor=ref(false);
const editorType=ref('info');
const bottomHeight=ref(200);
const form = reactive({
exchange_title: "",
@@ -575,6 +583,46 @@ const goBack = () => {
delta: 1,
});
};
const editorCotent=ref('')
const closeEditor=()=>{
showEditor.value=false;
};
const changeEditor=(data)=>{
showEditor.value=false;
console.log(data)
if(data.type=="info"){
editorCtx.value.initHtml(data.content,async (videoUrl) => {
let res='';
// #ifdef APP || H5
// res = await this.editorCtx.createVideoThumbnail(videoUrl)
// #endif
const fox = 'https://cn.bing.com//th?id=OHR.FlamingosNamibia_ZH-CN3639748956_1920x1080.jpg'
res = await editorCtx.value.createCoverThumbnail(fox)
showEditor.value=false;
return res
})
}else{
editorCtxResult.value.initHtml(data.content,async (videoUrl) => {
let res='';
// #ifdef APP || H5
// res = await this.editorCtx.createVideoThumbnail(videoUrl)
// #endif
const fox = 'https://cn.bing.com//th?id=OHR.FlamingosNamibia_ZH-CN3639748956_1920x1080.jpg'
res = await editorCtx.value.createCoverThumbnail(fox)
showEditor.value=false;
return res
})
}
// setTimeout(()=>{
// showEditor.value=false;
// },1000)
};
const openDraftList=()=>{
getDraftList();
@@ -584,6 +632,18 @@ const openDraftList=()=>{
const epaste=(e)=>{
console.log(e)
}
const alertVote=()=>{
if(exchange_id.value){
uni.showToast({
title: "投票发布后不能编辑",
icon: "none",
})
return false;
}else{
showVote.value = true
}
}
const addOption = () => {
voteData.case_exchange_vote_option.push({
option_value: "",
@@ -700,6 +760,7 @@ const ready = (e) => {
selector:"#form"
// })
})
uni.hideLoading();
};
const readyResult = (e) => {
@@ -716,8 +777,16 @@ const clearMuBan = () => {
editorCtx.value.initHtml("");
};
const focusInfo = () => {
const changeSv=()=>{
showEditor.value=false;
}
const focusInfo = async() => {
isFocusInfo.value = true;
const res= await editorCtx.value.getLastContent();
editorCotent.value=res.html
showEditor.value=true;
editorType.value="info"
// uni.onKeyboardHeightChange(res => {
// console.log(res.height);
// bottomHeight.value=res.height*2;
@@ -735,9 +804,14 @@ const blurInfo = () => {
},0)
// #endif
};
const focusResult = () => {
const focusResult = async() => {
isFocusResult.value = true;
const res= await editorCtxResult.value.getLastContent();
editorCotent.value=res.html
editorType.value="result";
showEditor.value=true;
// uni.onKeyboardHeightChange(res => {
// console.log(res.height);
// bottomHeight.value=res.height*2;
@@ -890,8 +964,10 @@ const confirmDel = () => {
};
const cancelDel = () => {
showModal.value = false;
if (delType.value == "saveDraft") {
goBack();
console.log('wee')
}
};
const delDraft = (id) => {
@@ -932,7 +1008,8 @@ const alertSave = async () => {
};
const publish = async () => {
const publish =throttle(async () => {
console.log(3333);
const initInfo =
"<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p>";
if (form.exchange_title == "") {
@@ -942,6 +1019,13 @@ const publish = async () => {
});
return false;
}
if(form.exchange_title.length>40){
uni.showToast({
title: "标题不超过40个字",
icon: "none",
});
return false;
}
const res = await editorCtx.value.getLastContent();
let html = editorCtx.value.exportHtml(res.html);
if (html == initInfo) {
@@ -991,7 +1075,7 @@ const publish = async () => {
});
}
};
});
const handleUpload = (file) => {
api
.getOss({
@@ -1323,6 +1407,10 @@ const openLabelPop=()=>{
getCaseLabel(1,0);
}
onLoad((optoions) => {
uni.showLoading({
title: "正在加载中...",
mask: true,
});
if(optoions.exchange_id){
exchange_id.value=optoions.exchange_id;
console.log(1111)
@@ -1601,11 +1689,29 @@ onLoad((optoions) => {
}
}
#editor {
position:relative;
padding: 0 10rpx;
height: calc(100vh - 700rpx);
.mask{
opacity: 0;
position: absolute;
width:100%;
height:100%;
background:red;
z-index:9;
}
}
#editorRes {
position: relative;
height: 600rpx;
.mask{
opacity: 0;
position: absolute;
width:100%;
height:100%;
background:red;
z-index:9;
}
:deep(.sv-editor-wrapper) {
flex: 1;
min-height: 300rpx;
@@ -1886,9 +1992,8 @@ onLoad((optoions) => {
.bottom {
position: fixed;
bottom: 0;
width: 100%;
z-index: 3;
z-index: 1;
background: #ffffff;
.bottombtn {
File diff suppressed because it is too large Load Diff
+10 -7
View File
@@ -9,10 +9,10 @@
@query="queryList"
>
<template #top>
<navBarSearch :searchWord="keyWord" :navName="navName" @changeWord="changeWord"></navBarSearch>
<navBarSearch :searchWord="keyWord" :navName="navName" @changeWord="changeWord" :type="navType"></navBarSearch>
<view class="databox" v-if="hospital_id || doctor_id || (label_iden && !canOpenCase)">
<view class="cell">
<view class="num">{{ numInfo.article_collect_num }}</view>
<view class="num">{{ numInfo.article_num }}</view>
<view class="name">文章</view>
</view>
<view class="cell">
@@ -32,7 +32,7 @@
</view>
<view class="filterbox" :class="{active:canOpenCase,'on':hideType,'isCase':isCase}">
<view class="type" v-if="!hideType && !isCase" @click="swicthType">{{!isArticle?'视频':'文章'}}<up--image :src="switchImg" width="31rpx" height="31rpx"></up--image></view>
<view class="casesdown" @click="openCase" v-if="canOpenCase">筛选<up--image :src="caseImg" width="31rpx" height="31rpx"></up--image></view>
<view class="casesdown" :class="{active:label_iden}" @click="openCase" v-if="canOpenCase">筛选<up--image :src="caseImg" width="31rpx" height="31rpx"></up--image></view>
<up-dropdown class="u-dropdown" ref="uDropdownRef">
<up-dropdown-item
@@ -106,7 +106,7 @@
>
<view class="votepop casepop">
<view class="titlebox">
<view class="left" @click="cancelCase">取消</view>
<view class="left" @click="closeCase">取消</view>
<view class="right" @click="confirmCase">确定</view>
</view>
@@ -231,6 +231,7 @@ const doctor_name=ref('');
const numInfo=reactive({});
const searchInfo=reactive({});
const freshKey=ref(0);
const navType=ref('')
const navName=ref('肝胆相照临床病例库')
const paging = ref(null);
const hideType=ref(false)
@@ -402,6 +403,8 @@ const changeWord=(value)=>{
onLoad((options) => {
if(options.from=='home'){
isSearch.value=true;
}else if(options.from=="myCase"){
navType.value="myCase"
}
if(options.keyWord){
keyWord.value = options.keyWord;
@@ -496,8 +499,8 @@ const goDetail=(id,isLink,src)=>{
const swicthType=()=>{
isArticle.value=!isArticle.value;
dataList.value=[];
order.read_num='';
order.push_date='';
// order.read_num='';
// order.push_date='';
paging.value.reload();
}
const searchArticle =(params) => {
@@ -823,7 +826,7 @@ const queryList = (pageNo, pageSize) => {
}
:deep(.u-dropdown__menu__item__text){
font-size: 14px!important;
color:rgb(60, 156, 255)!important;
color:#3CC7C0!important;
}
:deep(.u-dropdown__menu__item){
+18 -16
View File
@@ -131,7 +131,7 @@ const option= ref([
},
]);
const order=reactive({
updated_at:'desc'
push_date:'desc'
})
onLoad((options) => {
@@ -139,6 +139,7 @@ onLoad((options) => {
type.value ='hospital';
(option.value)[1].label="医院名称"
}
console.log( type.value)
keyWord.value=options.name;
if(options.name){
navName.value=options.name+'临床病例库'
@@ -158,8 +159,8 @@ onShow(()=>{
})
const change=(e)=>{
if(e==1){
order.updated_at='desc';
if(type.value ='hospital'){
order.push_date='desc';
if(type.value =='hospital'){
order.hospital_name='';
}else{
order.doctor_name='';
@@ -168,18 +169,18 @@ const change=(e)=>{
order.article_num='';
dropTitle.value="更新时间"
}else if(e==2){
order.updated_at='';
order.push_date='';
order.article_num='';
if(type.value ='hospital'){
order.hospital_name='desc';
if(type.value =='hospital'){
order.hospital_name='asc';
dropTitle.value="医院名称"
}else{
order.doctor_name='asc';
dropTitle.value="医生名称"
}
}else if(e==3){
order.updated_at='';
if(type.value ='hospital'){
order.push_date='';
if(type.value =='hospital'){
order.hospital_name='';
}else{
order.doctor_name='';
@@ -254,8 +255,9 @@ const searchHospital = async(params) => {
let searchForm={
hospital_name: keyWord.value,
}
if(!order.updated_at){
delete order.updated_at
if(!order.push_date){
delete order.push_date
}
if(!order.article_num){
delete order.article_num
@@ -263,7 +265,7 @@ const searchHospital = async(params) => {
if(!order.hospital_name){
delete order.hospital_name
}
if(order.updated_at || order.article_num || order.hospital_name){
if(order.push_date || order.article_num || order.hospital_name){
searchForm.order=order
}
api.searchHospital({
@@ -280,8 +282,8 @@ const searchDoctor = async(params) => {
let searchForm={
doctor_name: keyWord.value,
}
if(!order.updated_at){
delete order.updated_at
if(!order.push_date){
delete order.push_date
}
if(!order.article_num){
delete order.article_num
@@ -289,7 +291,7 @@ const searchDoctor = async(params) => {
if(!order.doctor_name){
delete order.doctor_name
}
if(order.updated_at || order.article_num || order.doctor_name){
if(order.push_date || order.article_num || order.doctor_name){
searchForm.order=order
}
api.searchDoctor({
@@ -338,7 +340,7 @@ const changeWord=(value)=>{
keyWord.value=value;
dataList.value=[];
order.updated_at='desc';
order.push_date='desc';
order.article_num='';
paging.value.reload();
@@ -407,7 +409,7 @@ const changeWord=(value)=>{
position: relative;
:deep(.u-dropdown__menu__item__text){
font-size: 14px!important;
color:rgb(60, 156, 255)!important;
color:#3CC7C0!important;
}
.type{
position: absolute;
+2 -2
View File
@@ -164,7 +164,7 @@ const changeDate=(e)=>{
dropTitle.value="更新时间"
}else if(e==2){
order.updated_at='';
order.label_name='desc';
order.label_name='asc';
order.article_num='';
dropTitle.value="疾病名称"
}else if(e==3){
@@ -436,7 +436,7 @@ const changeWord=(value)=>{
}
:deep(.u-dropdown__menu__item__text){
font-size: 14px!important;
color:rgb(60, 156, 255)!important;
color:#3CC7C0!important;
}
:deep(.u-dropdown__menu__item){
+4 -4
View File
@@ -26,7 +26,7 @@
<view class="bar"></view>
<view class="filterbox">
<!-- <view class="type" @click="swicthType">{{!isArticle?'文章':'视频'}}<up--image :src="switchImg" width="31rpx" height="31rpx"></up--image></view> -->
<view class="casesdown" @click="openCase" >筛选<up--image :src="caseImg" width="31rpx" height="31rpx"></up--image></view>
<view class="casesdown" :class="{active:label_iden}" @click="openCase" >筛选<up--image :src="caseImg" width="31rpx" height="31rpx"></up--image></view>
<up-dropdown class="u-dropdown" ref="uDropdownRef">
<up-dropdown-item :title="dropTitle">
<view class="dropcontent">
@@ -177,7 +177,7 @@
>
<view class="votepop casepop">
<view class="titlebox">
<view class="left" @click="cancelCase">取消</view>
<view class="left" @click="closeCase">取消</view>
<view class="right" @click="confirmCase">确定</view>
</view>
@@ -347,7 +347,7 @@ const options= ref([
value: '2',
},
{
label: "互动数",
label: "互动数",
value: '3',
},
]);
@@ -716,7 +716,7 @@ const searchList = async (params) => {
border-bottom: 2rpx solid #f3f4f6;
:deep(.u-dropdown__menu__item__text){
font-size: 14px!important;
color: #3c9cff !important
color: #3CC7C0!important
}
.type{
color: #606266;
+5 -5
View File
@@ -16,7 +16,7 @@
<view class="name">文章</view>
</view>
<view class="cell" v-else>
<view class="num">{{ numInfo.video_collect_num }}</view>
<view class="num">{{ numInfo.video_num }}</view>
<view class="name">视频</view>
</view>
<view class="cell" v-if="isArticle">
@@ -34,7 +34,7 @@
<view class="desc" v-if="keyWord">检索词:<text class="red">{{ keyWord }}</text></view>
</view>
<view class="filterbox">
<view class="casesdown" @click="openCase" >筛选<up--image :src="caseImg" width="31rpx" height="31rpx"></up--image></view>
<view class="casesdown" :class="{active:label_iden}" @click="openCase" >筛选<up--image :src="caseImg" width="31rpx" height="31rpx"></up--image></view>
<!-- <view class="type" @click="swicthType">{{!isArticle?'文章':'视频'}}<up--image :src="switchImg" width="31rpx" height="31rpx"></up--image></view> -->
<up-dropdown class="u-dropdown" ref="uDropdownRef">
<up-dropdown-item
@@ -70,7 +70,7 @@
</view>
</template>
<view class="item" v-for="(item, index) in dataList" :key="index" @click="isArticle?goDetail(item.article_id):goDetail(item.video_id)">
<view class="title ellipsis-one-lines">{{isArticle?item.article_title:item.video_title }}</view>
<view class="title ellipsis-two-lines">{{isArticle?item.article_title:item.video_title }}</view>
<view class="tagsbox">
<view class="tag" v-for="tag in item.author" :key="tag.author_id">{{ tag.doctor_name }}</view>
</view>
@@ -103,7 +103,7 @@
>
<view class="votepop casepop">
<view class="titlebox">
<view class="left" @click="cancelCase">取消</view>
<view class="left" @click="closeCase">取消</view>
<view class="right" @click="confirmCase">确定</view>
</view>
@@ -618,7 +618,7 @@ const queryList = (pageNo, pageSize) => {
border-bottom: 2rpx solid #f3f4f6;
:deep(.u-dropdown__menu__item__text){
font-size: 14px!important;
color:rgb(60, 156, 255)!important;
color:#3CC7C0!important;
}
.casesdown{
font-size:14px;