480 lines
17 KiB
JavaScript
480 lines
17 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_assets = require("../../common/assets.js");
|
|
const api_api = require("../../api/api.js");
|
|
const utils_navTo = require("../../utils/navTo.js");
|
|
if (!Array) {
|
|
const _easycom_navBarSearch2 = common_vendor.resolveComponent("navBarSearch");
|
|
const _easycom_up__image2 = common_vendor.resolveComponent("up--image");
|
|
const _easycom_up_dropdown_item2 = common_vendor.resolveComponent("up-dropdown-item");
|
|
const _easycom_up_dropdown2 = common_vendor.resolveComponent("up-dropdown");
|
|
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
|
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
|
const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio");
|
|
const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group");
|
|
const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup");
|
|
const _easycom_up_overlay2 = common_vendor.resolveComponent("up-overlay");
|
|
(_easycom_navBarSearch2 + _easycom_up__image2 + _easycom_up_dropdown_item2 + _easycom_up_dropdown2 + _easycom_up_icon2 + _easycom_z_paging2 + _easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_up_popup2 + _easycom_up_overlay2)();
|
|
}
|
|
const _easycom_navBarSearch = () => "../../components/navBarSearch/navBarSearch.js";
|
|
const _easycom_up__image = () => "../../node-modules/uview-plus/components/u--image/u--image.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_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
|
|
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
|
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_popup = () => "../../node-modules/uview-plus/components/u-popup/u-popup.js";
|
|
const _easycom_up_overlay = () => "../../node-modules/uview-plus/components/u-overlay/u-overlay.js";
|
|
if (!Math) {
|
|
(_easycom_navBarSearch + _easycom_up__image + _easycom_up_dropdown_item + _easycom_up_dropdown + _easycom_up_icon + _easycom_z_paging + _easycom_up_radio + _easycom_up_radio_group + _easycom_up_popup + _easycom_up_overlay)();
|
|
}
|
|
const _sfc_main = {
|
|
__name: "specialList",
|
|
setup(__props) {
|
|
const user_id = common_vendor.ref("");
|
|
const showModal = common_vendor.ref(false);
|
|
const showDeal = common_vendor.ref(false);
|
|
const is_selected = common_vendor.ref(0);
|
|
const isMine = common_vendor.ref(false);
|
|
const paging = common_vendor.ref(null);
|
|
const dataList = common_vendor.ref([]);
|
|
const total = common_vendor.ref(0);
|
|
const keyWord = common_vendor.ref("");
|
|
const vote = common_vendor.ref(null);
|
|
const showNum = common_vendor.ref(true);
|
|
const options = common_vendor.ref([
|
|
{
|
|
label: "正序",
|
|
value: "asc"
|
|
},
|
|
{
|
|
label: "倒序",
|
|
value: "desc"
|
|
}
|
|
]);
|
|
const order = common_vendor.reactive({
|
|
read_num: "",
|
|
push_date: ""
|
|
});
|
|
const label_iden = common_vendor.ref("");
|
|
const showCase = common_vendor.ref(false);
|
|
common_vendor.ref(false);
|
|
const caseValue1 = common_vendor.ref("");
|
|
const caseValue2 = common_vendor.ref("");
|
|
const caseValue3 = common_vendor.ref("");
|
|
const level = common_vendor.ref(1);
|
|
const dealId = common_vendor.ref("");
|
|
const labelObj = common_vendor.reactive({
|
|
list1: [],
|
|
list2: [],
|
|
list3: []
|
|
});
|
|
const openDeal = (id, voteObj) => {
|
|
showDeal.value = true;
|
|
dealId.value = id;
|
|
vote.value = voteObj;
|
|
common_vendor.index.__f__("log", "at pages/specialList/specialList.vue:324", id);
|
|
};
|
|
const alertDel = () => {
|
|
showDeal.value = false;
|
|
showModal.value = true;
|
|
};
|
|
const goEdit = () => {
|
|
showDeal.value = false;
|
|
if (vote.value && vote.value.is_have_voted != 1) {
|
|
common_vendor.index.showToast({
|
|
icon: "none",
|
|
title: "不可编辑"
|
|
});
|
|
return false;
|
|
}
|
|
utils_navTo.navTo({
|
|
url: "/pages/publish/publish?exchange_id=" + dealId.value
|
|
});
|
|
};
|
|
const confirmDel = () => {
|
|
showModal.value = false;
|
|
};
|
|
const closeDealPop = () => {
|
|
showDeal.value = false;
|
|
};
|
|
const getCaseLabel = (lev, pid = 0) => {
|
|
api_api.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 openCase = () => {
|
|
getCaseLabel(1, 0);
|
|
showCase.value = true;
|
|
};
|
|
const confirmCase = () => {
|
|
if (level.value == 1 && caseValue1.value == "") {
|
|
common_vendor.index.showToast({ title: "请选择疾病", icon: "none" });
|
|
return false;
|
|
}
|
|
if (level.value == 2 && caseValue2.value == "") {
|
|
common_vendor.index.showToast({ title: "请选择疾病", icon: "none" });
|
|
return false;
|
|
}
|
|
if (level.value == 3 && caseValue3.value == "") {
|
|
common_vendor.index.showToast({ title: "请选择疾病", icon: "none" });
|
|
return false;
|
|
}
|
|
showCase.value = false;
|
|
if (level.value == 1) {
|
|
label_iden.value = caseValue1.value;
|
|
}
|
|
if (level.value == 2) {
|
|
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 == "") {
|
|
common_vendor.index.showToast({ title: "请选择疾病", icon: "none" });
|
|
return false;
|
|
}
|
|
if (level.value == 2 && caseValue2.value == "") {
|
|
common_vendor.index.showToast({ title: "请选择疾病", icon: "none" });
|
|
return false;
|
|
}
|
|
if (level.value == 3 && caseValue3.value == "") {
|
|
common_vendor.index.showToast({ title: "请选择疾病", icon: "none" });
|
|
return false;
|
|
}
|
|
if (level.value == 1) {
|
|
getCaseLabel(2, caseValue1.value);
|
|
} else if (level.value == 2) {
|
|
getCaseLabel(3, caseValue2.value);
|
|
}
|
|
paging.value.reload();
|
|
};
|
|
const closeCase = () => {
|
|
showCase.value = false;
|
|
};
|
|
const formatdate = (date) => {
|
|
return common_vendor.dayjs(date).format("YYYY-MM-DD");
|
|
};
|
|
common_vendor.onLoad((options2) => {
|
|
if (options2.keyWord) {
|
|
keyWord.value = options2.keyWord;
|
|
}
|
|
if (options2.userId) {
|
|
user_id.value = options2.userId;
|
|
}
|
|
if (options2.is_selected) {
|
|
is_selected.value = options2.is_selected;
|
|
}
|
|
if (options2.type == "mine") {
|
|
isMine.value = true;
|
|
}
|
|
});
|
|
common_vendor.onShow(() => {
|
|
var _a;
|
|
(_a = paging.value) == null ? void 0 : _a.refresh();
|
|
});
|
|
const changeDate = (e) => {
|
|
common_vendor.index.__f__("log", "at pages/specialList/specialList.vue:444", e);
|
|
order.read_num = "";
|
|
paging.value.reload();
|
|
};
|
|
const changeRead = (e) => {
|
|
common_vendor.index.__f__("log", "at pages/specialList/specialList.vue:449", e);
|
|
order.push_date = "";
|
|
paging.value.reload();
|
|
};
|
|
const videoErrorCallback = (e) => {
|
|
common_vendor.index.showModal({
|
|
content: e.target.errMsg,
|
|
showCancel: false
|
|
});
|
|
};
|
|
const changeWord = (val) => {
|
|
if (!val)
|
|
return false;
|
|
showNum.value = true;
|
|
keyWord.value = val;
|
|
paging.value.reload();
|
|
};
|
|
const goDetail = (id) => {
|
|
utils_navTo.navTo({
|
|
url: `/pages/detail/detail?id=${id}&type=exchange`
|
|
});
|
|
};
|
|
const queryList = (pageNo, pageSize) => {
|
|
common_vendor.index.__f__("log", "at pages/specialList/specialList.vue:471", 666666);
|
|
const params = {
|
|
page: pageNo,
|
|
page_size: pageSize
|
|
};
|
|
searchList(params);
|
|
};
|
|
const searchList = async (params) => {
|
|
let searchForm = {
|
|
keyword: keyWord.value,
|
|
user_id: user_id.value,
|
|
label_iden: label_iden.value
|
|
};
|
|
if (Number(is_selected.value)) {
|
|
searchForm.is_selected = Number(is_selected.value);
|
|
}
|
|
if (!order.read_num) {
|
|
delete order.read_num;
|
|
}
|
|
if (!label_iden.value) {
|
|
delete searchForm.label_iden;
|
|
}
|
|
if (!order.push_date) {
|
|
delete order.push_date;
|
|
}
|
|
if (order.read_num || order.push_date) {
|
|
searchForm.order = order;
|
|
}
|
|
api_api.api.searchExchage({
|
|
...searchForm,
|
|
...params
|
|
}).then((res) => {
|
|
paging.value.complete(res.data.data.data);
|
|
total.value = res.data.data.total;
|
|
}).catch((err) => {
|
|
paging.value.complete(false);
|
|
});
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return common_vendor.e({
|
|
a: common_vendor.o(changeWord),
|
|
b: common_vendor.p({
|
|
navName: "肝胆相照精选病例交流"
|
|
}),
|
|
c: showNum.value
|
|
}, showNum.value ? common_vendor.e({
|
|
d: common_vendor.t(total.value),
|
|
e: keyWord.value
|
|
}, keyWord.value ? {
|
|
f: common_vendor.t(keyWord.value)
|
|
} : {}) : {}, {
|
|
g: common_vendor.p({
|
|
src: common_vendor.unref(common_assets.caseImg),
|
|
width: "31rpx",
|
|
height: "31rpx"
|
|
}),
|
|
h: common_vendor.o(openCase),
|
|
i: common_vendor.o(changeDate),
|
|
j: common_vendor.o(($event) => order.push_date = $event),
|
|
k: common_vendor.p({
|
|
title: "发布时间",
|
|
options: options.value,
|
|
modelValue: order.push_date
|
|
}),
|
|
l: common_vendor.o(changeRead),
|
|
m: common_vendor.o(($event) => order.read_num = $event),
|
|
n: common_vendor.p({
|
|
title: "阅读量",
|
|
options: options.value,
|
|
modelValue: order.read_num
|
|
}),
|
|
o: common_vendor.sr("uDropdownRef", "b2cb78f4-3,b2cb78f4-0"),
|
|
p: common_vendor.f(dataList.value, (item, k0, i0) => {
|
|
return common_vendor.e({
|
|
a: common_vendor.t(item.exchange_title),
|
|
b: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id)
|
|
}, isMine.value ? {
|
|
c: common_vendor.o(($event) => openDeal(item.exchange_id, item.case_exchange_vote), item.exchange_id)
|
|
} : {}, {
|
|
d: "b2cb78f4-6-" + i0 + ",b2cb78f4-0",
|
|
e: common_vendor.p({
|
|
src: item.avatar ? item.avatar : common_vendor.unref(common_assets.headImg),
|
|
width: "46rpx",
|
|
height: "46rpx",
|
|
radius: "50%"
|
|
}),
|
|
f: common_vendor.t(item.user_name),
|
|
g: common_vendor.t(item.hospital_name),
|
|
h: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id),
|
|
i: common_vendor.t(item.exchange_content),
|
|
j: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id),
|
|
k: item.exchange_content_image && item.exchange_content_image.length > 0
|
|
}, item.exchange_content_image && item.exchange_content_image.length > 0 ? {
|
|
l: common_vendor.f(item.exchange_content_image, (unit, k1, i1) => {
|
|
return {
|
|
a: "b2cb78f4-7-" + i0 + "-" + i1 + ",b2cb78f4-0",
|
|
b: common_vendor.p({
|
|
src: unit,
|
|
radius: "10",
|
|
width: "220rpx",
|
|
height: "220rpx"
|
|
})
|
|
};
|
|
}),
|
|
m: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id)
|
|
} : {}, {
|
|
n: item.exchange_content_video && item.exchange_content_video.length > 0
|
|
}, item.exchange_content_video && item.exchange_content_video.length > 0 ? {
|
|
o: common_vendor.f(item.exchange_content_video, (videoCell, index, i1) => {
|
|
return {
|
|
a: index,
|
|
b: videoCell,
|
|
c: common_vendor.o(videoErrorCallback, index)
|
|
};
|
|
})
|
|
} : {}, {
|
|
p: item.label && item.label.length > 0
|
|
}, item.label && item.label.length > 0 ? {
|
|
q: common_vendor.f(item.label, (cell, k1, i1) => {
|
|
return {
|
|
a: common_vendor.t(cell.label_name),
|
|
b: cell.exchange_label_id
|
|
};
|
|
}),
|
|
r: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id)
|
|
} : {}, {
|
|
s: "b2cb78f4-8-" + i0 + ",b2cb78f4-0",
|
|
t: common_vendor.t(item.read_num),
|
|
v: "b2cb78f4-9-" + i0 + ",b2cb78f4-0",
|
|
w: common_vendor.t(item.collect_num),
|
|
x: "b2cb78f4-10-" + i0 + ",b2cb78f4-0",
|
|
y: common_vendor.t(item.comment_num),
|
|
z: "b2cb78f4-11-" + i0 + ",b2cb78f4-0",
|
|
A: common_vendor.t(formatdate(item.push_date)),
|
|
B: common_vendor.o(($event) => goDetail(item.exchange_id), item.exchange_id),
|
|
C: item.exchange_id
|
|
});
|
|
}),
|
|
q: isMine.value,
|
|
r: common_vendor.p({
|
|
name: "eye",
|
|
color: "#4B5563",
|
|
size: "28rpx"
|
|
}),
|
|
s: common_vendor.p({
|
|
name: "heart",
|
|
color: "#4B5563",
|
|
size: "28rpx"
|
|
}),
|
|
t: common_vendor.p({
|
|
name: "chat",
|
|
color: "#4B5563",
|
|
size: "28rpx"
|
|
}),
|
|
v: common_vendor.p({
|
|
name: "clock",
|
|
color: "#4B5563",
|
|
size: "28rpx"
|
|
}),
|
|
w: common_vendor.sr(paging, "b2cb78f4-0", {
|
|
"k": "paging"
|
|
}),
|
|
x: common_vendor.o(queryList),
|
|
y: common_vendor.o(($event) => dataList.value = $event),
|
|
z: common_vendor.p({
|
|
["inside-more"]: true,
|
|
["loading-more-no-more-text"]: "咱也是有底线的!",
|
|
["auto-show-back-to-top"]: true,
|
|
modelValue: dataList.value
|
|
}),
|
|
A: common_vendor.o(($event) => showCase.value = false),
|
|
B: common_vendor.o(continueCase),
|
|
C: level.value != 3,
|
|
D: common_vendor.o(confirmCase),
|
|
E: common_vendor.f(labelObj.list1, (item, k0, i0) => {
|
|
return {
|
|
a: "b2cb78f4-14-" + i0 + ",b2cb78f4-13",
|
|
b: common_vendor.p({
|
|
activeColor: "#3CC7C0 ",
|
|
label: item.label_name,
|
|
name: item.app_iden
|
|
}),
|
|
c: item.app_iden
|
|
};
|
|
}),
|
|
F: common_vendor.o(($event) => caseValue1.value = $event),
|
|
G: common_vendor.p({
|
|
iconPlacement: "right",
|
|
placement: "column",
|
|
modelValue: caseValue1.value
|
|
}),
|
|
H: level.value == 1,
|
|
I: common_vendor.f(labelObj.list2, (item, k0, i0) => {
|
|
return {
|
|
a: "b2cb78f4-16-" + i0 + ",b2cb78f4-15",
|
|
b: common_vendor.p({
|
|
activeColor: "#3CC7C0 ",
|
|
label: item.label_name,
|
|
name: item.app_iden
|
|
}),
|
|
c: item.app_iden
|
|
};
|
|
}),
|
|
J: common_vendor.o(($event) => caseValue2.value = $event),
|
|
K: common_vendor.p({
|
|
iconPlacement: "right",
|
|
placement: "column",
|
|
modelValue: caseValue2.value
|
|
}),
|
|
L: level.value == 2,
|
|
M: common_vendor.f(labelObj.list3, (item, k0, i0) => {
|
|
return {
|
|
a: "b2cb78f4-18-" + i0 + ",b2cb78f4-17",
|
|
b: common_vendor.p({
|
|
activeColor: "#3CC7C0 ",
|
|
label: item.label_name,
|
|
name: item.app_iden
|
|
}),
|
|
c: item.app_iden
|
|
};
|
|
}),
|
|
N: common_vendor.o(($event) => caseValue3.value = $event),
|
|
O: common_vendor.p({
|
|
iconPlacement: "right",
|
|
placement: "column",
|
|
modelValue: caseValue3.value
|
|
}),
|
|
P: level.value == 3,
|
|
Q: common_vendor.o(closeCase),
|
|
R: common_vendor.p({
|
|
round: 10,
|
|
zIndex: "9",
|
|
show: showCase.value,
|
|
mode: "bottom"
|
|
}),
|
|
S: common_vendor.o(goEdit),
|
|
T: common_vendor.o(alertDel),
|
|
U: common_vendor.o(closeDealPop),
|
|
V: common_vendor.o(_ctx.closeDeal),
|
|
W: common_vendor.p({
|
|
zIndex: 60,
|
|
overlayStyle: {
|
|
zIndex: 59
|
|
},
|
|
closeOnClickOverlay: false,
|
|
show: showDeal.value,
|
|
round: 10,
|
|
mode: "bottom"
|
|
}),
|
|
X: common_vendor.o(($event) => showModal.value = false),
|
|
Y: common_vendor.o(confirmDel),
|
|
Z: common_vendor.p({
|
|
show: showModal.value,
|
|
["mask-click-able"]: true
|
|
})
|
|
});
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-b2cb78f4"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/specialList/specialList.js.map
|