1111
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
@query="queryList"
|
||||
>
|
||||
<template #top>
|
||||
<navBarSearch :searchWord="keyWord" :navName="navName" @changeWord="changeWord"></navBarSearch>
|
||||
<navBarSearch :searchWord="keyWord" :navName="navName" @changeWord="changeWord" :type="'cert'"></navBarSearch>
|
||||
<view class="detail" v-if="isSearch">
|
||||
<view class="desc" v-if="tab==0">检索到:<text class="red">{{total}}篇文章</text></view>
|
||||
<view class="desc" v-if="tab==1">检索到:<text class="red">{{total}}个视频</text></view>
|
||||
@@ -70,7 +70,7 @@ const tab=ref(0);
|
||||
const hospital_id=ref('');
|
||||
const doctor_id=ref('');
|
||||
const numInfo=reactive({});
|
||||
const navName=ref('肝胆相照临床病例库')
|
||||
const navName=ref('肝胆相照临床病例库收录证书')
|
||||
|
||||
const formatdate=(date)=>{
|
||||
return dayjs(date).format('YYYY-MM-DD')
|
||||
@@ -93,6 +93,10 @@ onLoad((options) => {
|
||||
if(options.doctor_id){
|
||||
doctor_id.value=options.doctor_id;
|
||||
}
|
||||
let userInfo=uni.getStorageSync('userInfo');
|
||||
if(userInfo.user_name){
|
||||
navName.value=userInfo.user_name+"临床病例库收录证书"
|
||||
}
|
||||
})
|
||||
onShow(()=>{
|
||||
paging.value?.refresh();
|
||||
|
||||
+189
-50
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<up-toast ref="uToast"></up-toast>
|
||||
<div class="upage">
|
||||
<pEditor v-if="showEditor" :editorCotent="editorCotent" :editorType="editorType" @closeEditor="closeEditor" @changeEditor="changeEditor"></pEditor>
|
||||
<view class="navbox">
|
||||
@@ -27,18 +28,24 @@
|
||||
清除模板
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="textcon page-editor-container" id="editor" >
|
||||
<view class="textcon page-editor-container" id="editor" :style="{height:infoHeight+'px'}">
|
||||
<view class="mask" @click="focusInfo"></view>
|
||||
<sv-editor
|
||||
placeholder="患者基本情况,检查结果,诊疗图片或视频"
|
||||
eid="editor-id"
|
||||
@ready="ready"
|
||||
pasteMode="origin"
|
||||
|
||||
readOnly="true"
|
||||
@changeInput="changeSv"
|
||||
@epaste="epaste"
|
||||
></sv-editor>
|
||||
<view class="infoContent" id="infoContent">
|
||||
<rich-text :nodes="fromatImg(infoHtml)"></rich-text>
|
||||
</view>
|
||||
<view class="editorcon" :class="{active:showInfoOpacity}" >
|
||||
<sv-editor
|
||||
|
||||
placeholder="患者基本情况,检查结果,诊疗图片或视频"
|
||||
eid="editor-id"
|
||||
@ready="ready"
|
||||
pasteMode="origin"
|
||||
@input="changeInfoEditor"
|
||||
readOnly="true"
|
||||
|
||||
@epaste="epaste"
|
||||
></sv-editor>
|
||||
</view>
|
||||
<!-- <editor
|
||||
id="editor"
|
||||
placeholder="写点什么吧~~"
|
||||
@@ -57,15 +64,21 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="textcell">
|
||||
<view class="iptbox" id="editorRes">
|
||||
<view class="iptbox" id="editorRes" :style="{height:resultHeight+'px'}">
|
||||
<view class="mask" @click="focusResult"></view>
|
||||
<sv-editor
|
||||
placeholder="分享经验和心得,如:诊断与鉴别诊断易错点,治疗过程难点,病例的相关知识总结及讨论等"
|
||||
eid="editorResult"
|
||||
@ready="readyResult"
|
||||
:readOnly="true"
|
||||
|
||||
></sv-editor>
|
||||
<view class="resultContent" id="resultContent">
|
||||
<rich-text :nodes="fromatImg(resultHtml)"></rich-text>
|
||||
</view>
|
||||
<view class="editorcon" :class="{active:showOpacity}">
|
||||
<sv-editor
|
||||
placeholder="分享经验和心得,如:诊断与鉴别诊断易错点,治疗过程难点,病例的相关知识总结及讨论等"
|
||||
eid="editorResult"
|
||||
@ready="readyResult"
|
||||
@input="changeResEditor"
|
||||
:readOnly="true"
|
||||
|
||||
></sv-editor>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -136,9 +149,17 @@
|
||||
<view class="bottombtn">
|
||||
<view class="left">
|
||||
<view class="draft" @click="openDraftList">草稿箱</view>
|
||||
<view class="vote" @click="alertVote">
|
||||
<view class="vote" :class="{active:form.case_exchange_vote.vote_title}" @click="alertVote">
|
||||
投票
|
||||
<up--image
|
||||
v-if="form.case_exchange_vote.vote_title"
|
||||
:src="voteOnImg"
|
||||
class="headImg"
|
||||
width="47rpx"
|
||||
height="47rpx"
|
||||
></up--image>
|
||||
<up--image
|
||||
v-else
|
||||
:src="voteImg"
|
||||
class="headImg"
|
||||
width="47rpx"
|
||||
@@ -146,7 +167,7 @@
|
||||
></up--image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right" @click="publish">发布</view>
|
||||
<view class="right" @click="isConfirmPublish=true">发布</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -384,6 +405,23 @@
|
||||
</view>
|
||||
</view>
|
||||
</up-overlay>
|
||||
<up-overlay :show="isConfirmPublish" mask-click-able zIndex="99">
|
||||
<view class="zanboxpop">
|
||||
<view class="zanwraper">
|
||||
<view class="title">提示</view>
|
||||
<view class="content" v-if="exchange_id">
|
||||
是否确认发布?
|
||||
</view>
|
||||
<view class="content" v-else>
|
||||
是否确认修改?
|
||||
</view>
|
||||
<view class="btnbox">
|
||||
<view class="cancle" @click="cancelConfirmPublish">取消</view>
|
||||
<view class="ok" @click="confirmConfirmPublish">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-overlay>
|
||||
<up-popup
|
||||
:round="10"
|
||||
zIndex="9"
|
||||
@@ -503,13 +541,17 @@ 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 voteOnImg from "@/static/voteon.png";
|
||||
|
||||
import draftImg from "@/static/draft.png";
|
||||
import api from "@/api/api";
|
||||
import dayjs from "dayjs";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { onLoad,onReady } 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 videoface from "@/static/videoface.jpg";
|
||||
const uToast=ref(null);
|
||||
//import SvEditorToolbar from "@/uni_modules/sv-editor/components/sv-editor/sv-editor-toolbar.vue";
|
||||
import {
|
||||
addImage,
|
||||
@@ -524,6 +566,7 @@ const delType = ref("delDraft"); //delDraft saveDraft
|
||||
const isPublish = ref(false);
|
||||
const exchange_id=ref('');
|
||||
const showEditor=ref(false);
|
||||
const showOpacity=ref(false);
|
||||
const editorType=ref('info');
|
||||
const bottomHeight=ref(200);
|
||||
const form = reactive({
|
||||
@@ -543,7 +586,7 @@ const voteData = reactive({
|
||||
],
|
||||
});
|
||||
const value = ref("");
|
||||
|
||||
const isConfirmPublish=ref(false)
|
||||
const showVote = ref(false);
|
||||
const showDraft = ref(false);
|
||||
const showTitle = ref(false);
|
||||
@@ -556,7 +599,13 @@ const isFocusInfo = ref(false);
|
||||
const isFocusResult = ref(false);
|
||||
const labelList = ref([]);
|
||||
|
||||
|
||||
const infoHeight=ref(100);
|
||||
let inithtmlString =
|
||||
"<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/><br/>";
|
||||
const infoHtml=ref(inithtmlString);
|
||||
const resultHtml=ref('');
|
||||
const resultHeight=ref(100);
|
||||
const showInfoOpacity=ref(true)
|
||||
const level = ref(1);
|
||||
const freshKey=ref(0);
|
||||
const showCase = ref(false);
|
||||
@@ -589,8 +638,8 @@ const closeEditor=()=>{
|
||||
};
|
||||
const changeEditor=(data)=>{
|
||||
showEditor.value=false;
|
||||
console.log(data)
|
||||
if(data.type=="info"){
|
||||
infoHtml.value=data.content
|
||||
editorCtx.value.initHtml(data.content,async (videoUrl) => {
|
||||
let res='';
|
||||
|
||||
@@ -598,13 +647,21 @@ const changeEditor=(data)=>{
|
||||
// res = await this.editorCtx.createVideoThumbnail(videoUrl)
|
||||
// #endif
|
||||
|
||||
const fox = 'https://cn.bing.com//th?id=OHR.FlamingosNamibia_ZH-CN3639748956_1920x1080.jpg'
|
||||
const fox = videoface
|
||||
res = await editorCtx.value.createCoverThumbnail(fox)
|
||||
showEditor.value=false;
|
||||
return res
|
||||
})
|
||||
|
||||
setTimeout(()=>{
|
||||
const query = wx.createSelectorQuery();
|
||||
query.select('#infoContent').boundingClientRect(function(rect){
|
||||
console.log(rect.height);
|
||||
infoHeight.value=rect.height+10
|
||||
// 输出元素的高度
|
||||
}).exec();
|
||||
},0)
|
||||
}else{
|
||||
resultHtml.value=data.content
|
||||
editorCtxResult.value.initHtml(data.content,async (videoUrl) => {
|
||||
let res='';
|
||||
|
||||
@@ -612,19 +669,25 @@ const changeEditor=(data)=>{
|
||||
// res = await this.editorCtx.createVideoThumbnail(videoUrl)
|
||||
// #endif
|
||||
|
||||
const fox = 'https://cn.bing.com//th?id=OHR.FlamingosNamibia_ZH-CN3639748956_1920x1080.jpg'
|
||||
const fox = videoface
|
||||
res = await editorCtx.value.createCoverThumbnail(fox)
|
||||
showEditor.value=false;
|
||||
return res
|
||||
})
|
||||
|
||||
setTimeout(()=>{
|
||||
const query = wx.createSelectorQuery();
|
||||
query.select('#resultContent').boundingClientRect(function(rect){
|
||||
console.log(rect.height);
|
||||
resultHeight.value=rect.height+10
|
||||
// 输出元素的高度
|
||||
}).exec();
|
||||
},0)
|
||||
}
|
||||
// setTimeout(()=>{
|
||||
// showEditor.value=false;
|
||||
// },1000)
|
||||
};
|
||||
const openDraftList=()=>{
|
||||
|
||||
const openDraftList=()=>{
|
||||
getDraftList();
|
||||
showDraft.value=true;
|
||||
}
|
||||
@@ -746,6 +809,8 @@ const fromatImg = (val) => {
|
||||
|
||||
};
|
||||
const ready = (e) => {
|
||||
|
||||
|
||||
console.log(e);
|
||||
editorCtx.value = e;
|
||||
|
||||
@@ -760,15 +825,16 @@ const ready = (e) => {
|
||||
selector:"#form"
|
||||
// })
|
||||
})
|
||||
uni.hideLoading();
|
||||
|
||||
|
||||
};
|
||||
const readyResult = (e) => {
|
||||
editorCtxResult.value = e;
|
||||
setTimeout(()=>{
|
||||
if(exchange_id.value){
|
||||
getExchangeDetail(exchange_id.value);
|
||||
|
||||
}
|
||||
uni.hideLoading();
|
||||
})
|
||||
//editorCtxResult.value.initHtml("")
|
||||
};
|
||||
@@ -777,9 +843,7 @@ const clearMuBan = () => {
|
||||
|
||||
editorCtx.value.initHtml("");
|
||||
};
|
||||
const changeSv=()=>{
|
||||
showEditor.value=false;
|
||||
}
|
||||
|
||||
const focusInfo = async() => {
|
||||
isFocusInfo.value = true;
|
||||
const res= await editorCtx.value.getLastContent();
|
||||
@@ -902,7 +966,7 @@ const getExchangeDetail = (id) => {
|
||||
// res = await this.editorCtx.createVideoThumbnail(videoUrl)
|
||||
// #endif
|
||||
|
||||
const fox = 'https://cn.bing.com//th?id=OHR.FlamingosNamibia_ZH-CN3639748956_1920x1080.jpg'
|
||||
const fox = videoface
|
||||
res = await editorCtx.value.createCoverThumbnail(fox)
|
||||
|
||||
return res
|
||||
@@ -920,7 +984,7 @@ const getExchangeDetail = (id) => {
|
||||
// res = await this.editorCtx.createVideoThumbnail(videoUrl)
|
||||
// #endif
|
||||
|
||||
const fox = 'https://cn.bing.com//th?id=OHR.FlamingosNamibia_ZH-CN3639748956_1920x1080.jpg'
|
||||
const fox = videoface
|
||||
res = await editorCtxResult.value.createCoverThumbnail(fox)
|
||||
|
||||
return res
|
||||
@@ -970,14 +1034,19 @@ const cancelDel = () => {
|
||||
console.log('wee')
|
||||
}
|
||||
};
|
||||
const cancelConfirmPublish=()=>{
|
||||
isConfirmPublish.value=false;
|
||||
}
|
||||
|
||||
const delDraft = (id) => {
|
||||
api.delDraft(id).then((res) => {
|
||||
uni.showToast({
|
||||
title: "删除成功",
|
||||
icon: "none",
|
||||
});
|
||||
getDraftList();
|
||||
});
|
||||
getDraftList();
|
||||
|
||||
};
|
||||
const alertSave = async () => {
|
||||
if(isPublish.value || exchange_id.value){
|
||||
@@ -1007,7 +1076,10 @@ const alertSave = async () => {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const cconfirmConfirmPublish=()=>{
|
||||
confirmConfirmPublish.value=false;
|
||||
publish();
|
||||
}
|
||||
const publish =throttle(async () => {
|
||||
console.log(3333);
|
||||
const initInfo =
|
||||
@@ -1209,8 +1281,7 @@ const HandleAddVideo = async (file) => {
|
||||
if (res.statusCode === 204) {
|
||||
let url = host + "/" + dir + filename + imgType;
|
||||
console.log(editorCtx);
|
||||
let imgUrl =
|
||||
"https://cn.bing.com//th?id=OHR.FlamingosNamibia_ZH-CN3639748956_1920x1080.jpg";
|
||||
let imgUrl =videoface;
|
||||
const fileThumbnail = await editorCtx.createCoverThumbnail(
|
||||
imgUrl
|
||||
);
|
||||
@@ -1232,12 +1303,30 @@ const HandleAddVideo = async (file) => {
|
||||
});
|
||||
});
|
||||
if (videos) {
|
||||
uni.showLoading();
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: "添加视频成功", icon: "success" });
|
||||
} else {
|
||||
uni.showToast({ title: "添加视频失败", icon: "error" });
|
||||
}
|
||||
};
|
||||
const changeInfoEditor=async()=>{
|
||||
const res=await editorCtx.value.getLastContent();
|
||||
let str=res.text.replace(/\s/g, '')
|
||||
if(str){
|
||||
showInfoOpacity.value=true;
|
||||
}else{
|
||||
showInfoOpacity.value=false;
|
||||
}
|
||||
}
|
||||
const changeResEditor=async()=>{
|
||||
const res=await editorCtxResult.value.getLastContent();
|
||||
let str=res.text.replace(/\s/g, '')
|
||||
if(str){
|
||||
showOpacity.value=true;
|
||||
}else{
|
||||
showOpacity.value=false;
|
||||
}
|
||||
}
|
||||
const getDraftList = () => {
|
||||
api.getDraftList().then((res) => {
|
||||
draftList.value = res.data.data.data;
|
||||
@@ -1406,16 +1495,23 @@ const openLabelPop=()=>{
|
||||
showCase.value=true;
|
||||
getCaseLabel(1,0);
|
||||
}
|
||||
|
||||
onReady(()=>{
|
||||
uToast.value.show( {
|
||||
type: "loading",
|
||||
title: "正在加载",
|
||||
message: "正在加载",
|
||||
duration:1000
|
||||
})
|
||||
})
|
||||
onLoad((optoions) => {
|
||||
uni.showLoading({
|
||||
title: "正在加载中...",
|
||||
mask: true,
|
||||
});
|
||||
|
||||
if(optoions.exchange_id){
|
||||
exchange_id.value=optoions.exchange_id;
|
||||
console.log(1111)
|
||||
console.log(exchange_id.value)
|
||||
}
|
||||
|
||||
//getDraftList();
|
||||
|
||||
});
|
||||
@@ -1689,9 +1785,28 @@ onLoad((optoions) => {
|
||||
}
|
||||
}
|
||||
#editor {
|
||||
position:relative;
|
||||
position:relative;
|
||||
padding: 0 10rpx;
|
||||
height: calc(100vh - 700rpx);
|
||||
min-height:600rpx;
|
||||
.editorcon{
|
||||
position: absolute;
|
||||
top:0;
|
||||
width:100%;
|
||||
bottom:0;
|
||||
z-index:1;
|
||||
opacity:1
|
||||
}
|
||||
.editorcon.active{
|
||||
opacity:0
|
||||
}
|
||||
.infoContent{
|
||||
|
||||
margin:0 32rpx;
|
||||
word-break: break-all;
|
||||
/* position: relative;
|
||||
z-index:2; */
|
||||
}
|
||||
|
||||
.mask{
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
@@ -1703,7 +1818,22 @@ onLoad((optoions) => {
|
||||
}
|
||||
#editorRes {
|
||||
position: relative;
|
||||
height: 600rpx;
|
||||
min-height: 600rpx;
|
||||
.editorcon{
|
||||
position: absolute;
|
||||
top:0;
|
||||
width:100%;
|
||||
bottom:0;
|
||||
z-index:1;
|
||||
opacity:1
|
||||
}
|
||||
.editorcon.active{
|
||||
opacity:0
|
||||
}
|
||||
.resultContent{
|
||||
margin:0 32rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
.mask{
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
@@ -1715,6 +1845,7 @@ position: relative;
|
||||
:deep(.sv-editor-wrapper) {
|
||||
flex: 1;
|
||||
min-height: 300rpx;
|
||||
position: absolute!important;
|
||||
}
|
||||
}
|
||||
.myVideo {
|
||||
@@ -2040,6 +2171,10 @@ position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.vote.active{
|
||||
color:#3CC7C0;
|
||||
border: 2rpx solid #3CC7C0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.form {
|
||||
@@ -2129,6 +2264,7 @@ position: relative;
|
||||
}
|
||||
:deep(.ql-container){
|
||||
padding-bottom: 25rpx;
|
||||
word-break: break-all;
|
||||
height: calc(100vh - 700rpx);
|
||||
}
|
||||
:deep(.ql-container) img{
|
||||
@@ -2148,6 +2284,9 @@ position: relative;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
:deep(.imgstyle){
|
||||
max-width: 100%;
|
||||
}
|
||||
/* #ifdef H5 */
|
||||
:deep(.ql-editor){
|
||||
position: absolute;
|
||||
|
||||
Reference in New Issue
Block a user