<template>
    <div class="right-con">
      <p>时间轴</p>
      <div style="padding: 0 20px">
            <!-- <el-date-picker
              style="width: 100%; margin-bottom: 10px"
              size="small"
              v-model="time"
              @change="inputChang"
              type="daterange"
              range-separator="-"
              value-format="yyyy-MM-dd"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            >
            </el-date-picker> -->
            <lv-cascader @change="inputChang" @treeChange="treeChange" v-model="input" :options="options"></lv-cascader>
      </div>
      <el-scrollbar class="scroll" tag="div">
        <el-empty v-if="!timelineData.length" :image="require('@/assets/images/empty.png')" description="暂无数据~"></el-empty>
        <div class="timeline-item"
          v-for="(items, indexs) in timelineData"
          :key="indexs"
        >
          <div class="timeline-left">
            <p>{{items.date}}</p>
          </div>
          <div class="timeline-right">
            <div v-for="(item,index) in items.child" :key="'c_' + index" style="margin-bottom:5px">
            <!-- 标题 -->
            <p class="text text-head"  :style="{'font-weight':item.subCategory=='diagnose'?'normal':'bold'}">
              <span class="start-type" v-if="item.type == '外院'">外院</span>
              <span class="sign-type"
                v-if="item.subCategory == 'outHospital' || item.subCategory == 'inHospital' || item.subCategory == 'appointment' || (item.subCategory=='diagnose' && item.type == '外院')">{{outpatientshospitalRecordType(item.subCategory)}}</span>
              <template v-if="item.category==='outpatients_hospital_record'&&item.subCategory=='diagnose'">
                <span
                  v-if="item.data.diagnosticType"
                  class='start-type'
                  :class="{
                    'main-diagnose':item.data&& item.data.diagnosticType&&item.data.diagnosticType.slice(0,2)=='主要',
                    'minor-diagnose':item.data&& item.data.diagnosticType&&item.data.diagnosticType.slice(0,2)=='次要'
                  }"
                >
                  {{item.data&& item.data.diagnosticType&&item.data.diagnosticType.slice(0,2)}}
                </span>
              </template>
              {{item.title}}
              <!-- 普通报告查看逻辑 -->
              <span @click="check(item)" class="check" v-if="setTimelineShow(item,'category')">查看</span>
              <span class="check" v-if="setWriterBtn(item) && item.category =='writer' && item.type =='外院'" @click="getWriterUrl(item)">查看</span>
              <!-- dicom开始 -->
              <template v-if="item.subCategory == 'image' && item.dcmUrl">
                <img :src="require('@/assets/images/yinxiang.png')" width="20px" height="20px" style="vertical-align:middle;margin-right:3px"/>
                <span class="check" @click="checkImage(item)">图像查看</span>
              </template>
              <!-- dicom结束 -->
              <!-- 病理医嘱/报告处理 -->
              <template v-if="setSortPathology(item,'subCategory') && Array.isArray(item.data)">
                  <template v-for="(ele, idx) in item.data">
                    <span
                      style="text-decoration:unset;margin-right: 20px;"
                      class="check"
                      v-if="ele.type == '冰冻病理' && !ele.isSupplement"
                      @click="check(item, 'frozenUrl')"
                      :key="idx"
                    >
                      <span class="risp-button-text" style="">冰冻</span>
                      <span class="risp-count">{{item.data | calcRispCount('frozenUrl')}}</span>
                    </span>
                    <span
                      style="text-decoration:unset;margin-right: 20px;"
                      class="check"
                      v-if="ele.type != '冰冻病理' && !ele.isSupplement"
                      @click="check(item, 'conventionalUrl')"
                      :key="idx"
                    >
                      <span class="risp-button-text" style="">冰冻</span>
                      <span class="risp-count">{{item.data | calcRispCount('conventionalUrl')}}</span>
                    </span>
                  </template>
              </template>
            </p>
            <!-- 描述 -->
            <p class="descript" v-if="!(item.subCategory == 'pathology' && item.type == '本院') && item.subCategory != 'mdt' && (item.subCategory != 'diagnose' || (item.subCategory == 'diagnose' && item.type == '外院'))">
              {{item.des}}
              <!-- 是否显示标准的药物医嘱用量 -->
              <span class="ywts-con" v-if="item.noticed">
                <el-tooltip
                  class="item"
                  effect="dark"
                  :content="item.noticeMsg"
                  placement="top-start"
                >
                  <img
                    class="icon_ywts"
                    :src="require('@/assets/images/icon_ywts.png')"
                  />
                </el-tooltip>
              </span>
              <el-tooltip placement="top-start" :open-delay="500"  class="tolStyle" v-if="item.category==='treatment'&&item.subCategory=='drug'&&item.drugAliasList.length>0">
                <div slot="content">
                <div v-for="(e, index) in item.drugAliasList" :key="e.drugCode" :style="index != item.drugAliasList.length-1 ? 'margin-bottom: 4px' : ''">
                    <span class="tipPoint"></span>
                    <span >{{ e.drugAlias}}</span>
                    <br/> 
                  </div>
                </div>
                <span>
                  <span class="tishi_icon"></span>
                </span>
              </el-tooltip>
            </p>
            <!-- MDT相关 -->
            <p  class="descript" v-if="item.data.meetingType">
              <span v-if="getMeetingType(item, 'source')" style="display:block;color:rgba(0,0,0,.65)">病例资料整理<span class="check" @click="check(item, 'source')">查看</span>
              </span>
              <span style="display:block;color:rgba(0,0,0,.65)">MDT小结<span v-if="getMeetingType(item, 'sumary')" class="check" @click="check(item, 'sumary')"> 查看</span></span>
              <span style="display:block;color:rgba(0,0,0,.65)">
                {{item.data.meetingType == "Tumor Board" ? "Tumor Board咨询建议书" : "MDT咨询建议书"}}
                <span v-if="getMeetingType(item, 'mdt')" class="check" @click="check(item, 'MDT')">查看</span>
              </span>
            </p>
          </div>
          </div>
        </div>
        
      </el-scrollbar>
       <!-- 全屏弹窗 -->
      <el-dialog
        title="病例资料"
        :visible.sync="dialogVisible"
        fullscreen
        :modal="false"
        :append-to-body="true"
        :before-close="handleClose"
        :modal-append-to-body="true"
        custom-class="new-mdt-dialog"
        class='timeLineCloes'
        :show-close="false"
      >
      <template slot="title" style="display:flex">
          <div>
            <span v-if="dialogDataType != 'record'&&dialogDataType != 'fRecord'">病例资料</span>
          <el-button
            size="mini"
            type="text"
            v-if="extUrlList.length"
            style="margin-left: 15px"
            @click="handleOpenLinks"
          >外部链接</el-button>
          </div>
         
          <el-tooltip class="item" effect="dark" content="关闭" placement="bottom">
            <div style="font-size:28px" class="boxbo" @click="handleClose"><i class="el-icon-close"></i></div>
          </el-tooltip>
        </template>
        <!-- 图片/pdf -->
        <template v-if="dialogDataType === 'imgPdf' ||
          dialogDataType === 'ECImg' ||
          dialogDataType === 'risp' ||
          dialogDataType==='surgery' ||
          dialogDataType==='anesthia'">
          <div class="url-content">
            <div class="url-content-left">
              <span
                class="url-item"
                :class="{ active: activeIndex === index }"
                v-for="(item, index) of urlList"
                @click="hanldeUrlClick(item.type, item.url, index,item)"
                :key="index"
              ><i class="el-icon-document" style="margin-right:4px;"></i>{{ item.label }}</span>
            </div>
            <div class="url-content-right" style="height: 100%">
              <el-scrollbar class="mdt-in-scroll" style="height: 100%" ref="scroll">
                <template
                  v-if="
                    type.toLowerCase() === 'pdf' || type.toLowerCase() === 'word'
                  "
                >
                  <iframe :src="url" width="100%" height="100%"></iframe>
                </template>
                <!-- risp -->
                <template v-else-if="type.toLowerCase() === 'risp'">
                  <risp-show
                    :examId="url"
                        :getDocReprotDataRequest = rispRequest.getDocReprotDataRequest
                        :getExamsInfoRequest = rispRequest.getExamsInfoRequest
                        :getReportBaseInfoRequest = rispRequest.getReportBaseInfoRequest
                        :getReferenceByReportIdRequest = rispRequest.getReferenceByReportIdRequest
                        :checkUniqueRequest = rispRequest.checkUniqueRequest
                        :getCurtCapHistoryFormRequest = rispRequest.getCurtCapHistoryFormRequest
                    style="display: inline-flex;justify-content: center;width: 100%;background: #D7D7D7;"
                    ref="rispShow"
                    @rispPrint="onRispprintStatus"
                  ></risp-show>
                </template>
                <!-- 手术安全核查表 -->
                <template v-else-if="dialogDataType === 'surgery'">
                  <surgicalChecklist :operationId="anesthesia.operationId" :id="anesthesia.id"></surgicalChecklist>
                </template>
                <!-- 麻醉记录单 -->
                 <template v-else-if="dialogDataType === 'anesthia'">
                  <recordList :operationId="anesthesia.operationId" :id="anesthesia.id"></recordList>
                </template>
                <!--图片-->
                <template v-else>
                  <img :src="url" alt />
                  <div style="margin: -200000px; z-index: -1">
                    <img :src="url" alt ref="print" style="width: 760px" />
                  </div>
                  <div class="print-position">
                    <div class="pdf-box" ref="Page">
                      <img :src="url" class="print-rise-img" alt />
                    </div>
                  </div>
                  <div class="print-positions">
                    <div class="pdf-boxBox" ref="printBate">
                      <div class="img-item" style="page-break-after: always;" >
                        <img :src="url" class="print-rise-img" alt="">
                      </div>
                    </div>
                  </div>
                </template>
              </el-scrollbar>
          </div>
          <div class="url-content-extend" v-show="!(type.toLowerCase() == 'pdf' || type.toLowerCase() == 'word')">
            <!-- <template v-if="type === 'risp'">
              <el-button
                type="primary"
                size="small"
                class="print-button"
                v-show="rispCanPrint && rispPrintButtonIsShow"
                @click="printRisp(printInspectUrl)"
              >打 印</el-button>
            </template>
            <template v-else>
               <el-button
                type="primary"
                v-if="dialogDataType!='surgery' && dialogDataType!='anesthia'"
                size="small"
                class="print-button"
                @click="handleReportPrint(urlList)"
              >打 印</el-button>
            </template> -->
          </div>
            </div>
        </template>
        <!-- GE的链接处理 -->
        <template v-else-if="dialogDataType === 'GePage'">
          <el-tabs v-model="activeName">
            <el-tab-pane
              v-for="item of urlList"
              :key="item.type"
              :lazy="true"
              :label="item.label"
              :name="item.type"
            >
              <iframe :src="item.url" width="100%" height="100%"></iframe>
            </el-tab-pane>
          </el-tabs>
        </template>
        <!-- 住院病历 -->
        <template v-else-if="dialogDataType === 'page'">
          <template>
            <iframe :src="url" width="100%" height="100%"></iframe>
          </template>
        </template>
        <!-- 门诊实时病历 ||妇科门诊病历-->
        <template v-else-if="dialogDataType === 'record' || dialogDataType === 'fRecord'">
          <div class="styleBox">
            <iframe v-if="timelineOutpatientInformationstr" :src="timelineOutpatientInformationstr" frameborder="0" :width="widthThe?'120%':'100%'" height="100%"></iframe>
          </div>
          <!-- <MedicalRecord :caseHistory="caseHistory"></MedicalRecord> -->
          <!-- <Gynaecology :caseHistory="caseHistory"></Gynaecology> -->
        </template>
        <!-- 会诊申请 -->
        <template v-else-if="dialogDataType === 'aRecord'">
          <applyConsultation :applyConsultationInfo="applyConsultationInfo"></applyConsultation>
        </template>
        <!-- 会诊记录 -->
        <template v-else-if="dialogDataType === 'rRecord'">
          <consultation :consultationInfo="consultationInfo"></consultation>
        </template>
        <!-- 检验报告 -->
        <template v-else>
          <div class="url-content" v-if="dialogDataType !== 'radiationTherapy'">
            <div class="url-content-right" :style="{ height: conHeight }">
              <el-scrollbar style="height: 100%" ref="scroll">
                <el-button
                  type="primary"
                  icon="el-icon-printer"
                  circle
                  v-if="titleType != 'inHospital'"
                  class="pos-top"
                  @click="handleTablePrint(printInspectUrl)"
                ></el-button>
                <div class="report-con">
                  <div
                    class="report-name"
                  >{{titleType === 'inHospital' ? "北京美中爱瑞肿瘤医院检验报告单":'北京迪安医学检验实验室检测报告单'}}</div>
                  <section class="sec-flex">
                    <div class="info-item dataBox">
                      <div>
                        <span class="label">
                          <span class="SimSun">患者</span>
                          <span class="Arial">ID/Patient ID：</span>
                        </span>
                        <span class="con">{{inspectInfo.reportPatientInfo.healthCardNo || ''}}</span>
                      </div>
                      <div>
                        <span class="label">
                          <span class="SimSun">科 室</span>
                          <span class="Arial">/Department：</span>
                        </span>
                        <span class="con">{{inspectInfo.reportPatientInfo.deptName}}</span>
                      </div>
                      <div>
                        <span class="label">
                          <span class="SimSun">标本类型</span>
                          <span class="Arial">/Type of Specimen：</span>
                        </span>
                        <span class="con">{{inspectInfo.reportPatientInfo.specimen}}</span>
                      </div>
                    </div>
                    <div class="info-item">
                      <div>
                        <span class="label">
                          <span class="SimSun">姓 名</span>
                          <span class="Arial">/Patient Name：</span>
                        </span>
                        <span class="con">{{inspectInfo.reportPatientInfo.patientName}}</span>
                      </div>
                      <div>
                        <span class="label">
                          <span class="SimSun">出生日期</span>
                          <span class="Arial">/Date of Birth：</span>
                        </span>
                        <span class="con">{{inspectInfo.reportPatientInfo.birthday}}</span>
                      </div>
                      <div style="display:flex">
                        <span class="label">
                          <span class="SimSun">临床印象</span>
                          <span class="Arial">/Clinical Impression：</span>
                        </span>
                        <span class="con" style="max-width:200px">{{inspectInfo.reportPatientInfo.relevantClinicDiag}}</span>
                      </div>
                    </div>
                    <div class="info-item">
                      <div>
                        <span class="label">
                          <span class="SimSun">性 别</span>
                          <span class="Arial">/Gender：</span>
                        </span>
                        <span class="con">{{inspectInfo.reportPatientInfo.gender === "F"? "女": "男"}}</span>
                      </div>
                      <div>
                        <span class="label">
                          <span class="SimSun">年 龄</span>
                          <span class="Arial">/Age：</span>
                        </span>
                        <span class="con">{{inspectInfo.reportPatientInfo.age}}</span>
                      </div>
                      <div>
                        <span class="label">
                          <span class="SimSun">检验项目</span>
                          <span class="Arial">/Test Name：</span>
                        </span>
                        <span class="con">{{inspectInfo.reportPatientInfo.testName}}</span>
                      </div>
                    </div>
                  </section>
                  <div class="table-report-con">
                    <el-table
                      class="mdtTableDialog"
                      :data="inspectInfo.list"
                      style="width: 100%"
                      :cell-style="rowDClass"
                      :header-cell-style="headClass"
                    >
                      <el-table-column
                        prop="itemName"
                        header-align="left"
                        label="分析项目"
                        min-width="220px"
                        label-class-name='analyzeProject'
                      >
                        <template slot-scope="scope">
                          <div style='margin-left:15px'>{{scope.row.itemName}}</div>
                        </template>
                      </el-table-column>
                      <el-table-column prop="itemEnName" header-align="center" label="英文名称" min-width="150px"></el-table-column>
                      <el-table-column width="120" header-align="left" label="趋势图">
                        <template slot-scope="scope">
                          <img style="cursor: pointer" :src="require('@/assets/images/trend.png')" class="trend" alt v-if="scope.row.isNumber" @click="hanldeRowClick(scope.row)"/>
                        </template>
                      </el-table-column>
                      <el-table-column label="结果" header-align="left" min-width="170" label-class-name='dataBigBox'>
                        <template slot-scope="scope">
                          <div style="display:flex;">
                            <div style="width:20px">
                                <el-tooltip class="item " effect="dark" placement="top" v-if='scope.row.clinicalSignificance' popper-class='clinicalValue' >
                                    <div slot="content" class='testBubble'>
                                      <div >
                                        <span>临床意义:{{scope.row.clinicalSignificance}}</span>
                                      </div>
                                    </div>
                                  <div class='meaningButton' ></div>
                                </el-tooltip>
                            </div>
                            <span
                              style="flex:1;text-align:left;padding-left:5px;"
                              :class="setTextColor(  scope.row.testResult,  scope.row.itemRef,  scope.row.quaResult)"><span
                              :class="setTextBackColor(  scope.row.itemRef,  scope.row.quaResult,  scope.row.testResult,)"
                            >{{ scope.row.testResult }}</span></span>
                            <span
                              style="width:17px"
                              :class="setTextArrowColor(scope.row.itemRef, scope.row.quaResult)"
                            >{{scope.row.quaResult !== "正常"? scope.row.quaResult: ""}}
                            </span>
                          </div>
                        </template>
                      </el-table-column>
                      <el-table-column prop="unit" header-align="left" label="单位" min-width="150"></el-table-column>
                      <el-table-column  prop="itemRef" header-align="left" label="参考区间" min-width="180"></el-table-column>
                    </el-table>
                  </div>
                  <el-row>
                    <el-col :span="6">
                      <span class="label">
                        <span class="SimSun">申请医师</span>
                        <span class="Arial">/Doctor：</span>
                      </span>
                      <span class="con">{{inspectInfo.reportPatientInfo.orderingProvider}}</span>
                    </el-col>
                    <el-col :span="6">
                      <span class="label">
                        <span class="SimSun">采样人</span>
                        <span class="Arial">/Sampled by：</span>
                      </span>
                      <span class="con">{{inspectInfo.reportPatientInfo.specer}}</span>
                    </el-col>
                    <el-col :span="6">
                      <span class="label">
                        <span class="SimSun">检验者</span>
                        <span class="Arial">/Examined by：</span>
                      </span>
                      <span class="con">{{inspectInfo.reportPatientInfo.verifiedBy}}</span>
                    </el-col>
                    <el-col :span="6">
                      <span class="label">
                        <span class="SimSun">审核者</span>
                        <span class="Arial">Reviewed by：</span>
                      </span>
                      <span class="con">{{inspectInfo.reportPatientInfo.transcriptionist}}</span>
                    </el-col>
                    <el-col :span="6">
                      <span class="label">
                        <span class="SimSun">采样时间</span>
                        <span class="Arial">/Sampled at：</span>
                      </span>
                      <span class="con">{{inspectInfo.reportPatientInfo.sampledDateTime}}</span>
                    </el-col>
                    <el-col :span="6">
                      <span class="label">
                        <span class="SimSun">接收时间</span>
                        <span class="Arial">/Received at：</span>
                      </span>
                      <span class="con">{{inspectInfo.reportPatientInfo.receivedDateTime}}</span>
                    </el-col>
                    <el-col :span="6">
                      <span class="label">
                        <span class="SimSun">报告时间</span>
                        <span class="Arial">/Report Time：</span>
                      </span>
                      <span class="con">{{inspectInfo.reportPatientInfo.reviewDateTime}}</span>
                    </el-col>
                    <el-col :span="6">
                      <span class="label">
                        <span class="SimSun">备注</span>
                        <span class="Arial">/Note：</span>
                      </span>
                      <span class="con">{{inspectInfo.reportPatientInfo.remark || ''}}</span>
                    </el-col>
                  </el-row>
                </div>
                <!-- 打印检验报告 -->
                <div style=" margin-top: -2000000px;position:fixed;">
                  <div ref="printTable" style="width:970px;">
                    <img
                      v-if="Type != 'pdf'"
                      :src="printInspectUrl"
                      style="width: 970px;margin: 0"
                      alt
                    />
                  </div>
                </div>
              </el-scrollbar>
            </div>
            <div class="url-content-extend">
                <!-- <el-button
                type="primary"
                class="print-button sp"
                @click="handleTablePrint(printInspectUrl)"
                size="small"
              >打 印</el-button> -->
          </div>
          </div>
        </template>
        <el-dialog
          width="30%"
          :title="recordsInfo.name"
          :visible.sync="trendVisible"
          custom-class="trendDialogmdts"
          :modal-append-to-body="false"
          @before-close="trendVisible = false"
        >
          <div slot="title" class="header">
            <span class="dialog-title">{{ recordsInfo.name }}</span>
            <div style="display:flex;justify-content: center;">
              <span class="type-value">
                <i style="backgroundColor:#F94B4B;margin-right:12px"></i>危急值
              </span>
              <span class="type-value">
                <i style="backgroundColor:#06af67;margin-right:12px"></i>参考值
              </span>
              <span class="type-value">
                <i style="backgroundColor:#218cfa;margin-right:12px"></i>指标数值
              </span>
            </div>
          </div>
          <div class='clinicalSignificance' v-if='recordsInfo.clinical'>临床意义:<span>{{ recordsInfo.clinical}}</span></div>
          <line-chart :recordsInfo="recordsInfo" :visible="trendVisible"></line-chart>
        </el-dialog>
      </el-dialog>
      <!-- 放射治疗的弹窗 -->
      <el-dialog
        :visible.sync="radiationVisible"
        fullscreen
        class="radiationTherapyDialog"
        :modal="false"
        :append-to-body="true"
        :before-close="handleRadiationClose"
        :modal-append-to-body="true"
      >
        <!-- 放射治疗 -->
        <template>
          <radiotherapy
            :rationInfo="rationInfo"
            :visible="radiationVisible"
            :radiationInDate="radiationInDate"
            @handleGetOrderInfo="handleGetOrderInfo"
          ></radiotherapy>
        </template>
      </el-dialog>
    </div>
