From c80bc467a41daa6cbae4e5515a300a8ca98cfeaa Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 21 七月 2026 15:44:01 +0800
Subject: [PATCH] 维护
---
unpackage/dist/dev/mp-weixin/pagesSub/case/CaseDetails.js | 1133 ++++++++++++++++++++++++++++-------------------------------
1 files changed, 533 insertions(+), 600 deletions(-)
diff --git a/unpackage/dist/dev/mp-weixin/pagesSub/case/CaseDetails.js b/unpackage/dist/dev/mp-weixin/pagesSub/case/CaseDetails.js
index f5549ee..7eabbd6 100644
--- a/unpackage/dist/dev/mp-weixin/pagesSub/case/CaseDetails.js
+++ b/unpackage/dist/dev/mp-weixin/pagesSub/case/CaseDetails.js
@@ -1,34 +1,76 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const stores_user = require("../../stores/user.js");
-const utils_dict = require("../../utils/dict.js");
+const utils_useDictMapper = require("../../utils/useDictMapper.js");
if (!Array) {
const _easycom_u_input2 = common_vendor.resolveComponent("u-input");
const _easycom_u_textarea2 = common_vendor.resolveComponent("u-textarea");
- const _easycom_u_button2 = common_vendor.resolveComponent("u-button");
- const _easycom_u_picker2 = common_vendor.resolveComponent("u-picker");
const _easycom_u_datetime_picker2 = common_vendor.resolveComponent("u-datetime-picker");
- const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon");
- (_easycom_u_input2 + _easycom_u_textarea2 + _easycom_u_button2 + _easycom_u_picker2 + _easycom_u_datetime_picker2 + _easycom_u_loading_icon2)();
+ const _easycom_u_button2 = common_vendor.resolveComponent("u-button");
+ (_easycom_u_input2 + _easycom_u_textarea2 + _easycom_u_datetime_picker2 + _easycom_u_button2)();
}
const _easycom_u_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
const _easycom_u_textarea = () => "../../uni_modules/uview-plus/components/u-textarea/u-textarea.js";
-const _easycom_u_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js";
-const _easycom_u_picker = () => "../../uni_modules/uview-plus/components/u-picker/u-picker.js";
const _easycom_u_datetime_picker = () => "../../uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.js";
-const _easycom_u_loading_icon = () => "../../uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.js";
+const _easycom_u_button = () => "../../uni_modules/uview-plus/components/u-button/u-button.js";
if (!Math) {
- (_easycom_u_input + _easycom_u_textarea + _easycom_u_button + common_vendor.unref(attachmentUpload) + _easycom_u_picker + _easycom_u_datetime_picker + _easycom_u_loading_icon)();
+ (_easycom_u_input + common_vendor.unref(AreaSelect) + _easycom_u_textarea + _easycom_u_datetime_picker + common_vendor.unref(attachmentUpload) + _easycom_u_button)();
}
const attachmentUpload = () => "../../components/attachment/index.js";
+const AreaSelect = () => "../../components/AreaSelect/index.js";
const _sfc_main = {
__name: "CaseDetails",
setup(__props) {
- const dict = common_vendor.ref({});
+ const requiredDictTypes = [
+ "sys_IDType",
+ "sys_user_sex",
+ "sys_Nation",
+ "sys_BloodType",
+ "sys_Infectious",
+ "sys_AgeUnit",
+ // 骞撮緞鍗曚綅锛堝凡瀛樺湪锛�
+ "sys_education",
+ "sys_occupation"
+ ];
+ const { dictData, loading: dictLoading } = utils_useDictMapper.useDictMapper(requiredDictTypes);
+ const getDictList = (dictType) => dictData.value[dictType] || [];
+ const nationList = common_vendor.computed(
+ () => getDictList("sys_Nation").map((item) => item.label)
+ );
+ const idCardTypeList = common_vendor.computed(
+ () => getDictList("sys_IDType").map((item) => item.label)
+ );
+ const infectiousList = common_vendor.computed(() => getDictList("sys_Infectious"));
+ const educationList = common_vendor.computed(
+ () => getDictList("sys_education").map((item) => item.label)
+ );
+ const occupationList = common_vendor.computed(
+ () => getDictList("sys_occupation").map((item) => item.label)
+ );
+ const ageUnitList = common_vendor.computed(
+ () => getDictList("sys_AgeUnit").map((item) => item.label)
+ );
const userStore = stores_user.useUserStore();
const isEditMode = common_vendor.ref(false);
const currentId = common_vendor.ref(null);
const selectedInfectious = common_vendor.ref([]);
+ const loading = common_vendor.ref(false);
+ const currentTime = common_vendor.ref("");
+ const disabledColor = common_vendor.ref("#f5f5f7");
+ const isReadonly = common_vendor.ref(false);
+ common_vendor.ref(false);
+ common_vendor.ref(0);
+ const nationIndex = common_vendor.ref(-1);
+ const idCardTypeIndex = common_vendor.ref(-1);
+ const educationIndex = common_vendor.ref(-1);
+ const occupationIndex = common_vendor.ref(-1);
+ const idCardError = common_vendor.ref("");
+ const attachments = common_vendor.ref([]);
+ const ageUnitIndex = common_vendor.ref(-1);
+ const showReportTimePicker = common_vendor.ref(false);
+ const reportTimeValue = common_vendor.ref(Date.now());
+ const residenceAddress = common_vendor.ref({ sheng: "", shi: "", qu: "" });
+ const registerAddress = common_vendor.ref({ sheng: "", shi: "", qu: "" });
const form = common_vendor.ref({
caseNo: "",
treatmenthospitalname: "",
@@ -36,6 +78,7 @@
coordinatorName: "",
coordinatorNo: "",
treatmentdeptname: "",
+ deptName: "",
name: "",
nation: "",
nationality: "涓浗",
@@ -45,203 +88,239 @@
birthday: "",
age: "",
ageunit: "",
- // 鏂板锛氬勾榫勫崟浣�
inpatientno: "",
+ gcsScore: "",
diagnosisname: "",
bloodType: "",
rhYin: "",
infoName: "",
phone: "",
+ icuDoctor: "",
+ icuDoctorPhone: "",
reportername: "",
reporterno: "",
reporterphone: "",
- // 鎶ュ憡鑰呰仈绯荤數璇�
reporttime: "",
contactperson: "",
- // 鏂板锛氳仈绯讳汉锛堝崗璋冨憳锛�
education: "",
- // 鏂板锛氬鍘�
illnessoverview: "",
- // 鏂板锛氱梾鎯呮鍐�
infectious: "",
- // 浼犳煋鐥呮儏鍐�
infectiousOther: "",
- // 浼犳煋鐥呭叾浠�
isTransport: "",
- // 鏂板锛氭槸鍚﹂渶瑕佽浆杩愶紝榛樿1涓嶉渶瑕�
nativeplace: "",
- // 鏂板锛氱睄璐�
occupation: "",
- // 鏂板锛氳亴涓�
patientstate: "",
- // 鏂板锛氱梾浜虹姸鍐�
registeraddress: "",
- // 鏂板锛氭埛绫嶅湴鍧�
registerprovince: "",
- // 鏂板锛氭埛绫嶅湴鍧�鐪佺紪鍙�
registerprovincename: "",
- // 鏂板锛氭埛绫嶅湴鍧�鐪佸悕绉�
registercityname: "",
- // 鏂板锛氬競鍚嶇О
registertownname: "",
- // 鏂板锛氭墍灞炶閬擄紙闀囷級鍚嶇О
registercommunityname: "",
- // 鏂板锛氱ぞ鍖猴紙鏉戯級鍚嶇О
residenceaddress: "",
- // 鏂板锛氱幇浣忓湴鍧�
residenceprovince: "",
- // 鏂板锛氱幇浣忓湴鍧�鐪佷唬鐮�
residenceprovincename: "",
- // 鏂板锛氱幇浣忓湴鍧�鐪佸悕绉�
residencecountycode: "",
- // 鏂板锛氭墍灞炲尯鍩熺紪鍙�
residencecountyname: "",
- // 鏂板锛氭墍灞炲尯鍩熷悕绉�
residencetownname: "",
- // 鏂板锛氭墍灞炶閬擄紙闀囷級鍚嶇О
residencecommunity: "",
- // 鏂板锛氱ぞ鍖猴紙鏉戯級缂栧彿
residencecommunityname: "",
- // 鏂板锛氱ぞ鍖猴紙鏉戯級鍚嶇О
remark: "",
- // 鏂板锛氬娉�
reportStatus: "1",
- // 鏂板锛氫笂鎶ョ姸鎬侊紝榛樿1宸蹭笂鎶�
terminationCase: 0,
- // 鏂板锛氭槸鍚︾粓姝㈡渚嬶紝榛樿0寮�鍚�
annexfilesList: []
- // 闄勪欢鏂囦欢鍦板潃闆嗗悎
});
- const attachments = common_vendor.ref([]);
- const infectiousDiseaselist = common_vendor.ref([]);
- const nationLabel = common_vendor.ref([]);
- const isReadonly = common_vendor.ref(false);
- const id = common_vendor.ref(null);
- const selectShow = common_vendor.ref(false);
- const showHospitalPicker = common_vendor.ref(false);
- const showNationPicker = common_vendor.ref(false);
- common_vendor.ref(false);
- const showDatePicker = common_vendor.ref(false);
- const showReporterPicker = common_vendor.ref(false);
- const birthdayValue = common_vendor.ref(0);
- const hospitalOptions = common_vendor.ref([
- { label: "闈掑矝闀滄箹鍖婚櫌", value: "qdhospital1" },
- { label: "闈掑矝绉戝ぇ鍖婚櫌", value: "qdhospital2" },
- { label: "闈掑矝澶у闄勫睘鍖婚櫌", value: "qdhospital3" },
- { label: "闈掑矝甯傜珛鍖婚櫌", value: "qdhospital4" }
- ]);
- const pickerColumns = common_vendor.ref([
- [
- { label: "绁炵粡澶栫", value: "neurosurgery" },
- { label: "蹇冭绠″唴绉�", value: "cardiology" },
- { label: "閲嶇棁鍖诲绉�", value: "icu" },
- { label: "鎬ヨ瘖绉�", value: "emergency" },
- { label: "绁炵粡鍐呯", value: "neurology" },
- { label: "鍛煎惛鍐呯", value: "respiratory" },
- { label: "娑堝寲鍐呯", value: "gastroenterology" },
- { label: "鑲惧唴绉�", value: "nephrology" }
- ]
- ]);
- const nationOptions = common_vendor.ref([
- { label: "姹夋棌", value: "han" },
- { label: "鍥炴棌", value: "hui" },
- { label: "婊℃棌", value: "man" },
- { label: "钂欏彜鏃�", value: "menggu" }
- ]);
- const idCardTypeOptions = common_vendor.ref([
- { label: "灞呮皯韬唤璇�", value: "idcard" },
- { label: "鎶ょ収", value: "passport" },
- { label: "鍐涘畼璇�", value: "officer" }
- ]);
- const genderOptions = common_vendor.ref([
- { label: "鐢�", value: "1" },
- { label: "濂�", value: "2" }
- ]);
- const bloodTypeOptions = common_vendor.ref([
+ const genderOptions = common_vendor.computed(() => {
+ const sexDict = getDictList("sys_user_sex");
+ if (sexDict.length)
+ return sexDict.map((item) => ({ label: item.label, value: item.value }));
+ return [
+ { label: "鐢�", value: "1" },
+ { label: "濂�", value: "2" }
+ ];
+ });
+ const bloodTypeOptions = [
{ label: "A鍨�", value: "A鍨�" },
{ label: "B鍨�", value: "B鍨�" },
{ label: "O鍨�", value: "O鍨�" },
{ label: "AB鍨�", value: "AB鍨�" }
- ]);
- common_vendor.ref([
- { label: "闇�瑕�", value: "2" },
- { label: "涓嶉渶瑕�", value: "1" }
- ]);
- const rhOptions = common_vendor.ref([
+ ];
+ const rhOptions = [
{ label: "闃虫��", value: "1" },
{ label: "闃存��", value: "0" }
- ]);
- const reporterOptions = common_vendor.ref([
- { label: "寮犲尰鐢�", value: "doctor1" },
- { label: "鏉庡尰鐢�", value: "doctor2" }
- ]);
- const loading = common_vendor.ref(false);
- const currentTime = common_vendor.ref("");
- const disabledColor = common_vendor.ref("#f5f5f7");
- const isFormValid = common_vendor.computed(() => {
- return form.value.name && // form.value.idcardno &&
- form.value.diagnosisname && form.value.toHospital;
- });
- const hospitalIndex = common_vendor.ref(-1);
- const deptIndex = common_vendor.ref(-1);
- const nationIndex = common_vendor.ref(-1);
- const idCardTypeIndex = common_vendor.ref(-1);
- const hospitalLabels = common_vendor.computed(
- () => hospitalOptions.value.map((item) => item.label)
+ ];
+ const isFormValid = common_vendor.computed(
+ () => form.value.name && form.value.diagnosisname && form.value.toHospital
);
- const ageDisplay = common_vendor.computed(() => {
- if (!form.value.age || !form.value.ageunit) {
- return "鑷姩璁$畻";
+ const currentAgeUnitText = common_vendor.computed(() => {
+ if (ageUnitIndex.value >= 0 && ageUnitList.value[ageUnitIndex.value]) {
+ return ageUnitList.value[ageUnitIndex.value];
}
- return `${form.value.age}${form.value.ageunit}`;
+ if (form.value.ageunit) {
+ const found = getDictList("sys_AgeUnit").find(
+ (item) => item.value === form.value.ageunit
+ );
+ return found ? found.label : form.value.ageunit;
+ }
+ return "";
});
- const deptLabels = common_vendor.computed(() => {
- return pickerColumns.value[0].map((item) => item.label);
+ const currentNationText = common_vendor.computed(() => {
+ if (nationIndex.value >= 0 && nationList.value[nationIndex.value])
+ return nationList.value[nationIndex.value];
+ return form.value.nation || "";
});
- const nationLabels = common_vendor.computed(
- () => nationLabel.value.map((item) => item.label)
- );
- const idCardTypeLabels = common_vendor.computed(
- () => idCardTypeOptions.value.map((item) => item.label)
- );
- common_vendor.computed(() => {
- return hospitalIndex.value >= 0 ? hospitalLabels.value[hospitalIndex.value] : "璇烽�夋嫨鍖荤枟鏈烘瀯";
+ const currentIdCardTypeText = common_vendor.computed(() => {
+ if (idCardTypeIndex.value >= 0 && idCardTypeList.value[idCardTypeIndex.value])
+ return idCardTypeList.value[idCardTypeIndex.value];
+ if (form.value.idcardtype) {
+ const found = getDictList("sys_IDType").find(
+ (item) => item.value == form.value.idcardtype
+ );
+ return found ? found.label : form.value.idcardtype;
+ }
+ return "";
});
- common_vendor.computed(() => {
- return deptIndex.value >= 0 ? deptLabels.value[deptIndex.value] : "璇烽�夋嫨绉戝";
+ const currentEducationText = common_vendor.computed(() => {
+ if (educationIndex.value >= 0 && educationList.value[educationIndex.value])
+ return educationList.value[educationIndex.value];
+ if (form.value.education) {
+ const found = getDictList("sys_education").find(
+ (item) => item.value == form.value.education
+ );
+ return found ? found.label : form.value.education;
+ }
+ return "";
});
- const currentNation = common_vendor.computed(() => {
- return nationIndex.value >= 0 ? nationLabels.value[nationIndex.value] : form.value.nation ? form.value.nation : "璇烽�夋嫨姘戞棌";
+ const currentOccupationText = common_vendor.computed(() => {
+ if (occupationIndex.value >= 0 && occupationList.value[occupationIndex.value])
+ return occupationList.value[occupationIndex.value];
+ if (form.value.occupation) {
+ const found = getDictList("sys_occupation").find(
+ (item) => item.value == form.value.occupation
+ );
+ return found ? found.label : form.value.occupation;
+ }
+ return "";
});
- const currentIdCardType = common_vendor.computed(() => {
- return idCardTypeIndex.value >= 0 ? idCardTypeLabels.value[idCardTypeIndex.value] : "璇烽�夋嫨璇佷欢绫诲瀷";
- });
+ const updateCurrentTime = () => {
+ const now = /* @__PURE__ */ new Date();
+ const year = now.getFullYear();
+ const month = String(now.getMonth() + 1).padStart(2, "0");
+ const day = String(now.getDate()).padStart(2, "0");
+ const hours = String(now.getHours()).padStart(2, "0");
+ const minutes = String(now.getMinutes()).padStart(2, "0");
+ const seconds = String(now.getSeconds()).padStart(2, "0");
+ const timeStr = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+ currentTime.value = timeStr;
+ if (!form.value.reporttime) {
+ form.value.reporttime = timeStr;
+ }
+ };
+ const generateCaseNo = () => {
+ const now = /* @__PURE__ */ new Date();
+ const year = now.getFullYear();
+ const month = String(now.getMonth() + 1).padStart(2, "0");
+ const day = String(now.getDate()).padStart(2, "0");
+ const hours = String(now.getHours()).padStart(2, "0");
+ const minutes = String(now.getMinutes()).padStart(2, "0");
+ form.value.caseNo = `opo${year}${month}${day}${hours}${minutes}`;
+ };
const onNationChange = (e) => {
const index = parseInt(e.detail.value);
nationIndex.value = index;
- form.value.nation = nationOptions.value[index].label;
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:670", form.value.nation, "form.value.nation");
+ form.value.nation = nationList.value[index];
};
const onIdCardTypeChange = (e) => {
const index = parseInt(e.detail.value);
idCardTypeIndex.value = index;
- form.value.idcardtype = idCardTypeOptions.value[index].value;
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:677", form.value.idcardtype, "form.value.idcardtype");
+ const selectedLabel = idCardTypeList.value[index];
+ const dictItem = getDictList("sys_IDType").find(
+ (item) => item.label == selectedLabel
+ );
+ form.value.idcardtype = dictItem ? dictItem.value : selectedLabel;
+ };
+ const onEducationChange = (e) => {
+ const index = parseInt(e.detail.value);
+ educationIndex.value = index;
+ const selectedLabel = educationList.value[index];
+ const dictItem = getDictList("sys_education").find(
+ (item) => item.label == selectedLabel
+ );
+ form.value.education = dictItem ? dictItem.value : selectedLabel;
+ };
+ const onOccupationChange = (e) => {
+ const index = parseInt(e.detail.value);
+ occupationIndex.value = index;
+ const selectedLabel = occupationList.value[index];
+ const dictItem = getDictList("sys_occupation").find(
+ (item) => item.label == selectedLabel
+ );
+ form.value.occupation = dictItem ? dictItem.value : selectedLabel;
+ };
+ const onAgeUnitChange = (e) => {
+ const index = parseInt(e.detail.value);
+ ageUnitIndex.value = index;
+ const selectedLabel = ageUnitList.value[index];
+ const dictItem = getDictList("sys_AgeUnit").find(
+ (item) => item.label === selectedLabel
+ );
+ form.value.ageunit = dictItem ? dictItem.value : selectedLabel;
};
const onBirthdayChange = (e) => {
form.value.birthday = e.detail.value;
calculateAge();
};
- const onDateConfirm = (e) => {
- const date = new Date(e.value);
- form.value.birthday = `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")}`;
- calculateAge();
- showDatePicker.value = false;
+ const calculateAge = () => {
+ if (!form.value.birthday) {
+ form.value.age = "";
+ form.value.ageunit = "";
+ ageUnitIndex.value = -1;
+ return;
+ }
+ const birthDate = new Date(form.value.birthday);
+ const today = /* @__PURE__ */ new Date();
+ if (isNaN(birthDate.getTime()))
+ return;
+ if (birthDate > today) {
+ common_vendor.index.showToast({ title: "鍑虹敓鏃ユ湡涓嶈兘鏄湭鏉ユ棩鏈�", icon: "none" });
+ form.value.age = "";
+ form.value.ageunit = "";
+ ageUnitIndex.value = -1;
+ return;
+ }
+ const daysDiff = Math.floor((today - birthDate) / (1e3 * 60 * 60 * 24));
+ if (daysDiff < 0)
+ return;
+ let years = today.getFullYear() - birthDate.getFullYear();
+ let months = today.getMonth() - birthDate.getMonth();
+ let days = today.getDate() - birthDate.getDate();
+ let ageValue, ageUnit;
+ if (years >= 1) {
+ if (months < 0 || months === 0 && days < 0)
+ years--;
+ ageValue = years.toString();
+ ageUnit = "宀�";
+ } else if (daysDiff >= 30) {
+ let totalMonths = years * 12 + months;
+ if (days < 0)
+ totalMonths--;
+ ageValue = Math.max(1, totalMonths).toString();
+ ageUnit = "涓湀";
+ } else {
+ ageValue = Math.max(1, daysDiff).toString();
+ ageUnit = "澶�";
+ }
+ form.value.age = ageValue;
+ form.value.ageunit = ageUnit;
+ const unitList = ageUnitList.value;
+ const idx = unitList.findIndex((item) => item === ageUnit);
+ ageUnitIndex.value = idx >= 0 ? idx : -1;
};
- const idCardError = common_vendor.ref("");
const validateIdCard = () => {
const idCard = form.value.idcardno;
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:700", idCard, "褰撳墠杈撳叆");
+ if (!idCard) {
+ idCardError.value = "";
+ return true;
+ }
if (idCard.length !== 18) {
idCardError.value = "韬唤璇佸彿鐮佸繀椤绘槸18浣�";
return false;
@@ -251,57 +330,6 @@
idCardError.value = "韬唤璇佸彿鐮佹牸寮忎笉姝g‘";
return false;
}
- const birthStr = idCard.substring(6, 14);
- const year = birthStr.substring(0, 4);
- const month = birthStr.substring(4, 6);
- const day = birthStr.substring(6, 8);
- const birthDate = /* @__PURE__ */ new Date(`${year}-${month}-${day}`);
- if (isNaN(birthDate.getTime())) {
- idCardError.value = "韬唤璇佸彿鐮佷腑鐨勫嚭鐢熸棩鏈熸棤鏁�";
- return false;
- }
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:729", 3);
- const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
- const birthYear = parseInt(year, 10);
- if (birthYear < 1900 || birthYear > currentYear) {
- idCardError.value = "鍑虹敓骞翠唤涓嶅湪鏈夋晥鑼冨洿鍐�";
- return false;
- }
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:738", 4);
- if (!validateIdCardCheckCode(idCard)) {
- idCardError.value = "韬唤璇佸彿鐮佹牎楠屽け璐�";
- return false;
- }
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:745", 5);
- idCardError.value = "";
- return true;
- };
- const onIdCardChange = (value) => {
- if (validateIdCard()) {
- extractBirthdayFromIdCard();
- }
- };
- const handleGcsBlur = () => {
- const val = Number(form.value.gcsScore);
- if (!val && val !== 0)
- return;
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:762", val);
- if (val > 7) {
- common_vendor.index.showToast({
- title: "GCS璇勫垎涓嶈兘澶т簬7",
- icon: "none"
- });
- form.value.gcsScore = "";
- }
- if (val < 3) {
- common_vendor.index.showToast({
- title: "GCS璇勫垎涓嶈兘灏忎簬3",
- icon: "none"
- });
- form.value.gcsScore = "";
- }
- };
- const validateIdCardCheckCode = (idCard) => {
const coefficientArray = [
7,
9,
@@ -323,261 +351,113 @@
];
const checkCodeMap = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"];
let sum = 0;
- for (let i = 0; i < 17; i++) {
+ for (let i = 0; i < 17; i++)
sum += parseInt(idCard.charAt(i), 10) * coefficientArray[i];
- }
const checkCode = checkCodeMap[sum % 11];
- return checkCode === idCard.charAt(17).toUpperCase();
+ if (checkCode != idCard.charAt(17).toUpperCase()) {
+ idCardError.value = "韬唤璇佸彿鐮佹牎楠屽け璐�";
+ return false;
+ }
+ idCardError.value = "";
+ return true;
+ };
+ const onIdCardChange = () => {
+ if (validateIdCard())
+ extractBirthdayFromIdCard();
};
const extractBirthdayFromIdCard = () => {
const idCard = form.value.idcardno;
- if (!idCard || idCard.length !== 18) {
+ if (!idCard || idCard.length !== 18)
return;
- }
- try {
- const birthStr = idCard.substring(6, 14);
- const year = birthStr.substring(0, 4);
- const month = birthStr.substring(4, 6);
- const day = birthStr.substring(6, 8);
- const birthDate = /* @__PURE__ */ new Date(`${year}-${month}-${day}`);
- if (isNaN(birthDate.getTime())) {
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:816", "韬唤璇佸彿鐮佷腑鐨勫嚭鐢熸棩鏈熸棤鏁�");
- return;
- }
- const today = /* @__PURE__ */ new Date();
- if (birthDate > today) {
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:823", "鍑虹敓鏃ユ湡涓嶈兘鏄湭鏉ユ棩鏈�");
- return;
- }
- const monthNum = parseInt(month, 10);
- const dayNum = parseInt(day, 10);
- if (monthNum < 1 || monthNum > 12) {
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:832", "鏈堜唤鏃犳晥");
- return;
- }
- const daysInMonth = new Date(year, monthNum, 0).getDate();
- if (dayNum < 1 || dayNum > daysInMonth) {
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:839", "鏃ユ湡鏃犳晥");
- return;
- }
- form.value.birthday = `${year}-${month.padStart(2, "0")}-${day.padStart(
- 2,
- "0"
- )}`;
- calculateAge();
- const genderCode = parseInt(idCard.charAt(16), 10);
- if (!isNaN(genderCode)) {
- form.value.sex = genderCode % 2 === 1 ? "1" : "2";
- }
- common_vendor.index.showToast({
- title: "宸茶嚜鍔ㄦ彁鍙栧嚭鐢熸棩鏈熷拰鎬у埆",
- icon: "success",
- duration: 1500
- });
- } catch (error) {
- common_vendor.index.__f__("error", "at pagesSub/case/CaseDetails.vue:864", "瑙f瀽韬唤璇佸嚭鐢熸棩鏈熷け璐�:", error);
- }
+ const year = idCard.substring(6, 10);
+ const month = idCard.substring(10, 12);
+ const day = idCard.substring(12, 14);
+ const birthDate = /* @__PURE__ */ new Date(`${year}-${month}-${day}`);
+ if (isNaN(birthDate.getTime()))
+ return;
+ form.value.birthday = `${year}-${month}-${day}`;
+ calculateAge();
+ const genderCode = parseInt(idCard.charAt(16), 10);
+ if (!isNaN(genderCode))
+ form.value.sex = genderCode % 2 === 1 ? "1" : "2";
+ common_vendor.index.showToast({
+ title: "宸茶嚜鍔ㄦ彁鍙栧嚭鐢熸棩鏈熷拰鎬у埆",
+ icon: "success",
+ duration: 1500
+ });
};
- const textareaStyle = (isError) => {
- return isError ? "border: 2rpx solid #ff4757; border-radius: 12rpx; min-height: 120rpx; padding: 20rpx 24rpx;" : "border: 2rpx solid #e5e5e7; border-radius: 12rpx; min-height: 120rpx; padding: 20rpx 24rpx;";
- };
- common_vendor.onMounted(() => {
- setInterval(updateCurrentTime, 1e3);
- });
- common_vendor.onLoad(async (options) => {
- id.value = options.id;
- if (options.id) {
- currentId.value = options.id;
- isEditMode.value = true;
- await loadCaseData(options.id);
- } else {
- isEditMode.value = false;
- generateDonorNo();
+ const handleGcsBlur = () => {
+ const val = Number(form.value.gcsScore);
+ if (!val && val !== 0)
+ return;
+ if (val > 7) {
+ common_vendor.index.showToast({ title: "GCS璇勫垎涓嶈兘澶т簬7", icon: "none" });
+ form.value.gcsScore = "";
}
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:891", userStore.userInfo, "userStoreuserInfo");
- if (!userStore.userInfo) {
- await userStore.refreshUserInfo();
- }
- form.value.treatmenthospitalname = userStore.userInfo.orgName;
- form.value.toHospital = userStore.userInfo.orgName;
- form.value.coordinatorName = userStore.userInfo.coordinatorName;
- form.value.coordinatorNo = userStore.userInfo.coordinatorNo;
- form.value.infoName = userStore.userInfo.nickName;
- form.value.phone = userStore.userInfo.phonenumber;
- form.value.reportername = userStore.userInfo.name;
- form.value.reporterno = userStore.userInfo.userId;
- dict.value = await utils_dict.useDict(
- "sys_IDType",
- "sys_user_sex",
- "sys_Nation",
- "sys_BloodType",
- "sys_Infectious",
- "sys_AgeUnit",
- // 鏂板骞撮緞鍗曚綅
- "sys_education",
- // 鏂板瀛﹀巻
- "sys_occupation"
- // 鏂板鑱屼笟
- );
- initOptions();
- updateCurrentTime();
- });
- const initOptions = () => {
- infectiousDiseaselist.value = dict.value.sys_Infectious || [];
- idCardTypeOptions.value = dict.value.sys_IDType || [];
- nationLabel.value = dict.value.sys_Nation || [];
- if (form.value.infectious) {
- selectedInfectious.value = form.value.infectious.split(",").filter((item) => item.trim() !== "");
+ if (val < 3) {
+ common_vendor.index.showToast({ title: "GCS璇勫垎涓嶈兘灏忎簬3", icon: "none" });
+ form.value.gcsScore = "";
}
};
const toggleInfectious = (value) => {
const index = selectedInfectious.value.indexOf(value);
- if (index === -1) {
+ if (index === -1)
selectedInfectious.value.push(value);
- } else {
+ else
selectedInfectious.value.splice(index, 1);
- }
form.value.infectious = selectedInfectious.value.join(",");
};
- const isInfectiousSelected = (value) => {
- return selectedInfectious.value.includes(value);
+ const isInfectiousSelected = (value) => selectedInfectious.value.includes(value);
+ const onReportTimeConfirm = (e) => {
+ const date = new Date(e.value);
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+ const hours = String(date.getHours()).padStart(2, "0");
+ const minutes = String(date.getMinutes()).padStart(2, "0");
+ const seconds = String(date.getSeconds()).padStart(2, "0");
+ form.value.reporttime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+ showReportTimePicker.value = false;
};
- const updateCurrentTime = () => {
- const now = /* @__PURE__ */ new Date();
- const year = now.getFullYear();
- const month = String(now.getMonth() + 1).padStart(2, "0");
- const day = String(now.getDate()).padStart(2, "0");
- const hours = String(now.getHours()).padStart(2, "0");
- const minutes = String(now.getMinutes()).padStart(2, "0");
- const seconds = String(now.getSeconds()).padStart(2, "0");
- currentTime.value = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
- form.value.reporttime = currentTime.value;
- };
- const generateDonorNo = () => {
- const date = /* @__PURE__ */ new Date();
- date.getTime().toString().slice(-6);
- };
- const calculateAge = () => {
- if (!form.value.birthday) {
- form.value.age = "";
- form.value.ageunit = "";
- return;
- }
- const birthDate = new Date(form.value.birthday);
- const today = /* @__PURE__ */ new Date();
- if (isNaN(birthDate.getTime())) {
- form.value.age = "";
- form.value.ageunit = "";
- return;
- }
- if (birthDate > today) {
- common_vendor.index.showToast({
- title: "鍑虹敓鏃ユ湡涓嶈兘鏄湭鏉ユ棩鏈�",
- icon: "none"
- });
- form.value.age = "";
- form.value.ageunit = "";
- return;
- }
- const timeDiff = today.getTime() - birthDate.getTime();
- const daysDiff = Math.floor(timeDiff / (1e3 * 60 * 60 * 24));
- if (daysDiff < 0) {
- form.value.age = "";
- form.value.ageunit = "";
- return;
- }
- const years = today.getFullYear() - birthDate.getFullYear();
- const months = today.getMonth() - birthDate.getMonth();
- const days = today.getDate() - birthDate.getDate();
- let ageValue, ageUnit;
- if (years >= 1) {
- let actualYears = years;
- if (months < 0 || months === 0 && days < 0) {
- actualYears = years - 1;
- }
- ageValue = actualYears.toString();
- ageUnit = "宀�";
- } else if (daysDiff >= 30) {
- let totalMonths = years * 12 + months;
- if (days < 0) {
- totalMonths--;
- }
- ageValue = Math.max(1, totalMonths).toString();
- ageUnit = "涓湀";
- } else {
- ageValue = Math.max(1, daysDiff).toString();
- ageUnit = "澶�";
- }
- form.value.age = ageValue;
- form.value.ageunit = ageUnit;
- };
- const handleBaseUpload = (file) => {
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:1053", "鍩虹闄勪欢涓婁紶鎴愬姛:", file);
- attachments.value.push(file);
- };
+ const handleBaseUpload = (file) => attachments.value.push(file);
const handleFilesUpdate = (files) => {
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:1059", files, "files");
- attachments.value = files.map((file) => ({
- ...file
- // 纭繚鍙瓨鍌ㄥ崐璺緞
- // url: file.url.startsWith("http")
- // ? file.url.replace(baseUrlHt, "")
- // : file.url,
- }));
+ attachments.value = files.map((file) => ({ ...file }));
};
const handlePreview = (file) => {
- const fullUrl = file.url.startsWith("http") ? file.url : baseUrlHt + (file.url.startsWith("/") ? "" : "/") + file.url;
+ const fullUrl = file.url.startsWith("http") ? file.url : (file.url.startsWith("/") ? "" : "/") + file.url;
if (file.type.includes("image")) {
common_vendor.index.previewImage({
urls: attachments.value.filter((f) => f.type.includes("image")).map(
- (f) => f.url.startsWith("http") ? f.url : baseUrlHt + (f.url.startsWith("/") ? "" : "/") + f.url
+ (f) => f.url.startsWith("http") ? f.url : (f.url.startsWith("/") ? "" : "/") + f.url
),
current: fullUrl
});
} else if (file.type.includes("pdf")) {
common_vendor.index.downloadFile({
url: fullUrl,
- success: (res) => {
- common_vendor.index.openDocument({
- filePath: res.tempFilePath,
- fileType: "pdf",
- showMenu: true
- });
- },
- fail: (err) => {
- common_vendor.index.__f__("error", "at pagesSub/case/CaseDetails.vue:1098", "鎵撳紑鏂囨。澶辫触:", err);
- common_vendor.index.showToast({ title: "鎵撳紑鏂囦欢澶辫触", icon: "none" });
- }
+ success: (res) => common_vendor.index.openDocument({
+ filePath: res.tempFilePath,
+ fileType: "pdf",
+ showMenu: true
+ })
});
} else {
common_vendor.index.showToast({ title: "鏆備笉鏀寔姝ゆ枃浠剁被鍨嬮瑙�", icon: "none" });
}
};
- const onConfirm = (e) => {
- if (e.value && e.value[0]) {
- form.value.treatmentdeptname = e.value[0].label;
- }
- selectShow.value = false;
+ const onResidenceChange = (val) => {
+ form.value.residenceprovincename = val.sheng;
+ form.value.residenceprovince = val.provinceCode || "";
+ form.value.residencecountyname = val.shi;
+ form.value.residencetownname = val.qu;
};
- const onHospitalConfirm = (e) => {
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:1115", e, "姘戞棌");
- if (e.value && e.value[0]) {
- form.value.treatmenthospitalname = e.value[0].label;
- }
- showHospitalPicker.value = false;
+ const onRegisterChange = (val) => {
+ form.value.registerprovincename = val.sheng;
+ form.value.registerprovince = val.provinceCode || "";
+ form.value.registercityname = val.shi;
+ form.value.registertownname = val.qu;
};
- const onNationConfirm = (e) => {
- if (e.value && e.value[0]) {
- form.value.nation = e.value[0].label;
- }
- showNationPicker.value = false;
- };
- const onReporterConfirm = (e) => {
- if (e.value && e.value[0]) {
- form.value.reporterno = e.value[0].label;
- }
- showReporterPicker.value = false;
- };
+ const handleCancel = () => common_vendor.index.navigateBack();
const resetForm = () => {
common_vendor.index.showModal({
title: "纭閲嶇疆",
@@ -585,23 +465,24 @@
success: (res) => {
if (res.confirm) {
Object.keys(form.value).forEach((key) => {
- if (!["id", "caseNo"].includes(key)) {
+ if (!["id", "caseNo"].includes(key))
form.value[key] = "";
- }
});
- hospitalIndex.value = -1;
- deptIndex.value = -1;
+ form.value.nationality = "涓浗";
+ form.value.reportStatus = "1";
+ form.value.terminationCase = 0;
nationIndex.value = -1;
idCardTypeIndex.value = -1;
+ educationIndex.value = -1;
+ occupationIndex.value = -1;
+ ageUnitIndex.value = -1;
selectedInfectious.value = [];
attachments.value = [];
- form.value.nationality = "涓浗";
- form.value.isTransport = "";
- form.value.terminationCase = 0;
- form.value.reportStatus = "1";
- if (!isEditMode.value) {
- generateDonorNo();
- }
+ residenceAddress.value = { sheng: "", shi: "", qu: "" };
+ registerAddress.value = { sheng: "", shi: "", qu: "" };
+ if (!isEditMode.value)
+ generateCaseNo();
+ updateCurrentTime();
common_vendor.index.showToast({ title: "琛ㄥ崟宸查噸缃�", icon: "success" });
}
}
@@ -609,16 +490,15 @@
};
const handleSubmit = async () => {
if (!isFormValid.value) {
- common_vendor.index.showToast({
- title: "璇峰~鍐欏鍚嶃�佽瘉浠跺彿鐮佸拰鐤剧梾璇婃柇",
- icon: "none"
- });
+ common_vendor.index.showToast({ title: "璇峰~鍐欏鍚嶃�佺柧鐥呰瘖鏂拰涓婃姤鍖婚櫌", icon: "none" });
return;
}
try {
+ loading.value = true;
common_vendor.index.showLoading({ title: isEditMode.value ? "淇敼涓�..." : "鎻愪氦涓�..." });
const submitData = {
...form.value,
+ treatmenthospitalname: form.value.toHospital,
age: parseInt(form.value.age) || 0,
annexfilesList: attachments.value.map((file) => ({
path: file.url,
@@ -642,20 +522,16 @@
);
}
common_vendor.index.hideLoading();
- if (res.code === 200) {
+ if (res.code == 200) {
common_vendor.index.showToast({
title: isEditMode.value ? "淇敼鎴愬姛" : "涓婃姤鎴愬姛",
icon: "success"
});
- removeDraft();
- setTimeout(() => {
- common_vendor.index.navigateBack();
- }, 1500);
+ setTimeout(() => common_vendor.index.navigateBack(), 1500);
} else {
throw new Error(res.msg || "鎿嶄綔澶辫触");
}
} catch (error) {
- common_vendor.index.__f__("error", "at pagesSub/case/CaseDetails.vue:1252", "鎿嶄綔澶辫触:", error);
common_vendor.index.showToast({
title: error.message || (isEditMode.value ? "淇敼澶辫触" : "涓婃姤澶辫触"),
icon: "none"
@@ -664,272 +540,329 @@
loading.value = false;
}
};
- const removeDraft = () => {
- try {
- common_vendor.index.removeStorageSync("caseReportDraft");
- } catch (e) {
- common_vendor.index.__f__("error", "at pagesSub/case/CaseDetails.vue:1265", "绉婚櫎鑽夌澶辫触", e);
- }
- };
- const handleCancel = () => {
- common_vendor.index.navigateBack();
- };
- const loadCaseData = async (id2) => {
+ const loadCaseData = async (id) => {
try {
loading.value = true;
const res = await common_vendor.index.$uapi.get(
- `/project/donatebaseinforeport/getInfo/${id2}`
+ `/project/donatebaseinforeport/getInfo/${id}`
);
if (res.code) {
form.value = res.data;
- if (res.data.infectious) {
+ if (res.data.infectious)
selectedInfectious.value = res.data.infectious.split(",").filter((item) => item.trim() !== "");
+ if (form.value.nation) {
+ const idx = nationList.value.findIndex(
+ (item) => item == form.value.nation
+ );
+ nationIndex.value = idx >= 0 ? idx : -1;
}
- currentNation.value = form.value.nation;
- idCardTypeIndex.value = form.value.idcardtype;
+ if (form.value.idcardtype) {
+ const dictList = getDictList("sys_IDType");
+ const idx = dictList.findIndex(
+ (item) => item.value == form.value.idcardtype
+ );
+ idCardTypeIndex.value = idx >= 0 ? idx : -1;
+ }
+ if (form.value.education) {
+ const dictList = getDictList("sys_education");
+ const idx = dictList.findIndex(
+ (item) => item.value == form.value.education
+ );
+ educationIndex.value = idx >= 0 ? idx : -1;
+ }
+ if (form.value.occupation) {
+ const dictList = getDictList("sys_occupation");
+ const idx = dictList.findIndex(
+ (item) => item.value == form.value.occupation
+ );
+ occupationIndex.value = idx >= 0 ? idx : -1;
+ }
+ if (form.value.ageunit) {
+ const unitList = ageUnitList.value;
+ const idx = unitList.findIndex((item) => item === form.value.ageunit);
+ ageUnitIndex.value = idx >= 0 ? idx : -1;
+ }
+ if (res.data.residenceprovincename) {
+ residenceAddress.value = {
+ sheng: res.data.residenceprovincename,
+ shi: res.data.residencecountyname,
+ qu: res.data.residencetownname
+ };
+ }
+ if (res.data.registerprovincename) {
+ registerAddress.value = {
+ sheng: res.data.registerprovincename,
+ shi: res.data.registercityname,
+ qu: res.data.registertownname
+ };
+ }
if (res.data.annexfilesList) {
- attachments.value = res.data.annexfilesList;
- attachments.value.forEach((item) => {
- item.url = item.path;
- item.name = item.fileName;
- });
+ attachments.value = res.data.annexfilesList.map((item) => ({
+ url: item.path,
+ name: item.fileName,
+ type: item.type || ""
+ }));
}
- common_vendor.index.__f__("log", "at pagesSub/case/CaseDetails.vue:1299", 3, "res");
- common_vendor.index.showToast({
- title: "鏁版嵁鍔犺浇鎴愬姛",
- icon: "success"
- });
} else {
throw new Error(res.msg || "鏁版嵁鍔犺浇澶辫触");
}
} catch (error) {
- common_vendor.index.__f__("error", "at pagesSub/case/CaseDetails.vue:1309", "鍔犺浇妗堜緥鏁版嵁澶辫触:", error);
- common_vendor.index.showToast({
- title: "鏁版嵁鍔犺浇澶辫触锛岃閲嶈瘯",
- icon: "none"
- });
+ common_vendor.index.showToast({ title: "鏁版嵁鍔犺浇澶辫触锛岃閲嶈瘯", icon: "none" });
} finally {
loading.value = false;
}
};
+ common_vendor.onMounted(() => {
+ updateCurrentTime();
+ setInterval(updateCurrentTime, 1e3);
+ });
+ common_vendor.onLoad(async (options) => {
+ if (options.id) {
+ currentId.value = options.id;
+ isEditMode.value = true;
+ await new Promise((resolve) => {
+ if (!dictLoading.value)
+ resolve();
+ else {
+ const stopWatch = common_vendor.watch(dictLoading, (val) => {
+ if (!val) {
+ stopWatch();
+ resolve();
+ }
+ });
+ }
+ });
+ await loadCaseData(options.id);
+ } else {
+ isEditMode.value = false;
+ generateCaseNo();
+ updateCurrentTime();
+ }
+ if (!userStore.userInfo)
+ await userStore.refreshUserInfo();
+ const user = userStore.userInfo;
+ if (user) {
+ if (!form.value.treatmenthospitalname)
+ form.value.treatmenthospitalname = user.orgName;
+ if (!form.value.toHospital)
+ form.value.toHospital = user.orgName;
+ if (!form.value.coordinatorName)
+ form.value.coordinatorName = user.coordinatorName;
+ if (!form.value.coordinatorNo)
+ form.value.coordinatorNo = user.coordinatorNo;
+ if (!form.value.infoName)
+ form.value.infoName = user.nickName;
+ if (!form.value.phone)
+ form.value.phone = user.phonenumber;
+ if (!form.value.reportername)
+ form.value.reportername = user.name;
+ if (!form.value.reporterno)
+ form.value.reporterno = user.userId;
+ }
+ updateCurrentTime();
+ });
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.t(isEditMode.value ? "淇敼妗堜緥" : "涓婃姤妗堜緥"),
- b: common_vendor.o(($event) => form.value.toHospital = $event),
+ b: common_vendor.o(($event) => form.value.caseNo = $event),
c: common_vendor.p({
+ placeholder: "绯荤粺鑷姩鐢熸垚",
+ disabled: true,
+ disabledColor: disabledColor.value,
+ modelValue: form.value.caseNo
+ }),
+ d: common_vendor.o(($event) => form.value.toHospital = $event),
+ e: common_vendor.p({
placeholder: "璇疯緭鍏ヤ笂鎶ュ尰闄�",
maxlength: "100",
modelValue: form.value.toHospital
}),
- d: common_vendor.o(($event) => form.value.deptName = $event),
- e: common_vendor.p({
+ f: common_vendor.o(($event) => form.value.deptName = $event),
+ g: common_vendor.p({
placeholder: "璇疯緭鍏ヤ笂鎶ョ瀹�",
maxlength: "50",
modelValue: form.value.deptName
}),
- f: common_vendor.o(($event) => form.value.name = $event),
- g: common_vendor.p({
+ h: common_vendor.o(($event) => form.value.name = $event),
+ i: common_vendor.p({
type: "text",
placeholder: "璇疯緭鍏ュ鍚�",
maxlength: "20",
modelValue: form.value.name
}),
- h: common_vendor.t(currentNation.value),
- i: nationLabels.value,
- j: nationIndex.value,
- k: common_vendor.o(onNationChange),
- l: common_vendor.o(($event) => form.value.nationality = $event),
- m: common_vendor.p({
+ j: common_vendor.t(currentNationText.value || "璇烽�夋嫨姘戞棌"),
+ k: nationList.value,
+ l: nationIndex.value,
+ m: common_vendor.o(onNationChange),
+ n: common_vendor.o(($event) => form.value.nationality = $event),
+ o: common_vendor.p({
type: "text",
placeholder: "璇疯緭鍏ュ浗绫�",
modelValue: form.value.nationality
}),
- n: common_vendor.t(currentIdCardType.value),
- o: idCardTypeLabels.value,
- p: idCardTypeIndex.value,
- q: common_vendor.o(onIdCardTypeChange),
- r: common_vendor.o(onIdCardChange),
- s: common_vendor.o(($event) => form.value.idcardno = $event),
- t: common_vendor.p({
+ p: common_vendor.t(currentIdCardTypeText.value || "璇烽�夋嫨璇佷欢绫诲瀷"),
+ q: idCardTypeList.value,
+ r: idCardTypeIndex.value,
+ s: common_vendor.o(onIdCardTypeChange),
+ t: common_vendor.o(onIdCardChange),
+ v: common_vendor.o(($event) => form.value.idcardno = $event),
+ w: common_vendor.p({
type: "idcard",
placeholder: "璇疯緭鍏ヨ瘉浠跺彿鐮�",
maxlength: "18",
modelValue: form.value.idcardno
}),
- v: idCardError.value
+ x: idCardError.value
}, idCardError.value ? {
- w: common_vendor.t(idCardError.value)
+ y: common_vendor.t(idCardError.value)
} : {}, {
- x: common_vendor.f(genderOptions.value, (gender, k0, i0) => {
+ z: common_vendor.f(genderOptions.value, (gender, k0, i0) => {
return {
a: common_vendor.t(gender.label),
b: gender.value,
- c: form.value.sex === gender.value ? 1 : "",
+ c: form.value.sex == gender.value ? 1 : "",
d: common_vendor.o(($event) => form.value.sex = gender.value, gender.value)
};
}),
- y: common_vendor.t(form.value.birthday || "閫夋嫨鍑虹敓鏃ユ湡"),
- z: form.value.birthday,
- A: common_vendor.o(onBirthdayChange),
- B: common_vendor.o(($event) => ageDisplay.value = $event),
- C: common_vendor.p({
- placeholder: "鑷姩璁$畻",
- disabled: true,
- disabledColor: disabledColor.value,
- border: "none",
- modelValue: ageDisplay.value
- }),
- D: common_vendor.o(($event) => form.value.inpatientno = $event),
+ A: common_vendor.t(form.value.birthday || "閫夋嫨鍑虹敓鏃ユ湡"),
+ B: form.value.birthday,
+ C: common_vendor.o(onBirthdayChange),
+ D: common_vendor.o(($event) => form.value.age = $event),
E: common_vendor.p({
- placeholder: "璇疯緭鍏ヤ綇闄㈠彿",
+ placeholder: "杈撳叆鎴栬嚜鍔ㄨ绠�",
+ type: "number",
+ modelValue: form.value.age
+ }),
+ F: common_vendor.t(currentAgeUnitText.value || "鍗曚綅"),
+ G: ageUnitList.value,
+ H: ageUnitIndex.value,
+ I: common_vendor.o(onAgeUnitChange),
+ J: common_vendor.o(($event) => form.value.phone = $event),
+ K: common_vendor.p({
+ placeholder: "璇疯緭鍏ヨ仈绯荤數璇�",
+ type: "number",
+ modelValue: form.value.phone
+ }),
+ L: common_vendor.t(currentEducationText.value || "璇烽�夋嫨瀛﹀巻"),
+ M: educationList.value,
+ N: educationIndex.value,
+ O: common_vendor.o(onEducationChange),
+ P: common_vendor.t(currentOccupationText.value || "璇烽�夋嫨鑱屼笟"),
+ Q: occupationList.value,
+ R: occupationIndex.value,
+ S: common_vendor.o(onOccupationChange),
+ T: common_vendor.o(($event) => form.value.nativeplace = $event),
+ U: common_vendor.p({
+ placeholder: "璇疯緭鍏ョ睄璐�",
+ modelValue: form.value.nativeplace
+ }),
+ V: common_vendor.o(onResidenceChange),
+ W: common_vendor.o(($event) => residenceAddress.value = $event),
+ X: common_vendor.p({
+ modelValue: residenceAddress.value
+ }),
+ Y: common_vendor.o(($event) => form.value.residenceaddress = $event),
+ Z: common_vendor.p({
+ placeholder: "璇疯緭鍏ヨ缁嗗湴鍧�",
border: "none",
+ modelValue: form.value.residenceaddress
+ }),
+ aa: common_vendor.o(onRegisterChange),
+ ab: common_vendor.o(($event) => registerAddress.value = $event),
+ ac: common_vendor.p({
+ modelValue: registerAddress.value
+ }),
+ ad: common_vendor.o(($event) => form.value.registeraddress = $event),
+ ae: common_vendor.p({
+ placeholder: "璇疯緭鍏ヨ缁嗗湴鍧�",
+ border: "none",
+ modelValue: form.value.registeraddress
+ }),
+ af: common_vendor.o(($event) => form.value.inpatientno = $event),
+ ag: common_vendor.p({
+ placeholder: "璇疯緭鍏ヤ綇闄㈠彿",
modelValue: form.value.inpatientno
}),
- F: common_vendor.o(handleGcsBlur),
- G: common_vendor.o(($event) => form.value.gcsScore = $event),
- H: common_vendor.p({
+ ah: common_vendor.o(handleGcsBlur),
+ ai: common_vendor.o(($event) => form.value.gcsScore = $event),
+ aj: common_vendor.p({
type: "number",
maxlength: "1",
placeholder: "鈮�7",
- border: "none",
modelValue: form.value.gcsScore
}),
- I: common_vendor.o(($event) => form.value.diagnosisname = $event),
- J: common_vendor.p({
+ ak: common_vendor.o(($event) => form.value.diagnosisname = $event),
+ al: common_vendor.p({
placeholder: "璇疯緭鍏ョ柧鐥呰瘖鏂悕绉�",
count: true,
maxlength: "200",
- customStyle: textareaStyle(!form.value.diagnosisname),
modelValue: form.value.diagnosisname
}),
- K: common_vendor.f(bloodTypeOptions.value, (bloodType, k0, i0) => {
+ am: common_vendor.f(bloodTypeOptions, (bloodType, k0, i0) => {
return {
- a: form.value.bloodType === bloodType.value ? 1 : "",
+ a: form.value.bloodType == bloodType.value ? 1 : "",
b: common_vendor.t(bloodType.label),
c: bloodType.value,
d: common_vendor.o(($event) => form.value.bloodType = bloodType.value, bloodType.value)
};
}),
- L: common_vendor.f(rhOptions.value, (rh, k0, i0) => {
+ an: common_vendor.f(rhOptions, (rh, k0, i0) => {
return {
- a: form.value.rhYin === rh.value ? 1 : "",
+ a: form.value.rhYin == rh.value ? 1 : "",
b: common_vendor.t(rh.label),
c: rh.value,
d: common_vendor.o(($event) => form.value.rhYin = rh.value, rh.value)
};
}),
- M: common_vendor.f(infectiousDiseaselist.value, (disease, k0, i0) => {
+ ao: common_vendor.f(infectiousList.value, (disease, k0, i0) => {
return common_vendor.e({
a: isInfectiousSelected(disease.value)
}, isInfectiousSelected(disease.value) ? {} : {}, {
b: isInfectiousSelected(disease.value) ? 1 : "",
c: common_vendor.t(disease.label),
d: disease.value,
- e: common_vendor.o(($event) => toggleInfectious(disease.value), disease.value)
+ e: isInfectiousSelected(disease.value) ? 1 : "",
+ f: common_vendor.o(($event) => toggleInfectious(disease.value), disease.value)
});
}),
- N: common_vendor.o(($event) => form.value.infectiousOther = $event),
- O: common_vendor.p({
+ ap: common_vendor.o(($event) => form.value.infectiousOther = $event),
+ aq: common_vendor.p({
placeholder: "璇疯緭鍏ュ叾浠栦紶鏌撶梾",
- border: "none",
modelValue: form.value.infectiousOther
}),
- P: common_vendor.o(($event) => form.value.icuDoctor = $event),
- Q: common_vendor.p({
- placeholder: "璇疯緭鍏CU璇勪及鍖荤敓",
- border: "none",
- modelValue: form.value.icuDoctor
- }),
- R: common_vendor.o(($event) => form.value.icuDoctorPhone = $event),
- S: common_vendor.p({
- placeholder: "璇疯緭鍏CU鍖荤敓鐢佃瘽",
- type: "number",
- border: "none",
- modelValue: form.value.icuDoctorPhone
- }),
- T: common_vendor.o(($event) => form.value.infoName = $event),
- U: common_vendor.p({
+ ar: common_vendor.o(($event) => form.value.infoName = $event),
+ as: common_vendor.p({
placeholder: "璇疯緭鍏ヤ俊鎭憳",
- border: "none",
modelValue: form.value.infoName
}),
- V: common_vendor.o(($event) => form.value.phone = $event),
- W: common_vendor.p({
- placeholder: "璇疯緭鍏ヨ仈绯荤數璇�",
- type: "number",
- border: "none",
- modelValue: form.value.phone
+ at: common_vendor.t(form.value.reporttime || "閫夋嫨鎶ュ憡鏃堕棿"),
+ av: common_vendor.o(($event) => showReportTimePicker.value = true),
+ aw: common_vendor.o(onReportTimeConfirm),
+ ax: common_vendor.o(($event) => showReportTimePicker.value = false),
+ ay: common_vendor.o(($event) => reportTimeValue.value = $event),
+ az: common_vendor.p({
+ show: showReportTimePicker.value,
+ mode: "datetime",
+ title: "閫夋嫨鎶ュ憡鏃堕棿",
+ modelValue: reportTimeValue.value
}),
- X: common_vendor.o(($event) => currentTime.value = $event),
- Y: common_vendor.p({
- disabled: true,
- disabledColor: disabledColor.value,
- border: "none",
- modelValue: currentTime.value
- }),
- Z: common_vendor.o(handleCancel),
- aa: common_vendor.o(resetForm),
- ab: common_vendor.t(loading.value ? "鎻愪氦涓�..." : isEditMode.value ? "淇濆瓨淇敼" : "鎻愪氦涓婃姤"),
- ac: common_vendor.o(handleSubmit),
- ad: common_vendor.p({
- disabled: !isFormValid.value || loading.value
- }),
- ae: common_vendor.sr("attachment", "2006fde2-18"),
- af: common_vendor.o(handleFilesUpdate),
- ag: common_vendor.o(handleBaseUpload),
- ah: common_vendor.o(handlePreview),
- ai: common_vendor.p({
+ aA: common_vendor.sr("attachment", "2006fde2-19"),
+ aB: common_vendor.o(handleFilesUpdate),
+ aC: common_vendor.o(handleBaseUpload),
+ aD: common_vendor.o(handlePreview),
+ aE: common_vendor.p({
files: attachments.value,
readonly: isReadonly.value,
maxCount: 5
}),
- aj: common_vendor.sr("uPicker", "2006fde2-19"),
- ak: common_vendor.o(onConfirm),
- al: common_vendor.o(($event) => selectShow.value = false),
- am: common_vendor.p({
- show: selectShow.value,
- columns: pickerColumns.value,
- keyName: "label",
- title: "璇烽�夋嫨绉戝"
+ aF: common_vendor.o(handleCancel),
+ aG: common_vendor.o(resetForm),
+ aH: common_vendor.t(loading.value ? "鎻愪氦涓�..." : isEditMode.value ? "淇濆瓨淇敼" : "鎻愪氦涓婃姤"),
+ aI: common_vendor.o(handleSubmit),
+ aJ: common_vendor.p({
+ disabled: !isFormValid.value || loading.value
}),
- an: common_vendor.o(onHospitalConfirm),
- ao: common_vendor.o(($event) => showHospitalPicker.value = false),
- ap: common_vendor.p({
- show: showHospitalPicker.value,
- columns: [hospitalOptions.value],
- keyName: "label",
- title: "璇烽�夋嫨鍖荤枟鏈烘瀯"
- }),
- aq: common_vendor.o(onNationConfirm),
- ar: common_vendor.o(($event) => showNationPicker.value = false),
- as: common_vendor.p({
- show: showNationPicker.value,
- columns: [nationOptions.value],
- keyName: "label",
- title: "璇烽�夋嫨姘戞棌"
- }),
- at: common_vendor.o(onDateConfirm),
- av: common_vendor.o(($event) => showDatePicker.value = false),
- aw: common_vendor.o(($event) => birthdayValue.value = $event),
- ax: common_vendor.p({
- show: showDatePicker.value,
- mode: "date",
- title: "閫夋嫨鍑虹敓鏃ユ湡",
- modelValue: birthdayValue.value
- }),
- ay: common_vendor.o(onReporterConfirm),
- az: common_vendor.o(($event) => showReporterPicker.value = false),
- aA: common_vendor.p({
- show: showReporterPicker.value,
- columns: [reporterOptions.value],
- keyName: "label",
- title: "璇烽�夋嫨鎶ュ憡浜�"
- }),
- aB: common_vendor.p({
- show: loading.value,
- text: "鎻愪氦涓�..."
- }),
- aC: common_vendor.gei(_ctx, "")
+ aK: common_vendor.gei(_ctx, "")
});
};
}
--
Gitblit v1.9.3