This commit is contained in:
zoujiandong
2025-07-25 08:41:38 +08:00
parent 0b7edc39d4
commit 53d8455890
27 changed files with 594 additions and 336 deletions
+227 -131
View File
@@ -12,9 +12,11 @@ if (!Array) {
const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup");
const _easycom_up_empty2 = common_vendor.resolveComponent("up-empty");
const _easycom_up_overlay2 = common_vendor.resolveComponent("up-overlay");
const _easycom_up_steps_item2 = common_vendor.resolveComponent("up-steps-item");
const _easycom_up_steps2 = common_vendor.resolveComponent("up-steps");
const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio");
const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group");
(_easycom_u_icon2 + _easycom_up__textarea2 + _easycom_up_icon2 + _easycom_up__image2 + _easycom_up_input2 + _easycom_up_popup2 + _easycom_up_empty2 + _easycom_up_overlay2 + _easycom_up_radio2 + _easycom_up_radio_group2)();
(_easycom_u_icon2 + _easycom_up__textarea2 + _easycom_up_icon2 + _easycom_up__image2 + _easycom_up_input2 + _easycom_up_popup2 + _easycom_up_empty2 + _easycom_up_overlay2 + _easycom_up_steps_item2 + _easycom_up_steps2 + _easycom_up_radio2 + _easycom_up_radio_group2)();
}
const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_up__textarea = () => "../../node-modules/uview-plus/components/u--textarea/u--textarea.js";
@@ -24,10 +26,12 @@ const _easycom_up_input = () => "../../node-modules/uview-plus/components/u-inpu
const _easycom_up_popup = () => "../../node-modules/uview-plus/components/u-popup/u-popup.js";
const _easycom_up_empty = () => "../../node-modules/uview-plus/components/u-empty/u-empty.js";
const _easycom_up_overlay = () => "../../node-modules/uview-plus/components/u-overlay/u-overlay.js";
const _easycom_up_steps_item = () => "../../node-modules/uview-plus/components/u-steps-item/u-steps-item.js";
const _easycom_up_steps = () => "../../node-modules/uview-plus/components/u-steps/u-steps.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";
if (!Math) {
(_easycom_u_icon + _easycom_up__textarea + svEditor + _easycom_up_icon + _easycom_up__image + _easycom_up_input + _easycom_up_popup + _easycom_up_empty + _easycom_up_overlay + _easycom_up_radio + _easycom_up_radio_group)();
(_easycom_u_icon + _easycom_up__textarea + svEditor + _easycom_up_icon + _easycom_up__image + _easycom_up_input + _easycom_up_popup + _easycom_up_empty + _easycom_up_overlay + _easycom_up_steps_item + _easycom_up_steps + _easycom_up_radio + _easycom_up_radio_group)();
}
const svEditor = () => "../../uni_modules/sv-editor/components/sv-editor/sv-editor.js";
const _sfc_main = {
@@ -38,18 +42,8 @@ const _sfc_main = {
const delId = common_vendor.ref("");
const showModal = common_vendor.ref(false);
const delType = common_vendor.ref("delDraft");
const showCase = 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 isPublish = common_vendor.ref(false);
const exchange_id = common_vendor.ref("");
const labelObj = common_vendor.reactive({
list1: [],
list2: [],
list3: []
});
const bottomHeight = common_vendor.ref(200);
const form = common_vendor.reactive({
exchange_title: "",
@@ -79,6 +73,27 @@ const _sfc_main = {
const isFocusInfo = common_vendor.ref(false);
const isFocusResult = common_vendor.ref(false);
const labelList = common_vendor.ref([]);
const level = common_vendor.ref(1);
const freshKey = common_vendor.ref(0);
const showCase = common_vendor.ref(false);
common_vendor.ref(false);
const caseValue1 = common_vendor.reactive({
app_iden: "",
label_name: ""
});
const caseValue2 = common_vendor.reactive({
app_iden: "",
label_name: ""
});
const caseValue3 = common_vendor.reactive({
app_iden: "",
label_name: ""
});
const labelObj = common_vendor.reactive({
list1: [],
list2: [],
list3: []
});
const goBack = () => {
common_vendor.index.navigateBack({
delta: 1
@@ -88,11 +103,8 @@ const _sfc_main = {
getDraftList();
showDraft.value = true;
};
const closeCase = () => {
showCase.value = false;
};
const epaste = (e) => {
common_vendor.index.__f__("log", "at pages/publish/publish.vue:541", e);
common_vendor.index.__f__("log", "at pages/publish/publish.vue:585", e);
};
const addOption = () => {
voteData.case_exchange_vote_option.push({
@@ -170,7 +182,7 @@ const _sfc_main = {
}
};
const ready = (e) => {
common_vendor.index.__f__("log", "at pages/publish/publish.vue:645", e);
common_vendor.index.__f__("log", "at pages/publish/publish.vue:689", e);
editorCtx.value = e;
let html = "<p>【患者信息】:</p><br/><p>【主诉】:</p><br/><p>【现病史及既往史】:</p><br/><p>【检查】:</p><br/><p>【临床诊断】:</p><br/><p>【治疗经过及结果】:</p><br/><br/>";
editorCtx.value.initHtml(html);
@@ -190,7 +202,7 @@ const _sfc_main = {
});
};
const clearMuBan = () => {
common_vendor.index.__f__("log", "at pages/publish/publish.vue:671", "清空模板");
common_vendor.index.__f__("log", "at pages/publish/publish.vue:715", "清空模板");
editorCtx.value.initHtml("");
};
const focusInfo = () => {
@@ -260,7 +272,7 @@ const _sfc_main = {
};
const getExchangeDetail = (id) => {
api_api.api.getExchangeDetail(id).then((res) => {
common_vendor.index.__f__("log", "at pages/publish/publish.vue:772", res.data.data);
common_vendor.index.__f__("log", "at pages/publish/publish.vue:816", res.data.data);
let {
exchange_content,
exchange_title,
@@ -316,7 +328,7 @@ const _sfc_main = {
};
const confirmDel = () => {
showModal.value = false;
common_vendor.index.__f__("log", "at pages/publish/publish.vue:840", delType.value);
common_vendor.index.__f__("log", "at pages/publish/publish.vue:884", delType.value);
if (delType.value == "delDraft") {
delDraft(delId.value);
} else if (delType.value == "saveDraft") {
@@ -427,7 +439,7 @@ const _sfc_main = {
}
},
fail: (err) => {
common_vendor.index.__f__("log", "at pages/publish/publish.vue:969", err);
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1013", err);
}
});
});
@@ -457,7 +469,7 @@ const _sfc_main = {
return randomNumber;
};
const getImageFormat = (imageUrl) => {
common_vendor.index.__f__("log", "at pages/publish/publish.vue:999", imageUrl);
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1043", imageUrl);
const lastDotIndex = imageUrl.lastIndexOf(".");
if (lastDotIndex !== -1) {
return imageUrl.substring(lastDotIndex + 1);
@@ -489,7 +501,7 @@ const _sfc_main = {
//从相册选择
extension: [".mp4", ".webm", ".ogg"],
success: function(res) {
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1026", res.tempFilePath);
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1070", res.tempFilePath);
HandleAddVideo(res.tempFilePath);
}
});
@@ -527,7 +539,7 @@ const _sfc_main = {
async success(res2) {
if (res2.statusCode === 204) {
let url = host + "/" + dir + filename + imgType;
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1068", editorCtx2);
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1112", editorCtx2);
let imgUrl = "https://cn.bing.com//th?id=OHR.FlamingosNamibia_ZH-CN3639748956_1920x1080.jpg";
const fileThumbnail = await editorCtx2.createCoverThumbnail(
imgUrl
@@ -541,7 +553,7 @@ const _sfc_main = {
}
},
fail: (err) => {
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1083", err);
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1127", err);
}
});
});
@@ -561,79 +573,131 @@ const _sfc_main = {
draftList.value = res.data.data.data;
});
};
const openCaseLevel = (lev) => {
freshKey.value++;
level.value = lev;
if (lev == 1) {
caseValue2.label_name = "";
caseValue2.app_iden = "";
labelObj.list2 = [];
} else if (lev == 2) {
labelObj.list3 = [];
caseValue3.label_name = "";
caseValue3.app_iden = "";
}
};
const groupChange1 = (e) => {
caseValue1.app_iden = e;
for (var i = 0; i < labelObj.list1.length; i++) {
if (labelObj.list1[i].app_iden == caseValue1.app_iden) {
caseValue1.label_name = labelObj.list1[i].label_name;
break;
}
}
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1172", caseValue1);
getCaseLabel(2, e);
};
const groupChange2 = (e) => {
caseValue2.app_iden = e;
for (var i = 0; i < labelObj.list2.length; i++) {
if (labelObj.list2[i].app_iden == caseValue2.app_iden) {
caseValue2.label_name = labelObj.list2[i].label_name;
break;
}
}
getCaseLabel(3, e);
};
const groupChange3 = (e) => {
caseValue3.app_iden = e;
level.value = 3;
for (var i = 0; i < labelObj.list3.length; i++) {
if (labelObj.list3[i].app_iden == caseValue3.app_iden) {
caseValue3.label_name = labelObj.list3[i].label_name;
break;
}
}
};
const getCaseLabel = (lev, pid = 0) => {
api_api.api.getCaseLabel({
pId: pid
}).then((res) => {
level.value = lev;
if (lev == 1) {
labelObj.list1 = res.data.data;
} else if (lev == 2) {
labelObj.list2 = res.data.data;
if (res.data.data.length == 0) {
level.value = 1;
}
} else if (lev == 3) {
labelObj.list3 = res.data.data;
if (res.data.data.length == 0) {
level.value = 2;
}
}
level.value = lev;
});
};
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;
}
const cancelCase = () => {
showCase.value = false;
};
const clearCase = () => {
level.value = 1;
caseValue1.app_iden = "";
caseValue1.label_name = "";
caseValue2.app_iden = "";
caseValue2.label_name = "";
caseValue3.app_iden = "";
caseValue3.label_name = "";
labelObj.list2 = [];
labelObj.list3 = [];
freshKey.value++;
};
const confirmCase = () => {
if (level.value == 1 && caseValue1.app_iden == "") {
common_vendor.index.showToast({ title: "请选择疾病选项", icon: "none" });
return false;
}
if (level.value == 1) {
let label = labelObj.list1.find((item) => item.app_iden == caseValue1.value);
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1133", label);
let { app_iden, label_name } = caseValue1;
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
app_iden,
label_name
});
} else if (level.value == 2) {
if (!caseValue2.app_iden) {
let { app_iden, label_name } = caseValue1;
labelList.value.push({
app_iden,
label_name
});
} else {
let { app_iden, label_name } = caseValue2;
labelList.value.push({
app_iden,
label_name
});
}
} else if (level.value == 3) {
if (!caseValue3.app_iden) {
let { app_iden, label_name } = caseValue2;
labelList.value.push({
app_iden,
label_name
});
} else {
let { app_iden, label_name } = caseValue3;
labelList.value.push({
app_iden,
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 = "";
common_vendor.index.__f__("log", "at pages/publish/publish.vue:1290", labelList.value);
showCase.value = false;
};
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);
}
const closeCase = () => {
showCase.value = false;
};
const delLabel = (index) => {
labelList.value.splice(index, 1);
@@ -643,6 +707,7 @@ const _sfc_main = {
common_vendor.index.showToast({ title: "最多添加5个标签", icon: "none" });
return false;
}
clearCase();
showCase.value = true;
getCaseLabel(1, 0);
};
@@ -901,68 +966,99 @@ const _sfc_main = {
show: showModal.value,
["mask-click-able"]: true
}),
aG: common_vendor.o(($event) => showCase.value = false),
aH: common_vendor.o(continueCase),
aI: level.value != 3,
aJ: common_vendor.o(confirmCase),
aK: common_vendor.f(labelObj.list1, (item, k0, i0) => {
return {
a: "bfce3555-29-" + i0 + ",bfce3555-28",
b: common_vendor.p({
activeColor: "#3CC7C0 ",
label: item.label_name,
name: item.app_iden
}),
c: item.app_iden
};
aG: common_vendor.o(cancelCase),
aH: common_vendor.o(confirmCase),
aI: common_vendor.t(!caseValue1.label_name ? "请选择选项" : caseValue1.label_name),
aJ: common_vendor.p({
name: "arrow-right"
}),
aL: common_vendor.o(($event) => caseValue1.value = $event),
aM: common_vendor.p({
iconPlacement: "right",
placement: "column",
modelValue: caseValue1.value
aK: common_vendor.o(($event) => openCaseLevel("1")),
aL: caseValue1.label_name && labelObj.list2.length > 0
}, caseValue1.label_name && labelObj.list2.length > 0 ? {
aM: common_vendor.t(!caseValue2.label_name ? "请选择选项" : caseValue2.label_name),
aN: common_vendor.p({
name: "arrow-right"
}),
aN: level.value == 1,
aO: common_vendor.f(labelObj.list2, (item, k0, i0) => {
return {
a: "bfce3555-31-" + i0 + ",bfce3555-30",
b: common_vendor.p({
activeColor: "#3CC7C0 ",
label: item.label_name,
name: item.app_iden
}),
c: item.app_iden
};
aO: common_vendor.o(($event) => openCaseLevel("2"))
} : {}, {
aP: caseValue2.label_name && labelObj.list3.length > 0
}, caseValue2.label_name && labelObj.list3.length > 0 ? {
aQ: common_vendor.t(!caseValue3.label_name ? "请选择选项" : caseValue3.label_name),
aR: common_vendor.p({
name: "arrow-right"
}),
aP: common_vendor.o(($event) => caseValue2.value = $event),
aQ: common_vendor.p({
iconPlacement: "right",
placement: "column",
modelValue: caseValue2.value
}),
aR: level.value == 2,
aS: common_vendor.f(labelObj.list3, (item, k0, i0) => {
return {
a: "bfce3555-33-" + i0 + ",bfce3555-32",
b: common_vendor.p({
activeColor: "#3CC7C0 ",
label: item.label_name,
name: item.app_iden
}),
c: item.app_iden
};
}),
aT: common_vendor.o(($event) => caseValue3.value = $event),
aS: common_vendor.o(($event) => openCaseLevel("3"))
} : {}, {
aT: freshKey.value,
aU: common_vendor.p({
current: level.value - 1,
direction: "column"
}),
aV: common_vendor.f(labelObj.list1, (item, k0, i0) => {
return {
a: "bfce3555-36-" + i0 + ",bfce3555-35",
b: common_vendor.p({
activeColor: "#3CC7C0 ",
label: item.label_name,
name: item.app_iden
}),
c: item.app_iden
};
}),
aW: common_vendor.o(groupChange1),
aX: common_vendor.o(($event) => caseValue1.app_iden = $event),
aY: common_vendor.p({
name: "group1",
iconPlacement: "right",
placement: "column",
modelValue: caseValue3.value
modelValue: caseValue1.app_iden
}),
aV: level.value == 3,
aW: common_vendor.o(closeCase),
aX: common_vendor.p({
aZ: level.value == 1,
ba: common_vendor.f(labelObj.list2, (item, k0, i0) => {
return {
a: "bfce3555-38-" + i0 + ",bfce3555-37",
b: common_vendor.p({
activeColor: "#3CC7C0 ",
label: item.label_name,
name: item.app_iden
}),
c: item.app_iden
};
}),
bb: common_vendor.o(groupChange2),
bc: common_vendor.o(($event) => caseValue2.app_iden = $event),
bd: common_vendor.p({
name: "group2",
iconPlacement: "right",
placement: "column",
modelValue: caseValue2.app_iden
}),
be: level.value == 2,
bf: common_vendor.f(labelObj.list3, (item, k0, i0) => {
return {
a: "bfce3555-40-" + i0 + ",bfce3555-39",
b: common_vendor.p({
activeColor: "#3CC7C0 ",
label: item.label_name,
name: item.app_iden
}),
c: item.app_iden
};
}),
bg: common_vendor.o(groupChange3),
bh: common_vendor.o(($event) => caseValue3.app_iden = $event),
bi: common_vendor.p({
name: "group3",
iconPlacement: "right",
placement: "column",
modelValue: caseValue3.app_iden
}),
bj: level.value == 3,
bk: common_vendor.o(closeCase),
bl: common_vendor.p({
round: 10,
zIndex: "9",
closeOnClickOverlay: false,
show: showCase.value,
mode: "bottom"
})
@@ -10,6 +10,8 @@
"up-popup": "../../node-modules/uview-plus/components/u-popup/u-popup",
"up-empty": "../../node-modules/uview-plus/components/u-empty/u-empty",
"up-overlay": "../../node-modules/uview-plus/components/u-overlay/u-overlay",
"up-steps-item": "../../node-modules/uview-plus/components/u-steps-item/u-steps-item",
"up-steps": "../../node-modules/uview-plus/components/u-steps/u-steps",
"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",
"sv-editor": "../../uni_modules/sv-editor/components/sv-editor/sv-editor"
File diff suppressed because one or more lines are too long
+19
View File
@@ -23,6 +23,20 @@
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.stepbox.data-v-bfce3555 {
padding: 15rpx 30rpx;
border-bottom: 2rpx dotted #f3f4f6;
}
.stepbox.data-v-bfce3555 .u-steps-item__content {
margin-top: -5rpx !important;
}
.stepbox .slot-content.data-v-bfce3555 {
width: 100%;
margin-bottom: 25rpx;
justify-content: space-between;
align-items: center;
display: flex;
}
.casepop.data-v-bfce3555 {
display: flex;
flex-direction: column;
@@ -593,6 +607,7 @@
display: flex;
padding: 25rpx 25rpx 10rpx;
margin-bottom: 20rpx;
flex-wrap: wrap;
}
.form .add.data-v-bfce3555 {
display: flex;
@@ -600,13 +615,17 @@
justify-content: center;
align-items: center;
color: #3cc7c0;
margin-bottom: 10rpx;
margin-left: 18rpx;
}
.form .sick.data-v-bfce3555 {
position: relative;
padding: 0 60rpx 0 30rpx;
height: 60rpx;
margin-bottom: 10rpx;
white-space: nowrap;
display: flex;
margin-right: 10rpx;
justify-content: center;
align-items: center;
background: #f9f9f9;