</template>
<script>
import { encodeURI } from "js-base64";
import { Loading } from 'element-ui'
import {
  getDocReprotData,
  getExamsInfo,
  getReportBaseInfo,
  getReferenceByReportId,
  checkUnique,
  getCurtCapHistoryForm
} from "@/request/risp";
import {getLoginToken,getReportInfo,getTimeLabList,getReportData,exportTimeLineToData,getTimelineFirst,querySchemeNum,queryScheme,getLoginUserInfo } from '@/request/timeline'
import {preImageUrl,getPcafInfo,getPcrInfo} from '@/request/common.js'
import {Print} from "aegle-sp-components/src/utils/print";
import printHtml from 'aegle-sp-components/src/utils/printRisp.js'
import lvCascader from './lv-cascader.vue'
import { handleSortData } from "aegle-sp-components/src/utils/handleTimeLineData";
import { handleSetMedicalData } from 'aegle-sp-components/src/utils/handleData'
import { cloneDeep } from 'lodash'
import lineChart from './components/lineChart/line-chart.vue'
import consultation from './components/consultation/consultation.vue'
import applyConsultation from './components/consultation/apply-consultation.vue'
import Gynaecology from './components/medicalRecords/gynaecology.vue'
import MedicalRecord from './components/medicalRecords/medicalRecord.vue'
import rispShow from './components/risp-show/risp-report/index.vue'
import radiotherapy from './components/radiotherapy/radiotherapy.vue'
import surgicalChecklist from './components/anesthesia/surgicalChecklist.vue'
import recordList from './components/anesthesia/recordList.vue'
import axios from 'axios'

