require("./../css/emergency.less")
require("../images/back.png")
require("../images/down2.png")
require("../images/pic.png")
const $ = require("jquery");
const { getUrlArgObject } = require('./promise.js');
let fst = `
<div class="step stepFst">
        <p>步骤1</p>
        <h4>进行全血细胞计数+血型鉴定、术前免疫、凝血功能、超声心动图等检查</h4>
      </div>
      <div class="step stepSec">
        <p>步骤2</p>
        <div class="disBtn disBtnRed">
          <span>心包积液</span>
          <i id="sureBtn1">确定</i>
          <img id="backBtn1" src="./images/back.png" alt="">
        </div>
        <div class="disBtn disBtnBlue">
          <span>非心包积液</span>
          <i id="sureBtn2">确定</i>
          <img id="backBtn2" src="./images/back.png" alt="">
        </div>
        <div class="disMainRed">
          <div class="outHeart">心外会诊</div>
          <div class="inHeart">心内会诊</div>
          <h5>判断是否心包填塞</h5>
          <div class="fullPink">是</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">心包穿刺</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">穿刺液分析对症治疗</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">抢救室待床！</div>
          <br><br>
          <div class="fullBlue">否</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">积液量少查找病因对症治疗</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">病情未控制病情恶化</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">心包穿刺</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">穿刺液分析对症治疗</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">抢救室待床！</div>
        </div>
        <div class="disMainBlue">
            <h4>查找其他原因</h4>
        </div>
      </div>
`
let sec = `
<div class="step stepFst">
        <p>步骤1</p>
        <h4>听诊呼吸音是否减弱或消失</h4>
      </div>
      <div class="step stepSec">
        <p>步骤2</p>
        <h4>进行全血细胞计数+血型鉴定、术前免疫、凝血功能、肺部B超、胸部X线或者胸部CT检查</h4>
        <div class="disBtn disBtnRed">
          <span>气胸患者</span>
          <i id="sureBtn3">确定</i>
          <img id="backBtn3" src="./images/back.png" alt="">
        </div>
        <div class="disBtn disBtnBlue">
          <span>非气胸患者</span>
          <i id="sureBtn4">确定</i>
          <img id="backBtn4" src="./images/back.png" alt="">
        </div>
        <div class="disMainRed">
          <h5>结合症状体征是否危机生命是否濒死休克</h5>
          <div class="inHeart">胸外科会诊</div>
        </div>
        <div class="disBtn disBtnTrdRed disBtnTrd">
          <span>是</span>
          <i id="sureBtn5">确定</i>
        </div>
        <div class="disBtn disBtnTrdBlue disBtnTrd">
          <span>否</span>
          <i id="sureBtn6">确定</i>
        </div>
        <div class="disMainBlue">
            <h4>查找其他原因</h4>
        </div>
      </div>
      <div class="step stepTrd stepTrdRight">
        <p class="step3">步骤3</p>
        <div class="disBtn disBtnTreRed">
          <span>是</span>
          <img id="backBtn7" src="./images/back.png" alt="">
        </div>
        <div class="inHeart">急诊胸腔闭式引流</div>
        <p>抢救室待救</p>
      </div>
      <div class="step stepTrd stepTrdWrong">
        <p class="step3">步骤3</p>
        <div class="disBtn disBtnTreBlue">
          <span>否</span>
          <img id="backBtn8" src="./images/back.png" alt="">
        </div>
        <h4>判断肺压缩大于25%或小于25%</h4>
        <div class="btnBgWhite">肺压缩大于25%</div>
        <h4>建议保守对症治疗止咳、祛痰、急诊留观</h4>
        <div class="inHeart">择期胸穿</div>
        <div class="lineSpace"></div>
        <div class="btnBgWhite">肺压缩小于25%</div>
        <h4>建议保守对症治疗止咳、祛痰</h4>
        <br>
        <div class="spaceBetween">
          <span>病情未控制继续恶化</span>
          <i>择期胸穿</i>
        </div>
        <div class="spaceBetween">
          <span>病情好转</span>
          <i>胸外科随诊</i>
        </div>
      </div>
`
let trd = `
<div class="step stepFst">
        <p>步骤1</p>
        <h4>立即进行全血细胞计数+血型鉴定、术前免疫、凝血功能、D-二聚体、床旁超声心动图检查</h4>
      </div>
      <div class="step stepSec">
        <p>步骤2</p>
        <h4>判断血压是否正常或休克</h4>
        <div class="disBtn disBtnRed">
          <span>伴低血压休克</span>
          <i id="sureBtn9">确定</i>
          <img id="backBtn9" src="./images/back.png" alt="">
        </div>
        <div class="disBtn disBtnBlue">
          <span>不伴低血压休克</span>
          <i id="sureBtn10">确定</i>
          <img id="backBtn10" src="./images/back.png" alt="">
        </div>
        <h4 class="disMainRed9">判断右心负荷是否增加</h4>
        <div class="disBtn disBtnTrdRed disBtnTrd9">
          <span>右心负荷增加（DDI阳性）</span>
          <i id="sureBtn11">确定</i>
        </div>
        <div class="disBtn disBtnTrdBlue disBtnTrd9">
          <span>右心负荷不增加（DDI阴性）</span>
          <i id="sureBtn12">确定</i>
        </div>
        <h4 class="disMainRed10">根据临床经验或者PE评分规则评估PE可能性</h4>
        <div class="disBtn disBtnTrdRed disBtnTrd10">
          <span>评分高或DDI阳性</span>
          <i id="sureBtn13">确定</i>
        </div>
        <div class="disBtn disBtnTrdBlue disBtnTrd10">
          <span>评分低且DDI阴性</span>
          <i id="sureBtn14">确定</i>
        </div>
        <div class="disMainBlue">
            <h4>查找其他原因</h4>
        </div>
      </div>
      <div class="step stepTrd stepTrdRight">
        <p class="step3">步骤3</p>
        <div class="disBtn disBtnTreRed">
          <span>评分高或DDI阳性</span>
          <img id="backBtn15" src="./images/back.png" alt="">
        </div>
        <div class="outHeart">呼吸科会诊</div>
        <h4>建议检查CTPA（CT肺动脉造影）</h4>
        <br>
        <div class="spaceBetween">
          <span>阳性</span>
          <i>按肺栓塞治疗</i>
        </div>
        <div class="spaceBetween">
          <span>阴性</span>
          <i>请相关科室会诊寻找病因</i>
        </div>
      </div>
      <div class="step stepTrd stepTrdRight01">
        <p class="step3">步骤3</p>
        <div class="disBtn disBtnTreRed">
          <span>右心负荷增加（DDI阳性）</span>
          <img id="backBtn17" src="./images/back.png" alt="">
        </div>
        <div class="outHeart">呼吸科会诊</div>
        <h4>生命体征不稳定</h4>
        <div class="emptyMain">根据病史、体征、Well、Geneva肺栓塞评分判断病情</div>
        <div class="imgDown"><img src="./images/down2.png" alt=""></div>
        <div class="emptyMain">考虑溶栓或者血栓切除</div>
        <div class="imgDown"><img src="./images/down2.png" alt=""></div>
        <div class="emptyMain">ACLS（高级心脏生命支持）</div>
        <div class="imgDown"><img src="./images/down2.png" alt=""></div>
        <div class="emptyMain">收入ICU</div>
        <h4>生命体征稳定建议检查CTPA（CT肺动脉造影）</h4>
        <div class="spaceBetween">
          <span>阳性</span>
          <i>按肺栓塞治疗</i>
        </div>
        <div class="spaceBetween">
          <span>阴性</span>
          <i>请相关科室会诊寻找病因</i>
        </div>
      </div>
      <div class="step stepTrd stepTrdWrong">
        <p class="step3">步骤3</p>
        <div class="disBtn disBtnTreBlue">
          <span>评分低且DDI阴性</span>
          <img id="backBtn16" src="./images/back.png" alt="">
        </div>
        <h4>请相关科室会诊寻找病因</h4>
      </div>
      <div class="step stepTrd stepTrdWrong01">
        <p class="step3">步骤3</p>
        <div class="disBtn disBtnTreBlue">
          <span>右心负荷不增加（DDI阴性）</span>
          <img id="backBtn18" src="./images/back.png" alt="">
        </div>
        <h4>建议ACLS（高级心脏生命支持）</h4>
        <h4>请相关科室会诊寻找病因</h4>
      </div>
`
let fth = `
<div class="step stepFst">
        <p>步骤1</p>
        <h4>立即检查12导联或18导联心电图</h4>
      </div>
      <div class="step stepSec">
        <p>步骤2</p>
        <h4>判断心电图ST段是否有异常！</h4>
        <p>（如果不能明确5-10min重复一次）</p>
        <div class="disBtn disBtnRed">
          <span>ST段抬高或新发LBBB</span>
          <i id="sureBtn23">确定</i>
          <img id="backBtn23" src="./images/back.png" alt="">
        </div>
        <div class="disBtn disBtnBlue">
          <span>ST段压低或无特征性改变</span>
          <i id="sureBtn24">确定</i>
          <img id="backBtn24" src="./images/back.png" alt="">
        </div>
      </div>
      <div class="step stepTrd stepTrdRight">
        <p class="step3">步骤3</p>
        <div class="outHeart">紧急心内会诊</div>
        <h4>进一步诊疗</h4>
        <p>（STEMI处置时间&lt;10min）</p>
        <h4>询问并立即服用负荷剂量的双抗药物（若未服用）</h4>
        <p>阿司匹林0.3g+氯吡格雷300mg/600mg（急需手术）或 阿司匹林0.3g+替格瑞洛180mg（ "心拯救"）</p>
        <h4>患者发病时间！</h4>
        <ul class="jxgzdm">
          <li>1、发病大于12小时</li>
          <li>2、监测生命体征，持续心电监护，建立静脉通道（左侧肢体，1-2路） ;</li>
          <li>3、必要时给氧，保持血氧饱和度95%以上 ;</li>
          <li>4、取血化验 : <span>血常规</span><span>急诊生化</span><span>心肌酶谱</span><span>Troponinl</span><span>凝血功能</span><span>术前免疫</span></li>
          <li>5、床边心超检查 ;</li>
          <li>6、询问相关病史和体格检查 ;</li>
        </ul>
        <div class="disBtn disBtnRed01">
          <span>发病小于12小时</span>
          <i id="sureBtn25">确定</i>
          <img id="backBtn25" src="./images/back.png" alt="">
        </div>
        <div class="disBtn disBtnBlue01">
          <span>发病大于12小时</span>
          <i id="sureBtn26">确定</i>
          <img id="backBtn26" src="./images/back.png" alt="">
        </div>
        <div class="showBtn25">
          <br>
          <div class="emptyMain">启动导管室、获取知情同意联系床位</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">家属同意-导管室直接运转</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">控制D-B时间&lt;90min</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">家属不同意或者导管室到达&gt;60min</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">排除禁忌后考虑立即溶栓（D-B &lt;30min）</div>
        </div>
        <div class="showBtn26">
          <h4>判断患者是否有急诊PCI指征</h4>
          <div class="fullPink">是，有急诊PCI指征</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">启动导管室、获取知情同意联系床位</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">家属同意-导管室直接运转</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">控制D-B时间&lt;90min</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">家属不同意或者导管室到达&gt;60min</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">排除禁忌后考虑立即溶栓（D-B &lt;30min）</div>
          <br><br>
          <div class="fullBlue">否，没有急诊PCI指征</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">收住ICU/CCU</div>
        </div>
      </div>
      <div class="step stepTrd stepTrdWrong">
        <p class="step3">步骤3</p>
        <h4>进一步诊疗</h4>
        <p>（STEMI处置时间&lt;10min）</p>
        <h4>查血：检查心肌酶谱+Troponinl</h4>
        <p>必要时可 Q4-6h 复查</p>
        <div class="inHeart special">普通心内科会诊</div>
        <h4>判断检查结果是否异常</h4>
        <div class="disBtn disBtnRed01">
          <span>诊断NSTEMI-ACS</span>
          <i id="sureBtn27">确定</i>
          <img id="backBtn27" src="./images/back.png" alt="">
        </div>
        <div class="disBtn disBtnBlue01">
          <span>排除NSTEMI-ACS</span>
          <i id="sureBtn28">确定</i>
          <img id="backBtn28" src="./images/back.png" alt="">
        </div>
        <h4 class="showBtn28">已排除NSTEMI-ACS ，请其他诊室会诊！</h4>
        <div class="showBtn27">
          <h4>立即服用负荷剂量的双抗药物（若未服用）</h4>
          <div>阿司匹林0.3g+氯吡格雷300mg/600mg（急需手术）或 阿司匹林0.3g+替格瑞洛180mg（"心拯救"）</div>
          <h4>判断患者危重程度</h4>
          <ul class="chengdu">
            <li class="selectTab">极高危患者</li>
            <li>高危患者</li>
            <li>中危患者</li>
            <li>低危患者</li>
          </ul>
          <h4>判断依据</h4>
          <ul class="doList">
            <li>
              <input type="checkbox" data-val="0">
              <i> 1、血流动力学不稳定或心源性休克</i>
            </li>
            <li>
              <input type="checkbox" data-val="1">
              <i> 2、再发性或药物治疗难以缓解的持续性胸痛</i>
            </li>
            <li>
              <input type="checkbox" data-val="2">
              <i> 3、危及生命的心律失常或心跳骤停</i>
            </li>
            <li>
              <input type="checkbox" data-val="3">
              <i> 4、心肌梗死的机械性并发症</i>
            </li>
            <li>
              <input type="checkbox" data-val="4">
              <i> 5、急性心衰</i>
            </li>
            <li>
              <input type="checkbox" data-val="5">
              <i> 6、ST-T动态改变，特别是间歇性ST段抬高</i>
            </li>
            <li>
              <input type="checkbox" data-val="-1">
              <i> 7、以上依据都不符合</i>
            </li>
          </ul>
          <ul class="doList" style="display: none;">
            <li>
              <input type="checkbox" data-val="0">
              <i> 1、肌钙蛋白水平升高或降低与心梗一致</i>
            </li>
            <li>
              <input type="checkbox" data-val="1">
              <i> 2、动态ST或T波改变（有或无症状）</i>
            </li>
            <li>
              <input type="checkbox" data-val="2">
              <i> 3、GRACE评分&gt;140</i>
            </li>
            <li>
              <input type="checkbox" data-val="-1">
              <i> 4、以上依据都不符合</i>
            </li>
          </ul>
          <ul class="doList" style="display: none;">
            <li>
              <input type="checkbox" data-val="0">
              <i> 1、糖尿病</i>
            </li>
            <li>
              <input type="checkbox" data-val="1">
              <i> 2、肾功能不全（eGFR&lt;60ml/min/1.73m2）</i>
            </li>
            <li>
              <input type="checkbox" data-val="2">
              <i> 3、LVEF&lt;40%或充血性心力衰竭</i>
            </li>
            <li>
              <input type="checkbox" data-val="3">
              <i> 4、梗死后早起心绞痛</i>
            </li>
            <li>
              <input type="checkbox" data-val="4">
              <i> 5、近期PCI史</i>
            </li>
            <li>
              <input type="checkbox" data-val="5">
              <i> 6、之前CABG史</i>
            </li>
            <li>
              <input type="checkbox" data-val="6">
              <i> 7、GRACE评分&gt;109且&lt;140</i>
            </li>
            <li>
              <input type="checkbox" data-val="-1">
              <i> 8、以上依据都不符合</i>
            </li>
          </ul>
          <div class="lastResult" style="display: none;">
            <div class="lowDis">低危患者</div>
            <h4>留观或收住心内科</h4>
          </div>
        </div>
        <div class="partPool">
          <div class="lowDis">极高危患者</div>
          <h4>治疗方案</h4>
          <div class="emptyMain">启动导管室、获取知情同意联系床位</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">家属同意-导管室直接运转</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">控制D-B时间&lt;90min</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">家属不同意或者导管室到达>60min</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">排除禁忌后考虑立即溶栓（D-B &lt;30min）</div>
        </div>
        <div class="partPool01">
          <div class="lowDis"></div>
          <h4>治疗方案</h4>
          <div class="emptyMain">推荐早期侵入治疗（&lt;24h）</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">收住ICU/CCU</div>
          <div class="imgDown"><img src="./images/down2.png" alt=""></div>
          <div class="emptyMain">限期冠脉造影、继续监测生命体征、心电图（q6h）、心肌酶谱变化（q6h）、若有变化随时心内科会诊</div>
        </div>
      </div>
`
let fif = `
<div class="step stepFst">
        <p>步骤1</p>
        <h4>立即进行全血细胞计数+血型鉴定、术前免疫、凝血功能、D-二聚体、床旁超声心动图检查</h4>
      </div>
      <div class="step stepSec">
        <p>步骤2</p>
        <h4>判断DDI和TTE阴性或阳性！</h4>
        <div class="disBtn disBtnRed">
          <span>DDI阳性或TTE阳性(疑似AD)</span>
          <i id="sureBtn19">确定</i>
          <img id="backBtn19" src="./images/back.png" alt="">
        </div>
        <div class="disBtn disBtnBlue">
          <span>DDI阴性或TTE阴性</span>
          <i id="sureBtn20">确定</i>
          <img id="backBtn20" src="./images/back.png" alt="">
        </div>
        <h4 class="disMainRed20">再次详细询问病史、查体，必要时行主动脉CTA</h4>
        <h4 class="disMainRed20">请相关科室会诊寻找病因</h4>
      </div>
      <div class="step stepTrd stepTrdRight">
        <p class="step3">步骤3</p>
        <div class="disBtn disBtnTreRed">
          <span>立即检查主动脉CTA</span>
        </div>
        <div class="outHeart">血管外科内会诊</div>
        <div class="outHeart">心外会诊</div>
        <h4>判断检查结果数据</h4>
        <div class="disBtn disBtnRed01">
          <span>确诊AD（A型或B型）</span>
          <i id="sureBtn21">确定</i>
          <img id="backBtn21" src="./images/back.png" alt="">
        </div>
        <div class="disBtn disBtnBlue01">
          <span>排除AD</span>
          <i id="sureBtn22">确定</i>
          <img id="backBtn22" src="./images/back.png" alt="">
        </div>
        <h4 class="sureResult22">抢救室待床</h4>
        <h4 class="backResult22">请相关科室会诊寻找病因</h4>
      </div>
      <div class="step stepTrd stepTrdRight01">
        <p class="step3">步骤3</p>
        <div class="disBtn disBtnTreRed">
          <span>右心负荷增加（DDI阳性）</span>
          <img id="backBtn17" src="./images/back.png" alt="">
        </div>
        <div class="outHeart">呼吸科会诊</div>
        <h4>生命体征不稳定</h4>
        <div class="emptyMain">根据病史、体征、Well、Geneva肺栓塞评分判断病情</div>
        <div class="imgDown"><img src="./images/down2.png" alt=""></div>
        <div class="emptyMain">考虑溶栓或者血栓切除</div>
        <div class="imgDown"><img src="./images/down2.png" alt=""></div>
        <div class="emptyMain">ACLS（高级心脏生命支持）</div>
        <div class="imgDown"><img src="./images/down2.png" alt=""></div>
        <div class="emptyMain">收入ICU</div>
        <h4>生命体征稳定建议检查CTPA（CT肺动脉造影）</h4>
        <div class="spaceBetween">
          <span>阳性</span>
          <i>按肺栓塞治疗</i>
        </div>
        <div class="spaceBetween">
          <span>阴性</span>
          <i>请相关科室会诊寻找病因</i>
        </div>
      </div>
      <div class="step stepTrd stepTrdWrong">
        <p  class="step3">步骤3</p>
        <div class="disBtn disBtnTreBlue">
          <span>评分低且DDI阴性</span>
          <img id="backBtn16" src="./images/back.png" alt="">
        </div>
        <h4>请相关科室会诊寻找病因</h4>
      </div>
      <div class="step stepTrd stepTrdWrong01">
        <p class="step3">步骤3</p>
        <div class="disBtn disBtnTreBlue">
          <span>右心负荷不增加（DDI阴性）</span>
          <img id="backBtn18" src="./images/back.png" alt="">
        </div>
        <h4>建议ACLS（高级心脏生命支持）</h4>
        <h4>请相关科室会诊寻找病因</h4>
      </div>
`
let obj = {
  0:fst,
  1:sec,
  2:trd,
  3:fth,
  4:fif
}
$(function(){
  let disName = getUrlArgObject("disName");
  let imgNum = 0;
  $("#disName").html(disName)
  $(".disLis li").each(function(idx,item){
    if($(item).html() == disName){
      $(this).css("color","#2a9bd5").siblings().css("color","#000")
      let num = $(this).attr("data-val")
      imgNum = num
      $(".disFst").html(obj[num])
    }
  })
  $(".disLis li").click(function(){
    $("#disName").html($(this).html())
    let num = $(this).attr("data-val")
    imgNum = num
    $(this).css("color","#2a9bd5").siblings().css("color","#000")
    $(".disFst").html(obj[num])
  })
  const newinConf = {
    width: '900',   //窗口的文档显示区的宽度。以像素计。
    height: '826',  //窗口文档显示区的高度。以像素计。
    left: '0',  //窗口的 x 坐标。以像素计。
    top: '0',    //窗口的 y 坐标。以像素计。
    openMode: "_blank"  //每次都是新窗口打开为_blank,打开同一窗口填写任意字符串
  }
  
  const newWindowLocation = `width=${newinConf.width}, height=${newinConf.height}, left=${newinConf.left}, top=${newinConf.top} scrollbars=yes`
  const openNewWin = function (url) {
    window.open(url, newinConf.openMode, newWindowLocation)
  }
  $(".disName img").click(function(){
    openNewWin(`view.html?imgNum=`+imgNum)
  })
  $(".disFst").height(window.innerHeight-105+'px')
  $("#disFst").on('click',"#sureBtn1",function(){
    sure(1)
  })
  $("#disFst").on('click',"#backBtn1",function(){
    back(1)
  })
  $("#disFst").on("click","#sureBtn2",function(){
    backSure(2)
  })
  $("#disFst").on("click","#backBtn2",function(){
    backRe(2)
  })
  $(document).on("click",".disNameLis",function(e){
    e.stopPropagation()
    if($(".disLis").css("display")=="block"){
      $(".disLis").css("display","none")
    }else{
      $(".disLis").css("display","block")
    }
  })
  $(document).click(function(){
    $(".disLis").css("display","none")
  })
  $("#disFst").on("click","#sureBtn3",function(){
    sure(3)
  })
  $("#disFst").on("click","#backBtn3",function(){
    back(3)
  })
  $("#disFst").on("click","#sureBtn4",function(){
    backSure(4)
  })
  $("#disFst").on("click","#backBtn4",function(){
    backRe(4)
  })
  $("#disFst").on("click","#sureBtn5",function(){
    $(".disBtnTrd").css("display","none")
    $(".stepTrdRight").css("display","block")
  })
  $("#disFst").on("click","#sureBtn6",function(){
    $(".disBtnTrd").css("display","none")
    $(".stepTrdWrong").css("display","block")
  })
  $("#disFst").on("click","#backBtn7",function(){
    $(".disBtnTrd").css("display","block")
    $(".stepTrdRight").css("display","none")
  })
  $("#disFst").on("click","#backBtn8",function(){
    $(".disBtnTrd").css("display","block")
    $(".stepTrdWrong").css("display","none")
  })

  $("#disFst").on("click","#sureBtn9",function(){
    $(".disBtnBlue").css("display","none")
    $("#sureBtn9").css("display","none")
    $("#backBtn9").css("display","block")
    $(".disBtnTrd9").css("display","block")
    $(".disMainRed9").css("display","block")
  })
  $("#disFst").on("click","#sureBtn10",function(){
    $(".disBtnRed").css("display","none")
    $("#sureBtn10").css("display","none")
    $("#backBtn10").css("display","block")
    $(".disBtnTrd10").css("display","block")
    $(".disMainRed10").css("display","block")
  })
  $("#disFst").on("click","#backBtn9",function(){
    $(".disBtnBlue").css("display","block")
    $("#sureBtn9").css("display","block")
    $("#backBtn9").css("display","none")
    $(".disBtnTrd9").css("display","none")
    $(".disMainRed9").css("display","none")
    $(".stepTrdWrong01").css("display","none")
    $(".stepTrdRight01").css("display","none")
  })
  $("#disFst").on("click","#backBtn10",function(){
    $(".disBtnRed").css("display","block")
    $("#sureBtn10").css("display","block")
    $("#backBtn10").css("display","none")
    $(".disBtnTrd10").css("display","none")
    $(".disMainRed10").css("display","none")
    $(".stepTrdWrong").css("display","none")
    $(".stepTrdRight").css("display","none")
  })
  $("#disFst").on("click","#sureBtn11",function(){
    $(".stepTrdRight01").css("display","block")
    $(".disBtnTrd9").css("display","none")
  })
  $("#disFst").on("click","#backBtn17",function(){
    $(".stepTrdRight01").css("display","none")
    $(".disBtnTrd9").css("display","block")
  })
  $("#disFst").on("click","#sureBtn12",function(){
    $(".stepTrdWrong01").css("display","block")
    $(".disBtnTrd9").css("display","none")
  })
  $("#disFst").on("click","#backBtn18",function(){
    $(".stepTrdWrong01").css("display","none")
    $(".disBtnTrd9").css("display","block")
  })
  $("#disFst").on("click","#sureBtn13",function(){
    $(".stepTrdRight").css("display","block")
    $(".disBtnTrd10").css("display","none")
  })
  $("#disFst").on("click","#backBtn15",function(){
    $(".stepTrdRight").css("display","none")
    $(".disBtnTrd10").css("display","block")
  })
  $("#disFst").on("click","#sureBtn14",function(){
    $(".stepTrdWrong").css("display","block")
    $(".disBtnTrd10").css("display","none")
  })
  $("#disFst").on("click","#backBtn16",function(){
    $(".stepTrdWrong").css("display","none")
    $(".disBtnTrd10").css("display","block")
  })
  $("#disFst").on("click","#sureBtn19",function(){
    $("#sureBtn19").css("display","none")
    $("#backBtn19").css("display","block")
    $(".disBtnBlue").css("display","none")
    $(".stepTrdRight").css("display","block")
  })
  $("#disFst").on("click","#backBtn19",function(){
    $("#sureBtn19").css("display","block")
    $("#backBtn19").css("display","none")
    $(".disBtnBlue").css("display","block")
    $(".stepTrdRight").css("display","none")
  })
  $("#disFst").on("click","#sureBtn21",function(){
    $("#backBtn21").css("display","block")
    $("#sureBtn21").css("display","none")
    $(".sureResult22").css("display","block")
    $(".disBtnBlue01").css("display","none")
  })
  $("#disFst").on("click","#backBtn21",function(){
    $("#backBtn21").css("display","none")
    $("#sureBtn21").css("display","block")
    $(".sureResult22").css("display","none")
    $(".disBtnBlue01").css("display","block")
  })
  
  $("#disFst").on("click","#sureBtn22",function(){
    $("#backBtn22").css("display","block")
    $("#sureBtn22").css("display","none")
    $(".backResult22").css("display","block")
    $(".disBtnRed01").css("display","none")
  })
  $("#disFst").on("click","#backBtn22",function(){
    $("#backBtn22").css("display","none")
    $("#sureBtn22").css("display","block")
    $(".backResult22").css("display","none")
    $(".disBtnRed01").css("display","block")
  })
  $("#disFst").on("click","#sureBtn20",function(){
    $("#sureBtn20").css("display","none")
    $("#backBtn20").css("display","block")
    $(".disMainRed20").css("display","block")
    $(".disBtnRed").css("display","none")
  })
  $("#disFst").on("click","#backBtn20",function(){
    $("#sureBtn20").css("display","block")
    $("#backBtn20").css("display","none")
    $(".disMainRed20").css("display","none")
    $(".disBtnRed").css("display","block")
  })
  $("#disFst").on("click","#sureBtn23",function(){
    $("#backBtn23").css("display","block")
    $("#sureBtn23").css("display","none")
    $(".disBtnBlue").css("display","none")
    $(".stepTrdRight").css("display","block")
  })
  $("#disFst").on("click","#backBtn23",function(){
    $("#backBtn23").css("display","none")
    $("#sureBtn23").css("display","block")
    $(".disBtnBlue").css("display","block")
    $(".stepTrdRight").css("display","none")
    $(".showBtn25").css("display","none")
    $(".showBtn26").css("display","none")
    $(".disBtnBlue01").css("display","block")
    $(".disBtnRed01").css("display","block")
    $("#sureBtn25").css("display","block")
    $("#backBtn25").css("display","none")
    $("#sureBtn26").css("display","block")
    $("#backBtn26").css("display","none")
  })
  $("#disFst").on("click","#sureBtn24",function(){
    $("#backBtn24").css("display","block")
    $("#sureBtn24").css("display","none")
    $(".disBtnRed").css("display","none")
    $(".stepTrdWrong").css("display","block")
  })
  $("#disFst").on("click","#backBtn24",function(){
    $("#backBtn24").css("display","none")
    $("#sureBtn24").css("display","block")
    $(".disBtnRed").css("display","block")
    $(".stepTrdWrong").css("display","none")
    $("#sureBtn28").css("display","block")
    $("#sureBtn27").css("display","block")
    $("#backBtn28").css("display","none")
    $("#backBtn27").css("display","none")
    $(".showBtn28").css("display","none")
    $(".showBtn27").css("display","none")
    $(".disBtnRed01").css("display","block")
    $(".disBtnBlue01").css("display","block")
  })
  $("#disFst").on("click","#sureBtn25",function(){
    $("#sureBtn25").css("display","none")
    $("#backBtn25").css("display","block")
    $(".showBtn25").css("display","block")
    $(".disBtnBlue01").css("display","none")
  })
  $("#disFst").on("click","#backBtn25",function(){
    $("#sureBtn25").css("display","block")
    $("#backBtn25").css("display","none")
    $(".showBtn25").css("display","none")
    $(".disBtnBlue01").css("display","block")
  })
  $("#disFst").on("click","#sureBtn26",function(){
    $("#sureBtn26").css("display","none")
    $("#backBtn26").css("display","block")
    $(".showBtn26").css("display","block")
    $(".disBtnRed01").css("display","none")
  })
  $("#disFst").on("click","#backBtn26",function(){
    $("#sureBtn26").css("display","block")
    $("#backBtn26").css("display","none")
    $(".showBtn26").css("display","none")
    $(".disBtnRed01").css("display","block")
  })
  $("#disFst").on("click","#sureBtn27",function(){
    $("#sureBtn27").css("display","none")
    $("#backBtn27").css("display","block")
    $(".showBtn27").css("display","block")
    $(".disBtnBlue01").css("display","none")
  })
  $("#disFst").on("click","#backBtn27",function(){
    $("#sureBtn27").css("display","block")
    $("#backBtn27").css("display","none")
    $(".showBtn27").css("display","none")
    $(".disBtnBlue01").css("display","block")
  })
  $("#disFst").on("click","#sureBtn28",function(){
    $("#sureBtn28").css("display","none")
    $("#backBtn28").css("display","block")
    $(".showBtn28").css("display","block")
    $(".disBtnRed01").css("display","none")
  })
  $("#disFst").on("click","#backBtn28",function(){
    $("#sureBtn28").css("display","block")
    $("#backBtn28").css("display","none")
    $(".showBtn28").css("display","none")
    $(".disBtnRed01").css("display","block")
  })
  var indexNumPlus = 0;
  $("#disFst").on("click",".doList input",function(){
    var dataVal = $(this).parents(".doList").find("input:checked");
    var showNex = false;
    dataVal.each(function(val,item){
      // console.log($(item).attr("data-val"))
      if($(item).attr("data-val") == -1){
        showNex = true
      }
    })
    if(dataVal.length > 0){
      if(showNex){
        ++indexNumPlus
        $(".chengdu li").eq(indexNumPlus).addClass("selectTab").siblings().removeClass("selectTab")
        $(this).parents(".doList").next().css("display","block")
        $(this).parents(".doList").css("display","none")
        $(".partPool").css("display","none")
        $(".partPool01").css("display","none")
      }else{
        if(indexNumPlus>0){
          $(".partPool01").css("display","block").find(".lowDis").html(indexNumPlus==1?"高危患者":"中危患者")
          $(".partPool").css("display","none")
        }else{
          $(".partPool").css("display","block")
          $(".partPool01").css("display","none")
        }
      }
    }else{
      $(".partPool").css("display","none")
      $(".partPool01").css("display","none")
    }
  })
  function sure(num){//红色确定
    $("#sureBtn"+num).css({display:"none"})
    $(".disBtnBlue").css({display:"none"})
    $("#backBtn"+num).css({display:"block"})
    $(".disMainRed").css({display:"block"})
    if(num == 3){
      $(".disBtnTrdRed,.disBtnTrdBlue").css("display","block")
      $(".stepTrdRight").css("display","none")
      $(".stepTrdWrong").css("display","none")
    }else{
      $(".disBtnTrdRed,.disBtnTrdBlue").css("display","none")
    }
  }
  function back(num){//红色取消
    $("#backBtn"+num).css({display:"none"})
    $(".disBtnBlue").css({display:"block"})
    $("#sureBtn"+num).css({display:"block"})
    $(".disMainRed").css({display:"none"})
    if(num == 3){
      $(".disBtnTrdRed,.disBtnTrdBlue").css("display","none")
      $(".stepTrdRight").css("display","none")
      $(".stepTrdWrong").css("display","none")
    }else{
      $(".disBtnTrdRed,.disBtnTrdBlue").css("display","none")
    }
  }
  function backSure(num){
    $(".disBtnRed").css({display:"none"})
    $("#sureBtn"+num).css({display:"none"})
    $("#backBtn"+num).css({display:"block"})
    $(".disMainBlue").css({display:"block"})
  }
  function backRe(num){
    $(".disBtnRed").css({display:"block"})
    $("#backBtn"+num).css({display:"none"})
    $("#sureBtn"+num).css({display:"block"})
    $(".disMainBlue").css({display:"none"})
  }
})