11
This commit is contained in:
+15
-4
@@ -30,8 +30,8 @@
|
||||
<view class="desc" v-if="!hideType">检索到:<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" :class="{active:canOpenCase,'on':hideType}">
|
||||
<view class="type" v-if="!hideType" @click="swicthType">{{!isArticle?'视频':'文章'}}<up--image :src="switchImg" width="31rpx" height="31rpx"></up--image></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>
|
||||
<up-dropdown class="u-dropdown" ref="uDropdownRef">
|
||||
<up-dropdown-item
|
||||
@@ -237,6 +237,7 @@ const hideType=ref(false)
|
||||
const dropTitle=ref('发布时间');
|
||||
const orderFilter=ref('1')
|
||||
const uDropdownRef=ref(null);
|
||||
const isCase=ref(false);
|
||||
const options= ref([
|
||||
{
|
||||
label: "发布时间",
|
||||
@@ -434,7 +435,9 @@ onLoad((options) => {
|
||||
if(options.case_id){
|
||||
label_iden.value=options.case_id;
|
||||
navName.value= options.case_name+'临床病例库'
|
||||
getStaticSick(label_iden.value)
|
||||
getStaticSick(label_iden.value);
|
||||
//isCase.value=true;
|
||||
//console.log(111113)
|
||||
}else{
|
||||
canOpenCase.value = true;
|
||||
}
|
||||
@@ -809,7 +812,7 @@ const queryList = (pageNo, pageSize) => {
|
||||
:deep(.u-dropdown__menu){
|
||||
background: #fff;
|
||||
z-index:1;
|
||||
margin-left: 160rpx;
|
||||
margin-left: 150rpx;
|
||||
|
||||
}
|
||||
:deep(.u-dropdown__menu__item__text){
|
||||
@@ -931,6 +934,14 @@ const queryList = (pageNo, pageSize) => {
|
||||
|
||||
}
|
||||
}
|
||||
.filterbox.isCase{
|
||||
:deep(.u-dropdown__menu){
|
||||
background: #fff;
|
||||
z-index:1;
|
||||
margin-left: -30rpx;
|
||||
|
||||
}
|
||||
}
|
||||
.u-page {
|
||||
|
||||
.deal {
|
||||
|
||||
+138
-41
@@ -31,20 +31,43 @@
|
||||
</view> -->
|
||||
<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"
|
||||
:options="options"
|
||||
></up-dropdown-item>
|
||||
<!-- <up-dropdown-item
|
||||
v-model="order.read_num"
|
||||
title="阅读量"
|
||||
@change="change"
|
||||
:options="options"
|
||||
></up-dropdown-item> -->
|
||||
</up-dropdown>
|
||||
<up-dropdown class="u-dropdown" ref="uDropdownRef">
|
||||
<up-dropdown-item
|
||||
|
||||
:title="dropTitle"
|
||||
|
||||
|
||||
>
|
||||
<view class="dropcontent">
|
||||
<up-radio-group
|
||||
@change="change"
|
||||
v-model="orderFilter"
|
||||
iconPlacement="right"
|
||||
placement="column"
|
||||
>
|
||||
<view
|
||||
class="column"
|
||||
v-for="item in option"
|
||||
: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>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
@@ -91,25 +114,30 @@ const keyWord = ref("");
|
||||
const isArticle=ref(true)
|
||||
const type=ref('doctor')
|
||||
const navName=ref('医生临床病例库');
|
||||
const options= ref([
|
||||
const orderFilter=ref(1);
|
||||
const dropTitle=ref('更新时间')
|
||||
const option= ref([
|
||||
{
|
||||
label: "正序",
|
||||
value: 'asc',
|
||||
label: "更新时间",
|
||||
value: '1',
|
||||
},
|
||||
{
|
||||
label: "倒序",
|
||||
value: 'desc',
|
||||
label: "医生名称",
|
||||
value: '2',
|
||||
},
|
||||
{
|
||||
label: "病例数",
|
||||
value: '3',
|
||||
},
|
||||
]);
|
||||
|
||||
const order=reactive({
|
||||
read_num:'',
|
||||
push_date:''
|
||||
updated_at:'desc'
|
||||
})
|
||||
|
||||
onLoad((options) => {
|
||||
if(options.type=='hospital'){
|
||||
type.value ='hospital';
|
||||
(option.value)[1].label="医院名称"
|
||||
}
|
||||
keyWord.value=options.name;
|
||||
if(options.name){
|
||||
@@ -129,6 +157,39 @@ onShow(()=>{
|
||||
paging.value?.refresh();
|
||||
})
|
||||
const change=(e)=>{
|
||||
if(e==1){
|
||||
order.updated_at='desc';
|
||||
if(type.value ='hospital'){
|
||||
order.hospital_name='';
|
||||
}else{
|
||||
order.doctor_name='';
|
||||
|
||||
}
|
||||
order.article_num='';
|
||||
dropTitle.value="更新时间"
|
||||
}else if(e==2){
|
||||
order.updated_at='';
|
||||
order.article_num='';
|
||||
if(type.value ='hospital'){
|
||||
order.hospital_name='desc';
|
||||
dropTitle.value="医院名称"
|
||||
}else{
|
||||
order.doctor_name='asc';
|
||||
dropTitle.value="医生名称"
|
||||
}
|
||||
}else if(e==3){
|
||||
order.updated_at='';
|
||||
if(type.value ='hospital'){
|
||||
order.hospital_name='';
|
||||
}else{
|
||||
order.doctor_name='';
|
||||
|
||||
}
|
||||
order.article_num='desc';
|
||||
dropTitle.value="病例数"
|
||||
}
|
||||
orderFilter.value=e;
|
||||
uDropdownRef.value.close();
|
||||
paging.value.reload();
|
||||
}
|
||||
const formatdate=(date)=>{
|
||||
@@ -193,15 +254,18 @@ const searchHospital = async(params) => {
|
||||
let searchForm={
|
||||
hospital_name: keyWord.value,
|
||||
}
|
||||
if(!order.read_num){
|
||||
delete order.read_num
|
||||
if(!order.updated_at){
|
||||
delete order.updated_at
|
||||
}
|
||||
if(!order.push_date){
|
||||
delete order.push_date
|
||||
if(!order.article_num){
|
||||
delete order.article_num
|
||||
}
|
||||
if(order.read_num || order.push_date){
|
||||
searchForm.order=order
|
||||
}
|
||||
if(!order.hospital_name){
|
||||
delete order.hospital_name
|
||||
}
|
||||
if(order.updated_at || order.article_num || order.hospital_name){
|
||||
searchForm.order=order
|
||||
}
|
||||
api.searchHospital({
|
||||
...searchForm,
|
||||
...params
|
||||
@@ -216,13 +280,16 @@ const searchDoctor = async(params) => {
|
||||
let searchForm={
|
||||
doctor_name: keyWord.value,
|
||||
}
|
||||
if(!order.read_num){
|
||||
delete order.read_num
|
||||
if(!order.updated_at){
|
||||
delete order.updated_at
|
||||
}
|
||||
if(!order.push_date){
|
||||
delete order.push_date
|
||||
if(!order.article_num){
|
||||
delete order.article_num
|
||||
}
|
||||
if(order.read_num || order.push_date){
|
||||
if(!order.doctor_name){
|
||||
delete order.doctor_name
|
||||
}
|
||||
if(order.updated_at || order.article_num || order.doctor_name){
|
||||
searchForm.order=order
|
||||
}
|
||||
api.searchDoctor({
|
||||
@@ -260,20 +327,49 @@ const goDetail=(id,name)=>{
|
||||
*/
|
||||
const changeWord=(value)=>{
|
||||
console.log(value);
|
||||
if(value){
|
||||
navName.value=value+'临床病例库';
|
||||
|
||||
if(type.value=='hospital'){
|
||||
navName.value='医院临床病例库';
|
||||
order.hospital_name='';
|
||||
}else{
|
||||
navName.value='医生临床病例库';
|
||||
order.doctor_name='';
|
||||
}
|
||||
|
||||
keyWord.value=value;
|
||||
dataList.value=[];
|
||||
order.read_num='';
|
||||
order.push_date='';
|
||||
dataList.value=[];
|
||||
order.updated_at='desc';
|
||||
order.article_num='';
|
||||
|
||||
paging.value.reload();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.databox {
|
||||
height: 162rpx;
|
||||
background: #ffffff;
|
||||
@@ -311,6 +407,7 @@ const changeWord=(value)=>{
|
||||
position: relative;
|
||||
:deep(.u-dropdown__menu__item__text){
|
||||
font-size: 14px!important;
|
||||
color:rgb(60, 156, 255)!important;
|
||||
}
|
||||
.type{
|
||||
position: absolute;
|
||||
|
||||
+104
-43
@@ -31,26 +31,43 @@
|
||||
</view> -->
|
||||
<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="changeDate"
|
||||
:options="options"
|
||||
></up-dropdown-item>
|
||||
<up-dropdown-item
|
||||
v-model="order.article_num"
|
||||
title="文章数量"
|
||||
@change="changeRead"
|
||||
:options="options"
|
||||
></up-dropdown-item>
|
||||
<!-- <up-dropdown-item
|
||||
v-model="order.article_num"
|
||||
title="阅读量"
|
||||
@change="change"
|
||||
:options="options"
|
||||
></up-dropdown-item> -->
|
||||
</up-dropdown>
|
||||
<up-dropdown class="u-dropdown" ref="uDropdownRef">
|
||||
<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>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
@@ -96,22 +113,26 @@ const value = ref("");
|
||||
const keyWord = ref("");
|
||||
const isArticle=ref(true)
|
||||
const type=ref('doctor')
|
||||
const dropTitle=ref('更新时间');
|
||||
const navName=ref('疾病临床病例库');
|
||||
|
||||
const orderFilter=ref(1);
|
||||
const options= ref([
|
||||
{
|
||||
label: "正序",
|
||||
value: 'asc',
|
||||
label: "更新时间",
|
||||
value: '1',
|
||||
},
|
||||
{
|
||||
label: "倒序",
|
||||
value: 'desc',
|
||||
label: "疾病名称",
|
||||
value: '2',
|
||||
},
|
||||
{
|
||||
label: "病例数",
|
||||
value: '3',
|
||||
},
|
||||
]);
|
||||
|
||||
const order=reactive({
|
||||
article_num:'',
|
||||
push_date:''
|
||||
updated_at:'desc'
|
||||
})
|
||||
|
||||
onLoad((options) => {
|
||||
@@ -136,15 +157,27 @@ onShow(()=>{
|
||||
paging.value?.refresh();
|
||||
})
|
||||
const changeDate=(e)=>{
|
||||
console.log(e);
|
||||
order.article_num='';
|
||||
paging.value.reload();
|
||||
}
|
||||
const changeRead=(e)=>{
|
||||
console.log(e);
|
||||
order.push_date=''
|
||||
if(e==1){
|
||||
order.updated_at='desc';
|
||||
order.label_name='';
|
||||
order.article_num='';
|
||||
dropTitle.value="更新时间"
|
||||
}else if(e==2){
|
||||
order.updated_at='';
|
||||
order.label_name='desc';
|
||||
order.article_num='';
|
||||
dropTitle.value="疾病名称"
|
||||
}else if(e==3){
|
||||
order.updated_at='';
|
||||
order.label_name='';
|
||||
order.article_num='desc';
|
||||
dropTitle.value="病例数"
|
||||
}
|
||||
orderFilter.value=e;
|
||||
uDropdownRef.value.close();
|
||||
paging.value.reload();
|
||||
}
|
||||
|
||||
const formatdate=(date)=>{
|
||||
return dayjs(date).format('YYYY-MM-DD')
|
||||
}
|
||||
@@ -156,10 +189,13 @@ const searchList = async(params) => {
|
||||
if(!order.article_num){
|
||||
delete order.article_num
|
||||
}
|
||||
if(!order.push_date){
|
||||
delete order.push_date
|
||||
if(!order.updated_at){
|
||||
delete order.updated_at
|
||||
}
|
||||
if(order.article_num || order.push_date){
|
||||
if(!order.label_name){
|
||||
delete order.label_name
|
||||
}
|
||||
if(order.article_num || order.updated_at || order.label_name){
|
||||
searchForm.order=order
|
||||
}
|
||||
api.getSearchLabel({
|
||||
@@ -191,20 +227,41 @@ const goDetail=(id,name)=>{
|
||||
* @param value 输入的关键词
|
||||
*/
|
||||
const changeWord=(value)=>{
|
||||
console.log(value);
|
||||
if(value){
|
||||
navName.value=value+'临床病例库';
|
||||
navName.value='疾病临床病例库';
|
||||
keyWord.value=value;
|
||||
dataList.value=[];
|
||||
order.article_num='';
|
||||
order.push_date='';
|
||||
order.updated_at='desc';
|
||||
order.article_num='';
|
||||
order.label_name='';
|
||||
paging.value.reload();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.votepop {
|
||||
.confirm {
|
||||
margin: 39rpx 30rpx 0;
|
||||
@@ -377,6 +434,10 @@ const changeWord=(value)=>{
|
||||
margin-left:0rpx;
|
||||
|
||||
}
|
||||
:deep(.u-dropdown__menu__item__text){
|
||||
font-size: 14px!important;
|
||||
color:rgb(60, 156, 255)!important;
|
||||
}
|
||||
:deep(.u-dropdown__menu__item){
|
||||
|
||||
height:74rpx;
|
||||
|
||||
Reference in New Issue
Block a user