<template>
  <div class="bg-box" style="overflow: hidden; position: relative" :class="{ has_control: controlData.bSwitch }">
    <div class="bg-card">
      <h3 class="title">住院病案首页</h3>
      <div class="zyh">病案编号：{{ blInfo.patient_info.AAA28 }}</div>
      <div class="btn-wrapper">
        <el-button type="primary" class="export-btn" size="small" @click="onToggle">质控结果</el-button>
      </div>
      <!-- 基本信息 -->
      <table class="table">
        <tr>
          <td class="label ZA03" :class="{'jy': hasIntersection(zk_codes.jy, ['ZA03']), 'qz': hasIntersection(zk_codes.qz, ['ZA03'])}">医疗机构</td>
          <td colspan="5" :class="{'jy_bg': hasIntersection(active_zk_codes.jy, ['ZA03']), 'qz_bg': hasIntersection(active_zk_codes.qz, ['ZA03'])}">{{ blInfo.patient_other_info.ZA03 }}</td>
          <td class="label TYSHXYDM UNT_ID" :class="{'jy': hasIntersection(zk_codes.jy, ['TYSHXYDM', 'UNT_ID']), 'qz': hasIntersection(zk_codes.qz, ['TYSHXYDM', 'UNT_ID'])}">统一社会信用代码</td>
          <td colspan="5" :class="{'jy_bg': hasIntersection(active_zk_codes.jy, ['TYSHXYDM', 'UNT_ID']), 'qz_bg': hasIntersection(active_zk_codes.qz, ['TYSHXYDM', 'UNT_ID'])}">
            <NoValueInputVue :data="blInfo.patient_add.TYSHXYDM" />
            （组织机构机构代码：
            <NoValueInputVue :data="blInfo.patient_other_info.UNT_ID" />
            ）
          </td>
        </tr>
        <tr>
          <td class="label AAA26C" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA26C']), 'qz': hasIntersection(zk_codes.qz, ['AAA26C'])}">医疗付费方式</td>
          <td colspan="5" :class="{'jy_bg': hasIntersection(active_zk_codes.jy, ['AAA26C']), 'qz_bg': hasIntersection(active_zk_codes.qz, ['AAA26C'])}">{{ blInfo.patient_info.AAA26C }}</td>
          <td class="label JKKH" :class="{'jy': hasIntersection(zk_codes.jy, ['JKKH']), 'qz': hasIntersection(zk_codes.qz, ['JKKH'])}">健康卡号</td>
          <td colspan="3" :class="{'jy_bg': hasIntersection(active_zk_codes.jy, ['JKKH']), 'qz_bg': hasIntersection(active_zk_codes.qz, ['JKKH'])}">{{ blInfo.patient_add.JKKH }}</td>
          <td class="label AAA29" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA29']), 'qz': hasIntersection(zk_codes.qz, ['AAA29'])}">住院次数</td>
          <td :class="{'jy_bg': hasIntersection(active_zk_codes.jy, ['AAA29']), 'qz_bg': hasIntersection(active_zk_codes.qz, ['AAA29'])}">{{ blInfo.patient_info.AAA29 }}</td>
        </tr>
        <tr>
          <td class="label AAA01" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA01']), 'qz': hasIntersection(zk_codes.qz, ['AAA01'])}">姓名</td>
          <td>{{ blInfo.patient_info.AAA01 }}</td>
          <td class="label AAA02C" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA02C']), 'qz': hasIntersection(zk_codes.qz, ['AAA02C'])}">性别</td>
          <td>{{ blInfo.patient_info.AAA02C }}</td>
          <td class="label AAA03" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA03']), 'qz': hasIntersection(zk_codes.qz, ['AAA03'])}">出生日期</td>
          <td colspan="3">{{ blInfo.patient_info.AAA03 }}</td>
          <td class="label AAA04" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA04']), 'qz': hasIntersection(zk_codes.qz, ['AAA04'])}">年龄</td>
          <td>{{ blInfo.patient_info.AAA04 }}</td>
          <td class="label AAA40" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA40']), 'qz': hasIntersection(zk_codes.qz, ['AAA40'])}">天龄（不足1周岁）</td>
          <td>{{ blInfo.patient_info.AAA40 }}</td>
        </tr>
        <tr>
          <td class="label AAA09 AAA10 AAA11" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA09', 'AAA10', 'AAA11']), 'qz': hasIntersection(zk_codes.qz, ['AAA09', 'AAA10', 'AAA11'])}">出生地</td>
          <td colspan="3">
            <NoValueInputVue :data="blInfo.patient_address_info.AAA09 ? blInfo.patient_address_info.AAA09.replace('省', '') : ''" />
            （省）
            <NoValueInputVue :data="blInfo.patient_address_info.AAA10 ? blInfo.patient_address_info.AAA10.replace('市', '') : ''" />
            （市）
            <span v-if="blInfo.patient_address_info.AAA11.includes('县')">
              <NoValueInputVue :data="blInfo.patient_address_info.AAA11 ? blInfo.patient_address_info.AAA11.replace('县', '') : ''" />
              （县）
            </span>
            <span v-else-if="blInfo.patient_address_info.AAA11.includes('区')">
              <NoValueInputVue :data="blInfo.patient_address_info.AAA11 ? blInfo.patient_address_info.AAA11.replace('区', '') : ''" />
              （区）
            </span>
            <span v-else>
              <NoValueInputVue :data="blInfo.patient_address_info.AAA11" />
              （区）
            </span>
          </td>
          <td class="label AAA43 AAA44" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA43', 'AAA44']), 'qz': hasIntersection(zk_codes.qz, ['AAA43', 'AAA44'])}">籍贯</td>
          <td colspan="3">
            <NoValueInputVue :data="blInfo.patient_address_info.AAA43 ? blInfo.patient_address_info.AAA43.replace('省', '') : ''" />
            （省）
            <NoValueInputVue :data="blInfo.patient_address_info.AAA44 ? blInfo.patient_address_info.AAA44.replace('市', '') : ''" />
            （市）
          </td>
          <td class="label AAA06C" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA06C']), 'qz': hasIntersection(zk_codes.qz, ['AAA06C'])}">民族</td>
          <td>{{ blInfo.patient_info.AAA06C }}</td>
          <td class="label AAA05C" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA05C']), 'qz': hasIntersection(zk_codes.qz, ['AAA05C'])}">国籍</td>
          <td>{{ blInfo.patient_info.AAA05C }}</td>
        </tr>
        <tr>
          <td class="label SFZJLX" :class="{'jy': hasIntersection(zk_codes.jy, ['SFZJLX']), 'qz': hasIntersection(zk_codes.qz, ['SFZJLX'])}">身份证件类型</td>
          <td>{{ blInfo.patient_add.SFZJLX }}</td>
          <td class="label AAA07" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA07']), 'qz': hasIntersection(zk_codes.qz, ['AAA07'])}">身份证号</td>
          <td colspan="5">{{ blInfo.patient_info.AAA07 }}</td>
          <td class="label AAA18C" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA18C']), 'qz': hasIntersection(zk_codes.qz, ['AAA18C'])}">职业</td>
          <td>{{ blInfo.patient_work_info.AAA18C }}</td>
          <td class="label AAA08C" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA08C']), 'qz': hasIntersection(zk_codes.qz, ['AAA08C'])}">婚姻</td>
          <td>{{ blInfo.patient_info.AAA08C }}</td>
        </tr>
        <tr>
          <td class="label AAA48 AAA49 AAA50 AAA15" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA48', 'AAA49', 'AAA50', 'AAA15']), 'qz': hasIntersection(zk_codes.qz, ['AAA48', 'AAA49', 'AAA50', 'AAA15'])}">现住址</td>
          <td colspan="7">
            <NoValueInputVue :data="blInfo.patient_address_info.AAA48 ? blInfo.patient_address_info.AAA48.replace('省', '') : ''" />
            （省）
            <NoValueInputVue :data="blInfo.patient_address_info.AAA49 ? blInfo.patient_address_info.AAA49.replace('市', '') : ''" />
            （市）
            <span v-if="blInfo.patient_address_info.AAA50.includes('县')">
              <NoValueInputVue :data="blInfo.patient_address_info.AAA50 ? blInfo.patient_address_info.AAA50.replace('县', '') : ''" />
              （县）
            </span>
            <span v-else-if="blInfo.patient_address_info.AAA50.includes('区')">
              <NoValueInputVue :data="blInfo.patient_address_info.AAA50 ? blInfo.patient_address_info.AAA50.replace('区', '') : ''" />
              （区）
            </span>
            <span v-else>
              <NoValueInputVue :data="blInfo.patient_address_info.AAA50" />
              （区）
            </span>
            <NoValueInputVue :data="blInfo.patient_address_info.AAA15" />
          </td>
          <td class="label AAA51" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA51']), 'qz': hasIntersection(zk_codes.qz, ['AAA51'])}">电话</td>
          <td>{{ blInfo.patient_address_info.AAA51 }}</td>
          <td class="label AAA17C" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA17C']), 'qz': hasIntersection(zk_codes.qz, ['AAA17C'])}">邮编</td>
          <td>{{ blInfo.patient_address_info.AAA17C }}</td>
        </tr>
        <tr>
          <td class="label AAA45 AAA46 AAA47 AAA12" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA45', 'AAA46', 'AAA47', 'AAA12']), 'qz': hasIntersection(zk_codes.qz, ['AAA45', 'AAA46', 'AAA47', 'AAA12'])}">户口地址</td>
          <td colspan="9">
            <NoValueInputVue :data="blInfo.patient_address_info.AAA45 ? blInfo.patient_address_info.AAA45.replace('省', '') : ''" />
            （省）
            <NoValueInputVue :data="blInfo.patient_address_info.AAA46 ? blInfo.patient_address_info.AAA46.replace('市', '') : ''" />
            （市）
            <span v-if="blInfo.patient_address_info.AAA47.includes('县')">
              <NoValueInputVue :data="blInfo.patient_address_info.AAA47 ? blInfo.patient_address_info.AAA47.replace('县', '') : ''" />
              （县）
            </span>
            <span v-else-if="blInfo.patient_address_info.AAA47.includes('区')">
              <NoValueInputVue :data="blInfo.patient_address_info.AAA47 ? blInfo.patient_address_info.AAA47.replace('区', '') : ''" />
              （区）
            </span>
            <span v-else>
              <NoValueInputVue :data="blInfo.patient_address_info.AAA47" />
              （区）
            </span>
            <NoValueInputVue :data="blInfo.patient_address_info.AAA12" />
          </td>
          <td class="label">邮编</td>
          <td>{{ blInfo.patient_address_info.AAA14C }}</td>
        </tr>
        <tr>
          <td class="label AAA19" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA19']), 'qz': hasIntersection(zk_codes.qz, ['AAA19'])}">工作单位及地址</td>
          <td colspan="7">{{ blInfo.patient_work_info.AAA19 }}</td>
          <td class="label AAA20" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA20']), 'qz': hasIntersection(zk_codes.qz, ['AAA20'])}">单位电话</td>
          <td>{{ blInfo.patient_work_info.AAA20 }}</td>
          <td class="label AAA21C" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA21C']), 'qz': hasIntersection(zk_codes.qz, ['AAA21C'])}">邮编</td>
          <td>{{ blInfo.patient_work_info.AAA21C }}</td>
        </tr>
        <tr>
          <td class="label AAA22" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA22']), 'qz': hasIntersection(zk_codes.qz, ['AAA22'])}">联系人姓名</td>
          <td colspan="3">{{ blInfo.patient_contacts_info.AAA22 }}</td>
          <td class="label AAA24" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA24']), 'qz': hasIntersection(zk_codes.qz, ['AAA24'])}">地址</td>
          <td colspan="3">{{ blInfo.patient_contacts_info.AAA24 }}</td>
          <td class="label AAA23C" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA23C']), 'qz': hasIntersection(zk_codes.qz, ['AAA23C'])}">关系</td>
          <td>{{ blInfo.patient_contacts_info.AAA23C }}</td>
          <td class="label AAA25" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA25']), 'qz': hasIntersection(zk_codes.qz, ['AAA25'])}">电话</td>
          <td>{{ blInfo.patient_contacts_info.AAA25 }}</td>
        </tr>
        <tr>
          <td class="label AAB06C ZZYLJG" :class="{'jy': hasIntersection(zk_codes.jy, ['AAB06C', 'ZZYLJG']), 'qz': hasIntersection(zk_codes.qz, ['AAB06C', 'ZZYLJG'])}">入院途径</td>
          <td colspan="11">
            <span class="square">{{ blInfo.patient_info.AAB06C }}</span>
            <span class="mlr10" />
            1.门诊
            <span class="mlr10" />
            2.急诊
            <span class="mlr10" />
            3.其他医疗机构转入，转诊医疗机构名称：
            <NoValueInputVue :data="blInfo.patient_info.ZZYLJG" />
            <span class="mlr10" />
            4.其他
          </td>
        </tr>
        <tr>
          <td class="label AEN01" :class="{'jy': hasIntersection(zk_codes.jy, ['AEN01']), 'qz': hasIntersection(zk_codes.qz, ['AEN01'])}">新生儿出生体重</td>
          <td colspan="5">
            <NoValueInputVue :data="blInfo.patient_info.AEN01" />
            克
          </td>
          <td class="label AAA42" :class="{'jy': hasIntersection(zk_codes.jy, ['AAA42']), 'qz': hasIntersection(zk_codes.qz, ['AAA42'])}">新生儿入院体重</td>
          <td colspan="5">
            <NoValueInputVue :data="blInfo.patient_info.AAA42" />
            克
          </td>
        </tr>
        <tr>
          <td class="label AAB01" :class="{'jy': hasIntersection(zk_codes.jy, ['AAB01']), 'qz': hasIntersection(zk_codes.qz, ['AAB01'])}">入院时间</td>
          <td colspan="2">{{ blInfo.patient_info.AAB01 }}</td>
          <td class="label AAB02C" :class="{'qz': ['AAB02C'].includes(highlight_code)}">入院科别</td>
          <td colspan="2">{{ blInfo.patient_hospital_info.AAB02C }}</td>
          <td class="label AAB11N" :class="{'qz': ['AAB11N'].includes(highlight_code)}">病房</td>
          <td colspan="2">{{ blInfo.patient_hospital_info.AAB11N }}</td>
          <td class="label AAD01C" :class="{'qz': ['AAD01C'].includes(highlight_code)}">转科科别</td>
          <td colspan="2">{{ blInfo.patient_hospital_info.AAD01C }}</td>
        </tr>
        <tr>
          <td class="label AAC01" :class="{'jy': hasIntersection(zk_codes.jy, ['AAC01']), 'qz': hasIntersection(zk_codes.qz, ['AAC01'])}">出院时间</td>
          <td colspan="2">{{ blInfo.patient_info.AAC01 }}</td>
          <td class="label AAC02C" :class="{'jy': hasIntersection(zk_codes.jy, ['AAC02C']), 'qz': hasIntersection(zk_codes.qz, ['AAC02C'])}">出院科别</td>
          <td colspan="2">{{ blInfo.patient_hospital_info.AAC02C }}</td>
          <td class="label AAC11N" :class="{'jy': hasIntersection(zk_codes.jy, ['AAC11N']), 'qz': hasIntersection(zk_codes.qz, ['AAC11N'])}">病房</td>
          <td colspan="2">{{ blInfo.patient_info.AAC11N }}</td>
          <td class="label AAC04" :class="{'jy': hasIntersection(zk_codes.jy, ['AAC04']), 'qz': hasIntersection(zk_codes.qz, ['AAC04'])}">实际住院天数</td>
          <td colspan="2">{{ blInfo.patient_info.AAC04 }}</td>
        </tr>
        <tr>
          <td class="label ABA01C" :class="{'jy': hasIntersection(zk_codes.jy, ['ABA01C']), 'qz': hasIntersection(zk_codes.qz, ['ABA01C'])}">门(急)诊诊断</td>
          <td colspan="5">{{ blInfo.patient_medical_info.ABA01C }}</td>
          <td class="label ABA01N" :class="{'jy': hasIntersection(zk_codes.jy, ['ABA01N']), 'qz': hasIntersection(zk_codes.qz, ['ABA01N'])}">疾病编码</td>
          <td colspan="5">{{ blInfo.patient_medical_info.ABA01N }}</td>
        </tr>
      </table>
      <div class="oper-box">
        <IconBtnVue>
          <el-image class="icon_btn" :src="require('../../assets/images/sort.png')" fit="contain"></el-image>
        </IconBtnVue>
        <IconBtnVue style="margin-right: 0">
          <el-image class="icon_btn" :src="require('../../assets/images/setting.png')" fit="contain"></el-image>
        </IconBtnVue>
      </div>
      <!-- 诊断信息 -->
      <table class="table">
        <tr>
          <th class="label" colspan="3" :class="{'jy': hasIntersection(zk_codes.jy, ['ICD10_NAME']), 'qz': hasIntersection(zk_codes.qz, ['ICD10_NAME'])}">出院诊断</th>
          <th class="label" :class="{'jy': hasIntersection(zk_codes.jy, ['ICD10_ID1']), 'qz': hasIntersection(zk_codes.qz, ['ICD10_ID1'])}">疾病编码</th>
          <th class="label" :class="{'jy': hasIntersection(zk_codes.jy, ['RYQK']), 'qz': hasIntersection(zk_codes.qz, ['RYQK'])}">入院病情</th>
          <th class="label" colspan="3" :class="{'jy': hasIntersection(zk_codes.jy, ['ICD10_NAME']), 'qz': hasIntersection(zk_codes.qz, ['ICD10_NAME'])}">出院诊断</th>
          <th class="label" :class="{'jy': hasIntersection(zk_codes.jy, ['ICD10_ID1']), 'qz': hasIntersection(zk_codes.qz, ['ICD10_ID1'])}">疾病编码</th>
          <th class="label" :class="{'jy': hasIntersection(zk_codes.jy, ['RYQK']), 'qz': hasIntersection(zk_codes.qz, ['RYQK'])}">入院病情</th>
        </tr>
        <tr v-for="i of zdRows" :key="'zd' + i">
          <td colspan="3">{{ zdList[i - 1] ? `${zdLevel(i)}` + (zdList[i - 1].ICD10_NAME ? zdList[i - 1].ICD10_NAME : '') : '' }}</td>
          <td class="center">{{ zdList[i - 1] ? zdList[i - 1].ICD10_ID1 : '' }}</td>
          <td class="center">{{ zdList[i - 1] ? zdList[i - 1].RYQK : '' }}</td>
          <td colspan="3">{{ zdList[zdRows + i - 1] ? `${zdLevel(zdRows + i - 1)}` + zdList[zdRows + i - 1].ICD10_NAME : i === 1 ? '其他诊断：' : '' }}</td>
          <td class="center">{{ zdList[zdRows + i - 1] ? zdList[zdRows + i - 1].ICD10_ID1 : '' }}</td>
          <td class="center">{{ zdList[zdRows + i - 1] ? zdList[zdRows + i - 1].RYQK : '' }}</td>
        </tr>
        <tr>
          <!-- <td class="label">入院病情</td> -->
          <td colspan="10">
            入院病情：1.有
            <span class="mlr10" />
            2.临床未确定
            <span class="mlr10" />
            3.情况不明
            <span class="mlr10" />
            4.无
          </td>
        </tr>
        <tr>
          <td class="label ABG01N" :class="{'jy': hasIntersection(zk_codes.jy, ['ABG01N']), 'qz': hasIntersection(zk_codes.qz, ['ABG01N'])}">损伤、中毒的外部原因</td>
          <td colspan="7">{{ blInfo.patient_info.ABG01N }}</td>
          <td class="label ABG01C" :class="{'jy': hasIntersection(zk_codes.jy, ['ABG01C']), 'qz': hasIntersection(zk_codes.qz, ['ABG01C'])}">疾病编码</td>
          <td>{{ blInfo.patient_info.ABG01C }}</td>
        </tr>
        <tr>
          <td class="label ABF01N" :class="{'jy': hasIntersection(zk_codes.jy, ['ABF01N']), 'qz': hasIntersection(zk_codes.qz, ['ABF01N'])}">病理诊断</td>
          <td colspan="7">{{ blInfo.patient_medical_info.ABF01N }}</td>
          <td class="label ABF01C" :class="{'jy': hasIntersection(zk_codes.jy, ['ABF01C']), 'qz': hasIntersection(zk_codes.qz, ['ABF01C'])}">疾病编码</td>
          <td>{{ blInfo.patient_medical_info.ABF01C }}</td>
        </tr>
        <tr>
          <td class="label ABF02C" :class="{'jy': hasIntersection(zk_codes.jy, ['ABF02C']), 'qz': hasIntersection(zk_codes.qz, ['ABF02C'])}">最高诊断依据</td>
          <td colspan="4">{{ blInfo.patient_medical_info.ABF02C }}</td>
          <td class="label ABF04" :class="{'jy': hasIntersection(zk_codes.jy, ['ABF04']), 'qz': hasIntersection(zk_codes.qz, ['ABF04'])}">病理号</td>
          <td colspan="2">{{ blInfo.patient_medical_info.ABF04 }}</td>
          <td class="label ICD" :class="{'jy': hasIntersection(zk_codes.jy, ['ICD']), 'qz': hasIntersection(zk_codes.qz, ['ICD'])}">ICD-0-3</td>
          <td>{{ blInfo.patient_add.ICD }}</td>
        </tr>
        <tr>
          <td class="label AEB02C AEB01" :class="{'qz': ['AEB02C', 'AEB01'].includes(highlight_code)}">药物过敏</td>
          <td colspan="4">
            <span class="square">{{ blInfo.patient_medical_info.AEB02C }}</span>
            <span class="mlr10" />
            1.无
            <span class="mlr10" />
            2.有
            <span class="mlr10" />
            3.-
            <span style="margin-left: 40px">过敏药物：</span>
            <NoValueInputVue :data="blInfo.patient_medical_info.AEB01" />
          </td>
          <td class="label AEI01C" :class="{'jy': hasIntersection(zk_codes.jy, ['AEI01C']), 'qz': hasIntersection(zk_codes.qz, ['AEI01C'])}">死亡患者尸检</td>
          <td colspan="4">
            <span class="square">{{ blInfo.patient_hospital_info.AEI01C }}</span>
            <span class="mlr10" />
            1.是
            <span class="mlr10" />
            2.否
            <span class="mlr10" />
            3.-
          </td>
        </tr>
        <tr>
          <td class="label AEG01C" :class="{'jy': hasIntersection(zk_codes.jy, ['AEG01C']), 'qz': hasIntersection(zk_codes.qz, ['AEG01C'])}">血型</td>
          <td colspan="4">
            <span class="square">{{ blInfo.patient_medical_info.AEG01C }}</span>
            <span class="mlr10" />
            1.A
            <span class="mlr10" />
            2.B
            <span class="mlr10" />
            3.O
            <span class="mlr10" />
            4.AB
            <span class="mlr10" />
            5.不详
            <span class="mlr10" />
            6.未查
          </td>
          <td class="label AEG02C" :class="{'jy': hasIntersection(zk_codes.jy, ['AEG02C']), 'qz': hasIntersection(zk_codes.qz, ['AEG02C'])}">Rh</td>
          <td colspan="4">
            <span class="square">{{ blInfo.patient_medical_info.AEG02C }}</span>
            <span class="mlr10" />
            1.阴
            <span class="mlr10" />
            2.阳
            <span class="mlr10" />
            3.不详
            <span class="mlr10" />
            4.未查
          </td>
        </tr>
        <tr>
          <td class="label TJHL YJHL EJHL SJHL" :class="{'jy': hasIntersection(zk_codes.jy, ['TJHL', 'YJHL', 'EJHL', 'SJHL']), 'qz': hasIntersection(zk_codes.qz, ['TJHL', 'YJHL', 'EJHL', 'SJHL'])}">护理级别</td>
          <td colspan="9">
            1.特级护理
            <NoValueInputVue :data="blInfo.patient_add.TJHL" />
            天
            <span class="mlr10" />
            2.一级护理
            <NoValueInputVue :data="blInfo.patient_add.YJHL" />
            天
            <span class="mlr10" />
            3.二级护理
            <NoValueInputVue :data="blInfo.patient_add.EJHL" />
            天
            <span class="mlr10" />
            4.三级护理
            <NoValueInputVue :data="blInfo.patient_add.SJHL" />
            天
          </td>
        </tr>
        <tr>
          <td class="label AEE01" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE01']), 'qz': hasIntersection(zk_codes.qz, ['AEE01'])}">科主任</td>
          <td>{{ blInfo.patient_doctor_info.AEE01 }}</td>
          <td class="label AEE01_CODE" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE01_CODE']), 'qz': hasIntersection(zk_codes.qz, ['AEE01_CODE'])}">科主任编码</td>
          <td>{{ blInfo.patient_doctor_info.AEE01_CODE }}</td>
          <td class="label ZZYISXM" :class="{'jy': hasIntersection(zk_codes.jy, ['ZZYISXM']), 'qz': hasIntersection(zk_codes.qz, ['ZZYISXM'])}">医疗组长</td>
          <td>{{ blInfo.patient_doctor_info.ZZYISXM }}</td>
          <td class="label AEE02" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE02']), 'qz': hasIntersection(zk_codes.qz, ['AEE02'])}">主任(副主任)医师</td>
          <td>{{ blInfo.patient_doctor_info.AEE02 }}</td>
          <td class="label AEE02_CODE" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE02_CODE']), 'qz': hasIntersection(zk_codes.qz, ['AEE02_CODE'])}">主任(副主任)医师编码</td>
          <td>{{ blInfo.patient_doctor_info.AEE02_CODE }}</td>
        </tr>
        <tr>
          <td class="label AEE03" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE03']), 'qz': hasIntersection(zk_codes.qz, ['AEE03'])}">主治医师</td>
          <td>{{ blInfo.patient_doctor_info.AEE03 }}</td>
          <td class="label AEE03_CODE" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE03_CODE']), 'qz': hasIntersection(zk_codes.qz, ['AEE03_CODE'])}">主治医师编码</td>
          <td>{{ blInfo.patient_doctor_info.AEE03_CODE }}</td>
          <td class="label AEE04" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE04']), 'qz': hasIntersection(zk_codes.qz, ['AEE04'])}">住院医师</td>
          <td>{{ blInfo.patient_doctor_info.AEE04 }}</td>
          <td class="label AEE04_CODE" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE04_CODE']), 'qz': hasIntersection(zk_codes.qz, ['AEE04_CODE'])}">住院医师编码</td>
          <td>{{ blInfo.patient_doctor_info.AEE04_CODE }}</td>
          <td class="label"></td>
          <td></td>
        </tr>
        <tr>
          <td class="label AEE10" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE10']), 'qz': hasIntersection(zk_codes.qz, ['AEE10'])}">责任护士</td>
          <td>{{ blInfo.patient_doctor_info.AEE10 }}</td>
          <td class="label AEE10_CODE" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE10_CODE']), 'qz': hasIntersection(zk_codes.qz, ['AEE10_CODE'])}">责任护士编码</td>
          <td>{{ blInfo.patient_doctor_info.AEE10_CODE }}</td>
          <td class="label AEE05" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE05']), 'qz': hasIntersection(zk_codes.qz, ['AEE05'])}">进修医生</td>
          <td>{{ blInfo.patient_doctor_info.AEE05 }}</td>
          <td class="label AEE07" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE07']), 'qz': hasIntersection(zk_codes.qz, ['AEE07'])}">实习医师</td>
          <td>{{ blInfo.patient_doctor_info.AEE07 }}</td>
          <td class="label AEE08" :class="{'jy': hasIntersection(zk_codes.jy, ['AEE08']), 'qz': hasIntersection(zk_codes.qz, ['AEE08'])}">编码员</td>
          <td>{{ blInfo.patient_doctor_info.AEE08 }}</td>
        </tr>
        <tr>
          <td class="label AED01C" :class="{'qz': ['AED01C'].includes(highlight_code)}">病案质量</td>
          <td colspan="3">
            <span class="square">{{ blInfo.patient_medical_info.AED01C }}</span>
            <span class="mlr10" />
            1.甲
            <span class="mlr10" />
            2.乙
            <span class="mlr10" />
            3.丙
          </td>
          <td class="label AED02" :class="{'jy': hasIntersection(zk_codes.jy, ['AED02']), 'qz': hasIntersection(zk_codes.qz, ['AED02'])}">质控医师</td>
          <td>{{ blInfo.patient_doctor_info.AED02 }}</td>
          <td class="label AED03" :class="{'jy': hasIntersection(zk_codes.jy, ['AED03']), 'qz': hasIntersection(zk_codes.qz, ['AED03'])}">质控护士</td>
          <td>{{ blInfo.patient_doctor_info.AED03 }}</td>
          <td class="label AED04" :class="{'jy': hasIntersection(zk_codes.jy, ['AED04']), 'qz': hasIntersection(zk_codes.qz, ['AED04'])}">质控时间</td>
          <td>{{ blInfo.patient_doctor_info.AED04 }}</td>
        </tr>
      </table>
      <div class="oper-box">
        <IconBtnVue>
          <el-image class="icon_btn" :src="require('../../assets/images/sort.png')" fit="contain"></el-image>
        </IconBtnVue>
        <IconBtnVue style="margin-right: 0">
          <el-image class="icon_btn" :src="require('../../assets/images/setting.png')" fit="contain"></el-image>
        </IconBtnVue>
      </div>
      <!-- 手术信息 -->
      <table class="table shoushu">
        <tr>
          <th rowspan="2" class="label th25">手术及操作编码</th>
          <th rowspan="2" class="label th25">手术及操作日期</th>
          <th colspan="2" rowspan="2" class="label th25">手术及操作名称</th>
          <th rowspan="2" class="label th25">手术级别</th>
          <th rowspan="2" class="label th25">手术类型</th>
          <th rowspan="2" class="label th25">手术判别</th>
          <th colspan="3" class="label th25">手术及操作人员</th>
          <th rowspan="2" class="label th25">切口愈合等级</th>
          <th rowspan="2" class="label th25">麻醉方式</th>
          <th rowspan="2" class="label th25">麻醉医师</th>
        </tr>
        <tr>
          <th class="label th25">术者</th>
          <th class="label th25">Ⅰ助</th>
          <th class="label th25">Ⅱ助</th>
        </tr>
        <tr>
          <td class="center">{{ blInfo.main_operation.ICD9_ID1 }}</td>
          <td class="center">{{ blInfo.main_operation.OPE_DATE }}</td>
          <td class="center" colspan="2">{{ blInfo.main_operation.ICD9_NAME }}</td>
          <td class="center">{{ blInfo.main_operation.OPE_LEVEL }}</td>
          <td class="center">{{ blInfo.main_operation.OPE_TYPE }}</td>
          <td class="center">{{ blInfo.main_operation.SSPB }}</td>
          <td class="center">{{ blInfo.main_operation.OPE_MAN_NAME }}</td>
          <td class="center">{{ blInfo.main_operation.FRIST_ASSISTANT_NAME }}</td>
          <td class="center">{{ blInfo.main_operation.SECOND_ASSISTANT_NAME }}</td>
          <td class="center">{{ blInfo.main_operation.QKDJ }} / {{ blInfo.main_operation.YHDJ }}</td>
          <td class="center">{{ blInfo.main_operation.HOCUS_WAY_ID }}</td>
          <td class="center">{{ blInfo.main_operation.HOCUS_MAN_NAME }}</td>
        </tr>
        <tr v-for="item of blInfo.secondary_operation" :key="'ss' + item">
          <td class="center">{{ item.ICD9_ID1 }}</td>
          <td class="center">{{ item.OPE_DATE }}</td>
          <td class="center" colspan="2">{{ item.ICD9_NAME }}</td>
          <td class="center">{{ item.OPE_LEVEL }}</td>
          <td class="center">{{ item.OPE_TYPE }}</td>
          <td class="center">{{ item.SSPB }}</td>
          <td class="center">{{ item.OPE_MAN_NAME }}</td>
          <td class="center">{{ item.FRIST_ASSISTANT_NAME }}</td>
          <td class="center">{{ item.SECOND_ASSISTANT_NAME }}</td>
          <td class="center">{{ item.QKDJ }} / {{ item.YHDJ }}</td>
          <td class="center">{{ item.HOCUS_WAY_ID }}</td>
          <td class="center">{{ item.HOCUS_MAN_NAME }}</td>
        </tr>
        <template v-if="blInfo.secondary_operation.length < 8">
          <tr v-for="item of 8 - blInfo.secondary_operation.length" :key="'ss2' + item">
            <td class="center"></td>
            <td class="center"></td>
            <td class="center" colspan="2"></td>
            <td class="center"></td>
            <td class="center"></td>
            <td class="center"></td>
            <td class="center"></td>
            <td class="center"></td>
            <td class="center"></td>
            <td class="center"></td>
            <td class="center"></td>
            <td class="center"></td>
          </tr>
        </template>
        <tr>
          <td class="label RJSS" :class="{'jy': hasIntersection(zk_codes.jy, ['RJSS']), 'qz': hasIntersection(zk_codes.qz, ['RJSS'])}">是否为日间手术</td>
          <td colspan="5">
            <span class="square">{{ blInfo.main_operation.RJSS }}</span>
            <span class="mlr10" />
            1.是
            <span class="mlr10" />
            2.否
          </td>
          <td class="label AEL01" :class="{'jy': hasIntersection(zk_codes.jy, ['AEL01']), 'qz': hasIntersection(zk_codes.qz, ['AEL01'])}">有创呼吸机使用时间</td>
          <td colspan="6">{{ blInfo.patient_medical_info.AEL01 }}</td>
        </tr>
        <tr>
          <td class="label LCLJ" :class="{'jy': hasIntersection(zk_codes.jy, ['LCLJ']), 'qz': hasIntersection(zk_codes.qz, ['LCLJ'])}">临床路径/入径情况</td>
          <td colspan="5">
            <span class="square">{{ blInfo.patient_add.LCLJ }}</span>
            <span class="mlr10" />
            1.是
            <span class="mlr10" />
            2.否
          </td>
          <td class="label WCQK" :class="{'jy': hasIntersection(zk_codes.jy, ['WCQK']), 'qz': hasIntersection(zk_codes.qz, ['WCQK'])}">完成情况</td>
          <td colspan="2">
            <span class="square">{{ blInfo.patient_add.WCQK }}</span>
            <span class="mlr10" />
            1.完成
            <span class="mlr10" />
            2.退出
          </td>
          <td class="label BYQK" :class="{'jy': hasIntersection(zk_codes.jy, ['BYQK']), 'qz': hasIntersection(zk_codes.qz, ['BYQK'])}">变异情况</td>
          <td colspan="3">
            <span class="square">{{ blInfo.patient_add.BYQK }}</span>
            <span class="mlr10" />
            1.有
            <span class="mlr10" />
            2.无
          </td>
        </tr>
        <tr>
          <td class="label AEJ01 AEJ02 AEJ03 AEJ04 AEJ05 AEJ06" :class="{'jy': hasIntersection(zk_codes.jy, ['AEJ01', 'AEJ02', 'AEJ03', 'AEJ04', 'AEJ05', 'AEJ06']), 'qz': hasIntersection(zk_codes.qz, ['AEJ01', 'AEJ02', 'AEJ03', 'AEJ04', 'AEJ05', 'AEJ06'])}">颅脑损伤患者昏迷时间</td>
          <td colspan="12">
            入院前：
            <NoValueInputVue :data="blInfo.patient_medical_info.AEJ01" />
            天
            <NoValueInputVue :data="blInfo.patient_medical_info.AEJ02" />
            小时
            <NoValueInputVue :data="blInfo.patient_medical_info.AEJ03" />
            分钟
            <span class="mlr10" />
            入院后：
            <NoValueInputVue :data="blInfo.patient_medical_info.AEJ04" />
            天
            <NoValueInputVue :data="blInfo.patient_medical_info.AEJ05" />
            小时
            <NoValueInputVue :data="blInfo.patient_medical_info.AEJ06" />
            分钟
          </td>
        </tr>
        <tr>
          <th class="label" colspan="4">
            重症监护病房类型
            <br />
            （CCU、RICU、SICU、NICU、PICU、EICU、MICU、其他）
          </th>
          <th class="label" colspan="3">
            进重症监护室时间
            <br />
            年月日时分
          </th>
          <th class="label" colspan="3">
            出重症监护室时间
            <br />
            年月日时分
          </th>
          <th class="label" colspan="3">
            合计
            <br />
            小时
          </th>
        </tr>
        <tr v-for="(item, index) of blInfo.icu" :key="'icu' + index">
          <td colspan="4" class="center">{{ item.IS_MAIN_WAY }}</td>
          <td colspan="3" class="center">{{ item.IN_TIME }}</td>
          <td colspan="3" class="center">{{ item.OUT_TIME }}</td>
          <td colspan="3" class="center">{{ item.HJXS }}</td>
        </tr>
        <template v-if="3 - blInfo.icu.length">
          <tr v-for="item of 3 - blInfo.icu.length" :key="'zz' + item">
            <td colspan="4" class="center"></td>
            <td colspan="3" class="center"></td>
            <td colspan="3" class="center"></td>
            <td colspan="3" class="center"></td>
          </tr>
        </template>
        <tr>
          <td class="label AEM01C AEM02" :class="{'jy': hasIntersection(zk_codes.jy, ['AEM01C', 'AEM02']), 'qz': hasIntersection(zk_codes.qz, ['AEM01C', 'AEM02'])}">离院方式</td>
          <td colspan="12">
            <span class="square">{{ blInfo.patient_info.AEM01C }}</span>
            <span class="mlr10" />
            1.医嘱离院
            <span class="mlr10" />
            2.医嘱转院，拟接收医疗机构名称：
            <NoValueInputVue :data="blInfo.patient_info.AEM01C == 2 ? blInfo.patient_hospital_info.AEM02 : ''" />
            <span class="mlr10" />
            3.医嘱转社区卫生服务机构/乡镇卫生院，拟接收医疗机构名称：
            <NoValueInputVue :data="blInfo.patient_info.AEM01C == 3 ? blInfo.patient_hospital_info.AEM02 : ''" />
            <span class="mlr10" />
            4.非医嘱离院
            <span class="mlr10" />
            5.死亡
            <span class="mlr10" />
            9.其他
          </td>
        </tr>
        <tr>
          <td class="label AEM03C AEM04" :class="{'jy': hasIntersection(zk_codes.jy, ['AEM03C', 'AEM04']), 'qz': hasIntersection(zk_codes.qz, ['AEM03C', 'AEM04'])}">是否有出院31天内再住院计划</td>
          <td colspan="12">
            <span class="square">{{ blInfo.patient_hospital_info.AEM03C }}</span>
            <span class="mlr10" />
            1.无
            <span class="mlr10" />
            2.有，目的：
            <NoValueInputVue :data="blInfo.patient_hospital_info.AEM04" />
          </td>
        </tr>
      </table>
      <div class="oper-box">
        <IconBtnVue style="margin-right: 0">
          <span class="text_btn" @click="toCostPage">查看费用详情</span>
        </IconBtnVue>
      </div>
      <!-- 费用信息 -->
      <table class="table">
        <tr>
          <td class="label ADA01 ADA0101" :class="{'jy': hasIntersection(zk_codes.jy, ['ADA01', 'ADA0101']), 'qz': hasIntersection(zk_codes.qz, ['ADA01', 'ADA0101'])}">住院费用（元）</td>
          <td colspan="9">
            总费用:
            <NoValueInputVue :data="blInfo.patient_info.ADA01" />
            （自付金额：
            <NoValueInputVue :data="blInfo.patient_cost_info.ADA0101" />
            ）
          </td>
        </tr>
        <tr>
          <td class="label D11 D12 D13 D14" :class="{'jy': hasIntersection(zk_codes.jy, ['D11', 'D12', 'D13', 'D14']), 'qz': hasIntersection(zk_codes.qz, ['D11', 'D12', 'D13', 'D14'])}">1.综合医疗服务费</td>
          <td colspan="9">
            （1）一般医疗服务费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D11" />
            （2）一般治疗操作费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D12" />
            （3）护理费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D13" />
            （4）其他费用：
            <NoValueInputVue :data="blInfo.patient_cost_info.D14" />
          </td>
        </tr>
        <tr>
          <td class="label D15 D16 D17 D18" :class="{'jy': hasIntersection(zk_codes.jy, ['D15', 'D16', 'D17', 'D18']), 'qz': hasIntersection(zk_codes.qz, ['D15', 'D16', 'D17', 'D18'])}">2.诊断类</td>
          <td colspan="9">
            （5）病理诊断费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D15" />
            （6）实验室诊断费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D16" />
            （7）影像学诊断费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D17" />
            （8）临床诊断项目费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D18" />
          </td>
        </tr>
        <tr>
          <td class="label D19 D19X01 D20 D20X01 D20X02" :class="{'jy': hasIntersection(zk_codes.jy, ['D19', 'D19X01', 'D20', 'D20X01', 'D20X02']), 'qz': hasIntersection(zk_codes.qz, ['D19', 'D19X01', 'D20', 'D20X01', 'D20X02'])}">3.治疗类</td>
          <td colspan="9">
            （9）非手术治疗项目费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D19" />
            （临床物理治疗费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D19X01" />
            ） （10）手术治疗费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D20" />
            （麻醉费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D20X01" />
            手术费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D20X02" />
            ）
          </td>
        </tr>
        <tr>
          <td class="label D21" :class="{'jy': hasIntersection(zk_codes.jy, ['D21']), 'qz': hasIntersection(zk_codes.qz, ['D21'])}">4.康复类</td>
          <td colspan="9">
            （11）康复费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D21" />
          </td>
        </tr>
        <tr>
          <td class="label D22" :class="{'jy': hasIntersection(zk_codes.jy, ['D22']), 'qz': hasIntersection(zk_codes.qz, ['D22'])}">5.中医类</td>
          <td colspan="9">
            （12）中医治疗费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D22" />
          </td>
        </tr>
        <tr>
          <td class="label D23 D23X01" :class="{'jy': hasIntersection(zk_codes.jy, ['D23', 'D23X01']), 'qz': hasIntersection(zk_codes.qz, ['D23', 'D23X01'])}">6.西药类</td>
          <td colspan="9">
            （13）西药费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D23" />
            （抗菌药物费用：
            <NoValueInputVue :data="blInfo.patient_cost_info.D23X01" />
            ）
          </td>
        </tr>
        <tr>
          <td class="label D24 D25" :class="{'jy': hasIntersection(zk_codes.jy, ['D24', 'D25']), 'qz': hasIntersection(zk_codes.qz, ['D24', 'D25'])}">7.中药类</td>
          <td colspan="9">
            （14）中成药费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D24" />
            （15）中草药费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D25" />
          </td>
        </tr>
        <tr>
          <td class="label D26 D27 D28 D29 D30" :class="{'jy': hasIntersection(zk_codes.jy, ['D26', 'D27', 'D28', 'D29', 'D30']), 'qz': hasIntersection(zk_codes.qz, ['D26', 'D27', 'D28', 'D29', 'D30'])}">8.血液和血液制品类</td>
          <td colspan="9">
            （16）血费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D26" />
            （17）白蛋白类制品费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D27" />
            （18）球蛋白类制品费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D28" />
            （19）凝血因子类制品费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D29" />
            （20）细胞因子类制品费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D30" />
          </td>
        </tr>
        <tr>
          <td class="label D31 D32 D33" :class="{'jy': hasIntersection(zk_codes.jy, ['D31', 'D32', 'D33']), 'qz': hasIntersection(zk_codes.qz, ['D31', 'D32', 'D33'])}">9.耗材类</td>
          <td colspan="9">
            （21）检查用一次性医用材料费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D31" />
            （22）治疗用一次性医用材料费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D32" />
            （23）手术用一次性医用材料费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D33" />
          </td>
        </tr>
        <tr>
          <td class="label D34" :class="{'jy': hasIntersection(zk_codes.jy, ['D34']), 'qz': hasIntersection(zk_codes.qz, ['D34'])}">10.其他类</td>
          <td colspan="9">
            （24）其他费：
            <NoValueInputVue :data="blInfo.patient_cost_info.D34" />
          </td>
        </tr>
      </table>
    </div>
    <ControlDrawerVue v-if="controlData.bSwitch" :data="controlData" @close="controlData.bSwitch = false" @zk="handleZK" @codes="handleCodes" />
  </div>
