7.21
This commit is contained in:
@@ -144,6 +144,9 @@
|
||||
</view>
|
||||
|
||||
<tabBar :value="2"></tabBar>
|
||||
<view class="publish" @click="goPublish">
|
||||
<up-icon name="plus" color="#fff" size="18"></up-icon>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -230,6 +233,11 @@ const hotList=()=>{
|
||||
}).then(res=>{
|
||||
})
|
||||
}
|
||||
const goPublish=()=>{
|
||||
navTo({
|
||||
url:'/pages/publish/publish'
|
||||
})
|
||||
}
|
||||
onShow(()=>{
|
||||
getStatic();
|
||||
goodList();
|
||||
@@ -238,6 +246,18 @@ onShow(()=>{
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.publish{
|
||||
width: 92rpx;
|
||||
height: 92rpx;
|
||||
background: #3CC7C0;
|
||||
border-radius: 50%;
|
||||
position: fixed;
|
||||
right:30rpx;
|
||||
bottom:180rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.upage {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -368,6 +388,7 @@ onShow(()=>{
|
||||
border-bottom: 2rpx solid #f3f4f6;
|
||||
|
||||
.circle {
|
||||
flex-shrink: 0;
|
||||
margin-top: 15rpx;
|
||||
width: 15rpx;
|
||||
height: 15rpx;
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
<up--image
|
||||
@click="toggleCollect"
|
||||
:src="info.is_collect ? collectonImg : collectImg"
|
||||
|
||||
width="38rpx"
|
||||
height="38rpx"
|
||||
></up--image>
|
||||
|
||||
+7
-23
@@ -71,7 +71,7 @@
|
||||
<view class="cell" v-for="item in new_articles" :key="item.article_id" @click="goDetail(item.article_id,item.is_link,item.is_link_url)">
|
||||
<view class="circle"></view>
|
||||
<view class="info">
|
||||
<view class="name">{{item.article_title }}</view>
|
||||
<view class="name ellipsis-two-lines">{{item.article_title }}</view>
|
||||
<view class="tagsbox">
|
||||
<view class="tag" v-for="tag in item.author" :key="tag.author_id">{{ tag.doctor_name }}</view>
|
||||
</view>
|
||||
@@ -90,9 +90,9 @@
|
||||
</view>
|
||||
<view class="listbox">
|
||||
<view class="cell" v-for="item in most_read_articles" :key="item.article_id" @click="goDetail(item.article_id,item.is_link,item.is_link_url)">
|
||||
<view class="circle"></view>
|
||||
<view class="circle "></view>
|
||||
<view class="info">
|
||||
<view class="name">{{item.article_title }}</view>
|
||||
<view class="name ellipsis-two-lines">{{item.article_title }}</view>
|
||||
<view class="tagsbox">
|
||||
<view class="tag" v-for="tag in item.author" :key="tag.author_id">{{ tag.doctor_name }}</view>
|
||||
</view>
|
||||
@@ -127,9 +127,7 @@
|
||||
</view>
|
||||
|
||||
<tabBar></tabBar>
|
||||
<view class="publish" @click="goPublish">
|
||||
<u-icon name="plus" color="#fff" size="18"></u-icon>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -223,11 +221,7 @@ const goHospital=()=>{
|
||||
url:'/pages/searchList/searchList?type=hospital&name=医院&id='
|
||||
})
|
||||
}
|
||||
const goPublish=()=>{
|
||||
navTo({
|
||||
url:'/pages/publish/publish'
|
||||
})
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
getStatic();
|
||||
getData();
|
||||
@@ -282,6 +276,7 @@ onShow(() => {
|
||||
margin-top: 18rpx;
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
flex-shrink: 0;
|
||||
background: #3cc7c0;
|
||||
border-radius: 50%;
|
||||
}
|
||||
@@ -365,16 +360,5 @@ 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>
|
||||
+1
-1
@@ -110,7 +110,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="publish" @click="goPublish">
|
||||
<u-icon name="plus" color="#fff" size="18"></u-icon>
|
||||
<up-icon name="plus" color="#fff" size="18"></up-icon>
|
||||
</view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
+241
-80
@@ -31,27 +31,49 @@
|
||||
<view class="desc" v-if="keyWord">检索词:<text class="red">{{ keyWord }}</text></view>
|
||||
</view>
|
||||
<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="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 class="u-dropdown" ref="uDropdownRef">
|
||||
<up-dropdown-item
|
||||
v-model="order.push_date"
|
||||
title="发布时间"
|
||||
@change="changeDate"
|
||||
:options="options"
|
||||
></up-dropdown-item>
|
||||
<up-dropdown-item
|
||||
|
||||
:title="dropTitle"
|
||||
|
||||
|
||||
>
|
||||
<view class="dropcontent">
|
||||
<up-radio-group
|
||||
@change="changeDate"
|
||||
v-model="orderFilter"
|
||||
iconPlacement="right"
|
||||
placement="column"
|
||||
>
|
||||
<view
|
||||
class="column"
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:class="[orderFilter==item.value?'active':'']"
|
||||
>
|
||||
<up-radio
|
||||
activeColor="#3CC7C0"
|
||||
:label="item.label"
|
||||
:name="item.value"
|
||||
></up-radio>
|
||||
</view>
|
||||
</up-radio-group>
|
||||
</view>
|
||||
</up-dropdown-item>
|
||||
<!-- <up-dropdown-item
|
||||
v-model="order.read_num"
|
||||
title="阅读量"
|
||||
@change="changeRead"
|
||||
:options="options"
|
||||
></up-dropdown-item>
|
||||
></up-dropdown-item> -->
|
||||
</up-dropdown>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<view class="item" v-for="(item, index) in dataList" :key="index" @click="isArticle?goDetail(item.article_id,item.is_link,item.is_link_url):goDetail(item.video_id,item.is_link,item.is_link_url)">
|
||||
<view class="title ellipsis">{{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>
|
||||
@@ -61,9 +83,9 @@
|
||||
<up-icon name="eye" color="#6B7280" size="28rpx"></up-icon>
|
||||
<view class="num">{{item.read_num }}</view>
|
||||
</view>
|
||||
<view class="collect">
|
||||
<view class="collect" v-if="item.collect_num>0">
|
||||
<up-icon name="heart" color="#6B7280" size="28rpx"></up-icon>
|
||||
<view class="num">{{item.collect_num }}</view>
|
||||
<view class="num" >{{item.collect_num }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="time">
|
||||
@@ -77,26 +99,54 @@
|
||||
<up-popup
|
||||
:round="10"
|
||||
zIndex="9"
|
||||
:closeOnClickOverlay="false"
|
||||
: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="left" @click="cancelCase">取消</view>
|
||||
|
||||
<view class="right" @click="confirmCase">确定</view>
|
||||
</view>
|
||||
|
||||
<view class="stepbox">
|
||||
<up-steps :current="level-1" direction="column" :key="freshKey">
|
||||
<up-steps-item >
|
||||
<template v-slot:content>
|
||||
<view class="slot-content" @click="openCaseLevel('1')">
|
||||
|
||||
<view class="left">{{!caseValue1.name?'请选择选项':caseValue1.name}}</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</template>
|
||||
</up-steps-item>
|
||||
<up-steps-item v-if="caseValue1.name && labelObj.list2.length>0">
|
||||
<template v-slot:content>
|
||||
<view class="slot-content" @click="openCaseLevel('2')">
|
||||
<view class="left">{{!caseValue2.name?'请选择选项':caseValue2.name}}</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</template>
|
||||
</up-steps-item>
|
||||
<up-steps-item v-if="caseValue2.name && labelObj.list3.length>0">
|
||||
<template v-slot:content>
|
||||
<view class="slot-content" @click="openCaseLevel('3')">
|
||||
<view class="left">{{!caseValue3.name?'请选择选项':caseValue3.name}}</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</template>
|
||||
</up-steps-item>
|
||||
</up-steps>
|
||||
</view>
|
||||
<scroll-view class="casecon" scroll-y="true">
|
||||
<view v-show="level == 1" >
|
||||
<up-radio-group
|
||||
v-model="caseValue1"
|
||||
|
||||
v-model="caseValue1.value"
|
||||
name="group1"
|
||||
iconPlacement="right"
|
||||
placement="column"
|
||||
@change="groupChange1"
|
||||
>
|
||||
<view
|
||||
class="column"
|
||||
@@ -113,7 +163,9 @@
|
||||
</view>
|
||||
<view v-show="level == 2" >
|
||||
<up-radio-group
|
||||
v-model="caseValue2"
|
||||
name="group2"
|
||||
@change="groupChange2"
|
||||
v-model="caseValue2.value"
|
||||
iconPlacement="right"
|
||||
placement="column"
|
||||
>
|
||||
@@ -132,8 +184,9 @@
|
||||
</view>
|
||||
<view v-show="level == 3" >
|
||||
<up-radio-group
|
||||
v-model="caseValue3"
|
||||
|
||||
name="group3"
|
||||
@change="groupChange3"
|
||||
v-model="caseValue3.value"
|
||||
iconPlacement="right"
|
||||
placement="column"
|
||||
>
|
||||
@@ -165,8 +218,7 @@ import dayjs from "dayjs";
|
||||
import switchImg from "@/static/switch.png";
|
||||
import caseImg from "@/static/caseIcon.png";
|
||||
import navTo from "@/utils/navTo.js";
|
||||
const paging = ref(null);
|
||||
const uDropdownRef=ref(null);
|
||||
|
||||
const dataList = ref([]);
|
||||
const total = ref(0);
|
||||
const keyWord = ref("");
|
||||
@@ -177,99 +229,165 @@ const hospital_name=ref('');
|
||||
const doctor_id=ref('');
|
||||
const doctor_name=ref('');
|
||||
const numInfo=reactive({});
|
||||
const searchInfo=reactive({})
|
||||
const searchInfo=reactive({});
|
||||
const freshKey=ref(0);
|
||||
const navName=ref('肝胆相照临床病例库')
|
||||
|
||||
const dropTitle=ref('发布时间');
|
||||
const orderFilter=ref('1')
|
||||
const paging = ref(null);
|
||||
const uDropdownRef=ref(null);
|
||||
const options= ref([
|
||||
{
|
||||
label: "正序",
|
||||
value: 'asc',
|
||||
label: "发布时间",
|
||||
value: '1',
|
||||
},
|
||||
{
|
||||
label: "倒序",
|
||||
value: 'desc',
|
||||
label: "阅读次数",
|
||||
value: '2',
|
||||
},
|
||||
]);
|
||||
const isSearch=ref(true);
|
||||
const order=reactive({
|
||||
read_num:'',
|
||||
push_date:''
|
||||
push_date:'desc'
|
||||
})
|
||||
const showCase = ref(false);
|
||||
const canOpenCase = ref(false);
|
||||
const caseValue1 = ref("");
|
||||
const caseValue2 = ref("");
|
||||
const caseValue3 = ref("");
|
||||
const caseValue1 = reactive({
|
||||
value:'',
|
||||
name:'',
|
||||
});
|
||||
const caseValue2 = reactive({
|
||||
value:'',
|
||||
name:'',
|
||||
});
|
||||
const caseValue3 = reactive({
|
||||
value:'',
|
||||
name:'',
|
||||
});
|
||||
const level = ref(1);
|
||||
const labelObj = reactive({
|
||||
list1: [],
|
||||
list2: [],
|
||||
list3: [],
|
||||
list3: []
|
||||
});
|
||||
const openCaseLevel=(lev)=>{
|
||||
freshKey.value++;
|
||||
level.value=lev;
|
||||
if(lev==1){
|
||||
caseValue2.name='';
|
||||
caseValue2.value='';
|
||||
labelObj.list2=[]
|
||||
}else if(lev==2){
|
||||
labelObj.list3=[];
|
||||
caseValue3.name='';
|
||||
caseValue3.value=''
|
||||
}
|
||||
};
|
||||
const groupChange1=(e)=>{
|
||||
caseValue1.value=e;
|
||||
for (var i = 0; i <labelObj.list1.length; i++) {
|
||||
if(labelObj.list1[i].app_iden==caseValue1.value){
|
||||
caseValue1.name=labelObj.list1[i].label_name;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
getCaseLabel(2,e)
|
||||
}
|
||||
const groupChange2=(e)=>{
|
||||
caseValue2.value=e;
|
||||
for (var i = 0; i <labelObj.list2.length; i++) {
|
||||
if(labelObj.list2[i].app_iden==caseValue2.value){
|
||||
caseValue2.name=labelObj.list2[i].label_name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
getCaseLabel(3,e)
|
||||
}
|
||||
const groupChange3=(e)=>{
|
||||
caseValue3.value=e;
|
||||
level.value =3
|
||||
for (var i = 0; i <labelObj.list3.length; i++) {
|
||||
if(labelObj.list3[i].app_iden==caseValue3.value){
|
||||
caseValue3.name=labelObj.list3[i].label_name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
const getCaseLabel = (lev,pid=0) => {
|
||||
api.getCaseLabel({
|
||||
pId:pid
|
||||
}).then((res) => {
|
||||
level.value = lev;
|
||||
if (lev == 1) {
|
||||
labelObj.list1 = res.data.data;
|
||||
labelObj.list1 = res.data.data;
|
||||
//label_iden.value = caseValue1.value;
|
||||
|
||||
} else if (lev == 2) {
|
||||
labelObj.list2 = res.data.data;
|
||||
if(res.data.data.length==0){
|
||||
level.value = 1
|
||||
}
|
||||
//label_iden.value = caseValue2.value;
|
||||
|
||||
} else if (lev == 3) {
|
||||
labelObj.list3 = res.data.data;
|
||||
}
|
||||
level.value = lev;
|
||||
if(res.data.data.length==0){
|
||||
level.value = 2
|
||||
}
|
||||
//label_iden.value = caseValue3.value;
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
const openCase=()=>{
|
||||
getCaseLabel(1,0)
|
||||
|
||||
showCase.value = true;
|
||||
|
||||
}
|
||||
const cancelCase=()=>{
|
||||
showCase.value=false;
|
||||
level.value=1;
|
||||
caseValue1.name='';
|
||||
caseValue1.value='';
|
||||
caseValue2.name='';
|
||||
caseValue2.value='';
|
||||
caseValue3.name='';
|
||||
caseValue3.value='';
|
||||
//labelObj.list1=[];
|
||||
labelObj.list2=[];
|
||||
labelObj.list3=[];
|
||||
}
|
||||
const confirmCase = () => {
|
||||
if (level.value == 1 && caseValue1.value == "") {
|
||||
uni.showToast({ title: "请选择疾病", icon: "none" });
|
||||
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
|
||||
}
|
||||
label_iden.value = caseValue1.value;
|
||||
}
|
||||
if(level.value == 2 ){
|
||||
label_iden.value = caseValue2.value
|
||||
if(!caseValue2.value){
|
||||
label_iden.value = caseValue1.value;
|
||||
}else{
|
||||
label_iden.value = caseValue2.value;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(level.value == 3 ){
|
||||
label_iden.value = caseValue3.value
|
||||
}
|
||||
paging.value.reload();
|
||||
|
||||
};
|
||||
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);
|
||||
if(!caseValue3.value){
|
||||
label_iden.value = caseValue2.value;
|
||||
}else{
|
||||
label_iden.value = caseValue3.value;
|
||||
}
|
||||
}
|
||||
paging.value.reload();
|
||||
showCase.value=false;
|
||||
//cancelCase();
|
||||
};
|
||||
const closeCase = () => {
|
||||
showCase.value = false;
|
||||
@@ -313,13 +431,23 @@ onLoad((options) => {
|
||||
}else{
|
||||
canOpenCase.value = true;
|
||||
}
|
||||
getCaseLabel(1,0)
|
||||
});
|
||||
onShow(()=>{
|
||||
paging.value?.refresh();
|
||||
})
|
||||
const changeDate=(e)=>{
|
||||
console.log(e);
|
||||
order.read_num='';
|
||||
if(e==1){
|
||||
order.push_date='desc';
|
||||
order.read_num='';
|
||||
dropTitle.value="发布时间"
|
||||
}else{
|
||||
order.push_date='';
|
||||
order.read_num="desc";
|
||||
dropTitle.value="阅读次数"
|
||||
}
|
||||
orderFilter.value=e;
|
||||
uDropdownRef.value.close();
|
||||
paging.value.reload();
|
||||
}
|
||||
const changeRead=(e)=>{
|
||||
@@ -489,10 +617,41 @@ const queryList = (pageNo, pageSize) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dropcontent{
|
||||
padding-top: 40rpx;
|
||||
padding-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
:deep(.u-radio){
|
||||
margin-bottom: 6px!important;
|
||||
margin-top: 16px!important;
|
||||
}
|
||||
.column {
|
||||
padding: 0 30rpx;
|
||||
border-top: 2rpx solid #e5e7eb;
|
||||
:deep(.u-radio__text){
|
||||
color: #333 !important;
|
||||
}
|
||||
}
|
||||
.column.active{
|
||||
:deep(.u-radio__text){
|
||||
color: #3CC7C0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.stepbox{
|
||||
padding:10rpx 30rpx;
|
||||
padding:15rpx 30rpx;
|
||||
border-bottom: 2rpx dotted #f3f4f6;
|
||||
|
||||
:deep(.u-steps-item__content){
|
||||
margin-top: -5rpx!important;
|
||||
}
|
||||
.slot-content{
|
||||
width:100%;
|
||||
margin-bottom: 25rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
.bar {
|
||||
width: 100%;
|
||||
@@ -592,7 +751,7 @@ const queryList = (pageNo, pageSize) => {
|
||||
color: #2878ff !important;
|
||||
}
|
||||
}
|
||||
.casecon {
|
||||
.casecon{
|
||||
flex:1;
|
||||
max-height: calc(100vh - 800rpx);
|
||||
overflow-y: scroll;
|
||||
@@ -608,6 +767,7 @@ const queryList = (pageNo, pageSize) => {
|
||||
border-bottom: 2rpx solid #e5e7eb;
|
||||
}
|
||||
}
|
||||
|
||||
.databox {
|
||||
height: 162rpx;
|
||||
background: #ffffff;
|
||||
@@ -647,6 +807,7 @@ const queryList = (pageNo, pageSize) => {
|
||||
}
|
||||
:deep(.u-dropdown__menu__item__text){
|
||||
font-size: 14px!important;
|
||||
color:rgb(60, 156, 255)!important;
|
||||
}
|
||||
:deep(.u-dropdown__menu__item){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user