WXL
3 天以前 4d9da000fbe74d344e0e4580b138e79d4ad98ede
pages/case/CaseDetails.vue
@@ -192,8 +192,11 @@
              <text class="item-label">GCS评分</text>
              <u-input
                v-model="form.gcsScore"
                placeholder="请输入GCS评分"
                type="number"
                maxlength="1"
                placeholder="≤7"
                border="none"
                @blur="handleGcsBlur"
              />
            </view>
@@ -207,7 +210,7 @@
                :customStyle="textareaStyle(!form.diagnosisname)"
              />
            </view>
            <view class="form-item">
            <!-- <view class="form-item">
              <text class="item-label">是否需要转运</text>
              <view class="radio-group horizontal">
                <view
@@ -223,7 +226,7 @@
                  <text class="radio-label">{{ bloodType.label }}</text>
                </view>
              </view>
            </view>
            </view> -->
            <view class="form-item">
              <text class="item-label">血型</text>
              <view class="radio-group horizontal">
@@ -238,6 +241,23 @@
                    :class="{ active: form.bloodType === bloodType.value }"
                  ></view>
                  <text class="radio-label">{{ bloodType.label }}</text>
                </view>
              </view>
            </view>
            <view class="form-item">
              <text class="item-label">Rh(D)</text>
              <view class="radio-group horizontal">
                <view
                  v-for="rh in rhOptions"
                  :key="rh.value"
                  class="radio-item"
                  @click="form.rhYin = rh.value"
                >
                  <view
                    class="radio-dot"
                    :class="{ active: form.rhYin === rh.value }"
                  ></view>
                  <text class="radio-label">{{ rh.label }}</text>
                </view>
              </view>
            </view>
@@ -264,31 +284,13 @@
                </view>
              </view>
            </view>
            <view class="form-item full-width"">
            <view class="form-item full-width">
              <text class="item-label">其他</text>
              <u-input
                v-model="form.infectiousOther"
                placeholder="请输入其他传染病"
                border="none"
              />
            </view>
            <view class="form-item">
              <text class="item-label">Rh(D)</text>
              <view class="radio-group horizontal">
                <view
                  v-for="rh in rhOptions"
                  :key="rh.value"
                  class="radio-item"
                  @click="form.rhYin = rh.value"
                >
                  <view
                    class="radio-dot"
                    :class="{ active: form.rhYin === rh.value }"
                  ></view>
                  <text class="radio-label">{{ rh.label }}</text>
                </view>
              </view>
            </view>
          </view>
        </view>
@@ -301,6 +303,24 @@
          </view>
          <view class="form-grid">
            <view class="form-item">
              <text class="item-label">ICU评估医生</text>
              <u-input
                v-model="form.icuDoctor"
                placeholder="请输入ICU评估医生"
                border="none"
              />
            </view>
            <view class="form-item">
              <text class="item-label">ICU医生电话</text>
              <u-input
                v-model="form.icuDoctorPhone"
                placeholder="请输入ICU医生电话"
                type="number"
                border="none"
              />
            </view>
            <view class="form-item">
              <text class="item-label">上报信息员</text>
              <u-input
@@ -482,7 +502,7 @@
  illnessoverview: "", // 新增:病情概况
  infectious: "", // 传染病情况
  infectiousOther: "", // 传染病其他
  isTransport: "1", // 新增:是否需要转运,默认1不需要
  isTransport: "", // 新增:是否需要转运,默认1不需要
  nativeplace: "", // 新增:籍贯
  occupation: "", // 新增:职业
  patientstate: "", // 新增:病人状况
@@ -589,7 +609,7 @@
const isFormValid = computed(() => {
  return (
    form.value.name &&
    form.value.idcardno &&
    // form.value.idcardno &&
    form.value.diagnosisname &&
    form.value.toHospital
  );
@@ -636,7 +656,9 @@
const currentNation = computed(() => {
  return nationIndex.value >= 0
    ? nationLabels.value[nationIndex.value]
    : (form.value.nation?form.value.nation:"请选择证件类型");
    : form.value.nation
    ? form.value.nation
    : "请选择民族";
});
const currentIdCardType = computed(() => {
@@ -644,7 +666,6 @@
    ? idCardTypeLabels.value[idCardTypeIndex.value]
    : "请选择证件类型";
});
const onNationChange = (e) => {
  const index = parseInt(e.detail.value);
  nationIndex.value = index;
@@ -681,10 +702,10 @@
  const idCard = form.value.idcardno;
  console.log(idCard, "当前输入");
  if (!idCard) {
    idCardError.value = "请输入证件号码";
    return false;
  }
  // if (!idCard) {
  //   idCardError.value = "请输入证件号码";
  //   return false;
  // }
  if (idCard.length !== 18) {
    idCardError.value = "身份证号码必须是18位";
@@ -740,6 +761,29 @@
    extractBirthdayFromIdCard();
  }
};
const handleGcsBlur = () => {
  const val = Number(form.value.gcsScore);
  if (!val && val !== 0) return;
  console.log(val);
  if (val > 7) {
    uni.showToast({
      title: "GCS评分不能大于7",
      icon: "none",
    });
    form.value.gcsScore = "";
  }
  if (val < 3) {
    uni.showToast({
      title: "GCS评分不能小于3",
      icon: "none",
    });
    form.value.gcsScore = "";
  }
};
// 身份证校验码验证函数
const validateIdCardCheckCode = (idCard) => {
  // 系数数组
@@ -1128,7 +1172,7 @@
        // 重置附件
        attachments.value = [];
        form.value.nationality = "中国";
        form.value.isTransport = "1";
        form.value.isTransport = "";
        form.value.terminationCase = 0;
        form.value.reportStatus = "1";
@@ -1162,7 +1206,7 @@
        fileName: file.name,
        type: file.type,
      })),
      isTransport: form.value.isTransport || "1",
      isTransport: form.value.isTransport,
      terminationCase: form.value.terminationCase || 0,
      reportStatus: form.value.reportStatus || "1",
    };