216 lines
7.5 KiB
JavaScript
216 lines
7.5 KiB
JavaScript
"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: "sickList",
|
|
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 dropTitle = common_vendor.ref("更新时间");
|
|
const navName = common_vendor.ref("疾病临床病例库");
|
|
const orderFilter = common_vendor.ref("1");
|
|
const options = common_vendor.ref([
|
|
{
|
|
label: "更新时间",
|
|
value: "1"
|
|
},
|
|
{
|
|
label: "疾病名称",
|
|
value: "2"
|
|
},
|
|
{
|
|
label: "病例数",
|
|
value: "3"
|
|
}
|
|
]);
|
|
const order = common_vendor.reactive({
|
|
updated_at: "desc"
|
|
});
|
|
common_vendor.onLoad((options2) => {
|
|
if (options2.type == "hospital") {
|
|
type.value = "hospital";
|
|
}
|
|
keyWord.value = options2.name;
|
|
if (options2.name) {
|
|
navName.value = options2.name + "临床病例库";
|
|
}
|
|
if ((options2.name = "医生") && !options2.id) {
|
|
keyWord.value = "";
|
|
}
|
|
if (options2.order == "new") {
|
|
order.push_date = "asc";
|
|
}
|
|
if (options2.order == "read") {
|
|
order.article_num = "desc";
|
|
}
|
|
});
|
|
common_vendor.onShow(() => {
|
|
var _a;
|
|
(_a = paging.value) == null ? void 0 : _a.refresh();
|
|
});
|
|
const changeDate = (e) => {
|
|
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 = "asc";
|
|
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 common_vendor.dayjs(date).format("YYYY-MM-DD");
|
|
};
|
|
const searchList = async (params) => {
|
|
let searchForm = {
|
|
label_name: keyWord.value
|
|
};
|
|
if (!order.article_num) {
|
|
delete order.article_num;
|
|
}
|
|
if (!order.updated_at) {
|
|
delete order.updated_at;
|
|
}
|
|
if (!order.label_name) {
|
|
delete order.label_name;
|
|
}
|
|
if (order.article_num || order.updated_at || order.label_name) {
|
|
searchForm.order = order;
|
|
}
|
|
api_api.api.getSearchLabel({
|
|
...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
|
|
};
|
|
searchList(params);
|
|
};
|
|
const goDetail = (id, name) => {
|
|
let url = `/pages/search/search?case_id=${id}&case_name=${name}`;
|
|
utils_navTo.navTo({
|
|
url
|
|
});
|
|
};
|
|
const changeWord = (value) => {
|
|
navName.value = "疾病临床病例库";
|
|
keyWord.value = value;
|
|
dataList.value = [];
|
|
order.updated_at = "desc";
|
|
order.article_num = "";
|
|
order.label_name = "";
|
|
paging.value.reload();
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.o(changeWord),
|
|
b: common_vendor.p({
|
|
searchWord: keyWord.value,
|
|
navName: navName.value,
|
|
type: "case"
|
|
}),
|
|
c: common_vendor.f(options.value, (item, k0, i0) => {
|
|
return {
|
|
a: "55f9e2cf-5-" + i0 + ",55f9e2cf-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(changeDate),
|
|
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, "55f9e2cf-2,55f9e2cf-0", {
|
|
"k": "uDropdownRef"
|
|
}),
|
|
i: common_vendor.f(dataList.value, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.label_name),
|
|
b: common_vendor.t(item.video_num + item.article_num),
|
|
c: "55f9e2cf-6-" + i0 + ",55f9e2cf-0",
|
|
d: common_vendor.t(formatdate(item.last_push_date)),
|
|
e: index,
|
|
f: common_vendor.o(($event) => goDetail(item.label_iden, item.label_name), index)
|
|
};
|
|
}),
|
|
j: common_vendor.p({
|
|
src: common_vendor.unref(common_assets.arrowrightImg),
|
|
width: "32rpx",
|
|
height: "32rpx"
|
|
}),
|
|
k: common_vendor.sr(paging, "55f9e2cf-0", {
|
|
"k": "paging"
|
|
}),
|
|
l: common_vendor.o(queryList),
|
|
m: common_vendor.o(($event) => dataList.value = $event),
|
|
n: 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-55f9e2cf"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/sickList/sickList.js.map
|