</template>

<script>
import ControlDrawerVue from './components/index/ControlDrawer.vue';
import IconBtnVue from './components/index/IconBtn.vue';
import NoValueInputVue from './components/index/NoValueInput.vue';
export default {
  components: {
    IconBtnVue,
    NoValueInputVue,
    ControlDrawerVue,
  },
  data() {
    return {
      controlData: {
        bSwitch: false,
        zyh: '',
      },
      // blInfo: {
      //   patient_info: {},
      //   patient_add: {},
      //   patient_address_info: {},
      //   patient_contacts_info: {},
      //   patient_cost_info: {},
      //   patient_doctor_info: {},
      //   patient_hospital_info: {},
      //   patient_medical_info: {},
      //   patient_other_info: {},
      //   patient_work_info: {},
      //   main_diagnosis: {},
      //   other_diagnosis: [],
      //   main_operation: {},
      //   secondary_operation: [],
      //   icu: []
      // },
      blInfo: {
        patient_info: {
          id: 108258,
          hospital_name: '滨州医学院烟台附属医院',
          AAA28: '00224538',
          MED_REC_ID: '844664',
          AAA01: '林*娟',
          AAA02C: '女',
          AAA03: '1956-03-27 00:00:00',
          AAA04: 67,
          AAA05C: '汉族',
          AAA40: 0,
          AAA42: '',
          AEN01: '',
          AAA06C: '中国',
          AAA07: '370631********5526',
          AAA08C: '已婚',
          AEM01C: '1',
          AAB01: '2023-09-25 07:58:00',
          AAC01: '2023-09-29 09:18:00',
          AAC11N: '胃肠外科、疝与腹壁外科二病区',
          AAC04: 4,
          ADA01: '6122.22',
          ADA0101: '514.9',
          AAA29: 5,
          AAB06C: '2',
          ABC01N: '手术后恶性肿瘤化学治疗',
          ICD9_NAME: null,
          ORG_STATE: '01',
          AAA26C: '2.城乡居民基本医疗保险',
          ATTEND_GRP_CODE: '',
          ATTEND_GRP_NAME: '',
          F_D: null,
          J: null,
          coder_id: null,
          score: 100,
          is_error: 0,
          ABG01N: '',
          ABG01C: '',
          status: 0,
          created_at: '2023-10-08 12:33:32',
          updated_at: '2023-10-09 00:32:54',
          source: 0,
          level: 0,
          is_defect: 1,
          is_defect_v2: 0,
          is_update: 0,
          home_bmy_score: null,
          AAC11C: null,
          AEE03_CODE: null,
          AEE04_CODE: null,
          AEE08_CODE: null,
          ICD10_NAME: null,
          ZZYLJG: null,
        },
        patient_add: {
          id: 534804,
          YLJG: '',
          AAA28: '00224538',
          BRCW: '',
          BAHM: '',
          TYSHXYDM: '123700000871841638',
          JKKH: null,
          SFZJLX: '居民身份证',
          XB: '女',
          CSRQ: '1956-03-27 00:00:00',
          ZYH: 844664,
          XM: '林*娟',
          RYKB: '胃肠外科、疝与腹壁外科二病区',
          BFRY: '胃肠外科、疝与腹壁外科二病区',
          ZKKB: '4269',
          CYKB: '胃肠外科、疝与腹壁外科二病区',
          CYSJ: '2023-09-29 09:18:00',
          NL: '67岁',
          rynyr: '2023-09-25',
          rys: '07:58:00',
          SJHL: 0,
          EJHL: 4,
          YJHL: 0,
          TJHL: 0,
          ZRHSBM: '9334',
          ZRHS: '张*娥',
          BMY: '隋*平',
          ZKHSBM: '619',
          ZKHS: '王*',
          ZKRQ: '2023-09-29 00:00:00',
          ZHFZRYS: '203',
          ZZYSBM: '9276',
          ZYYSBM: '10291',
          ZZZYSBM: null,
          SS1BM: '99.2503',
          SS1RQ: '2023-09-25 00:00:00',
          SS1MC: '静脉注射化疗药物',
          SSLX1: null,
          SS2BM: null,
          SS2RQ: null,
          SS2MC: null,
          SSLX2: null,
          SS3BM: null,
          SS3RQ: null,
          SS3MC: null,
          SSLX3: null,
          SS4BM: null,
          SS4RQ: null,
          SS4MC: null,
          SSLX4: null,
          SS5BM: null,
          SS5RQ: null,
          SS5MC: null,
          SSLX5: null,
          SS6BM: null,
          SS6RQ: null,
          SS6MC: null,
          SSLX6: null,
          SS7BM: null,
          SS7RQ: null,
          SS7MC: null,
          SSLX7: null,
          SS8BM: null,
          SS8RQ: null,
          SS8MC: null,
          SSLX8: null,
          SS9BM: null,
          SS9RQ: null,
          SS9MC: null,
          SSLX9: null,
          SS10BM: null,
          SS10RQ: null,
          SS10MC: null,
          SSLX10: null,
          SS11BM: null,
          SS11RQ: null,
          SS11MC: null,
          SSLX11: null,
          SS12BM: null,
          SS12RQ: null,
          SS12MC: null,
          SSLX12: null,
          SS13BM: null,
          SS13RQ: null,
          SS13MC: null,
          SSLX13: null,
          SS14BM: null,
          SS14RQ: null,
          SS14MC: null,
          SSLX14: null,
          SS15BM: null,
          SS15RQ: null,
          SS15MC: null,
          SSLX15: null,
          LCLJ: '2',
          WCQK: null,
          KZRXM: '李*',
          ZHFZRYSXM: '李*',
          ZZYSXM: '鲁*翔',
          ZYYSXM: '常*宾',
          ZZYISXM: null,
          SFCH: '是',
          BLZDMC: null,
          BLZDBM: null,
          SSPB: 0,
          created_at: '2023-10-08 06:50:49',
          updated_at: '2023-10-08 06:50:49',
          BYQK: '0',
          HB: 0,
          HCV: 0,
          HIV: 0,
        },
        patient_address_info: {
          id: 108258,
          AAA28: '844664',
          AAA09: '山东省',
          AAA10: '烟台市',
          AAA11: '牟平区',
          AAA43: '山东省',
          AAA44: '烟台市',
          AAA45: '山东省',
          AAA46: '烟台市',
          AAA47: '牟平区',
          AAA12: '体育馆路５１１号３单元３３０１号',
          AAA13C: 370631,
          AAA33C: '',
          AAA14C: '',
          AAA15: '体育馆路５１１号３单元３３０１号',
          AAA48: '山东省',
          AAA49: '烟台市',
          AAA50: '牟平区',
          AAA16C: 370612,
          AAA36C: '',
          AAA51: '',
          AAA17C: '',
          created_at: '2023-10-08 12:33:32',
          updated_at: '2023-10-08 12:33:32',
        },
        patient_contacts_info: {
          id: 515554,
          AAA28: '844664',
          AAA22: '唐*江',
          AAA23C: '配偶',
          AAA24: '体育馆路５１１号３单元３３０１号',
          AAA25: '156****5028',
          created_at: '2023-10-08 12:33:32',
          updated_at: '2023-10-08 12:33:32',
        },
        patient_cost_info: {
          id: 1035920,
          AAA28: '844664',
          CYSJ: '2023-09-29 09:18:00',
          ADA0101: '514.9',
          AAE040: '',
          D11: '405',
          D12: '183',
          D13: '162',
          D14: '0',
          D15: '0',
          D16: '843.3',
          D17: '0',
          D18: '38',
          D19: '0',
          D19X01: '0',
          D20: '0',
          D20X01: '0',
          D20X02: '0',
          D21: '0',
          D22: '0',
          D23: '2500.68',
          D23X01: '0',
          D24: '1729.12',
          D25: '0',
          D26: '0',
          D27: '0',
          D28: '0',
          D29: '0',
          D30: '0',
          D31: '6.7',
          D32: '254.42',
          D33: '0',
          D34: '0',
          created_at: '2023-10-08 06:50:16',
          updated_at: '2023-10-08 06:50:16',
        },
        patient_doctor_info: {
          id: 108258,
          AAA28: '844664',
          AED02: '李贺',
          AED03: '王东',
          AED04: '2023-09-29',
          AEE01: '李贺',
          AEE01_CODE: '203',
          AEE02: '李贺',
          AEE03: '鲁科翔',
          AEE11: '',
          AEE09: '常凯宾',
          AEE04: '常凯宾',
          AEE05: '',
          AEE07: '',
          AEE08: '8292',
          AEE10: '张勤娥',
          CODE_DATE: null,
          COMPLETION_DATE: null,
          SIGN_IN_DATE: null,
          QUALITY_CONTROL: null,
          AEE02_CODE: '203',
          AEE03_CODE: '9276',
          AEE04_CODE: '10291',
          created_at: '2023-10-08 12:33:32',
          updated_at: '2023-10-08 12:33:32',
          AEE10_CODE: '9334',
        },
        patient_hospital_info: {
          id: 108258,
          AAA28: '844664',
          AAA30: '00224538',
          ABC01C: 'Z51.102',
          AAA27: '-',
          AAC001: '',
          AAB01: '2023-09-25',
          AAB02C: '胃肠外科、疝与腹壁外科二病区',
          AAB03: '',
          AAB11C: '胃肠外科、疝与腹壁外科二病区',
          AAB11N: '胃肠外科、疝与腹壁外科二病区',
          AAC02C: '胃肠外科、疝与腹壁外科二病区',
          AAC03: ' ',
          AAC11C: '胃肠外科、疝与腹壁外科二病区',
          AAD01C: '',
          AEM02: '',
          AEM03C: 1,
          AEM04: '',
          AEI01C: 2,
          created_at: '2023-10-08 12:33:32',
          updated_at: '2023-10-08 12:33:32',
        },
        patient_medical_info: {
          id: 620795,
          AAA28: '844664',
          ABA01C: 'Z51.102',
          ABA01N: '手术后恶性肿瘤化学治疗',
          ABC03C: 0,
          ABF01C: '',
          ABF01N: '',
          ABF04: '2312126',
          ABF02C: 1,
          ABF03C: '',
          ABH01C: '',
          ABH0201C: '',
          ABH0202C: '',
          ABH0203C: '',
          ABH03C: '',
          AEB02C: 1,
          AEB01: '',
          AED01C: 1,
          AEG01C: 6,
          AEG02C: 4,
          AEG04: '',
          AEG05: '',
          AEG06: '',
          AEG07: '',
          AEG08: '',
          AEJ01: 0,
          AEJ02: 0,
          AEJ03: 0,
          AEJ04: 0,
          AEJ05: 0,
          AEJ06: 0,
          AEL01: 0,
          AEN02C: '',
          AEN02N: '',
          AEI09: '',
          AEI10: '',
          AEI08: '',
          created_at: '2023-10-08 12:33:32',
          updated_at: '2023-10-08 12:33:32',
        },
        patient_other_info: {
          id: 620795,
          AAA28: '844664',
          AAB07C: '',
          AAB07N: '',
          AAB07: 3,
          AAB07D: '',
          ABD04: '',
          ABD051: 1,
          ABD052: 1,
          ABD053: 0,
          ABD054: 0,
          ZB09: '',
          ZB08: '',
          ZB07: '',
          ZB06: '',
          ZB05: '',
          ZB04: '隋亚平',
          ZB03: 9,
          ZB02: 2023,
          ZB01C: '',
          ZA04: '',
          MED_REC_ID: 844664,
          UNT_ID: '060101',
          ZA03: '滨州医学院烟台附属医院',
          AFA01: 0,
          AFA02: 0,
          AFA03: 0,
          AFA04: 0,
          AFA05: 0,
          AFA06: 0,
          AFA07: 0,
          AFA08: 0,
          AFA09: 0,
          AFA10: 0,
          AFA11: 0,
          AFA12: '',
          ZB10: '',
          ZB11: '',
          IS_VALID: '',
          SYN_DATE: '',
          QU_STATE: '',
          DATA_STATE: '',
          BALANCEID: '',
          AKC021: '',
          created_at: '2023-10-08 12:33:32',
          updated_at: '2023-10-08 12:33:32',
        },
        patient_work_info: {
          id: 108258,
          AAA28: '844664',
          AAA18C: 18,
          AAA19: '无',
          AAA20: '156****5029',
          AAA21C: '',
          created_at: '2023-10-08 12:33:32',
          updated_at: '2023-10-08 12:33:32',
        },
        main_diagnosis: {
          id: 194173,
          AAA28: '844664',
          ZYHM: '00224538',
          BAHM: '00224538',
          CYRQ: '2023-09-29 09:18:00',
          DIA_ORDER: 1,
          ZZPB: 1,
          LBMC: '出院诊断',
          ICD10_ID1: 'Z51.102',
          ICD10_NAME: '手术后恶性肿瘤化学治疗',
          RYQK: '有',
          CYQK: null,
          AREA_ID: '',
          BATCH_ID: '',
          created_at: '2023-10-08 06:45:40',
          updated_at: '2023-10-08 06:45:40',
        },
        other_diagnosis: [
          {
            id: 886005,
            AAA28: '844664',
            ZYHM: '00224538',
            BAHM: '00224538',
            CYRQ: '2023-09-29 09:18:00',
            DIA_ORDER: 1,
            ZZPB: 0,
            LBMC: '其他诊断1',
            ICD10_ID1: 'C18.900',
            ICD10_NAME: '结肠恶性肿瘤',
            RYQK: '有',
            CYQK: null,
            AREA_ID: '',
            BATCH_ID: '',
            created_at: '2023-10-08 06:46:20',
            updated_at: '2023-10-08 06:46:20',
          },
          {
            id: 886006,
            AAA28: '844664',
            ZYHM: '00224538',
            BAHM: '00224538',
            CYRQ: '2023-09-29 09:18:00',
            DIA_ORDER: 2,
            ZZPB: 0,
            LBMC: '其他诊断2',
            ICD10_ID1: 'E11.900',
            ICD10_NAME: '2型糖尿病',
            RYQK: '有',
            CYQK: null,
            AREA_ID: '',
            BATCH_ID: '',
            created_at: '2023-10-08 06:46:20',
            updated_at: '2023-10-08 06:46:20',
          },
          {
            id: 886007,
            AAA28: '844664',
            ZYHM: '00224538',
            BAHM: '00224538',
            CYRQ: '2023-09-29 09:18:00',
            DIA_ORDER: 3,
            ZZPB: 0,
            LBMC: '其他诊断3',
            ICD10_ID1: 'I10.x00x002',
            ICD10_NAME: '高血压',
            RYQK: '有',
            CYQK: null,
            AREA_ID: '',
            BATCH_ID: '',
            created_at: '2023-10-08 06:46:20',
            updated_at: '2023-10-08 06:46:20',
          },
          {
            id: 886095,
            AAA28: '844664',
            ZYHM: '00224538',
            BAHM: '00224538',
            CYRQ: '2023-09-29 09:18:00',
            DIA_ORDER: 4,
            ZZPB: 0,
            LBMC: '其他诊断4',
            ICD10_ID1: 'Z98.800x005',
            ICD10_NAME: '肺术后',
            RYQK: '有',
            CYQK: null,
            AREA_ID: '',
            BATCH_ID: '',
            created_at: '2023-10-08 06:46:20',
            updated_at: '2023-10-08 06:46:20',
          },
        ],
        main_operation: {
          id: 225938,
          AAA28: '844664',
          ICD9_ID1: '99.2503',
          ICD9_NAME: '静脉注射化疗药物',
          OPE_DATE: '2023-09-25 00:00:00',
          OPE_MAN_NAME: '李*',
          OPE_MAN_CODE: '203',
          FRIST_ASSISTANT_CODE: null,
          FRIST_ASSISTANT_NAME: null,
          SECOND_ASSISTANT_CODE: null,
          SECOND_ASSISTANT_NAME: null,
          HOCUS_WAY_ID: null,
          INCISION_GRADE_ID: '0',
          HOCUS_MAN_CODE: null,
          HOCUS_MAN_NAME: null,
          START_TIME: null,
          END_TIME: null,
          OPE_ORDER: 1,
          OPE_LEVEL: 2,
          RJSS: '否',
          AREA_ID: '',
          BATCH_ID: '',
          created_at: '2023-10-08 06:48:19',
          updated_at: '2023-10-08 06:48:19',
          OPE_TYPE: null,
          SSPB: '治疗操作',
          HEAL_ID: null,
          ZYHM: '00224538',
          BAHM: '00224538',
          CYRQ: '2023-09-29 09:18:00',
          SFZYSS: '1',
        },
        secondary_operation: [
          {
            id: 225938,
            AAA28: '844664',
            ICD9_ID1: '99.2503',
            ICD9_NAME: '静脉注射化疗药物',
            OPE_DATE: '2023-09-25 00:00:00',
            OPE_MAN_NAME: '李*',
            OPE_MAN_CODE: '203',
            FRIST_ASSISTANT_CODE: null,
            FRIST_ASSISTANT_NAME: null,
            SECOND_ASSISTANT_CODE: null,
            SECOND_ASSISTANT_NAME: null,
            HOCUS_WAY_ID: null,
            INCISION_GRADE_ID: '0',
            HOCUS_MAN_CODE: null,
            HOCUS_MAN_NAME: null,
            START_TIME: null,
            END_TIME: null,
            OPE_ORDER: 1,
            OPE_LEVEL: 2,
            RJSS: '否',
            AREA_ID: '',
            BATCH_ID: '',
            created_at: '2023-10-08 06:48:19',
            updated_at: '2023-10-08 06:48:19',
            OPE_TYPE: null,
            SSPB: '治疗操作',
            HEAL_ID: null,
            ZYHM: '00224538',
            BAHM: '00224538',
            CYRQ: '2023-09-29 09:18:00',
            SFZYSS: '1',
          },
        ],
        icu: [],
      },
      highlight_code: '',
      zk_codes: {
        qz: [],
        jy: []
      },
      active_zk_codes: {
        qz: [],
        jy: []
      }
    };
  },
  computed: {
    zdList() {
      // 包含主要和其他
      const { other_diagnosis, main_diagnosis } = this.blInfo;
      const other_list = JSON.parse(JSON.stringify(other_diagnosis));
      other_list.unshift(main_diagnosis);
      return other_list;
    },
    zdRows() {
      const count = this.zdList.length / 2;
      return count < 11 ? 11 : count;
    },
  },
  created() {
    this.controlData.zyh = this.$route.query.zyh;
    this.controlData.bSwitch = true;
    // this.getData();
  },
  methods: {
    // 判断诊断级别
    zdLevel(i) {
      let str;
      if (i === 1) {
        str = '主要诊断：';
      } else if (i === 2) {
        str = '其他诊断：';
      } else if (i === this.zdRows) {
        str = '其他诊断：';
      } else {
        str = '';
      }
      return str;
    },
    // 是否显示质控栏
    onToggle() {
      this.controlData.zyh = this.$route.query.zyh;
      this.controlData.bSwitch = !this.controlData.bSwitch;
    },
    // 获取详情
    getData() {
      const params = {
        ZYH: this.$route.query.zyh,
      };
      this.$axios.post('/bmy/getBlDetails', params).then(res => {
        this.blInfo = res.data;
      });
    },
    // 质控栏锚点及高亮
    handleZK(val) {
      console.log(val, 89898)
      const { anchor, codes } = val
      const { key, field } = anchor
      this.active_zk_codes = codes
      if (key === 'user') {
        this.highlight_code = field
        document.querySelector(`.${field}`).scrollIntoView({ behavior: 'smooth', block: 'center' })
      }
    },
    handleCodes(codes) {
      this.$set(this, 'zk_codes', codes)
    },
    // 判断两个数组是否存在交际
    hasIntersection(arr1, arr2) {
      // 在arr1中筛选出arr2中存在的元素  
      const filtered = arr1.filter(item => arr2.includes(item));  
      // 如果筛选后的数组长度大于0，则存在交集  
      return filtered.length > 0;  
    },
    // 查看费用详情
    toCostPage() {
      this.$router.push({ name: 'Cost', query: { zyh: this.$route.query.zyh } });
    },
  },
};
</script>

