6.13
This commit is contained in:
+425
-34
@@ -9,8 +9,8 @@
|
||||
@query="queryList"
|
||||
>
|
||||
<template #top>
|
||||
<navBarSearch :searchWord="keyWord" :navName="navName"></navBarSearch>
|
||||
<view class="databox" v-if="hospital_id || doctor_id">
|
||||
<navBarSearch :searchWord="keyWord" :navName="navName" @changeWord="changeWord"></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="name">文章</view>
|
||||
@@ -24,13 +24,15 @@
|
||||
<view class="name">阅读量</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="detail" v-if="total>0 && !(hospital_id || doctor_id)">
|
||||
<view class="desc" v-if="isArticle">检索到:<text class="red">{{total}}篇文章</text></view>
|
||||
<view class="desc" v-else>检索到:<text class="red">{{total}}个视频</text></view>
|
||||
<view class="bar"></view>
|
||||
<view class="detail" v-if="isSearch">
|
||||
<view class="desc" >检索到:<text class="red">{{searchInfo.search_article_num}}篇文章</text></view>
|
||||
<view class="desc" >检索到:<text class="red">{{searchInfo.search_video_num}}个视频</text></view>
|
||||
<view class="desc" v-if="keyWord">检索词:<text class="red">{{ keyWord }}</text></view>
|
||||
</view>
|
||||
<view class="filterbox">
|
||||
<view class="filterbox" :class="{active:canOpenCase}">
|
||||
<view class="type" @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>
|
||||
<up-dropdown class="u-dropdown" ref="uDropdownRef">
|
||||
<up-dropdown-item
|
||||
v-model="order.push_date"
|
||||
@@ -72,6 +74,84 @@
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
<up-popup
|
||||
:round="10"
|
||||
zIndex="9"
|
||||
:show="showCase"
|
||||
mode="bottom"
|
||||
@close="closeCase"
|
||||
>
|
||||
<view class="votepop casepop">
|
||||
<view class="titlebox">
|
||||
<view class="left" @click="showCase = false">取消</view>
|
||||
<view class="left continue" @click="continueCase" v-show="level != 3"
|
||||
>继续选择</view
|
||||
>
|
||||
<view class="right" @click="confirmCase">确定</view>
|
||||
</view>
|
||||
<view class="casecon">
|
||||
<view v-show="level == 1" >
|
||||
<up-radio-group
|
||||
v-model="caseValue1"
|
||||
|
||||
iconPlacement="right"
|
||||
placement="column"
|
||||
>
|
||||
<view
|
||||
class="column"
|
||||
v-for="item in labelObj.list1"
|
||||
:key="item.app_iden"
|
||||
>
|
||||
<up-radio
|
||||
activeColor="#3CC7C0 "
|
||||
:label="item.label_name"
|
||||
:name="item.app_iden"
|
||||
></up-radio>
|
||||
</view>
|
||||
</up-radio-group>
|
||||
</view>
|
||||
<view v-show="level == 2" >
|
||||
<up-radio-group
|
||||
v-model="caseValue2"
|
||||
iconPlacement="right"
|
||||
placement="column"
|
||||
>
|
||||
<view
|
||||
class="column"
|
||||
v-for="item in labelObj.list2"
|
||||
:key="item.app_iden"
|
||||
>
|
||||
<up-radio
|
||||
activeColor="#3CC7C0 "
|
||||
:label="item.label_name"
|
||||
:name="item.app_iden"
|
||||
></up-radio>
|
||||
</view>
|
||||
</up-radio-group>
|
||||
</view>
|
||||
<view v-show="level == 3" >
|
||||
<up-radio-group
|
||||
v-model="caseValue3"
|
||||
|
||||
iconPlacement="right"
|
||||
placement="column"
|
||||
>
|
||||
<view
|
||||
class="column"
|
||||
v-for="item in labelObj.list2"
|
||||
:key="item.app_iden"
|
||||
>
|
||||
<up-radio
|
||||
activeColor="#3CC7C0 "
|
||||
:label="item.label_name"
|
||||
:name="item.app_iden"
|
||||
></up-radio>
|
||||
</view>
|
||||
</up-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-popup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -82,19 +162,20 @@ import api from "@/api/api";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import dayjs from "dayjs";
|
||||
import switchImg from "@/static/switch.png";
|
||||
import caseImg from "@/static/caseIcon.png";
|
||||
const paging = ref(null);
|
||||
const uDropdownRef=ref(null);
|
||||
const dataList = ref([]);
|
||||
const total = ref(0);
|
||||
const value = ref("");
|
||||
const keyWord = ref("");
|
||||
const page=ref(1);
|
||||
const label_iden = ref("");
|
||||
const isArticle=ref(true);
|
||||
const hospital_id=ref('');
|
||||
const hospital_name=ref('');
|
||||
const doctor_id=ref('');
|
||||
const doctor_name=ref('');
|
||||
const numInfo=reactive({});
|
||||
const searchInfo=reactive({})
|
||||
const navName=ref('肝胆相照临床病例库')
|
||||
const options= ref([
|
||||
{
|
||||
@@ -106,12 +187,96 @@ const options= ref([
|
||||
value: 'desc',
|
||||
},
|
||||
]);
|
||||
|
||||
const isSearch=ref(false);
|
||||
const order=reactive({
|
||||
read_num:'',
|
||||
push_date:''
|
||||
})
|
||||
const showCase = ref(false);
|
||||
const canOpenCase = ref(false);
|
||||
const caseValue1 = ref("");
|
||||
const caseValue2 = ref("");
|
||||
const caseValue3 = ref("");
|
||||
const level = ref(1);
|
||||
const labelObj = reactive({
|
||||
list1: [],
|
||||
list2: [],
|
||||
list3: [],
|
||||
});
|
||||
const getCaseLabel = (lev,pid=0) => {
|
||||
api.getCaseLabel({
|
||||
pid:pid
|
||||
}).then((res) => {
|
||||
if (lev == 1) {
|
||||
labelObj.list1 = res.data.data;
|
||||
} else if (lev == 2) {
|
||||
labelObj.list2 = res.data.data;
|
||||
} else if (lev == 3) {
|
||||
labelObj.list3 = res.data.data;
|
||||
}
|
||||
level.value = lev;
|
||||
});
|
||||
};
|
||||
const openCase=()=>{
|
||||
getCaseLabel(1,0)
|
||||
showCase.value = true;
|
||||
|
||||
}
|
||||
const confirmCase = () => {
|
||||
if (level.value == 1 && caseValue1.value == "") {
|
||||
uni.showToast({ title: "请选择疾病", icon: "none" });
|
||||
return false;
|
||||
}
|
||||
if (level.value == 2 && caseValue2.value == "") {
|
||||
uni.showToast({ title: "请选择疾病", icon: "none" });
|
||||
return false;
|
||||
}
|
||||
if (level.value == 3 && caseValue3.value == "") {
|
||||
uni.showToast({ title: "请选择疾病", icon: "none" });
|
||||
return false;
|
||||
}
|
||||
showCase.value = false;
|
||||
if(level.value == 1){
|
||||
label_iden.value = caseValue1.value
|
||||
}
|
||||
if(level.value == 2 ){
|
||||
label_iden.value = caseValue2.value
|
||||
}
|
||||
if(level.value == 3 ){
|
||||
label_iden.value = caseValue3.value
|
||||
}
|
||||
|
||||
};
|
||||
const continueCase = () => {
|
||||
if (level.value == 1 && caseValue1.value == "") {
|
||||
uni.showToast({ title: "请选择疾病", icon: "none" });
|
||||
return false;
|
||||
}
|
||||
|
||||
if (level.value == 2 && caseValue2.value == "") {
|
||||
uni.showToast({ title: "请选择疾病", icon: "none" });
|
||||
return false;
|
||||
}
|
||||
if (level.value == 3 && caseValue3.value == "") {
|
||||
uni.showToast({ title: "请选择疾病", icon: "none" });
|
||||
return false;
|
||||
}
|
||||
if(level.value == 1 ){
|
||||
getCaseLabel(2,caseValue1.value);
|
||||
}else if(level.value == 2 ){
|
||||
getCaseLabel(3,caseValue2.value);
|
||||
}
|
||||
paging.value.reload();
|
||||
};
|
||||
const closeCase = () => {
|
||||
showCase.value = false;
|
||||
};
|
||||
const changeWord=(value)=>{
|
||||
keyWord.value=value;
|
||||
isSearch.value=true;
|
||||
paging.value.reload()
|
||||
|
||||
}
|
||||
onLoad((options) => {
|
||||
if(options.keyWord){
|
||||
keyWord.value = options.keyWord;
|
||||
@@ -135,9 +300,16 @@ onLoad((options) => {
|
||||
hospital_id.value=options.hospital_id;
|
||||
hospital_name.value=options.hospital_name;
|
||||
navName.value= hospital_name.value+'临床病例库'
|
||||
getStaticDoctor(hospital_id.value)
|
||||
getStaticHospital(hospital_id.value)
|
||||
|
||||
}
|
||||
if(options.case_id){
|
||||
label_iden.value=options.case_id;
|
||||
navName.value= options.case_name+'临床病例库'
|
||||
getStaticSick(label_iden.value)
|
||||
}else{
|
||||
canOpenCase.value = true;
|
||||
}
|
||||
});
|
||||
const change=(e)=>{
|
||||
paging.value.reload();
|
||||
@@ -163,8 +335,11 @@ const swicthType=()=>{
|
||||
const searchArticle =(params) => {
|
||||
let searchForm={
|
||||
keyword: keyWord.value,
|
||||
doctor_id:doctor_id.value,
|
||||
hospital_id:hospital_id.value
|
||||
hospital_id:hospital_id.value,
|
||||
doctor_id:doctor_id.value
|
||||
}
|
||||
if(isSearch.value){
|
||||
searchForm.is_need_num=1;
|
||||
}
|
||||
if(!order.read_num){
|
||||
delete order.read_num
|
||||
@@ -181,6 +356,8 @@ const searchArticle =(params) => {
|
||||
}).then((res)=>{
|
||||
paging.value.complete(res.data.data.data);
|
||||
total.value=res.data.data.total;
|
||||
searchInfo.search_video_num=res.data.data.search_video_num;
|
||||
searchInfo.search_article_num=res.data.data.search_article_num;
|
||||
}).catch(err=>{
|
||||
paging.value.complete(false);
|
||||
})
|
||||
@@ -189,6 +366,11 @@ const searchArticle =(params) => {
|
||||
const searchVideo = async(params) => {
|
||||
let searchForm={
|
||||
keyword: keyWord.value,
|
||||
hospital_id:hospital_id.value,
|
||||
doctor_id:doctor_id.value
|
||||
}
|
||||
if(isSearch.value){
|
||||
searchForm.is_need_num=1;
|
||||
}
|
||||
if(!order.read_num){
|
||||
delete order.read_num
|
||||
@@ -200,10 +382,13 @@ const searchVideo = async(params) => {
|
||||
searchForm.order=order
|
||||
}
|
||||
api.searchVideo({
|
||||
...searchForm,
|
||||
...params
|
||||
}).then((res)=>{
|
||||
paging.value.complete(res.data.data.data);
|
||||
total.value=res.data.data.total;
|
||||
searchInfo.search_video_num=res.data.data.search_video_num;
|
||||
searchInfo.search_article_num=res.data.data.search_article_num;
|
||||
}).catch(err=>{
|
||||
paging.value.complete(false);
|
||||
})
|
||||
@@ -224,6 +409,25 @@ const getStaticDoctor=(id)=>{
|
||||
}
|
||||
})
|
||||
}
|
||||
const getStaticSick=(id)=>{
|
||||
api.getStaticSick({
|
||||
label_iden:id
|
||||
}).then((res)=>{
|
||||
let result=res.data.data;
|
||||
if(result){
|
||||
Object.assign(numInfo,result);
|
||||
}else{
|
||||
Object.assign(numInfo,{
|
||||
article_num: 0,
|
||||
article_read_num: 0,
|
||||
video_collect_num: 0,
|
||||
video_num: 0,
|
||||
video_read_num: 0,
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getStaticHospital=(id)=>{
|
||||
api.getStaticHospital(id).then((res)=>{
|
||||
let result=res.data.data;
|
||||
@@ -253,6 +457,114 @@ const queryList = (pageNo, pageSize) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bar {
|
||||
width: 100%;
|
||||
background: #f9fafb;
|
||||
height: 20rpx;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
}
|
||||
.titlebox {
|
||||
padding: 0 30rpx;
|
||||
height: 86rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2rpx solid #f3f4f6;
|
||||
.left {
|
||||
font-size: 31rpx;
|
||||
color: #4b5563;
|
||||
}
|
||||
.right {
|
||||
font-size: 31rpx;
|
||||
color: #3cc7c0;
|
||||
}
|
||||
}
|
||||
.votecon {
|
||||
max-height: calc(100vh - 530rpx);
|
||||
overflow-y: scroll;
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.iconbox {
|
||||
margin-left: 15rpx;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.titlebox {
|
||||
border: none;
|
||||
margin: 30rpx 0 20rpx;
|
||||
.title {
|
||||
font-size: 31rpx;
|
||||
color: #111827;
|
||||
}
|
||||
.desc {
|
||||
font-size: 27rpx;
|
||||
color: #9ca3af;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.casepop{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: calc(100vh - 400rpx);
|
||||
.continue{
|
||||
color: #2878ff !important;
|
||||
}
|
||||
}
|
||||
.casecon {
|
||||
flex:1;
|
||||
overflow-y: scroll;
|
||||
padding-top: 10rpx;
|
||||
min-height: 350rpx;
|
||||
.column {
|
||||
padding: 0 30rpx;
|
||||
border-bottom: 2rpx solid #e5e7eb;
|
||||
}
|
||||
}
|
||||
.databox {
|
||||
height: 162rpx;
|
||||
background: #ffffff;
|
||||
@@ -278,37 +590,20 @@ const queryList = (pageNo, pageSize) => {
|
||||
}
|
||||
}
|
||||
.filterbox{
|
||||
display: flex;
|
||||
height:128rpx;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
.type{
|
||||
position: absolute;
|
||||
left:30rpx;
|
||||
top:24rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #F3F4F6;
|
||||
border-radius: 15rpx;
|
||||
height: 74rpx;
|
||||
padding:0 25rpx;
|
||||
z-index:2;
|
||||
}
|
||||
}
|
||||
.u-page {
|
||||
:deep(.u-flex) {
|
||||
:deep(.u-flex) {
|
||||
display: flex;
|
||||
flex-direction:row;
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
:deep(.u-dropdown__menu){
|
||||
|
||||
background: #fff;
|
||||
z-index:1;
|
||||
margin-left: 180rpx;
|
||||
margin-left: 160rpx;
|
||||
|
||||
}
|
||||
:deep(.u-dropdown__menu__item__text){
|
||||
font-size: 14px!important;
|
||||
}
|
||||
:deep(.u-dropdown__menu__item){
|
||||
|
||||
@@ -320,6 +615,102 @@ const queryList = (pageNo, pageSize) => {
|
||||
margin-left: 60rpx;
|
||||
|
||||
}
|
||||
display: flex;
|
||||
height:128rpx;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
.type{
|
||||
position: absolute;
|
||||
left:30rpx;
|
||||
top:24rpx;
|
||||
color: #606266;
|
||||
font-size:14px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #F3F4F6;
|
||||
border-radius: 15rpx;
|
||||
height: 74rpx;
|
||||
padding:0 25rpx;
|
||||
z-index:2;
|
||||
}
|
||||
.casesdown{
|
||||
font-size:14px;
|
||||
color: #606266;
|
||||
position: absolute;
|
||||
left:190rpx;
|
||||
top:24rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #F3F4F6;
|
||||
border-radius: 15rpx;
|
||||
height: 74rpx;
|
||||
padding:0 25rpx;
|
||||
z-index:2;
|
||||
}
|
||||
}
|
||||
.filterbox.active{
|
||||
:deep(.u-flex) {
|
||||
display: flex;
|
||||
flex-direction:row;
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
:deep(.u-dropdown__menu){
|
||||
background: #fff;
|
||||
z-index:1;
|
||||
margin-left: 330rpx;
|
||||
|
||||
}
|
||||
:deep(.u-dropdown__menu__item__text){
|
||||
font-size: 14px!important;
|
||||
}
|
||||
:deep(.u-dropdown__menu__item){
|
||||
height:74rpx;
|
||||
padding:0 20rpx;
|
||||
background: #F3F4F6;
|
||||
border-radius: 15rpx;
|
||||
flex:none;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
display: flex;
|
||||
height:128rpx;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
.type{
|
||||
position: absolute;
|
||||
left:30rpx;
|
||||
top:24rpx;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #F3F4F6;
|
||||
border-radius: 15rpx;
|
||||
height: 74rpx;
|
||||
padding:0 25rpx;
|
||||
z-index:2;
|
||||
}
|
||||
.casesdown{
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
position: absolute;
|
||||
left:190rpx;
|
||||
top:24rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #F3F4F6;
|
||||
border-radius: 15rpx;
|
||||
height: 74rpx;
|
||||
padding:0 25rpx;
|
||||
z-index:2;
|
||||
}
|
||||
}
|
||||
.u-page {
|
||||
|
||||
.deal {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user