const catalog = ['outpatients_hospital_record',]
export default {
    components: {
        lineChart,
        consultation,
        applyConsultation,
        Gynaecology,
        MedicalRecord,
        lvCascader,
        rispShow,
        radiotherapy,
        surgicalChecklist,
        recordList
    },
    data() {
        return {
          widthThe: false,
          printInspectUrl: "",
          titleType: '',
          dicList:[],
          selectTreeId: [],
          dialogVisible: false,
          dialogDataType: 'imgPdf',
          extUrlList: [],
          activeIndex: 0,
          urlList: [],
          conHeight: '500px',
          type: '',
          url: '',
          referenceList: [],
          activeReferenceIndex: 0,
          activeName: 'GePage',
          caseHistory: {},
          applyConsultationInfo: {},
          consultationInfo: {},
          defaultReportInfo: {
            healthCardNo: "",
            patientName: "",
            gender: "",
            deptName: "",
            birthday: "",
            age: "",
            specimen: "",
            testName: "",
            relevantClinicDiag: "",
            orderingProvider: " ",
            specer: "",
            transcriptionist: "",
            verifiedBy: "",
            sampledDateTime: "",
            receivedDateTime: "",
            reviewDateTime: "",
            note: ""
          },
          inspectInfo: {
            list: [],
            status: 0,
            reportPatientInfo: {
              healthCardNo: "",
              patientName: "",
              gender: "",
              deptName: "",
              birthday: "",
              age: "",
              specimen: "",
              testName: "",
              relevantClinicDiag: "",
              orderingProvider: " ",
              specer: "",
              transcriptionist: "",
              verifiedBy: "",
              sampledDateTime: "",
              receivedDateTime: "",
              reviewDateTime: "",
              note: ""
            }
          },
          Type: '',
          recordsInfo: {
            list: [],
            timeList: [],
            name: "",
            unit: "",
            maxNum: "",
            minNum: "",
            itemRef: "",
            panLow: "",
            panHigh: "",
            markLineList: []
          },
          trendVisible: false,
          radiationVisible: false,
          rationInfo: {
            status: true
          },
          // 放疗弹窗
          radiationVisible: false,
          radiationInDate: "",
          time: '',
          input: '',
          configIp: 108,
          props: { multiple: true },
          categoryLineData: [],
          timelineData: [],
          tableModal: [],
          options: [],
          //risp
          rispRequest: {
            getDocReprotDataRequest: getDocReprotData,
            getExamsInfoRequest: getExamsInfo,
            getReportBaseInfoRequest: getReportBaseInfo,
            getReferenceByReportIdRequest: getReferenceByReportId,
            checkUniqueRequest: checkUnique,
            getCurtCapHistoryFormRequest: getCurtCapHistoryForm
          },
          preImageUrl,
          labList: [],
          timelineArr: [],
          anesthesia: {
            operationId: '',
            id: ''
          },
          rispCanPrint: false,
          rispPrintButtonIsShow: false,
          printObj:{
            id: "medical-record", //打印区域 Dom ID
            popTitle: '门诊病历',//打印页面标题文字
            // extraCss: 'https://www.google.com,https://www.google.com',
            extraHead: '', //  可以传进去  style tag 标签；注意要逗号分隔   解决特定区域不显示问题；
          },
          timelineOutpatientInformationstr:"",
        }
    },
    inject: ['topObj'],
    created() {
      this.configIp = this.topObj.setting == 'test' ? 108 : 111;
      this.openTimeline()
      this.conHeight = document.documentElement.clientHeight - 120 + "px";
      if(window.screen.width >2293) this.widthThe=true;
    },
    watch: {
        // 门诊病历数据
        caseHistory: {
          handler(val) {
            if (val && val.status) {
              this.dialogVisible = true;
            }
          },
          deep: true,
          immediate: true
        },
        // 检验数据
        inspectInfo: {
          handler(val) {
            if (val && this.dialogDataType === "list" && val.status) {
              this.dialogVisible = true;
            }
          },
          deep: true,
          immediate: true
        },
        // 放疗数据
        rationInfo: {
          handler(val) {
            if (val && this.dialogDataType === "radiationTherapy" && !val.status) {
              this.radiationVisible = true;
            }
          },
          deep: true,
          immediate: true
        },
        // 会诊申请单
        applyConsultationInfo: {
          handler(val) {
            if (val && val.status) {
              this.dialogVisible = true;
            }
          },
          deep: true,
          immediate: true
        },
        // 会诊记录
        consultationInfo: {
          handler(val) {
            if (val && val.status) {
              this.dialogVisible = true;
            }
          },
          deep: true,
          immediate: true
        },
        labList: {
          handler(val) {
            if (val.length) {
              this.recordsInfo.list = val.map(item => {
                return item.value;
              });
              this.recordsInfo.timeList = val.map(item => {
                return item.time;
              });
              let { itemRef, panLow, panHigh, list } = this.recordsInfo;
              let { maxNum, markLineList, minNum } = this.setMarkLineList(itemRef, panLow, panHigh, list);
              this.recordsInfo.maxNum = maxNum;
              this.recordsInfo.minNum = minNum;
              this.recordsInfo.markLineList = markLineList;
              setTimeout(() => {
                this.trendVisible = true;
              }, 0);
            }
          },
          deep: true,
          immediate: true
        },
    },
    filters: {
      calcRispCount(data,type){
        let preUrlArr = [];
          if (type == "frozenUrl") {
          // 手术标本病理诊断冰冻按钮
          preUrlArr = data.filter((item) => {  return item.type == "冰冻病理";});
        } else if (type == "conventionalUrl") {
          // 手术标本病理诊断 常规
          preUrlArr = data.filter((item) => {  return item.type !== "冰冻病理" ;});
        } else {
          preUrlArr = data;
        }
        return preUrlArr.length
      }
    },
    methods: {
      // el-table样式
      rowDClass() {
        return "line-height: 30px;height: 30px;padding:0px 20px;;font-size:14px;font-family: Microsoft YaHei;";
      },
      headClass() {
        return "color:#000; line-height: 30px;height: 30px;padding:5px 20px;;font-size:14px;font-family: Microsoft YaHei;";
      },
      //时间轴弹窗显示
      async openTimeline(d) {
        this.topObj.handleOption(1,{ pointLoading: true })
        await this.getTimelineFirst()
        await this.exportTimeLineToData()
        this.topObj.handleOption(1,{ pointLoading: false })
      },
      //新版获取时间轴分类的接口
      async  getTimelineFirst() {
        const res = await getTimelineFirst(this.topObj.healthNum)
        // const res = await getTimelineFirst('10000012649')
        if (res.code != 0) return this.$message.error(res.msg);
        let arr = [],catalog = []
        for(let k in res.data) {
          arr.push({ label: res.data[k],value: k })
          catalog.push(k)
        }
        this.options = arr;
        this.selectTreeId = catalog
      },
      //获取时间轴数据新
      async exportTimeLineToData() {
        let param = {
          // healthCardNo: '10000012649',
          healthCardNo: this.topObj.healthNum,
          title: this.input,
        }
        if(this.time && this.time.length){
          param.startTime = this.time[0] + ' 00:00:00',
          param.endTime = this.time[1] + ' 23:59:59';
        }
        if(!this.selectTreeId.length) {
          this.timelineData = []
          return
        }
        this.selectTreeId.forEach(item => {
          param[item] = item
        })
        const { code, data, msg} = await exportTimeLineToData(param)
        this.topObj.handleOption(1,{ pointLoading: false })
        if (code != 0) return this.$message.error(msg);
        if(this.selectTreeId.length){
          this.timelineData = handleSortData(data, this.topObj.doctorInfo.username)
        } else {
          this.timelineData = []
        } 
      },
      //关键字搜索
      inputChang(e) {
          this.exportTimeLineToData()
      },
      //文书分类选择是值改变
      treeChange(e) {
        this.selectTreeId = e.filter(item => item != 'all')
        if(!this.selectTreeId.length) {
          this.timelineData = []
          return
        }
        this.exportTimeLineToData()
      },
      //设置检验表格相关颜色
      setTextColor(result, itemref, quaresult) {
        if (quaresult === "正常" || !itemref) return "";
        if (itemref === "阴性") return "table-span-red";
        if (quaresult === "↑") return "table-span-red";
        if (quaresult === "↓") return "table-span-green";
        return "";
      },
      setTextArrowColor(itemref,quaresult){
        if(!itemref) return "";
        if (itemref === "阴性") return "table-spanArrow-red";
        if (quaresult ==="↑") return "table-spanArrow-red";
        if (quaresult === "↓") return "table-spanArrow-green";
        return "";
      },
      setTextBackColor(itemref,quaresult,result){
        if(!itemref) return "";
        if (itemref === "阴性" && result==="阴性") return '';
        if (quaresult ==="↑") return "table-spanBack-red";
        if (quaresult === "↓") return "table-spanBack-green";
        return "";
      },
      outpatientshospitalRecordType(subCategory){
        let types = [
          { subCategory:"inHospital", type:'入院'},
          { subCategory:"outHospital", type:'出院'},
          { subCategory:"appointment", type:'门诊'},
          { subCategory: "diagnose", type: '诊断'}
        ];
        let result = types.find(item=>item.subCategory==subCategory);
        return result ? result.type : ''
      },
      //获取诊断的title，拼接了des
      getTitleStr(item) {
        if(!item) return '';
        if(item.subCategory == 'diagnose') return item.title;
        return item.title && item.des ? (item.title + '-' + item.des) : (item.title ? item.title : item.des)
      },
      // 区分冰冻和常规
      setSortPathology (row,type) {
        if (!row.data.meetingType) {
          return row[type] == 'pathology' && !row.urls
        } else {
          return false
        }
      },
       // 判断数据是否是咨询建议书或会议意见
      getMeetingType(d, t) {
        console.log()
        let status = false;
        if (t == "mdt" && d.data.status) {
          status = d.data.mergePdfUrl ? true : false;
        } else if (t == "Tumor" && d.data.status) {
          status = (d.data.meetingType == "Tumor Board" && d.data.opinionReportUrl) ? true: false;
        } else if (t == "source") {
          status = d.data.caseReportUrl ? true : false;
        } else if (t == "sumary" && d.data.status) {
          let url =
          d.data.meetingType == "Tumor Board"
            ? d.data.tboardReportUrl
            : d.data.reportUrl;
          status = url ? true : false;
        }
        return status;
      },
      setWriterBtn(row) {
        if((row.subCategory =='outpatients_emergency_case' ||
          row.subCategory == 'nursing_record' ||
          row.subCategory == 'in_hospital_process' ||
          row.subCategory == 'informed_consent') && row.data.url) {
          return true
        } else if(row.subCategory == 'medical_record_homepage' && row.data.filePath) {
          return true
        }
      },
      //获取文书的所有url
      getWriterUrl(val) {
        this.extUrlList = val.extUrl ? val.extUrl.split(",") : [];
        let url = ''
        if(val.subCategory === "medical_record_homepage" || val.category === "medical_record_homepage"){
          url = val.data.filePath || ''
        } else if(val.subCategory === "outpatients_emergency_case" || val.subCategory =='in_hospital_process' || val.subCategory == 'informed_consent') {
          url = val.data ? val.data.url : '';
        } else if(val.subCategory === "nursing_record") {
          url = val.data.url || '';
        }else {
          url = val.other.filePath || '';
        }
        let urlArr = url.split(',')
        const list = urlArr.map(item => {
          let str = item.substring(0,item.lastIndexOf('.'))
          return {
              title: val.title,
              label: str.substring(0,str.indexOf('_')),
              type: item.substring(item.lastIndexOf('.') + 1),
              subCategory: val.subCategory || val.category,
              url: item,
            };
        })
        this.handleUrlList(list)
      },
      //影像报告查看跳转
      checkImage(item) {
        window.open(item.dcmUrl)
      },
      // 设置普通的查看显示效果
      setTimelineShow(row, type) {
        if (!row.data.meetingType) {
          if (row[type] == "pathology" && row.urls) {
            return true;
          } else if (row.urls) {
            return true;
          } else if (row.reportData) {
            return true;
          } else if (row.other.inpatientId) {
            return true;
          } else if (row.extUrl) {
            return true;
          } else if (row.data.reportSource == "1" && row.urls) {
            return true;
          } else if (row.data.reportSource == "2" && row.data.pacsPatientId) {
            return true;
          } else if(row.data.flag===1 || row.data.flag===9){
          return true;
          }  else if ((row.subCategory === "examination" || row.category === "examination") && row.title.indexOf("PET/CT") != -1 && row.data.pacsPatientId) {
            return true;
          } else if (
            (row.subCategory === "examination" || row.category === "examination") && Object.keys(row.other).length) {
            return true;
          } else if (
            (row.subCategory === "radiationTherapy" || row.category === "radiationTherapy") && row.schemeOut
          ) {
            return true;
          } else if(row.subCategory==='patient_checkup'&&row.data.reportUrl){
            return true;
          } else {
              return false;
          }
        } else {
          return false;
        }
      },
      // 处理报告的url数据
      handleSetUrl(val, reportUrl) {
        let preUrlArr = reportUrl.split('http').length > 2 ? reportUrl.split(",") : [reportUrl]
        let list = preUrlArr.map((item) => {
          let arr = item.split("/");
          let arr1 = arr[arr.length - 1].split(".");
          if (item.indexOf("http") !== -1) {
            return {
              title: val.title || '',
              label: val.type === "外院" ? (arr1[0].substring(arr1[0].indexOf("_") + 1, arr1[0].length)) : arr1[0],
              type: arr1[arr1.length - 1],
              subCategory: val.subCategory || val.category,
              url: item,
            };
          } else {
            return {
              title: val.title,
              label: arr1[0],
              type: arr1[arr1.length - 1],
              subCategory: val.subCategory || val.category,
              url: (item.indexOf("ftp") != -1 ? this.preGeImageUrl : this.preImageUrl) + item,
            };
          }
        });
        let writeType = val.other && (val.other.writeStatus === 1 || val.other.writeStatus === 3)
        this.handleUrlList(list, writeType)
      },
      // 时间格式处理
      handleDataFormat(date) {
        let year = new Date(date).getFullYear();
        let month = new Date(date).getMonth() + 1;
        let day = new Date(date).getDate();
        if (month < 10) month = "0" + String(month);
        if (day < 10) day = "0" + String(day);
        return String(year) + String(month) + String(day);
      },
      // 放疗
      handelSetRadiation(val) {
        const obj = cloneDeep(val)
        this.rationInfo.status = true;
        this.radiationInDate = obj.data.inHospitalDate ? obj.data.inHospitalDate.slice(0, 10) : "";
        this.rationInfo.userInfo = obj.data;
        this.rationInfo.radioPatientId = obj.data.id;
        // 查询放疗方案列表
        this.getOrderList(obj.data.id);
      },
      // 处理检验数据
      handleInspect(obj) {
        let type = "inHospital";
        let url = "";
        if (obj.data.performedBy === "外送组") {
          url = obj.data.reportUrl;
          type = "delivery";
        } else if (obj.data.testDate && obj.data.inspectionId && obj.data.fileName) {
          type = "inHospital";
          let date = this.handleDataFormat(obj.data.testDate);
          url = `http://10.72.2.180:8081/SampleHandler/api.tools.pdf.oldreport.jsp?NDate=${date}&SpecimenNo=${obj.data.inspectionId}&FileName=${obj.data.fileName}`;
        }
        // 检验-坐标过来的数据
        this.backInspect(obj.title, obj.data.daId, url, type)
      },
      // mdt数据处理
      handelSetMdt(obj, type) {
        let URL = "", sourceType = "", list = [];
        // 判断mdt会议为二级还是三级
        if (type == "MDT") {
          URL = obj.data.mergePdfUrl
            ? obj.data.mergePdfUrl
            : obj.data.meetingType == "Tumor Board"
            ? obj.data.tboardPdfUrl
            : obj.data.pdfReportUrl;
        } else if (type == "Tumor") {
          URL = obj.data.opinionPdfUrl;
        } else if (type == "source") {
          sourceType = "source";
          URL = obj.data.caseReportUrl;
        } else if (type == "sumary") {
          URL = obj.data.meetingType == "Tumor Board" ? obj.data.tboardPdfUrl : obj.data.pdfReportUrl;
        }
        if (!URL) return false;
        let preUrlArr = URL.split(",");
        // 过滤mdt的url
        list = preUrlArr.map((item) => {
          let arr = item.split("/");
          let arr1 = arr[arr.length - 1].split(".");
          let status = item.substring(item.lastIndexOf(".") + 1) == "pdf";
          let mdtProposalUrl = status ? item : `https://view.officeapps.live.com/op/view.aspx?src=${item}`;
          let sub = arr1[0].indexOf("_");
          let subLable = arr1[0].substring(sub + 1, arr1[0].length);
          return {
            title: sourceType === "source" ? subLable : arr1[0],
            label: sourceType === "source" ? subLable : arr1[0],
            type: item.substring(item.lastIndexOf(".") + 1),
            // type: status,
            url: mdtProposalUrl,
          };
        });
        if (type == "source") list[0].url = obj.data.caseReportUrl;
        if ((type == "sumary" || type == "MDT") && obj.data.updateType == 2) list[0].url ="http://wapi.arioncc.cn/oss-service/oss/aegle/20211125T135047-673_white.pdf";
        this.handleUrlList(list)
      },
      // 处理影像/检查的数据
      handelSetImgE(obj, extUrlList) {
        // 影像
        if (obj.type === "本院" && obj.data.reportSource == 1) {
          if (obj.urls && obj.urls !== "null") this.handleSetUrl(obj, obj.urls);
        } else if (obj.type === "本院" && obj.data.reportSource == 2) {
          //判断是不是pt报告，是就新开窗口查看
          if (obj.data.checkType == "PT" || obj.data.checkType == 'PETCT') {
            window.open(`http://10.72.2.43:8080/PowerWebVision/pacslistviewer?user=c3e8dc67dbe5a3a031ca2f89b8b6fb99-30800013&type=nm&PatientID=${obj.data.pacsPatientId}`);
            return;
          }
          let list = [
            {
              label: "GE报告",
              type: "page",
              title: obj.title,
              url: `http://10.72.2.${this.configIp}:30051/arion1/geList?daId=${obj.data.daId}&healthCardNo=${obj.data.healthCardNo}`,
            },
          ];
          this.handleUrlList(list)
        } else {
          if (obj.urls && obj.urls !== "null") {
            this.handleSetUrl(obj, obj.urls);
          } else if (extUrlList.length) {
            //外院上传的不添加
            extUrlList.forEach((item, index) => {
              window.open(item, index + item);
            });
          }
        }
      },
      //处理查看的list，区别显示类型
      handleUrlList(list, writeType) {  
        if (list[0].url == "http://wapi.arioncc.cn/oss-service/oss/aegle/20211125T135047-673_white.pdf") {
            this.$message.closeAll();
            this.$message.error({
            message: "文件已撤回，暂无法查看！",
            duration: 0,
            customClass: "timeline-message-custom-class"
            });
        } else {
            this.urlList = list;
            this.type = list[0].type;
            let type = this.type ? this.type.toLowerCase() : '';
            if (list[0].subCategory == "pathology" && list[0].status) {
              this.referenceList = [];
              if (list[0].status == 0) {
                this.url = list[0].url;
                this.referenceList = list[0].reference;
                this.activeReferenceIndex = -1;
              } else {
                this.url = "";
                this.$message.error({
                message: "原签发报告病理科已撤回",
                duration: 2000,
                customClass: "timeline-message-custom-class"
                });
              }
            } else {
              const str = 'png,jpg,pdf,jpeg,gif,bmp'
              if(list[0].subCategory == "outpatients_emergency_case" && str.indexOf(list[0].type) == -1){
                this.dialogVisible=false
                this.getLoginToken(list[0].url)
                return
              }else{
                this.url = list[0].url;
              } 
            }
            //如果是pdf，则直接展示
            const status = list.some(item => {
              return item.type != 'pdf' && item.type != 'PDF' && !(["jpg","bmp","png","tif","gif","jpeg","webp","word"].includes(item.type.toLowerCase()))
            })
            if(!status) {
              const loadingPdf = this.$loading({
                lock: true,
                text: 'Loading',
                spinner: 'el-icon-loading',
                background: 'rgba(0, 0, 0, 0.7)'
              });
              const urlList = list.map(item => {
                return item.url
              })
              this.handlePdfUrl(urlList.join(','),list,loadingPdf)
              return;
            }
            this.dialogVisible = true;
            this.dialogDataType = "imgPdf";
            const status1 = list.some(item => {
              return ["jpg","bmp","png","tif","gif","jpeg","webp","word"].includes(item.type.toLowerCase())
            })
            if (status1) {
              this.dialogDataType = "imgPdf";
            } else if (type == "gepage") {
              this.dialogDataType = "GePage";
            } else if(type == "risp"){
              this.dialogDataType = "risp";
            } else {
              this.dialogDataType = "page";
            }
            if (writeType) {
              this.dialogDataType = "ECImg";
            }
        }
      },
      //请求处理多个pdf文件
      handlePdfUrl(str,d,load) {
        const config = {
          method: 'post',
          url: '/api/pdf-service/',
          headers: {
            Authorization: `Bearer ${window.sessionStorage.getItem('urlToken')}`
          },
          responseType: 'blob',  
          data: {
            mainPage: false,
            url: this.topObj.setting == 'test' ? 'http://10.72.2.108:30064' : 'http://10.72.2.113:30064',  //正式
            route: `cm-mdt-pdf?imageInfos=${encodeURI(str)}`,
          },
        }
        const that = this
        axios(config)
        .then(function (response) {
          const url = that.getObjectURL(response.data);
          load.close()
          that.$emit('check',[{...d[0],url}])
        })
        .catch(function (error) {
          load.close()
          // console.log(error)
        })
      },
      getObjectURL(file) {
        const bolb = new Blob([file], { type:'application/pdf'});
        let url = "";
        if (window.createObjectURL != undefined) {
          url = window.createObjectURL(bolb);
        } else if (window.webkitURL != undefined) {
          try {
            url = window.URL.createObjectURL(bolb);
          } catch (error) {}
        } else if (window.URL != undefined) {
          try {
            url = window.webkitURL.createObjectURL(bolb);
          } catch (error) {}
        }
        return url;
      },
      //获取token
      async getLoginToken(url) {
        let params = { userCode: this.topObj?.doctorInfo?.username };
        const res = await getLoginToken(params);
        if (res != null && res != []) this.getLoginUserInfo(url, res.token);
      },
      // 获取认证的医生相关信息
      async getLoginUserInfo(url, token) {
        const res = await getLoginUserInfo({ token });
        if (res != null && res != []) {
          const parm = this.getQueryObject(url)
          const seturl=`http://10.72.2.60:8080/emrweb/new_version/print_view.html?id=${parm.id}&patientId=${parm.patientId}&vaa07=${parm.vaa07}` + "&jsessionids=" + res.jessionids
          window.open(seturl,"_blank");
        }
      },
      //获取地址里的参数
      getQueryObject(url) {
        const search = url.substring(url.lastIndexOf("?") + 1);
        const obj = {};
        const reg = /([^?&=]+)=([^?&=]*)/g;
        search.replace(reg, (rs, $1, $2) => {
          const name = decodeURIComponent($1);
          let val = decodeURIComponent($2);
          val = String(val);
          obj[name] = val;
          return rs;
        });
        return obj;
      },
      // 查看链接
      check(val, type) {
        // 外部链接处理
        this.extUrlList = val.extUrl ? val.extUrl.split(",") : [];
        // 检验数据
        if (
          (val.subCategory === "inspectionReport" ||
            val.category === "inspectionReport") &&
          !val.inspectionReportData&&
          val.type === "本院"
        ) {
          if (val.data.performedBy === "外送组" ||  (val.data.testDate && val.data.inspectionId)) {
            val.data.reportUrl ? this.handleSetUrl(val,val.data.reportUrl) : this.handleInspect(val)
          } else if (val.data.reportUrl) {
            this.handleSetUrl(val, val.data.reportUrl);
          }
          // 检查/影像
        } else if (
          val.subCategory === "image" ||
          val.category === "image" ||
          val.subCategory === "examination" ||
          val.category === "examination"
        ) {
          if (
            (val.subCategory === "examination" ||
              val.category === "examination") &&
            val.other &&
            val.other.writeStatus === 2
          ) {
            this.$message({
              message: "原心电图报告已撤回",
              type: "error",
              duration: 2000,
            });
          } else {
            this.handelSetImgE(val, this.extUrlList);
          }
          // mdt
        } else if (val.subCategory === "mdt" || val.category === "mdt") {
          this.handelSetMdt(val, type);
          // 放疗
        } else if (val.subCategory === "radiationTherapy" || val.category === "radiationTherapy") {
          this.handelSetRadiation(val);
        } else if(val.subCategory === "patient_checkup"){//体检
          let list =[{ title: "体检报告", label: "体检报告", type: "imgPdf", url: val.data.reportUrl }]
          this.handleUrlList(list)
        } else {
          // 门诊病历
          if ((val.subCategory === "outpatients_emergency_case" || val.category === "outpatients_emergency_case") && val.other.inpatientId) {
            if (val.other.writerType === "outpatients_emergency_case") {
              if (val.other.deptId == "121") {
                //判断是不是妇科门诊病历
                this.handleRecord({ value: val.other.inpatientId, time:val.data.dateTime, pationId:val.data.patientBaseId, type: "fRecord",})
              } else {
                // 判断是不是实时门诊病历
                this.handleRecord({ value: val.other.inpatientId, time:val.data.dateTime, pationId:val.data.patientBaseId, type: "record",})
              }
            } else if (val.other.writerType === "consultation_apply_form") {
              // 会诊申请单
              this.handleRecord({ value: val.other.inpatientId, type: "aRecord",})
            } else if (val.other.writerType === "consultation_record") {
              // 会诊记录
              this.handleRecord({ value: val.other.inpatientId, type: "rRecord",})
            }
            // 文书
          } else if (
            val.subCategory === "in_hospital_process" ||
            val.category === "in_hospital_process" ||
            val.subCategory === "nursing_record" ||
            val.category === "nursing_record" ||
            val.subCategory === "informed_consent" ||
            val.category === "informed_consent"
          ) {
            if (val.type === "外院") {
              this.getWriterUrl(val)
            }else if(val.title==="手术安全核查表"){
              this.handleSurgery(val.data);
            }else if(val.title==="麻醉记录表"){
              this.handleRecordList(val.data);
            } else {
              window.open(val.urls, "_blank");
            }
          } else if (val.subCategory === "medical_record_homepage" || val.category === "medical_record_homepage") {
            this.handleSetUrl(val, val.data.filePath);
          } else if ((val.category === "pathology" || val.subCategory == "pathology") &&Array.isArray(val.data) &&val.data.length) {
            // 病理
            let preUrlArr = [];
            if (type == "frozenUrl") {
              // 手术标本病理诊断冰冻按钮
              preUrlArr = val.data.filter((item) => {
                return item.type == "冰冻病理";
              });
            } else if (type == "conventionalUrl") {
              // 手术标本病理诊断 常规
              preUrlArr = val.data.filter((item) => {
                return item.type !== "冰冻病理";
              });
            } else {
              preUrlArr = val.data;
            }
            // 附件的数组处理
            let list = preUrlArr.map((item) => {
              // let arr = item.reportUrl.split("/");
              // let arr1 = arr[arr.length - 1].split(".");
              return {
                label: item.filename,
                type: "risp",
                url: item.examId,
                title: item.title || '',
                status: item.status,
                daId: val.data.daId,
                reference: item.reference,
                subCategory: "pathology",
              };
            });
            this.handleUrlList(list)
            // 排除-检验数据/检查/影像/mdt/门诊病历
          } else {
            if (val.urls && val.urls !== "null") {
              this.handleSetUrl(val, val.urls);
            } else if (this.extUrlList.length) {
              this.extUrlList.forEach((item, index) => {
                window.open(item, index + item);
              });
            }
          }
        }
      },
      // 手麻安全核查表
      handleSurgery(val) {
        if (val.flag === 9) return this.$message.error("手术安全核查表已撤回");
        this.urlList=[{label:`手术安全核查表-${val.patientName}${val.operationDate}`}]
        this.anesthesia.operationId = val.operationId;
        this.anesthesia.id = val.id;
        this.dialogDataType = 'surgery'
        this.dialogVisible = true;
      },
      // 麻醉记录单
      handleRecordList(val){
        if (val.flag === 9) return this.$message.error("麻醉记录单已撤回");
        this.urlList=[{label:`麻醉记录单-${val.patientName}${val.operationDate}`}]
        this.anesthesia.operationId = val.operationId;
        this.anesthesia.id = val.healthCardNo;
        this.dialogDataType = 'anesthia'
        this.dialogVisible = true;
      },
      // 关闭弹窗
      handleClose() {
        this.dialogVisible = false;
        let info = { status: 0};
        this.handleGetInspect(info)
        this.extUrlList = [];
        this.urlList = [];
        this.type = "";
        this.url = "";
        this.activeIndex = 0;
      },
      // 打开外部链接
      handleOpenLinks() {
        this.extUrlList.forEach((item, index) => {
            window.open(item, index);
        });
      },
      // 点击函数
      hanldeUrlClick(type, url, index, item) {
        this.activeIndex = index;
        this.type = type;
        if (item && item.subCategory == "pathology" && item.status) {
          this.referenceList = [];
          if (item.status == 0) {
            this.url = url;
            this.referenceList = item.reference;
            this.activeReferenceIndex = -1;
            } else {
            this.url = "";
            this.$message.error({
              message: "原签发报告病理科已撤回",
              duration: 2000,
              customClass: "timeline-message-custom-class"
            });
          }
          return false;
        }
        this.$refs["scroll"].wrap.scrollTop = 0;
        this.url = url;
      },
      // 打印图片
      handleReportPrint(urlList) {
        const div = (this.dialogDataType === "ECImg" || urlList[0].title=="电脑多导联心电图") ? this.$refs.printPage : this.$refs.print;
        Print(div, {
          onStart: function() {},
          onEnd: function() {}
        });
      },
      //放疗打印
      printRisp() {
        let arr = [];
        let clazzes = [".timeline-risp-common-page"];
        if(this.$refs.rispShow.addPageShow) clazzes.push(".timeline-risp-add-page");
        if(Array.isArray(this.$refs.rispShow.answer) && this.$refs.rispShow.answer.length) clazzes.push(".timeline-risp-cap-page");
        for (let index = 0; index < clazzes.length; index++) {
          let parentHrtmlDom = document.querySelector(clazzes[index]);
          arr.push({
            headerDom: parentHrtmlDom.querySelector(".risp-view-top"),
            footerDom: parentHrtmlDom.querySelector(".risp-view-bottom"),
            containerDom: parentHrtmlDom.querySelector(".risp-view-middle")
          });
        }
        printHtml({ mul: true, arr: arr});
      },
      //打印table
      handleTablePrint(url) {
        if(!url) return this.$message.warning("报告未出，暂不可打印");
        if (this.printType !== "pdf") {
          Print(this.$refs.printTable, { onStart: function() {}, onEnd: function() {} });
          return
        }
        if (this.inspectInfo.url.indexOf(",") === -1) {
          window.open(this.inspectInfo.url);
          return
        }
        let preUrlArr = this.inspectInfo.url.split(",");
        preUrlArr.forEach(item => window.open(item));
      },
      
      // 趋势图
      async hanldeRowClick(row) {
        this.recordsInfo.name = row.itemName;
        this.recordsInfo.unit = row.unit;
        this.recordsInfo.itemRef = row.itemRef;
        this.recordsInfo.panLow = row.panLow;
        this.recordsInfo.panHigh = row.panHigh;
        this.recordsInfo.clinical=row.clinicalSignificance
        this.labList = [];
        const res = await getTimeLabList({ patientId: row.healthcardno, itemKey: row.itemId});
        if (res.code === 0) {
          this.labList = res.data.list.map(item => {
            return { time: item.label.slice(0, 16), value: item.value };
          });
        }
      },
      setMarkLineList(itemRef, panLow, panHigh, list) {
        let itemrefList = [];
        let warnRangeList = [];
        let max = 0;
        let min = 0;
        if (itemRef) {
          let symbol1 = "－";
          let symbol2 = "-";
          if (itemRef.indexOf(symbol1) && itemRef.split(symbol1).length === 2) {
            itemrefList = itemRef.split(symbol1).map((item, index) => {
              return {
                yAxis: item,
                name: item,
                label: { show: true, position: "end", formatter: index === 0 ? "低值：" + item : "高值：" + item},
                lineStyle: { color: "#06AF67"}
              };
            });
          } else if (itemRef.indexOf(symbol2) && itemRef.split(symbol2).length === 2) {
            itemrefList = itemRef.split(symbol2).map((item, index) => {
              return {
                yAxis: item,
                name: item,
                label: { show: true,  position: "end",  formatter: index === 0 ? "低值：" + item : "高值：" + item },
                lineStyle: { color: "#06AF67"}
              };
            });
          }
        }
        if (panLow) {
          warnRangeList.push({
            yAxis: panLow,
            name: panLow,
            label: { show: true,  position: "end",  formatter: "低限：" + panLow },
            lineStyle: {  color: "red"}
          });
        }
        if (panHigh) {
          warnRangeList.push({
            yAxis: panHigh,
            name: panHigh,
            label: { show: true,  position: "end", formatter: "高限：" + panHigh },
            lineStyle: { color: "red"}
          });
        }
        let List = itemrefList.concat(warnRangeList);
        let arr = cloneDeep(list);
        List.forEach(item => arr.push(item.yAxis));
        max = Math.max(...arr);
        min = Math.min(...arr);
        let info = {
          maxNum: max,
          minNum: min,
          markLineList: List
        };
        return info;
      },
      // 返回实时病历的visitNo
      handleRecord(val) {
        if (val.type === "fRecord") {
          // 妇科门诊病历
          let info = { code: "docctest", doctorId: 274, printType: 1, templateType: 4 }
          this.timelineOutpatientInformationstr =`http://10.72.2.${this.configIp}:30059/arion/printPage?printType=${info.printType}&templateType=${info.templateType}&visitNo=${val.value}&code=${info.code}&patientId=${val.pationId}&doctorId=${info.doctorId}&timeAxis=1`
          this.handleRecordData(val.value)
          this.dialogDataType = "fRecord";
        } else if (val.type === "record") {
          // 门诊病历
          let info = { code: "docctest", doctorId: 274, printType:1, templateType:3 }
          this.timelineOutpatientInformationstr =`http://10.72.2.${this.configIp}:30059/arion/printPage?printType=${info.printType}&templateType=${info.templateType}&visitNo=${val.value}&code=${info.code}&patientId=${val.pationId}&doctorId=${info.doctorId}&timeAxis=1`
          this.handleRecordData(val.value)
          this.dialogDataType = "record";
        } else if (val.type === "aRecord") {
          // 会诊申请单
          this.getApplyRecord(val.value)
          this.dialogDataType = "aRecord";
        } else if (val.type === "rRecord") {
          // 会诊记录
          this.getConsultationRecord(val.value)
          this.dialogDataType = "rRecord";
        }
      },
      // 门诊实时病历
      handleRecordData(visitNo) {
        this.caseHistory = {
          ...this.caseHistory,
          status: 0,
        };
        handleSetMedicalData(visitNo).then((info) => {
          this.caseHistory = {
            ...info,
            status: 1,
          };
          // this.dialogVisible = true
        });
      },
      // 返回检验结果数据
      backInspect(title, daId, printInspectUrl, type) {
        this.dialogDataType = "list";
        let info = { daId, title};
        this.titleType = type;
        if (printInspectUrl) {
          let arr = printInspectUrl.split("/");
          let arr1 = arr[arr.length - 1].split(".");
          this.printType = arr1[arr1.length - 1].toLowerCase();
          this.printInspectUrl = printInspectUrl;
          this.handleGetInspect(info)
        } else {
          this.printType = "pdf";
          this.printInspectUrl = "";
          this.handleGetInspect(info)
        }
      },
      // 检验数据
      async handleGetInspect(val) {
        if (val.status === 0) {
          this.inspectInfo.status = 0;
          this.inspectInfo.list = [];
          this.inspectInfo.reportPatientInfo = cloneDeep(this.defaultReportInfo);
        } else {
          const res = await getReportInfo({ daId: val.daId });
          const res1 = await getReportData({ daId: val.daId });
          if (res.code === 0 && res1.code === 0) {
            let reportPatientInfo = {
              ...res.data,
              receivedDateTime: res.data.receivedDateTime ? res.data.receivedDateTime.slice(0, 16) : "",
              reviewDateTime: res.data.reviewDateTime ? res.data.reviewDateTime.slice(0, 16) : "",
              sampledDateTime: res.data.sampledDateTime ? res.data.sampledDateTime.slice(0, 16) : ""
            };
            this.inspectInfo = {
              list: res1.data,
              title: val.title,
              reportPatientInfo: reportPatientInfo,
              status: 1
            };
          }
        }
      },
      // 会诊申请单数据
      async getApplyRecord(visitNo) {
        this.applyConsultationInfo = {
          ...this.applyConsultationInfo,
          status: 0
        };
        const res = await getPcafInfo(visitNo);
        if (res.code != 0) return this.$message.error(res.msg);
        let {
          deptName,
          briefMedicalHistory,
          purpose,
          intendInviteHospitalDept,
          intendInviteConsultantsJobRequire
        } = res.data.pcaf;
        this.applyConsultationInfo = {
          diagnosis: res.data.diag,
          pte: res.data.pte,
          pte: res.data.pte,
          deptName: deptName || "",
          briefMedicalHistory: briefMedicalHistory || "",
          purpose: purpose || "",
          intendInviteHospitalDept: intendInviteHospitalDept || "",
          intendInviteConsultantsJobRequire: intendInviteConsultantsJobRequire || "",
          userInfo: { ...res.data.patientInfo },
          status: 1
        };
      },
      // 会诊记录
      async getConsultationRecord(visitNo) {
        this.consultationInfo = {
          ...this.consultationInfo,
          status: 0
        };
        const res = await getPcrInfo(visitNo);
        if (res.code === 0) {
          let {
            deptName,
            consultationType,
            applyTime,
            consultationTime,
            inviteConsultants,
            applyConsultants,
            attendConsultants,
            purpose,
            briefMedicalHistory,
            opinion
          } = res.data.pcr;
          this.consultationInfo = {
            deptName: deptName,
            consultationType: consultationType ? Number(consultationType) : "",
            applyTime: applyTime || "",
            consultationTime: consultationTime || "",
            inviteConsultants: inviteConsultants || "",
            applyConsultants: applyConsultants || "",
            attendConsultants: attendConsultants || "",
            purpose: purpose || "",
            briefMedicalHistory: briefMedicalHistory || "",
            opinion: opinion || "",
            userInfo: { ...res.data.patientInfo },
            status: 1
          };
        } else {
          this.$message.error(res.msg);
        }
      },
      // 关闭放疗弹窗
      handleRadiationClose() {
          this.radiationVisible = false;
      },
      //放疗能不能打印
      onRispprintStatus(val) {
        this.rispCanPrint = val;
      },
      // 查询放疗方案列表
      async getOrderList(radioPatientId) {
        const res = await querySchemeNum(radioPatientId);
        if (res.code == 0) {
          this.rationInfo.dynamicTags = res.data;
          this.handleGetOrderInfo("方案1",radioPatientId);
        }
      },
      //获取放疗查看相关信息
      async handleGetOrderInfo(schemeName,radioPatientId) {
        let res = await queryScheme({ radiationTherapyId: radioPatientId, scheme: schemeName});
        if (res.code != 0) return this.$message.error(res.msg);
        this.rationInfo = {
          ...this.rationInfo,
          status: false,
          radiationStepsInfo: {
            radiotherapyOrder: res.data.radiotherapyOrder,
            afterOrderInfo: res.data.afterloadRadiotherapyOrder
          }
        };
        this.dialogDataType = "radiationTherapy";
        this.radiationVisible = true
      }
    }
}
</script>
<style lang="less">