<style lang="scss" scoped>
.bg-box {
  transition: all 0.3s;
}
.has_control {
  padding-right: 426px;
}
.title {
  font-size: 24px;
  font-family: Source Han Sans CN-Bold, Source Han Sans CN;
  font-weight: bold;
  color: #333333;
  text-align: center;
  line-height: 40px;
  margin-bottom: 20px;
}
.bg-card {
  position: relative;
  user-select: none;
}
.btn-wrapper {
  position: absolute;
  top: 20px;
  right: 20px;
}
.zyh {
  font-size: 16px;
  font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  font-weight: 400;
  color: #333333;
  text-align: right;
  margin-bottom: 20px;
}
.icon_btn {
  width: 20px;
  height: 20px;
  display: block;
}
.text_btn {
  font-size: 14px;
  font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  font-weight: 400;
  color: #185da6;
  line-height: 20px;
}
.oper-box {
  text-align: right;
}
.mlr10 {
  margin: 0 10px;
}
.table {
  width: 100%;
  min-width: 600px;
  table-layout: fixed;
  empty-cells: show;
  border-collapse: collapse;
  margin: 0 auto;
  th,
  td {
    border: 1px solid #666666;
    font-size: 14px;
    box-sizing: border-box;
    height: 40px;
    color: #333333;
    padding: 0 12px;
    word-break: break-all;
    &.jy_bg {
      background: rgba($color: #178691, $alpha: 0.2);
    }
    &.qz_bg {
      background: rgba($color: #ED3028, $alpha: 0.2);
    }
  }
  td.label {
    width: 140px;
    height: 40px;
    color: #666666;
    background-color: #ebebeb;
    text-align: center;
    &.jy {
      color: #178691;
      font-weight: bold;
    }
    &.qz {
      color: #FB5C4F;
      font-weight: bold;
    }
  }
  th.label {
    height: 40px;
    color: #666666;
    background-color: #ebebeb;
    text-align: center;
    &.jy {
      color: #178691;
      font-weight: bold;
    }
    &.qz {
      color: #FB5C4F;
      font-weight: bold;
    }
  }
  .center {
    text-align: center;
  }
}
.shoushu {
  .th25 {
    height: 25px !important;
  }
}
.square {
  display: inline-block;
  width: 20px;
  height: 20px;
  text-align: center;
  border: 1px solid #707070;
  border-radius: 2px;
  vertical-align: middle;
}


</style>