This commit is contained in:
zoujiandong
2025-07-30 13:58:39 +08:00
parent afc79a0f26
commit 43abd1f3d6
360 changed files with 27253 additions and 0 deletions
@@ -0,0 +1,280 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_api = require("../../api/api.js");
const utils_navTo = require("../../utils/navTo.js");
const common_assets = require("../../common/assets.js");
if (!Array) {
const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio");
const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group");
const _easycom_up_dropdown_item2 = common_vendor.resolveComponent("up-dropdown-item");
const _easycom_up_dropdown2 = common_vendor.resolveComponent("up-dropdown");
const _easycom_up__image2 = common_vendor.resolveComponent("up--image");
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
(_easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_up_dropdown_item2 + _easycom_up_dropdown2 + _easycom_up__image2 + _easycom_z_paging2)();
}
const _easycom_up_radio = () => "../../node-modules/uview-plus/components/u-radio/u-radio.js";
const _easycom_up_radio_group = () => "../../node-modules/uview-plus/components/u-radio-group/u-radio-group.js";
const _easycom_up_dropdown_item = () => "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js";
const _easycom_up_dropdown = () => "../../node-modules/uview-plus/components/u-dropdown/u-dropdown.js";
const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.js";
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
if (!Math) {
(navBarSearch + _easycom_up_radio + _easycom_up_radio_group + _easycom_up_dropdown_item + _easycom_up_dropdown + _easycom_up__image + _easycom_z_paging)();
}
const navBarSearch = () => "../../components/navBarSearch/navBarSearch.js";
const _sfc_main = {
__name: "searchList",
setup(__props) {
const paging = common_vendor.ref(null);
const uDropdownRef = common_vendor.ref(null);
const dataList = common_vendor.ref([]);
const total = common_vendor.ref(0);
common_vendor.ref("");
const keyWord = common_vendor.ref("");
common_vendor.ref(true);
const type = common_vendor.ref("doctor");
const navName = common_vendor.ref("医生临床病例库");
const orderFilter = common_vendor.ref("1");
const dropTitle = common_vendor.ref("更新时间");
const option = common_vendor.ref([
{
label: "更新时间",
value: "1"
},
{
label: "医生名称",
value: "2"
},
{
label: "病例数",
value: "3"
}
]);
const order = common_vendor.reactive({
push_date: "desc"
});
common_vendor.onLoad((options) => {
if (options.type == "hospital") {
type.value = "hospital";
option.value[1].label = "医院名称";
}
common_vendor.index.__f__("log", "at pages/searchList/searchList.vue:142", type.value);
keyWord.value = options.name;
if (options.name) {
navName.value = options.name + "临床病例库";
}
if ((options.name = "医生") && !options.id) {
keyWord.value = "";
}
if (options.order == "new") {
order.push_date = "asc";
}
if (options.order == "read") {
order.read_num = "desc";
}
});
common_vendor.onShow(() => {
var _a;
(_a = paging.value) == null ? void 0 : _a.refresh();
});
const change = (e) => {
if (e == 1) {
order.push_date = "desc";
if (type.value == "hospital") {
order.hospital_name = "";
} else {
order.doctor_name = "";
}
order.article_num = "";
dropTitle.value = "更新时间";
} else if (e == 2) {
order.push_date = "";
order.article_num = "";
if (type.value == "hospital") {
order.hospital_name = "asc";
dropTitle.value = "医院名称";
} else {
order.doctor_name = "asc";
dropTitle.value = "医生名称";
}
} else if (e == 3) {
order.push_date = "";
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) => {
if (!date)
return common_vendor.dayjs().format("YYYY-MM-DD");
return common_vendor.dayjs(date).format("YYYY-MM-DD");
};
const searchHospital = async (params) => {
let searchForm = {
hospital_name: keyWord.value
};
if (!order.push_date) {
delete order.push_date;
}
if (!order.article_num) {
delete order.article_num;
}
if (!order.hospital_name) {
delete order.hospital_name;
}
if (order.push_date || order.article_num || order.hospital_name) {
searchForm.order = order;
}
api_api.api.searchHospital({
...searchForm,
...params
}).then((res) => {
paging.value.complete(res.data.data.data);
total.value = res.data.data.total;
}).catch((err) => {
paging.value.complete(false);
});
};
const searchDoctor = async (params) => {
let searchForm = {
doctor_name: keyWord.value
};
if (!order.push_date) {
delete order.push_date;
}
if (!order.article_num) {
delete order.article_num;
}
if (!order.doctor_name) {
delete order.doctor_name;
}
if (order.push_date || order.article_num || order.doctor_name) {
searchForm.order = order;
}
api_api.api.searchDoctor({
...searchForm,
...params
}).then((res) => {
paging.value.complete(res.data.data.data);
total.value = res.data.data.total;
}).catch((err) => {
paging.value.complete(false);
});
};
const queryList = (pageNo, pageSize) => {
const params = {
page: pageNo,
page_size: pageSize
};
type.value == "hospital" ? searchHospital(params) : searchDoctor(params);
};
const goDetail = (id, name) => {
let url = "";
if (type.value == "doctor") {
url = `/pages/search/search?doctor_id=${id}&doctor_name=${name}`;
} else {
url = `/pages/search/search?hospital_id=${id}&hospital_name=${name}`;
}
utils_navTo.navTo({
url
});
};
const changeWord = (value) => {
common_vendor.index.__f__("log", "at pages/searchList/searchList.vue:331", value);
if (type.value == "hospital") {
navName.value = "医院临床病例库";
order.hospital_name = "";
} else {
navName.value = "医生临床病例库";
order.doctor_name = "";
}
keyWord.value = value;
dataList.value = [];
order.push_date = "desc";
order.article_num = "";
paging.value.reload();
};
return (_ctx, _cache) => {
return {
a: common_vendor.o(changeWord),
b: common_vendor.p({
searchWord: keyWord.value,
navName: navName.value,
type: type.value
}),
c: common_vendor.f(option.value, (item, k0, i0) => {
return {
a: "5d2f7987-5-" + i0 + ",5d2f7987-4",
b: common_vendor.p({
activeColor: "#3CC7C0",
label: item.label,
name: item.value
}),
c: item.value,
d: common_vendor.n(orderFilter.value == item.value ? "active" : "")
};
}),
d: common_vendor.o(change),
e: common_vendor.o(($event) => orderFilter.value = $event),
f: common_vendor.p({
iconPlacement: "right",
placement: "column",
modelValue: orderFilter.value
}),
g: common_vendor.p({
title: dropTitle.value
}),
h: common_vendor.sr(uDropdownRef, "5d2f7987-2,5d2f7987-0", {
"k": "uDropdownRef"
}),
i: common_vendor.f(dataList.value, (item, index, i0) => {
return common_vendor.e(type.value == "hospital" ? {
a: common_vendor.t(item.basic_hospital.hospital_name)
} : {
b: common_vendor.t(item.case_clinical_doctor.doctor_name),
c: common_vendor.t(item.case_clinical_doctor.hospital_name)
}, {
d: common_vendor.f(item.author, (tag, k1, i1) => {
return {
a: common_vendor.t(tag.doctor_name),
b: tag.author_id
};
}),
e: common_vendor.t(item.video_num + item.article_num),
f: "5d2f7987-6-" + i0 + ",5d2f7987-0",
g: common_vendor.t(formatdate(item.last_push_date)),
h: index,
i: common_vendor.o(($event) => type.value == "hospital" ? goDetail(item.basic_hospital.hospital_id, item.basic_hospital.hospital_name) : goDetail(item.case_clinical_doctor.doctor_id, item.case_clinical_doctor.doctor_name), index)
});
}),
j: type.value == "hospital",
k: common_vendor.p({
src: common_vendor.unref(common_assets.arrowrightImg),
width: "32rpx",
height: "32rpx"
}),
l: common_vendor.sr(paging, "5d2f7987-0", {
"k": "paging"
}),
m: common_vendor.o(queryList),
n: common_vendor.o(($event) => dataList.value = $event),
o: common_vendor.p({
["inside-more"]: true,
["loading-more-no-more-text"]: "咱也是有底线的!",
["auto-show-back-to-top"]: true,
modelValue: dataList.value
})
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-5d2f7987"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/searchList/searchList.js.map
@@ -0,0 +1,13 @@
{
"navigationBarTitleText": "肝胆相照临床病例库",
"navigationStyle": "custom",
"usingComponents": {
"up-radio": "../../node-modules/uview-plus/components/u-radio/u-radio",
"up-radio-group": "../../node-modules/uview-plus/components/u-radio-group/u-radio-group",
"up-dropdown-item": "../../node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item",
"up-dropdown": "../../node-modules/uview-plus/components/u-dropdown/u-dropdown",
"up--image": "../../node-modules/uview-plus/components/u--image/u--image",
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging",
"nav-bar-search": "../../components/navBarSearch/navBarSearch"
}
}
@@ -0,0 +1 @@
<view class="u-page data-v-5d2f7987"><z-paging wx:if="{{o}}" class="r data-v-5d2f7987" u-s="{{['top','d']}}" u-r="paging" bindquery="{{m}}" u-i="5d2f7987-0" bind:__l="__l" bindupdateModelValue="{{n}}" u-p="{{o}}"><view slot="top"><nav-bar-search wx:if="{{b}}" class="data-v-5d2f7987" bindchangeWord="{{a}}" u-i="5d2f7987-1,5d2f7987-0" bind:__l="__l" u-p="{{b}}"></nav-bar-search><view class="filterbox data-v-5d2f7987"><up-dropdown u-s="{{['d']}}" class="u-dropdown r data-v-5d2f7987" u-r="uDropdownRef" u-i="5d2f7987-2,5d2f7987-0" bind:__l="__l"><up-dropdown-item wx:if="{{g}}" class="data-v-5d2f7987" u-s="{{['d']}}" u-i="5d2f7987-3,5d2f7987-2" bind:__l="__l" u-p="{{g}}"><view class="dropcontent data-v-5d2f7987"><up-radio-group wx:if="{{f}}" class="data-v-5d2f7987" u-s="{{['d']}}" bindchange="{{d}}" u-i="5d2f7987-4,5d2f7987-3" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="c" class="{{['column', 'data-v-5d2f7987', item.d]}}"><up-radio wx:if="{{item.b}}" class="data-v-5d2f7987" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-radio></view></up-radio-group></view></up-dropdown-item></up-dropdown></view></view><view class="listbox data-v-5d2f7987"><view wx:for="{{i}}" wx:for-item="item" wx:key="h" class="item data-v-5d2f7987" bindtap="{{item.i}}"><view wx:if="{{j}}" class="title ellipsis data-v-5d2f7987">{{item.a}}</view><view wx:else class="title ellipsis data-v-5d2f7987">{{item.b}}({{item.c}})</view><view class="tagsbox data-v-5d2f7987"><view wx:for="{{item.d}}" wx:for-item="tag" wx:key="b" class="tag data-v-5d2f7987">{{tag.a}}</view></view><view class="deal data-v-5d2f7987"><view class="left data-v-5d2f7987"><view class="count data-v-5d2f7987"> 病例数:{{item.e}}<up--image wx:if="{{k}}" class="data-v-5d2f7987" u-i="{{item.f}}" bind:__l="__l" u-p="{{k}}"></up--image></view></view><view class="time data-v-5d2f7987"><view class="num data-v-5d2f7987">更新时间:{{item.g}}</view></view></view></view></view></z-paging></view>
@@ -0,0 +1,192 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.dropcontent.data-v-5d2f7987 {
padding-top: 40rpx;
padding-bottom: 20rpx;
background-color: #fff;
}
.dropcontent.data-v-5d2f7987 .u-radio {
margin-bottom: 6px !important;
margin-top: 16px !important;
}
.dropcontent .column.data-v-5d2f7987 {
padding: 0 30rpx;
border-top: 2rpx solid #e5e7eb;
}
.dropcontent .column.data-v-5d2f7987 .u-radio__text {
color: #333 !important;
}
.dropcontent .column.active.data-v-5d2f7987 .u-radio__text {
color: #3CC7C0 !important;
}
.databox.data-v-5d2f7987 {
height: 162rpx;
background: #ffffff;
display: flex;
margin-bottom: 20rpx;
justify-content: space-between;
}
.databox .cell.data-v-5d2f7987 {
flex: 1;
padding: 35rpx 0;
text-align: center;
}
.databox .cell .num.data-v-5d2f7987 {
font-size: 38rpx;
color: #3cc7c0;
}
.databox .cell .name.data-v-5d2f7987 {
margin-top: 18rpx;
font-size: 28rpx;
color: #4b5563;
}
.listbox.data-v-5d2f7987 {
background: #F8F9FA;
overflow: hidden;
}
.filterbox.data-v-5d2f7987 {
display: flex;
height: 128rpx;
background: #fff;
border-bottom: 2rpx solid rgba(0, 0, 0, 0.08);
align-items: center;
position: relative;
}
.filterbox.data-v-5d2f7987 .u-dropdown__menu__item__text {
font-size: 14px !important;
color: #3CC7C0 !important;
}
.filterbox .type.data-v-5d2f7987 {
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.data-v-5d2f7987 .z-paging-content-fixed {
background: #F8F9FA !important;
}
.u-page.data-v-5d2f7987 .u-flex {
display: flex;
flex-direction: row;
overflow: hidden;
}
.u-page.data-v-5d2f7987 .u-image {
background: none !important;
}
.u-page.data-v-5d2f7987 .u-dropdown__menu {
background: #fff;
z-index: 1;
margin-left: -30rpx;
}
.u-page.data-v-5d2f7987 .u-dropdown__menu__item {
height: 74rpx;
padding: 0 20rpx;
background: #F3F4F6;
border-radius: 15rpx;
flex: none;
margin-left: 60rpx;
}
.u-page .deal.data-v-5d2f7987 {
margin-top: 20rpx;
display: flex;
color: #6b7280;
background: #fff;
font-size: 24rpx;
justify-content: space-between;
}
.u-page .deal .left.data-v-5d2f7987 {
display: flex;
align-items: center;
font-size: 27rpx;
}
.u-page .deal .left .count.data-v-5d2f7987 {
display: flex;
align-items: center;
}
.u-page .deal .collect.data-v-5d2f7987 {
display: flex;
align-items: center;
}
.u-page .deal .eyebox.data-v-5d2f7987 {
width: 160rpx;
display: flex;
align-items: center;
}
.u-page .deal .time.data-v-5d2f7987 {
display: flex;
align-items: center;
}
.u-page .deal .num.data-v-5d2f7987 {
margin-left: 8rpx;
}
.u-page .item.data-v-5d2f7987 {
margin: 30rpx;
background: #fff;
padding: 30rpx;
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.08);
border-radius: 23rpx;
}
.u-page .item .title.data-v-5d2f7987 {
font-size: 30rpx;
color: #111827;
line-height: 46rpx;
}
.u-page .tagsbox.data-v-5d2f7987 {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
}
.u-page .tagsbox .tag.data-v-5d2f7987 {
padding: 0 10rpx;
margin-right: 16rpx;
height: 46rpx;
line-height: 46rpx;
text-align: center;
background: rgba(60, 199, 192, 0.1);
border-radius: 8rpx;
font-weight: 400;
font-size: 24rpx;
color: #3cc7c0;
}
.detail.data-v-5d2f7987 {
background: #f9f9f9;
padding: 12rpx 30rpx;
}
.detail .desc.data-v-5d2f7987 {
font-size: 26rpx;
color: #4b5563;
line-height: 40rpx;
}
.detail .red.data-v-5d2f7987 {
color: #FF0000;
}