div.cell {
  .table-span-blue {
    color: #409eff;
    width: 17px;
  }
  .table-span-red {
    color: red;
    padding: 0 2px;
    width: 17px;
  }
  .table-span-green{
    color: #2EB16E;
    padding: 0 2px;
    width: 17px;
  }
  .table-spanArrow-red {
    color: red;
  }
  .table-spanArrow-green{
    color: #2EB16E;
  }
}
.timeLineCloes{
  .el-dialog__headerbtn{
    font-size: 27px;
  }
  .el-dialog__header{
    display: flex;
    justify-content: space-between;
  }
  .el-dialog__body {
    .styleBox {
      width: 100%;
      padding: 30px;
      position: absolute;
      height: auto;
      top: 50px;
      overflow-y: scroll;
      height: 94%;
      }
  }

  
}
.new-mdt-dialog {
    display: flex;
    flex-direction: column;
    .el-dialog__body {
      // height: 100%;
      flex: 1;
    }
    .mdtTableDialog {
        tbody tr {
        height: 30px !important;
      }
    }

    .mdt-in-scroll {
      height: calc(100vh - 67px);
      .el-scrollbar__view {
        height: 100%;
      }
    }
  }
.trendDialogmdts {
  z-index: 2050!important;
  width: 668px !important;
  .el-dialog__header,
  .el-dialog__body {
    padding: 20px 32px;
  }
  .el-dialog__body {
    padding: 0 20px 32px;
    display: flex;
    flex-direction: column;
    max-height: 500px;
    overflow-y: auto;
  }

  .header {
    display: flex;
    justify-content: flex-start;
    i {
      display: inline-block;
      width: 6px;
      height: 6px;
      opacity: 1;
      border-radius: 50%;
      margin-right: 6px;
      vertical-align: top;
      margin-top: 8px;
    }
    .type-value {
      margin-right: 15px;
      line-height: 22px;
    }
  }
  .dialog-title {
    height: 22px;
    opacity: 1;
    font-size: 16px;
    font-family: PingFangSC, PingFangSC-Semibold;
    font-weight: 600;
    text-align: left;
    color: rgba(0, 0, 0, 0.85);
    line-height: 22px;
    margin-right: 25px;
  }
  .clinicalSignificance{
    font-size:12px;
    padding: 0 12px;
  }
}
.time-line-box-pc {
  // 时间轴
  .el-timeline-item__node--normal {
    width: 20px !important;
    height: 20px !important;
  }
  .el-timeline-item__node {
    i {
      font-size: 30px;
      background: #fff;
    }
    .el-timeline-item__icon {
      color: #407df3 !important;
    }
  }
  .el-timeline-item__tail {
    left: 9px !important;
  }

  .el-timeline {
    li:nth-of-type(even) {
      .el-timeline-item__content {
        position: relative;
        left: calc(-100% - 72px);
        text-align: right;
      }

      .el-timeline-item__timestamp {
        transform: translateX(-162px);
        width: 300px;
      }
    }
    .el-timeline-item__timestamp {
      font-size: 16px;
      color: #000;
      font-weight: 600;
    }
    .el-timeline-item__wrapper {
      padding-left: 44px;
    }
  }
}
.time-line-box-pc {
  font-family: PingFangSC, PingFangSC-Semibold;
  .tree-con {
    label {
      margin-bottom: 0;
    }
  }
  .el-dialog {
    display: flex;
    flex-direction: column;
    .el-dialog__body {
      flex: 1;
    }
  }
  .el-scrollbar__wrap {
    overflow-x: hidden;
  }
  .el-scrollbar__view {
    height: 100%;
  }
}
.time-line-box-pc {
  .el-tabs {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .el-tabs__content {
    flex: 1;
    .el-tab-pane {
      height: 100%;
    }
  }
}
.url-content-right {
  thead {
    tr {
      th {
        border-top: 1px solid #333;
        border-bottom: 1px solid #333 !important;
      }
    }
  }
  .el-table td {
    border-bottom: none;
  }
  tbody {
    .el-table__row:last-child {
      td {
        border-bottom: none;
      }
    }
  }
  .table-report-con {
    border-bottom: 1px solid #333 !important;
  }
  .trend {
    height: 25px;
  }
}
.timeline-message-custom-class {
  z-index: 9999 !important;
}
.reference-header {
    width: 100%;
    margin-left: 6px;
    font-size: 16px;
}
.url-content-extend {
  width: 69px;

background: #ffffff;
.print-button {
  position: absolute;
  right: 20px;
  // right: 5px;
  bottom: 30px;
  &.sp {
    right: 20px;
  }
}
.print-buttons {
  position: absolute;
  right: -20px;
  bottom: 30px;
  
}
}
</style>
<style lang="less" scoped>
.radiationTherapyDialog {
  /deep/ .el-dialog__body {
    padding: 0;
    height: calc(100% - 52px);
    box-sizing: border-box;
  }
  /deep/.el-dialog__header {
    padding: 0;
    .el-dialog__headerbtn {
      z-index: 100;
      top: 28px;
      right: 45px;
      i {
        font-size: 30px;
      }
    }
  }
}
.url-content {
  width: 100%;
  height: 100%;
  display: flex;
  &-left {
    flex: auto 0 1;
    margin-right: 15px;
    width: 100px;
    max-width: 100px;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    span.url-item {
      line-height: 30px;
      cursor: pointer;
    }
    span.active {
      color: #409eff;
    }
  }
  &-right {
    position: relative;
    flex: 1;
    height: 100%;
    flex-direction: column;
    .report-name {
      font-family: "SimSun";
      text-align: center;
      font-size: 20px;
      color: #000;
      font-weight: bold;
      margin-bottom: 10px;
    }
    .label {
      .SimSun {
        font-family: "SimSun";
        height: 30px;
        line-height: 30px;
        font-size: 12px;
        color: #000;
      }
      .Arial {
        font-family: "Arial";
        height: 30px;
        line-height: 30px;
        font-size: 12px;
        color: #000;
      }
    }
    .con {
      font-family: "SimSun";
      line-height: 30px;
      font-size: 12px;
      color: #000;
    }
    .report-con {
      width: 1000px;
      margin: 0 auto;
    }
    .pos-top {
      position: absolute;
      top: 5px;
      right: 10px;
      z-index: 10;
    }
    .html-con {
      display: flex;
      flex-direction: row;
      justify-content: center;
      margin: 0 auto;
    }
    img {
      display: block;
      // width: 98%;
      margin: 0 auto;
      max-width: calc(100% - 40px);
    }
  }
}
.sec-flex {
  display: flex;
  justify-content: space-around;
  margin-bottom: 5px;
  .info-item {
    flex-direction: column;
  }
}
.print-position {
  position: fixed;
  z-index: 100;
  top: 20px;
  left: 0;
  margin-left: -120000px;
  width: 1000px;
  height: 20000px;
}
.pdf-box {
  display: block;
  position: absolute;
  text-align: center;
  z-index: 200;
  background-color: #fff;
  height: 794px;
  width: 1123px;
  transform: rotate(90deg);
  .print-rise-img {
    vertical-align: middle;
    display: inline-block;
    width: 100%;
    margin-left: 300px;
    border: none;
  }
}
.pdf-boxBox {
  display: block;
  position: absolute;
  text-align: center;
  z-index: 200;
  background-color: #fff;
  width: 1123px;
  .img-item {
    height: 794px; 
    width: 1123px;
    transform:rotate(90deg);
  }
  .print-rise-img {
    vertical-align: middle;
    display: inline-block;
    width: 100%;
    margin-left: 300px;
    border: none;
  }
}
.right-con {
  display: flex;
  flex-direction: column;
        width: 296px;
        height: 100%;
        > p {
          font-size: 16px;
          font-family: PingFangSC, PingFangSC-Medium;
          font-weight: 500;
          color: rgba(0, 0, 0, 0.85);
          line-height: 22px;
          position: relative;
          padding-left: 30px;
          &::before {
            top: 5px;
            left: 20px;
            display: block;
            content: "";
            width: 3px;
            height: 12px;
            background: #407df3;
            border-radius: 2px;
            position: absolute;
          }
        }
        .scroll {
          flex: 1;
          max-height: calc(100% - 110px);
          padding: 20px 0 20px;
        }
        /deep/ .el-scrollbar__wrap {
          overflow-x: hidden;
        }
      }
.timeline-item {
  display: flex;
  flex-direction: column;
  padding: 0 20px 0;
  position: relative;
  > div {
    padding-top: 5px;
    width: 100%;
  }
  &::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #407df3;
    border-radius: 50%;
    position: absolute;
    top: 25px;
    left: 20px;
  }
  &::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 100%;
    border-right: 1px dashed #ddd;
    position: absolute;
    top: 32px;
    left: 22px;
  }
  &:last-child::after {
    height: 0;
  }
  &:first-child {
    // padding-top: 10px;
    > div.timeline-left {
      padding-top: 0px;
    }
    &::before {
      top: 16px;
    }
    &::after {
      top: 22px;
      // height: 45px;
    }
  }
  p {
    line-height: 24px;
    margin: 0;
    font-size: 14px;
    font-family: PingFangSC, PingFangSC-Regular;
    color: rgba(0, 0, 0, 0.8);
  }
  .timeline-left {
    width: 100%;
    padding-left: 17px;
    line-height: 30px;
    padding-top: 10px;
    p:last-child {
      color: rgba(0, 0, 0, 0.6);
    }
    p {
      width: 100%;
      color: #000000;
      font-weight: 600;
      font-family: SourceHanSansCN, SourceHanSansCN-Medium;
      padding: 5px 0 5px;
    }
  }
  .timeline-right {
    width: 100%;
    padding-left: 15px;
    // flex: 1;
    >div {
      margin-bottom: 5px;
      &:last-child {
        margin-bottom: 0;
      }
    }
    p.text {
      width: 100%;
      // text-overflow: ellipsis;
      // white-space: nowrap;
      // overflow: hidden;
      cursor: default;
      &.text-head {
      line-height: 24px;
      font-size: 14px;
      font-family: PingFangSC,PingFangSC-Semibold;
      font-weight: bold;
      text-align: justify;
      color: rgba(0,0,0,.8);
    }
    }
    .risp-button-text {
      font-family: PingFangSC, PingFangSC-Semibold;
      font-weight: 600;
      font-size: 12px;
      margin-right:6px;    
      border-bottom: 1px solid #1890ffff;
    }
    .check {
      text-decoration: underline;
      color: rgba(24, 144, 255, 1);
      cursor: pointer;
      font-weight: 400!important;
    }
    .start-type {
      display: inline-block;
      box-sizing: border-box;
      margin-right: 5px;
      line-height: 13px!important;
      height: 18px!important;
      margin-top: 3px;
      font-style: normal;
      
      padding: 2px 4px;
      background: rgba(62,152,255,.12);
      border-radius: 4px;
      font-size: 12px;
      border: 1px solid #3e98ff;
      color: #3e98ff;
      &.main-diagnose{
        background: rgba(62,152,255,0.12);
        border: 1px solid #3e98ff;
        color: #3E98FF;
      }
      &.minor-diagnose {
        background: rgba(101,69,210,0.12);
        border: 1px solid #6545d2;
        color: #6545D2;
      }
    }
    .sign-type {
      font-size: 14px;
      font-family: PingFangSC,PingFangSC-Semibold;
      color: #3e98ff;
    }
    p.descript {
      font-weight: 500;
      >span {
        font-weight: 600;
      }
      .ywts-con {
        display: inline-block;
        box-sizing: border-box;
      }
      .icon_ywts {
        cursor: pointer;
        width: 16px;
        height: 16px;
        // margin-top: 3px;
        vertical-align: middle;
      }
    }
    .tishi_icon {
      vertical-align: middle;
      display: inline-block;
      background-image: url('../../../examples/assets/images/icon_tishi.png');
      background-size: 16px 16px;
      background-repeat: no-repeat;
      background-position: center;
      height: 20px;
      width: 20px;
      cursor: pointer;
    }
    .tolStyle{
      color:#1890ff ;
      margin-left: 3px;
      margin-top: 2px;
      padding: 0 10px 0 5px;
    }
    .tipPoint{
      vertical-align: middle;
      display: inline-block;
      width: 5px;
      height: 5px;
      background-color: #3e98ff;
      border-radius: 5px;
      margin-right: 5px;
      margin-left: 2px;
    }
  }
}
.analyzeProject{
  margin-left:15px
}
.dataBigBox{
  margin-left:25px
}
.clinicalValue{
  background:rgba(0, 0, 0,0.85) !important;
}
.meaningButton{
  height:20px;
  width:20px;
  margin-top: 3px;
  font-size: 18px;
  color:#2596ff;
  background-image: url('../../../examples/assets/images/grayInformation.png');
  background-size:18px 18px;
  background-repeat:no-repeat;
  &:hover{
    cursor: pointer;
    background-image:url('../../../examples/assets/images/icon_ywts.png');
  }
}
.testBubble{
    width: 250px !important;
    letter-spacing: 2px;
    line-height: 18px;
    font-size: 12px;
}
.dataBox{
  margin-left:0px
}
.risp-count {
    background-color: #f56c6c;
    border-radius: 10px;
    color: #fff;
    display: inline-block;
    font-size: 12px;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    padding: 0 6px;
    text-align: center;
    white-space: nowrap;
    border: 1px solid #fff;
    box-sizing: border-box;
}
</style>