This commit is contained in:
zoujiandong 2025-06-09 08:38:59 +08:00
parent 6684bf1e29
commit db955ff4f3
15 changed files with 1565 additions and 550 deletions

View File

@ -19,22 +19,53 @@ const api = {
return request('/clinical/stats', data, 'get', true);
},
getArticleDetail(id) { //获取详情
return request('/clinical/article/'+id,{}, 'get', true);
return request('/clinical/article/'+id,{}, 'get', false);
},
getVideoDetail(id) { //获取详情
return request('/clinical/video/'+id,{}, 'get', true);
return request('/clinical/video/'+id,{}, 'get', false);
},
collectArticle(id){
return request('/api/clinical/article/collect/'+id, {}, 'post',false);
return request('/clinical/article/collect/'+id, {}, 'post',false);
},
cancelCollectArticle(id){
return request('/api/clinical/article/collect/'+id, {}, 'delete',false);
return request('/clinical/article/collect/'+id, {}, 'delete',false);
},
collectVideo(id){
return request('/api/clinical/video/collect/'+id, {}, 'post',false);
return request('/clinical/video/collect/'+id, {}, 'post',false);
},
cancelCollectVideo(id){
return request('/api/clinical/video/collect/'+id,{}, 'delete',false);
return request('/clinical/video/collect/'+id,{}, 'delete',false);
},
addVideoComment(id,data){
return request('/clinical/video/comment/'+id,data, 'post',false,'application/json');
},
delVideoComment(id){
return request('/clinical/video/comment/'+id, {}, 'delete',false);
},
topVideoComment(id){
return request('/clinical/video/comment/top/'+id, {}, 'put',false);
},
cancelTopVideoComment(id){
return request('/clinical/video/comment/top/'+id, {}, 'delete',false);
},
addArticleComment(id,data){
return request('/clinical/article/comment/'+id, data, 'post',false,'application/json');
},
delArticleComment(id){
return request('/clinical/article/comment/'+id, {}, 'delete',false);
},
topArticleComment(id){
return request('/clinical/article/comment/top/'+id, {}, 'put',false);
},
cancelTopArticleComment(id){
return request('/clinical/article/comment/top/'+id, {}, 'delete',false);
},
getArticleComment(data){
return request('/clinical/article/comment/page',data, 'post', false,'application/json');
},
getVideoComment(data){
return request('/clinical/video/comment/page',data, 'post', false,'application/json');
},
searchArticle(data){
return request('/clinical/article/search', data, 'post',true,'application/json');
@ -49,12 +80,59 @@ const api = {
return request('/clinical/hospital/search', data, 'post',true,'application/json');
},
getStaticDoctor(id){
return request('/clinical/stats/doctor/'+id, data={}, 'post',false);
return request('/clinical/stats/doctor/'+id,{}, 'get',false);
},
getStaticHospital(id){
return request('/clinical/stats/hospital/'+id, data={}, 'post',false);
return request('/clinical/stats/hospital/'+id, {}, 'get',false);
},
getUserInfo(){
return request('/user',{}, 'get', false);
},
getExchangeStatic(){
return request('/exchange/stats',{}, 'get', false);
},
getExchangeStaticUser(id){
return request('/exchange/stats/user/'+id,{}, 'get', false);
},
searchExchage(){
return request('/exchange/search', data, 'post',true,'application/json');
},
getExchangeDetail(id){
return request('/exchange/'+id,{}, 'get', false);
},
getExchangeVote(id){
return request('/exchange/vote/'+id,{}, 'get', false);
},
exchangeCollect(id){
return request('/exchange/collect/'+id, {}, 'post',false);
},
cancelExchangeCollect(id){
return request('/exchange/collect/'+id, {}, 'delete',false);
},
addExchangeComment(id,data){
return request('/exchange/comment/'+id, data, 'post',false);
},
delExchangeComment(id){
return request('/exchange/comment/'+id, {}, 'delete',false);
},
topExchangeComment(id){
return request('/exchange/comment/top/'+id, {}, 'put',false);
},
cancleTopExchangeComment(id){
return request('/exchange/comment/top/'+id, {}, 'delete',false);
},
getExchangeComment(data){
return request('/exchange/comment/page', data, 'post',false);
},
getExchangeCommentUser(data){
return request('/exchange/user/comment/page', data, 'post',false);
},
getMyCollect(data){
return request('/user/collect/search',data, 'post',false,'application/json');
},
getMyRead(data){
return request('/user/case/read/search',data, 'post',false,'application/json');
},
queryList(data) {
const listCount = 24;
return _queryList(data, listCount);

View File

@ -34,7 +34,7 @@
</template>
<script setup>
import { ref, watch} from "vue";
import { ref, watch,defineEmits} from "vue";
import headImg from "@/static/headImg.png";
import logoImg from "@/static/logo.png";
const keyWord = ref('');
@ -65,11 +65,13 @@ watch(()=>props.type,(newVal)=>{
watch(()=>props.searchWord,(newVal)=>{
keyWord.value=newVal
})
const emit = defineEmits(['changeWord'])
const goMy=()=>{
uni.navigateTo({
url:'/pages/my/my'
})
}
const goBack = () => {
uni.navigateBack({
delta: 1,
@ -82,10 +84,10 @@ const search=()=>{
// icon:'none'
// });
// }
uni.navigateTo({
url: `/pages/search/search?keyWord=${keyWord.value}`,
});
emit('changeWord',keyWord.value)
// uni.navigateTo({
// url: `/pages/search/search?keyWord=${keyWord.value}`,
// });
}
</script>

View File

@ -1,18 +1,18 @@
<template>
<view class="upage">
<navBar></navBar>
<navBar :navName="'肝胆相照病例交流园地'" :type="'caseTalk'"></navBar>
<view class="databox">
<view class="cell">
<view class="num">11</view>
<view class="name">文章</view>
<view class="num">{{ numInfo.exchange_collect_num}}</view>
<view class="name">病例数</view>
</view>
<view class="cell">
<view class="num">22</view>
<view class="name">视频</view>
<view class="num">{{ numInfo.exchange_num }}</view>
<view class="name">互动数</view>
</view>
<view class="cell">
<view class="num">333</view>
<view class="name">阅读</view>
<view class="num">{{ numInfo.exchange_read_num }}</view>
<view class="name">浏览</view>
</view>
</view>
<view class="bar"></view>
@ -20,33 +20,33 @@
<view class="special">
<view class="titlebox">
<view class="title">精选病例</view>
<view class="more" @click="goList">
<view class="more" @click="goList('read')">
<view class="morename">查看更多</view>
<u-icon name="arrow-right" size="16" color="#3CC7C0"></u-icon>
</view>
</view>
<view class="list">
<view class="cell">
<view class="cell" v-for="item in most_read_articles" :key="item.article_id">
<view class="circle"></view>
<view class="title">肝胆相照临床病例库肝胆相照临床病例库</view>
<view class="title">{{ item.article_title }}</view>
</view>
</view>
</view>
<view class="bar"></view>
<view class="record">
<view class="titlebox">
<view class="title">精选病例</view>
<view class="more" @click="goList">
<view class="title">最新收录</view>
<view class="more" @click="goList('mew')">
<view class="morename">查看更多</view>
<u-icon name="arrow-right" size="16" color="#3CC7C0"></u-icon>
</view>
</view>
<view class="list">
<view class="cell">
<view class="title">肝胆相照临床病例库肝胆相照临床病例库肝胆</view>
<view class="doctor">
<view class="cell" v-for="item in new_articles" :key="item.article_id">
<view class="title">{{ item.article_title }}</view>
<view class="doctor" v-for="cell in item.autor">
<up--image :src="headImg" width="46rpx" height="46rpx" radius="50%"></up--image>
<view class="name">陈XX首都医科大学附属北京**医院</view>
<view class="name">{{cell.doctor_name}}{{cell.hospital_name}}</view>
</view>
<view class="content">
嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎XXXXX
@ -82,20 +82,20 @@
<view class="left">
<view class="eyebox item">
<up-icon name="eye" color="#4B5563" size="28rpx"></up-icon>
<view class="num">11</view>
<view class="num">{{ item.read_num }}</view>
</view>
<view class="collect item">
<up-icon name="heart" color="#4B5563" size="28rpx"></up-icon>
<view class="num">22</view>
<up-icon :name="item.is_collect?'heart-fill':'heart'" :color="item.is_collect?'red':'#4B5563'" size="28rpx"></up-icon>
<view class="num">{{item.collect_num }}</view>
</view>
<view class="chat item">
<up-icon name="chat" color="#4B5563" size="28rpx"></up-icon>
<view class="num">22</view>
<view class="num">{{item.comment_num }}</view>
</view>
</view>
<view class="time">
<up-icon name="clock" color="#4B5563" size="28rpx"></up-icon>
<view class="num">{{formatdate('2022-10-23') }}</view>
<view class="num">{{formatdate(item.push_date) }}</view>
</view>
</view>
</view>
@ -112,20 +112,52 @@
import tabBar from "@/components/tabBar/tabBar.vue";
import headImg from "@/static/headImg.png";
import dayjs from "dayjs";
import api from "@/api/api";
import { reactive,ref } from 'vue';
import { onLoad } from "@dcloudio/uni-app";
const numInfo=reactive({})
const most_read_articles=ref([]);
const new_articles=ref([]);
const formatdate = (date) => {
return dayjs(date).format('YYYY-MM-DD')
};
const goList = () => {
uni.navigateTo({
url: '/pages/specialList/specialList'
})
};
// const goList = () => {
// uni.navigateTo({
// url: '/pages/specialList/specialList'
// })
// };
const goList=(type)=>{
uni.navigateTo({
url:'/pages/search/search?order='+type
})
};
const getStatic=()=>{
api.getExchangeStatic().then(res=>{
let result=res.data.data;
Object.assign(numInfo,result);
})
}
const getData = async() => {
const {data}=await api.getHomeData();
if(data.code==200){
most_read_articles.value=data.data.most_read_articles;
new_articles.value=data.data.new_articles;
}
};
const videoErrorCallback = (e) => {
uni.showModal({
content: e.target.errMsg,
showCancel: false
})
};
onLoad(()=>{
console.log('onLoad')
getStatic();
getData();
})
</script>
<style lang='scss' scoped>

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
<template>
<navBar></navBar>
<navBar :type="'home'"></navBar>
<view class="page">
<view class="databox">
<view class="cell">
@ -151,8 +151,6 @@ const numInfo=reactive({})
const getData = async() => {
const {data}=await api.getHomeData();
console.log(11111);
console.log(data);
if(data.code==200){
most_read_articles.value=data.data.most_read_articles;
new_articles.value=data.data.new_articles;
@ -175,12 +173,12 @@ const goList=(type)=>{
};
const searchDoctor=()=>{
uni.navigateTo({
url:'/pages/searchList/searchList?type=doctor'
url:'/pages/searchList/searchList?type=doctor&name=医生&id='
})
}
const goHospital=()=>{
uni.navigateTo({
url:'/pages/searchList/searchList?type=hospital'
url:'/pages/searchList/searchList?type=hospital&name=医院&id='
})
}
onLoad(() => {

View File

@ -224,7 +224,13 @@ const getPhoneNumber = (e) => {
} else {
uni.setStorageSync("DEV_AUTH_TOKEN_CASEDATA",result.token);
};
console.log(2222222)
uni.setStorageSync("userInfo",{
avatar:result.avatar,
user_id:result.user_id,
status:result.status,
user_name:result.user_name,
doctor_id:result.doctor_id,
});
goPage()
}).catch((err)=>{
uni.showToast({
@ -258,6 +264,13 @@ const phoneLogin = () => {
} else {
uni.setStorageSync("DEV_AUTH_TOKEN_CASEDATA",result.token);
}
uni.setStorageSync("userInfo",{
avatar:result.avatar,
user_id:result.user_id,
status:result.status,
user_name:result.user_name,
doctor_id:result.doctor_id,
});
goPage()
});
});

View File

@ -4,36 +4,36 @@
<view class="con">
<view class="infobox">
<up--image
:src="headImg"
:src="userInfo.avatar?userInfo.avatar:headImg"
width="154rpx"
height="154rpx"
radius="50%"
></up--image>
<view class="info">
<view class="name">
张三主任医师
{{userInfo.user_name}}{{userInfo.title}}
</view>
<view class="hospital">首都医科大学附属北京**医院</view>
<view class="hospital">{{ userInfo.hospital_name }}</view>
</view>
</view>
<view class="databox">
<view class="cell">
<view class="num">11</view>
<view class="num">{{ numInfo.article_num }}</view>
<view class="name">文章</view>
</view>
<view class="cell">
<view class="num">22</view>
<view class="num">{{ numInfo.video_num }}</view>
<view class="name">视频</view>
</view>
<view class="cell">
<view class="num">333</view>
<view class="num">{{numInfo.video_read_num + numInfo.article_read_num }}</view>
<view class="name">阅读量</view>
</view>
</view>
<view class="listbox">
<view class="titlename">我的临床病例库</view>
<view class="cell" @click="goDoctor">
<view class="cell" @click="goDoctor(userInfo.doctor_id,userInfo.user_name)" v-if="numInfo.article_num>0">
<view class="left">
<u-icon name="chat-fill" color="#000" size="28"></u-icon>
<view class="title">我的病例库</view>
@ -47,10 +47,10 @@
</view>
<u-icon name="arrow-right" color="#9CA3AF" size="18"></u-icon>
</view>
<view class="cell" @click="goHospital">
<view class="cell" @click="goHospital(userInfo.hospital_id,userInfo.hospital_name)" v-if="hospitalInfo.video_read_num>0 || hospitalInfo.article_read_num>0">
<view class="left">
<u-icon name="chat-fill" color="#000" size="28"></u-icon>
<view class="title">XXXX医院临床病例库</view>
<view class="title">{{userInfo.hospital_name}}临床病例库</view>
</view>
<u-icon name="arrow-right" color="#9CA3AF" size="18"></u-icon>
</view>
@ -88,19 +88,54 @@
<script setup>
import dNav from "@/components/backNav/backNav.vue";
import headImg from "@/static/headImg.png";
import { onLoad } from "@dcloudio/uni-app";
import api from "@/api/api";
import { ref,reactive} from "vue";
const userInfo=reactive({})
const numInfo=reactive({})
const hospitalInfo=reactive({})
const getInfo=()=>{
api.getUserInfo().then(res=>{
const result=res.data.data;
Object.assign(userInfo,result);
console.log(result)
if(userInfo.doctor_id){
getNum(userInfo.doctor_id)
}
if(userInfo.hospital_id){
getHospitalNum(userInfo.hospital_id)
};
})
}
const getNum=(id)=>{
api.getStaticDoctor(id).then(res=>{
const result=res.data.data;
Object.assign(numInfo,result);
})
}
const getHospitalNum=(id)=>{
api.getStaticHospital(id).then(res=>{
const result=res.data.data;
Object.assign(hospitalInfo,result);
})
}
onLoad(()=>{
getInfo()
})
const goCert = () => {
uni.navigateTo({
url: "/pages/certList/certList",
});
};
const goDoctor=()=>{
const goDoctor=(id,name)=>{
uni.navigateTo({
url:'/pages/searchList/searchList?type=doctor'
url:'/pages/searchList/searchList?type=doctor&id='+id+'&name='+name
})
}
const goHospital=()=>{
const goHospital=(id,name)=>{
uni.navigateTo({
url:'/pages/searchList/searchList?type=hospital'
url:'/pages/searchList/searchList?type=hospital&id='+id+'&name='+name
})
}
const mySpecial=()=>{

View File

@ -9,45 +9,45 @@
@query="queryList"
>
<template #top>
<navBarSearch :searchWord="keyWord" :navName="navName"></navBarSearch>
<navBarSearch :searchWord="keyWord" :navName="navName" @changeWord="changeWord"></navBarSearch>
<view class="filterbox">
<!-- <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
v-model="order.push_date"
title="收藏"
@change="change"
v-model="type1"
:title="type1==0?'收藏':'浏览'"
@change="changetype1"
:options="options"
></up-dropdown-item>
<up-dropdown-item
v-model="order.read_num"
title="文章病例库"
@change="change"
:options="options"
<up-dropdown-item
v-model="type2"
:title="title2"
@change="changetype2"
:options="options1"
></up-dropdown-item>
</up-dropdown>
</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">{{isArticle?item.article_title:item.video_title }}</view>
<view class="item" v-for="(item, index) in dataList" @click="goDetail()" :key="item.collect_id">
<view class="title ellipsis">{{item.data.title}}</view>
<view class="tagsbox">
<view class="tag" v-for="tag in item.author" :key="tag.author_id">{{ tag.doctor_name }}</view>
<view class="tag" v-for="tag in item.data.author" :key="tag.author_id">{{ tag.doctor_name }}</view>
</view>
<view class="deal">
<view class="left">
<view class="eyebox">
<up-icon name="eye" color="#6B7280" size="28rpx"></up-icon>
<view class="num">{{item.read_num }}</view>
<view class="num">{{item.data.read_num }}</view>
</view>
<view class="collect">
<up-icon name="heart" color="#6B7280" size="28rpx"></up-icon>
<view class="num">{{item.collect_num }}</view>
<view class="num">{{item.data.collect_num }}</view>
</view>
</view>
<view class="time">
<up-icon name="clock" color="#6B7280" size="28rpx"></up-icon>
<view class="num">{{formatdate(item.push_date) }}</view>
<view class="num">{{formatdate(item.data.push_date) }}</view>
</view>
</view>
</view>
@ -69,14 +69,11 @@ const dataList = ref([]);
const total = ref(0);
const value = ref("");
const keyWord = ref("");
const page=ref(1);
const isArticle=ref(true);
const hospital_id=ref('');
const hospital_name=ref('');
const doctor_id=ref('');
const doctor_name=ref('');
const numInfo=reactive({});
const navName=ref('肝胆相照临床病例库')
const navName=ref('肝胆相照临床病例库');
const type1=ref(0);
const type2=ref(1);
const title2=ref('文章病例库');
const options= ref([
{
label: "收藏",
@ -90,15 +87,15 @@ const options= ref([
const options1= ref([
{
label: "文章病例库",
value: 0,
value: 1,
},
{
label: "视频病例库",
value:1,
value:2,
},
{
label: "病例交流",
value:2,
value:3,
},
]);
@ -111,32 +108,16 @@ onLoad((options) => {
if(options.keyWord){
keyWord.value = options.keyWord;
};
if(options.order=='new'){
order.push_date='asc'
};
if(options.order=='read'){
order.read_num='desc'
};
if(options.order=='video'){
isArticle.value=false;
}
if(options.doctor_id){
doctor_id.value=options.doctor_id;
doctor_name.value=options.doctor_name
navName.value= doctor_name.value+'临床病例库'
getStaticDoctor(doctor_id.value)
}
if(options.hospital_id){
hospital_id.value=options.hospital_id;
hospital_name.value=options.hospital_name;
navName.value= hospital_name.value+'临床病例库'
getStaticDoctor(hospital_id.value)
}
});
const change=(e)=>{
const changetype1=(e)=>{
type1.value=e;
paging.value.reload();
}
const changetype2=(e)=>{
type2.value=e;
title2.value=options1.value[e-1].label;
paging.value.reload();
}
const formatdate=(date)=>{
return dayjs(date).format('YYYY-MM-DD')
}
@ -148,53 +129,34 @@ const goDetail=(id)=>{
url: `/pages/detail/detail?id=${id}&type=${type}`
})
}
const swicthType=()=>{
isArticle.value=!isArticle.value;
dataList.value=[];
order.read_num='';
order.push_date='';
paging.value.reload();
const changeWord=(val)=>{
keyWord.value=val;
paging.value.reload();
}
const searchArticle =(params) => {
const searchCollect=(params) => {
let searchForm={
keyword: keyWord.value,
doctor_id:doctor_id.value,
hospital_id:hospital_id.value
type:type2.value,
}
if(!order.read_num){
delete order.read_num
}
if(!order.push_date){
delete order.push_date
}
if(order.read_num || order.push_date){
searchForm.order=order
}
api.searchArticle({
api.getMyCollect({
...searchForm,
...params
}).then((res)=>{
paging.value.complete(res.data.data.data);
paging.value.complete(res.data.data.data);
total.value=res.data.data.total;
}).catch(err=>{
paging.value.complete(false);
})
}
const searchVideo = async(params) => {
const searchRead = async(params) => {
let searchForm={
keyword: keyWord.value,
type:type2.value,
}
if(!order.read_num){
delete order.read_num
}
if(!order.push_date){
delete order.push_date
}
if(order.read_num || order.push_date){
searchForm.order=order
}
api.searchVideo({
api.getMyRead({
...searchForm,
...params
}).then((res)=>{
paging.value.complete(res.data.data.data);
@ -203,27 +165,14 @@ const searchVideo = async(params) => {
paging.value.complete(false);
})
}
const getStaticDoctor=(id)=>{
api.getStaticDoctor(id).then((res)=>{
let result=res.data.data;
Object.assign(numInfo,result);
})
}
const getStaticHospital=(id)=>{
api.getStaticHospital(id).then((res)=>{
let result=res.data.data;
Object.assign(numInfo,result);
})
}
const queryList = (pageNo, pageSize) => {
console.log(666666);
const params = {
page: pageNo,
page_size: pageSize,
};
isArticle.value?searchArticle(params):searchVideo(params)
type1.value==1?searchRead(params):searchCollect(params)
};
</script>

View File

@ -35,30 +35,39 @@
<view class="title ellipsis">{{
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>
<view class="deal">
<view class="left">
<view class="recored">
<up--image
:src="certImg"
width="39rpx"
height="39rpx"
></up--image>
收录证书
</view>
</view>
<view class="time">
<up-icon name="clock" color="#6B7280" size="28rpx"></up-icon>
<view class="num">{{ formatdate(item.push_date) }}</view>
</view>
<view class="dot">...</view>
</view>
<view class="casecontent">
<view class="author">段钟平(首都医科大学附属北京佑安医院教授</view>
<view class="content">肝胆相照临床病例库肝胆相照临床病例库肝胆相照临床病例库肝胆相照临床病例库</view>
</view>
</view>
</z-paging>
</view>
<!-- 底部操作 -->
<up-popup
:zIndex="10"
:overlayStyle="{ zIndex: 9 }"
:closeOnClickOverlay="false"
:show="showDeal"
:round="10"
mode="bottom"
@close="closeDeal"
@open="openDeal"
>
<view class="dealbox">
<view class="dealcell">收藏</view>
<view class="dealcell">删除</view>
<view class="bar"></view>
<view class="dealcell" @click="closeDeal">取消</view>
</view>
</up-popup>
</template>
<script setup>
@ -84,6 +93,13 @@ const doctor_id = ref("");
const doctor_name = ref("");
const numInfo = reactive({});
const navName = ref("肝胆相照临床病例库");
const showDeal = ref(true);
const closeDeal=()=>{
showDeal.value = false;
};
const openDeal=()=>{
showDeal.value = true;
};
const options = ref([
{
label: "正序",
@ -237,6 +253,22 @@ const queryList = (pageNo, pageSize) => {
</script>
<style lang="scss" scoped>
.bar {
width: 100%;
background: #f9fafb;
height: 20rpx;
}
.dealbox {
.dealcell {
display: flex;
align-items: center;
justify-content: center;
height: 112rpx;
font-size: 32rpx;
color: rgba(0, 0, 0, 0.9);
border-bottom: 2rpx solid #efefef;
}
}
.tabcon {
margin: 0 20rpx;
}
@ -302,6 +334,22 @@ const queryList = (pageNo, pageSize) => {
flex: none;
margin-left: 60rpx;
}
.casecontent{
margin-top: 16rpx;
padding:24rpx 30rpx;
border-radius: 16rpx;
border: 2rpx solid #E5E7EB;
.author{
font-size: 26rpx;
color: #666666;
}
.content{
margin-top: 10rpx;
font-size: 30rpx;
color: #333333;
line-height: 46rpx;
}
}
.deal {
margin-top: 20rpx;
display: flex;
@ -327,6 +375,9 @@ const queryList = (pageNo, pageSize) => {
display: flex;
align-items: center;
}
.dot{
font-size: 34rpx;
}
.time {
display: flex;
align-items: center;

View File

@ -116,22 +116,49 @@
</view>
<view class="toolbox">
<view class="cell">
<up--image
:src="photoImg"
class="headImg"
<u-upload
:fileList="imgList"
@afterRead="afterRead"
@delete="deletePic"
name="imgupload"
multiple
:maxCount="1"
width="32rpx"
height="32rpx"
></up--image>
<view class="name">添加图片</view>
>
<view class="cell">
<up--image
:src="photoImg"
class="headImg"
width="32rpx"
height="32rpx"
></up--image>
<view class="name">添加图片</view>
</view>
</u-upload>
</view>
<view class="cell">
<up--image
:src="videoImg"
class="headImg"
<u-upload
:fileList="videoList"
@afterRead="afterRead"
accept="video"
name="videoupload"
multiple
maxDuration="3600"
:maxCount="1"
width="32rpx"
height="32rpx"
></up--image>
<view class="name">添加视频</view>
>
<view class="cell">
<up--image
:src="videoImg"
class="headImg"
width="32rpx"
height="32rpx"
></up--image>
<view class="name">添加视频</view>
</view>
</u-upload>
</view>
<view class="cell">
<up--image
@ -143,6 +170,51 @@
<view class="name">添加小标题</view>
</view>
</view>
<view class="imgbox">
<view class="imgunit">
<up--image
src="https://cdn.uviewui.com/uview/album/1.jpg"
radius="6"
width="150rpx"
height="150rpx"
@click="previewImg"
></up--image>
<view class="close">
<up-icon name="close-circle" color="#666" size="18"></up-icon>
</view>
</view>
</view>
<view class="imgbox">
<view class="close">
<up-icon name="close-circle" color="red" size="30"></up-icon>
</view>
<video
class="myVideo"
src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"
@error="videoErrorCallback"
controls
></video>
</view>
<view class="textcell" v-if="showMinTitle">
<view class="titlebox">
<view class="title">小标题</view>
<up-icon name="trash" color="#3CC7C0" size="24" @click="delTitle"></up-icon>
</view>
<view class="iptbox">
<up--textarea
maxlength="-1"
autoHeight
v-model="form.title"
placeholder="请输入小标题"
></up--textarea>
</view>
</view>
<!-- <view class="imgbox">
<view class="imgcell">
<up--image src="https://cdn.uviewui.com/uview/album/1.jpg" mode="widthFix"></up--image>
</view>
</view> -->
</view>
</view>
<view class="bottom">
@ -161,9 +233,6 @@
<view class="right">发布</view>
</view>
<up-popup
:round="10"
:show="showVote"
@ -186,87 +255,95 @@
placeholder="请输入投票标题"
border="surround"
v-model="value"
clearable
clearable
></up-input>
</view>
<view class="row">
<view class="row">
<up-input
placeholder="输入选项建议少于16个字"
border="surround"
v-model="value"
clearable
clearable
></up-input>
</view>
<view class="row">
<view class="row">
<up-input
placeholder="输入选项建议少于16个字"
border="surround"
v-model="value"
clearable
clearable
></up-input>
</view>
<view class="row">
<view class="row">
<up-input
placeholder="输入选项建议少于16个字"
border="surround"
v-model="value"
clearable
clearable
></up-input>
</view>
<view class="add">
<up-icon name="plus" color="#4B5563" size="18"></up-icon>
<view class="desc">添加选项</view>
</view>
<view class="expire">
<view class="name">有效期</view>
<view class="right">
<view class="minus">-</view>
<view class="day">7</view>
<view class="plus">+</view>
</view>
</view>
<view class="tips">友情提醒为保证投票结果准确性帖子发布后投票无法修改</view>
<view class="add">
<up-icon name="plus" color="#4B5563" size="18"></up-icon>
<view class="desc">添加选项</view>
</view>
<view class="expire">
<view class="name">有效期</view>
<view class="right">
<view class="minus">-</view>
<view class="day">7</view>
<view class="plus">+</view>
</view>
</view>
<view class="tips"
>友情提醒为保证投票结果准确性帖子发布后投票无法修改</view
>
</view>
<view class="confirm">确认</view>
<view class="del">删除投票</view>
<view class="confirm">确认</view>
<view class="del">删除投票</view>
</view>
</up-popup>
<up-popup
:round="10"
zIndex="999999"
:show="showDraft"
mode="bottom"
@close="closeDraft"
@open="openDraft"
<up-popup
:round="10"
zIndex="999999"
:show="showDraft"
mode="bottom"
@close="closeDraft"
@open="openDraft"
>
<view class="draftpop">
<view class="titlebox">草稿箱
<view class="close" @click="closeDraft"><up-icon name="close" color="#4B5563" size="20"></up-icon></view>
</view>
<view class="draftlist">
<view class="cell">
<view class="title">2025: 肝硬化门静脉高压症食管胃底静脉曲张破裂出血诊治专家共识</view>
<view class="smalltitle">版2025 APASL临床实践指南</view>
<view class="deal">
<view class="time">编辑于03-11</view>
<view class="right">
<view class="del"><up-icon name="trash" color="#4B5563" size="16"></up-icon>删除</view>
<view class="edit"><up-icon name="edit-pen" color="#fff" size="17"></up-icon>编辑</view>
</view>
</view>
</view>
</view>
</view>
</up-popup>
<view class="draftpop">
<view class="titlebox"
>草稿箱
<view class="close" @click="closeDraft"
><up-icon name="close" color="#4B5563" size="20"></up-icon
></view>
</view>
<view class="draftlist">
<view class="cell">
<view class="title"
>2025:
肝硬化门静脉高压症食管胃底静脉曲张破裂出血诊治专家共识</view
>
<view class="smalltitle">版2025 APASL临床实践指南</view>
<view class="deal">
<view class="time">编辑于03-11</view>
<view class="right">
<view class="del"
><up-icon name="trash" color="#4B5563" size="16"></up-icon
>删除</view
>
<view class="edit"
><up-icon name="edit-pen" color="#fff" size="17"></up-icon
>编辑</view
>
</view>
</view>
</view>
</view>
</view>
</up-popup>
</div>
</template>
<script setup>
@ -283,6 +360,7 @@ const value = ref("");
const showVote = ref(false);
const showDraft = ref(true);
const showMinTitle = ref(false);
const closeVote = () => {
showVote.value = false;
};
@ -292,186 +370,218 @@ const openVote = () => {
const closeDraft = () => {
showDraft.value = false;
};
const delTitle = () => {
showMinTitle.value = false;
};
const openDraft = () => {
showDraft.value = true;
};
const afterRead=(file) => {
}
const previewImg = () => {
uni.previewImage({
current: "https://example.com/image1.jpg",
urls: ["https://example.com/image1.jpg", "https://example.com/image2.jpg"],
});
};
</script>
<style lang='scss' scoped>
.draftpop{
.titlebox{
text-align: center;
padding: 30rpx;
font-size: 31rpx;
color: #111827;
position: relative;
.close{
position: absolute;
top:20rpx;
right:30rpx;
}
}
.draftlist{
height:calc(100vh - 500rpx);
overflow-y: scroll;
.cell{
padding-bottom: 34rpx;
border-bottom:2rpx solid #E5E7EB;
.title{
margin:15rpx 30rpx 0;
font-size: 36rpx;
color: #111827;
line-height: 46rpx;
}
.smalltitle{
margin:4px 30rpx 0;
font-size: 30rpx;
color: #666666;
line-height: 38rpx;
}
.deal{
margin:36rpx 30rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
.time{
font-size: 26rpx;
color: #9CA3AF;
}
.right{
display: flex;
align-items: center;
}
.del{
width: 138rpx;
height: 62rpx;
background: #F3F4F6;
display: flex;
border-radius: 20rpx;
align-items: center;
font-size: 27rpx;
color: #4B5563;
justify-content: center;
}
.edit{
margin-left: 23rpx;
display: flex;
align-items: center;
justify-content: center;
width: 192rpx;
height: 62rpx;
font-size: 27rpx;
color: #FFFFFF;
background: #3CC7C0;
border-radius: 20rpx;
}
}
}
.myVideo {
width: 100%;
border-radius: 15rpx;
}
.imgbox {
margin: 0 30rpx 30rpx;
position: relative;
.close {
position: absolute;
top: 0rpx;
right: 0;
z-index: 9999;
}
.imgunit {
width: 150rpx;
height: 150rpx;
position: relative;
.close {
position: absolute;
top: 0rpx;
right: 0;
}
}
}
.expire{
margin-top: 46rpx;
padding: 0 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
.name{
font-size: 31rpx;
color: #111827;
}
.right{
display: flex;
align-items: center;
.day{
min-width:50rpx;
text-align: center;
}
.minus{
width: 62rpx;
height: 62rpx;
display: flex;
align-items: center;
justify-content: center;
background: #F5F5F5;
border-radius: 50%;
font-size: 50rpx;
}
.plus{
display: flex;
align-items: center;
font-size:50rpx;
justify-content: center;
width: 62rpx;
height: 62rpx;
background: #F5F5F5;
border-radius: 50%;
}
}
.draftpop {
.titlebox {
text-align: center;
padding: 30rpx;
font-size: 31rpx;
color: #111827;
position: relative;
.close {
position: absolute;
top: 20rpx;
right: 30rpx;
}
}
.draftlist {
height: calc(100vh - 500rpx);
overflow-y: scroll;
.cell {
padding-bottom: 34rpx;
border-bottom: 2rpx solid #e5e7eb;
.title {
margin: 15rpx 30rpx 0;
font-size: 36rpx;
color: #111827;
line-height: 46rpx;
}
.smalltitle {
margin: 4px 30rpx 0;
font-size: 30rpx;
color: #666666;
line-height: 38rpx;
}
.deal {
margin: 36rpx 30rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
.time {
font-size: 26rpx;
color: #9ca3af;
}
.right {
display: flex;
align-items: center;
}
.del {
width: 138rpx;
height: 62rpx;
background: #f3f4f6;
display: flex;
border-radius: 20rpx;
align-items: center;
font-size: 27rpx;
color: #4b5563;
justify-content: center;
}
.edit {
margin-left: 23rpx;
display: flex;
align-items: center;
justify-content: center;
width: 192rpx;
height: 62rpx;
font-size: 27rpx;
color: #ffffff;
background: #3cc7c0;
border-radius: 20rpx;
}
}
}
}
}
.row{
padding: 0 30rpx;
margin-bottom: 23rpx;
.expire {
margin-top: 46rpx;
padding: 0 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
.name {
font-size: 31rpx;
color: #111827;
}
.right {
display: flex;
align-items: center;
.day {
min-width: 50rpx;
text-align: center;
}
.minus {
width: 62rpx;
height: 62rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f5f5f5;
border-radius: 50%;
font-size: 50rpx;
}
.plus {
display: flex;
align-items: center;
font-size: 50rpx;
justify-content: center;
width: 62rpx;
height: 62rpx;
background: #f5f5f5;
border-radius: 50%;
}
}
}
.row {
padding: 0 30rpx;
margin-bottom: 23rpx;
:deep(.u-input){
background: #F5F5F5;
}
:deep(.u-input--radius){
border-radius: 15rpx;
}
:deep(.u-input__content__field-wrapper__field){
height:92rpx;
}
:deep(.u-input) {
background: #f5f5f5;
}
:deep(.u-input--radius) {
border-radius: 15rpx;
}
:deep(.u-input__content__field-wrapper__field) {
height: 92rpx;
}
}
.first{
margin-bottom: 47rpx;
.first {
margin-bottom: 47rpx;
}
.votepop {
.confirm{
margin:39rpx 30rpx 0;
height: 92rpx;
background: #3CC7C0;
border-radius: 15rpx;
display: flex;
align-items: center;
font-size: 31rpx;
color: #FFFFFF;
justify-content: center;
}
.del{
margin:30rpx 30rpx 30rpx;
height: 92rpx;
background: #fff;
border-radius: 15rpx;
font-size: 31rpx;
color: #666666;
display: flex;
align-items: center;
justify-content: center;
}
.tips{
margin-top: 30rpx;
font-size: 27rpx;
color: #9CA3AF;
line-height: 38rpx;
padding:0 30rpx;
}
.add{
margin:0 30rpx;
display: flex;
align-items: center;
height: 92rpx;
justify-content: center;
background: #F5F5F5;
border-radius: 15rpx;
font-size: 31rpx;
color: #4B5563;
.desc{
margin-left: 10rpx;
}
}
.confirm {
margin: 39rpx 30rpx 0;
height: 92rpx;
background: #3cc7c0;
border-radius: 15rpx;
display: flex;
align-items: center;
font-size: 31rpx;
color: #ffffff;
justify-content: center;
}
.del {
margin: 30rpx 30rpx 30rpx;
height: 92rpx;
background: #fff;
border-radius: 15rpx;
font-size: 31rpx;
color: #666666;
display: flex;
align-items: center;
justify-content: center;
}
.tips {
margin-top: 30rpx;
font-size: 27rpx;
color: #9ca3af;
line-height: 38rpx;
padding: 0 30rpx;
}
.add {
margin: 0 30rpx;
display: flex;
align-items: center;
height: 92rpx;
justify-content: center;
background: #f5f5f5;
border-radius: 15rpx;
font-size: 31rpx;
color: #4b5563;
.desc {
margin-left: 10rpx;
}
}
.titlebox {
padding: 0 30rpx;
height: 86rpx;
@ -489,8 +599,8 @@ const openDraft = () => {
}
}
.votecon {
max-height:calc(100vh - 530rpx);
overflow-y: scroll;
max-height: calc(100vh - 530rpx);
overflow-y: scroll;
.titlebox {
border: none;
margin: 30rpx 0 20rpx;
@ -626,6 +736,11 @@ const openDraft = () => {
.textcell {
padding: 0 30rpx;
margin-top: 25rpx;
.titlebox {
display: flex;
align-items: center;
justify-content: space-between;
}
}
.row {

View File

@ -9,7 +9,7 @@
@query="queryList"
>
<template #top>
<navBar :searchWord="keyWord" :navName="navName"></navBar>
<navBarSearch :searchWord="keyWord" :navName="navName"></navBarSearch>
<view class="databox" v-if="hospital_id || doctor_id">
<view class="cell">
<view class="num">{{ numInfo.article_collect_num }}</view>
@ -76,7 +76,7 @@
<script setup>
import { ref, reactive } from "vue";
import navBar from "@/components/navBar/navBar.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";
@ -179,7 +179,7 @@ const searchArticle =(params) => {
...searchForm,
...params
}).then((res)=>{
paging.value.complete(res.data.data.data);
paging.value.complete(res.data.data.data);
total.value=res.data.data.total;
}).catch(err=>{
paging.value.complete(false);

View File

@ -9,7 +9,7 @@
@query="queryList"
>
<template #top>
<navBarSearch :searchWord="keyWord" :navName="navName" :type="type"></navBarSearch>
<navBarSearch :searchWord="keyWord" :navName="navName" :type="type" @changeWord="changeWord"></navBarSearch>
<!-- <view class="databox">
<view class="cell">
<view class="num">22</view>
@ -73,7 +73,7 @@
</template>
<script setup>
import { ref, reactive } from "vue";
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";
@ -109,8 +109,14 @@ const order=reactive({
onLoad((options) => {
if(options.type=='hospital'){
type.value ='hospital';
navName.value='医院临床病例库'
};
}
keyWord.value=options.name;
if(options.name){
navName.value=options.name+'临床病例库'
}
if((options.name='医生' || options.name=='医院') && !options.id){
keyWord.value='';
}
if(options.order=='new'){
order.push_date='asc'
};
@ -125,7 +131,7 @@ const formatdate=(date)=>{
return dayjs(date).format('YYYY-MM-DD')
}
const swicthType=()=>{
isArticle.value=!isArticle.value;
isArticle.value=!isArticle.value;
dataList.value=[];
order.read_num='';
order.push_date='';
@ -180,7 +186,7 @@ const searchVideo = async(params) => {
const searchHospital = async(params) => {
let searchForm={
keyword: keyWord.value,
hospital_name: keyWord.value,
}
if(!order.read_num){
delete order.read_num
@ -192,6 +198,7 @@ const searchHospital = async(params) => {
searchForm.order=order
}
api.searchHospital({
...searchForm,
...params
}).then((res)=>{
paging.value.complete(res.data.data.data);
@ -202,7 +209,7 @@ const searchHospital = async(params) => {
}
const searchDoctor = async(params) => {
let searchForm={
keyword: keyWord.value,
doctor_name: keyWord.value,
}
if(!order.read_num){
delete order.read_num
@ -214,6 +221,7 @@ const searchDoctor = async(params) => {
searchForm.order=order
}
api.searchDoctor({
...searchForm,
...params
}).then((res)=>{
paging.value.complete(res.data.data.data);
@ -234,6 +242,18 @@ const goDetail=(id)=>{
url: `/pages/detail/detail?id=${id}&type=${type.value}`,
});
}
const changeWord=(value)=>{
console.log(value);
if(value){
navName.value=value+'临床病例库';
keyWord.value=value;
dataList.value=[];
order.read_num='';
order.push_date='';
paging.value.reload();
}
}
</script>
<style lang="scss" scoped>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/collectOn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

BIN
static/comment_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB