6.12
This commit is contained in:
parent
197d26b22c
commit
518a5d1b47
90
api/api.js
90
api/api.js
@ -136,6 +136,12 @@ const api = {
|
|||||||
getDraftList(data){
|
getDraftList(data){
|
||||||
return request('/exchange/draft/search', data, 'post',false,'application/json');
|
return request('/exchange/draft/search', data, 'post',false,'application/json');
|
||||||
},
|
},
|
||||||
|
saveDraft(data){
|
||||||
|
return request('/exchange/draft', data, 'post',false,'application/json');
|
||||||
|
},
|
||||||
|
delDraft(id){
|
||||||
|
return request('/exchange/draft/'+id, {}, 'delete',false);
|
||||||
|
},
|
||||||
getVideoCommentUser(data){
|
getVideoCommentUser(data){
|
||||||
return request('/clinical/video/user/comment/page', data, 'post',false,'application/json');
|
return request('/clinical/video/user/comment/page', data, 'post',false,'application/json');
|
||||||
},
|
},
|
||||||
@ -151,93 +157,17 @@ const api = {
|
|||||||
getOss(data){
|
getOss(data){
|
||||||
return request('/sign/oss',data, 'get', false);
|
return request('/sign/oss',data, 'get', false);
|
||||||
},
|
},
|
||||||
|
getCaseLabel(data){
|
||||||
|
return request('/case/label',data,'get', false);
|
||||||
|
},
|
||||||
|
|
||||||
ossUpload(url,data){
|
ossUpload(url,data){
|
||||||
return request(url,data,'post','multipart/form-data')
|
return request(url,data,'post','multipart/form-data')
|
||||||
},
|
},
|
||||||
queryList(data) {
|
|
||||||
const listCount = 24;
|
|
||||||
return _queryList(data, listCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
function _queryList(data, listCount, showNews = false ,random = false, showChat = false) {
|
|
||||||
if (!data.pageNo || !data.pageSize) {
|
|
||||||
return _callQueryResult([]);
|
|
||||||
}
|
|
||||||
let pageNo = parseInt(data.pageNo);
|
|
||||||
let pageSize = parseInt(data.pageSize);
|
|
||||||
let type = data.type || 0;
|
|
||||||
if (pageNo < 0 || pageSize <= 0) {
|
|
||||||
return _callQueryResult([]);
|
|
||||||
}
|
|
||||||
if (showLog) {
|
|
||||||
console.log('%c\n----------请求开始--------', 'color:green;');
|
|
||||||
console.info(`请求参数:【pageNo:${pageNo},pageSize:${pageSize}】`)
|
|
||||||
console.log('%c----------请求结束--------\n', 'color:green;');
|
|
||||||
}
|
|
||||||
uni.showLoading({
|
|
||||||
title: '加载中...'
|
|
||||||
})
|
|
||||||
if (pageNo == 0) {
|
|
||||||
pageNo = 1;
|
|
||||||
}
|
|
||||||
var totalPagingList = [];
|
|
||||||
for (let i = 0; i < listCount; i++) {
|
|
||||||
if (!showChat) {
|
|
||||||
const item = {
|
|
||||||
'title': (i + 1).toString(),
|
|
||||||
'detail': '测试信息' + type
|
|
||||||
};
|
|
||||||
if (showNews) {
|
|
||||||
item.detail = getNews(random);
|
|
||||||
}
|
|
||||||
totalPagingList.push(item);
|
|
||||||
} else {
|
|
||||||
const item = {
|
|
||||||
'name': '哆啦A梦',
|
|
||||||
'icon': '/static/duola.jpg',
|
|
||||||
'content': getNews(true),
|
|
||||||
'isMe': false
|
|
||||||
};
|
|
||||||
totalPagingList.push(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let pageNoIndex = (pageNo - 1) * pageSize;
|
|
||||||
if (pageNoIndex + pageSize <= totalPagingList.length) {
|
|
||||||
return _callQueryResult(totalPagingList.splice(pageNoIndex, pageSize));
|
|
||||||
} else if (pageNoIndex < totalPagingList.length) {
|
|
||||||
return _callQueryResult(totalPagingList.splice(pageNoIndex, totalPagingList.length - pageNoIndex));
|
|
||||||
} else {
|
|
||||||
return _callQueryResult([]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function _callQueryResult(arg) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.hideLoading();
|
|
||||||
if (showLog) {
|
|
||||||
console.log('%c\n----------响应开始--------', 'color:#0113fa;');
|
|
||||||
// #ifdef H5
|
|
||||||
console.table(arg);
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
// #ifndef H5
|
|
||||||
console.log(arg);
|
|
||||||
// #endif
|
|
||||||
console.log('%c----------响应结束--------\n', 'color:#0113fa;');
|
|
||||||
}
|
|
||||||
resolve({
|
|
||||||
data: {
|
|
||||||
list: arg
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, loadingTime)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default api
|
export default api
|
||||||
@ -38,8 +38,7 @@ const goBack = () => {
|
|||||||
#43c9c3 0%,
|
#43c9c3 0%,
|
||||||
rgba(255, 255, 255, 0) 100%
|
rgba(255, 255, 255, 0) 100%
|
||||||
);
|
);
|
||||||
}
|
.bg {
|
||||||
.bg {
|
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@ -90,4 +89,6 @@ const goBack = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
16
pages.json
16
pages.json
@ -12,6 +12,7 @@
|
|||||||
"pages": [
|
"pages": [
|
||||||
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
@ -26,6 +27,14 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/login/login",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "登录"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/caseTalk/caseTalk",
|
"path": "pages/caseTalk/caseTalk",
|
||||||
"style": {
|
"style": {
|
||||||
@ -93,12 +102,7 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/login/login",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "登录"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/case/case",
|
"path": "pages/case/case",
|
||||||
|
|||||||
@ -11,7 +11,8 @@
|
|||||||
<backNav :navName="'肝胆相照临床病例库'"></backNav>
|
<backNav :navName="'肝胆相照临床病例库'"></backNav>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="title" v-if="type == 'video'">{{ info.video_title }}</view>
|
<view class="title" v-if="type == 'video'">{{ info.video_title }}</view>
|
||||||
<view class="title" v-else>{{ info.article_title }}</view>
|
<view class="title" v-else-if="type=='article'">{{ info.article_title }}</view>
|
||||||
|
<view class="title" v-else>{{ info.exchange_title }}</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="info" v-for="item in info.author">
|
<view class="info" v-for="item in info.author">
|
||||||
<up--image
|
<up--image
|
||||||
@ -549,13 +550,21 @@ const getVideoDetail = (id) => {
|
|||||||
Object.assign(info, result);
|
Object.assign(info, result);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const getExchangeDetail = (id) => {
|
||||||
|
api.getExchangeDetail(id).then((res) => {
|
||||||
|
let result = res.data.data;
|
||||||
|
Object.assign(info, result);
|
||||||
|
});
|
||||||
|
};
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
id.value = options.id;
|
id.value = options.id;
|
||||||
type.value = options.type;
|
type.value = options.type;
|
||||||
if (type.value == "article") {
|
if (type.value == "article") {
|
||||||
getArticleDetail(options.id);
|
getArticleDetail(options.id);
|
||||||
} else {
|
} else if(type.value == "video") {
|
||||||
getVideoDetail(options.id);
|
getVideoDetail(options.id);
|
||||||
|
}else{
|
||||||
|
getExchangeDetail(options.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const clearComment = () => {
|
const clearComment = () => {
|
||||||
@ -603,7 +612,14 @@ const queryList = (pageNo, pageSize) => {
|
|||||||
page: pageNo,
|
page: pageNo,
|
||||||
page_size: pageSize,
|
page_size: pageSize,
|
||||||
};
|
};
|
||||||
type.value == "article" ? getArticleComment(params) : getVideoComment(params);
|
// type.value == "article" ? getArticleComment(params) : getVideoComment(params);
|
||||||
|
if(type.value == "article"){
|
||||||
|
getArticleComment(params)
|
||||||
|
}else if(type.value == "video"){
|
||||||
|
getVideoComment(params);
|
||||||
|
}else{
|
||||||
|
getExchangeComment(params);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getArticleComment = (params) => {
|
const getArticleComment = (params) => {
|
||||||
@ -634,8 +650,40 @@ const getArticleComment = (params) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const getVideoComment = (params) => {
|
const getVideoComment = (params) => {
|
||||||
|
const form = {
|
||||||
|
video_id: id.value,
|
||||||
|
is_have_sub_comment: 1,
|
||||||
|
};
|
||||||
api
|
api
|
||||||
.getVideoComment({
|
.getVideoComment({
|
||||||
|
...form,
|
||||||
|
...params,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
paging.value.complete(res.data.data.data);
|
||||||
|
total.value = res.data.data.total;
|
||||||
|
setTimeout(() => {
|
||||||
|
if (showMore.value) {
|
||||||
|
openMorePop(
|
||||||
|
mainCommentObj,
|
||||||
|
dataList.value[clickIndex.value].sub_comment,
|
||||||
|
clickIndex.value
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, 1500);
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
paging.value.complete(false);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const getExchangeComment = (params) => {
|
||||||
|
const form = {
|
||||||
|
exchange_id: id.value,
|
||||||
|
is_have_sub_comment: 1,
|
||||||
|
};
|
||||||
|
api
|
||||||
|
.getExchangeComment({
|
||||||
|
...form,
|
||||||
...params,
|
...params,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@ -1066,15 +1114,7 @@ const collectArticle = (id) => {
|
|||||||
getArticleDetail(id);
|
getArticleDetail(id);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const cancelCollectArticle = (id) => {
|
|
||||||
api.cancelCollectArticle(id).then((res) => {
|
|
||||||
uni.showToast({
|
|
||||||
icon: "none",
|
|
||||||
title: "已取消收藏",
|
|
||||||
});
|
|
||||||
getArticleDetail(id);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
const collectVideo = (id) => {
|
const collectVideo = (id) => {
|
||||||
api.collectVideo(id).then((res) => {
|
api.collectVideo(id).then((res) => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -1084,6 +1124,25 @@ const collectVideo = (id) => {
|
|||||||
getVideoDetail(id);
|
getVideoDetail(id);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const collectExchange = (id) => {
|
||||||
|
api.collectExchange(id).then((res) => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "收藏成功",
|
||||||
|
});
|
||||||
|
getExchangeDetail(id);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const cancelCollectArticle = (id) => {
|
||||||
|
api.cancelCollectArticle(id).then((res) => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "已取消收藏",
|
||||||
|
});
|
||||||
|
getArticleDetail(id);
|
||||||
|
});
|
||||||
|
};
|
||||||
const cancelCollectVideo = (id) => {
|
const cancelCollectVideo = (id) => {
|
||||||
api.cancelCollectVideo(id).then((res) => {
|
api.cancelCollectVideo(id).then((res) => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -1093,11 +1152,22 @@ const cancelCollectVideo = (id) => {
|
|||||||
getVideoDetail(id);
|
getVideoDetail(id);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const cancelCollectExchange = (id) => {
|
||||||
|
api.cancelCollectExchange(id).then((res) => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "已取消收藏",
|
||||||
|
});
|
||||||
|
getExchangeDetail(id);
|
||||||
|
});
|
||||||
|
};
|
||||||
const toggleCollect = () => {
|
const toggleCollect = () => {
|
||||||
if (type.value == "video") {
|
if (type.value == "video") {
|
||||||
info.is_collect ? cancelCollectVideo(id.value) : collectVideo(id.value);
|
info.is_collect ? cancelCollectVideo(id.value) : collectVideo(id.value);
|
||||||
} else {
|
} else if(type.value == "article") {
|
||||||
info.is_collect ? cancelCollectArticle(id.value) : collectArticle(id.value);
|
info.is_collect ? cancelCollectArticle(id.value) : collectArticle(id.value);
|
||||||
|
}else{
|
||||||
|
info.is_collect ? cancelCollectExchange(id.value) : collectExchange(id.value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const addArticleComment = (id, data) => {
|
const addArticleComment = (id, data) => {
|
||||||
@ -1112,7 +1182,18 @@ const addArticleComment = (id, data) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const addVideoComment = (id, data) => {
|
const addVideoComment = (id, data) => {
|
||||||
api.addVideoContent(id, data).then((res) => {
|
api.addVideoComment(id, data).then((res) => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "评论成功",
|
||||||
|
});
|
||||||
|
clearComment();
|
||||||
|
showCommentDialog.value = false;
|
||||||
|
paging.value.refresh();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const addExchangeComment = (id, data) => {
|
||||||
|
api.addExchangeComment(id, data).then((res) => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
title: "评论成功",
|
title: "评论成功",
|
||||||
@ -1140,6 +1221,15 @@ const delVideoComment = (id) => {
|
|||||||
paging.value.refresh();
|
paging.value.refresh();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const delExchangeComment = (id) => {
|
||||||
|
api.delExchangeComment(id).then((res) => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "删除成功",
|
||||||
|
});
|
||||||
|
paging.value.refresh();
|
||||||
|
});
|
||||||
|
};
|
||||||
const topArticleComment = (id) => {
|
const topArticleComment = (id) => {
|
||||||
api.topArticleComment(id).then((res) => {
|
api.topArticleComment(id).then((res) => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -1160,6 +1250,16 @@ const topVideoComment = (id) => {
|
|||||||
showDeal.value = false;
|
showDeal.value = false;
|
||||||
paging.value.refresh();
|
paging.value.refresh();
|
||||||
};
|
};
|
||||||
|
const topExchangeComment = (id) => {
|
||||||
|
api.topExchangeComment(id).then((res) => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "置顶成功",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
showDeal.value = false;
|
||||||
|
paging.value.refresh();
|
||||||
|
};
|
||||||
const cancelTopArticleComment = (id) => {
|
const cancelTopArticleComment = (id) => {
|
||||||
api.cancelTopArticleComment(id).then((res) => {
|
api.cancelTopArticleComment(id).then((res) => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -1180,6 +1280,16 @@ const cancelTopVideoComment = (id) => {
|
|||||||
showDeal.value = false;
|
showDeal.value = false;
|
||||||
paging.value.refresh();
|
paging.value.refresh();
|
||||||
};
|
};
|
||||||
|
const cancelTopExchangeComment = (id) => {
|
||||||
|
api.cancelTopExchangeComment(id).then((res) => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "取消置顶成功",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
showDeal.value = false;
|
||||||
|
paging.value.refresh();
|
||||||
|
};
|
||||||
const delComment = () => {
|
const delComment = () => {
|
||||||
showModal.value = true;
|
showModal.value = true;
|
||||||
showDeal.value = false;
|
showDeal.value = false;
|
||||||
@ -1187,8 +1297,10 @@ const delComment = () => {
|
|||||||
const confirmDel = () => {
|
const confirmDel = () => {
|
||||||
if (type.value == "article") {
|
if (type.value == "article") {
|
||||||
delArticleComment(parent_id.value);
|
delArticleComment(parent_id.value);
|
||||||
} else {
|
} else if(type.value == "video") {
|
||||||
delVideoComment(parent_id.value);
|
delVideoComment(parent_id.value);
|
||||||
|
}else{
|
||||||
|
delExchangeComment(parent_id.value);
|
||||||
}
|
}
|
||||||
showModal.value = false;
|
showModal.value = false;
|
||||||
};
|
};
|
||||||
@ -1198,10 +1310,14 @@ const toggleTop = () => {
|
|||||||
is_top.value
|
is_top.value
|
||||||
? cancelTopArticleComment(parent_id.value)
|
? cancelTopArticleComment(parent_id.value)
|
||||||
: topArticleComment(parent_id.value);
|
: topArticleComment(parent_id.value);
|
||||||
} else {
|
} else if(type.value == "video") {
|
||||||
is_top.value
|
is_top.value
|
||||||
? cancelTopVideoComment(parent_id.value)
|
? cancelTopVideoComment(parent_id.value)
|
||||||
: topVideoComment(parent_id.value);
|
: topVideoComment(parent_id.value);
|
||||||
|
}else{
|
||||||
|
is_top.value
|
||||||
|
? cancelTopExchangeComment(parent_id.value)
|
||||||
|
: topExchangeComment(parent_id.value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const sendComment = () => {
|
const sendComment = () => {
|
||||||
@ -1229,8 +1345,10 @@ const sendComment = () => {
|
|||||||
}
|
}
|
||||||
if (type.value == "article") {
|
if (type.value == "article") {
|
||||||
addArticleComment(id.value, postData);
|
addArticleComment(id.value, postData);
|
||||||
} else {
|
} else if(type.value == "video") {
|
||||||
addVideoComment(id.value, postData);
|
addVideoComment(id.value, postData);
|
||||||
|
}else{
|
||||||
|
addExchangeComment(id.value, postData);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const formatHtml = (val) => {
|
const formatHtml = (val) => {
|
||||||
@ -1245,6 +1363,9 @@ const formatHtml = (val) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
|
.videobox{
|
||||||
|
padding:20rpx 30rpx;
|
||||||
|
}
|
||||||
.zanboxpop {
|
.zanboxpop {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -70,6 +70,84 @@
|
|||||||
</view>
|
</view>
|
||||||
</z-paging>
|
</z-paging>
|
||||||
</view>
|
</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>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -90,6 +168,97 @@ const keyWord = ref("");
|
|||||||
const isArticle=ref(true)
|
const isArticle=ref(true)
|
||||||
const type=ref('doctor')
|
const type=ref('doctor')
|
||||||
const navName=ref('医生临床病例库');
|
const navName=ref('医生临床病例库');
|
||||||
|
const showCase = 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 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){
|
||||||
|
let label = labelObj.list1.find((item) => item.app_iden == caseValue1.value);
|
||||||
|
console.log(label);
|
||||||
|
labelList.value.push({
|
||||||
|
app_iden:label.app_iden,
|
||||||
|
label_name:label.label_name,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if(level.value == 2 ){
|
||||||
|
let label = labelObj.list2.find((item) => item.app_iden == caseValue2.value);
|
||||||
|
labelList.value.push({
|
||||||
|
app_iden:label.app_iden,
|
||||||
|
label_name:label.label_name,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if(level.value == 3 ){
|
||||||
|
let label = labelObj.list3.find((item) => item.app_iden == caseValue3.value);
|
||||||
|
labelList.value.push({
|
||||||
|
app_iden:label.app_iden,
|
||||||
|
label_name:label.label_name,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//去重
|
||||||
|
labelList.value=labelList.value.filter((item, index) => labelList.value.findIndex(i => i.app_iden === item.app_iden) === index);
|
||||||
|
caseValue1.value = "";
|
||||||
|
caseValue2.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);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
const closeCase = () => {
|
||||||
|
showCase.value = false;
|
||||||
|
};
|
||||||
const options= ref([
|
const options= ref([
|
||||||
{
|
{
|
||||||
label: "正序",
|
label: "正序",
|
||||||
@ -268,6 +437,110 @@ const changeWord=(value)=>{
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.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 {
|
.databox {
|
||||||
height: 162rpx;
|
height: 162rpx;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
|
|||||||
@ -31,6 +31,8 @@
|
|||||||
class="cell"
|
class="cell"
|
||||||
v-for="(item) in dataList"
|
v-for="(item) in dataList"
|
||||||
:key="item.exchange_id"
|
:key="item.exchange_id"
|
||||||
|
@click="goDetail(item.exchange_id)"
|
||||||
|
|
||||||
>
|
>
|
||||||
<view class="title ellipsis-two-lines">{{
|
<view class="title ellipsis-two-lines">{{
|
||||||
item.exchange_title
|
item.exchange_title
|
||||||
@ -170,6 +172,11 @@ const changeWord = (val) => {
|
|||||||
keyWord.value = val;
|
keyWord.value = val;
|
||||||
paging.value.reload();
|
paging.value.reload();
|
||||||
};
|
};
|
||||||
|
const goDetail = (id) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/detail/detail?id=${id}&type=exchange`,
|
||||||
|
});
|
||||||
|
};
|
||||||
const queryList = (pageNo, pageSize) => {
|
const queryList = (pageNo, pageSize) => {
|
||||||
console.log(666666);
|
console.log(666666);
|
||||||
const params = {
|
const params = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user