<template>
  <div class="main">
    <!-- <surgeryPrint :postForm="postForm" :preOperation="preOperation" :leaveForm="leaveForm"/> -->
    <div class="dialog">
      <h2 style="margin-bottom: 20px">手术安全核查表</h2>
      <div class="agency-con">
        <span
          >患者ID/Patient ID
          <span style="margin-left: 5px">{{
            operationInfo.healthCardNo
          }}</span></span
        >
        <span
          >姓名/Patient Name
          <span style="margin-left: 5px">{{
            operationInfo.patientName
          }}</span></span
        >
        <span
          >性别/Gender
          <span style="margin-left: 5px">{{
            operationInfo.genderDesc
          }}</span></span
        >

        <span
          >出生日期/Date of Bith
          <span style="margin-left: 5px">{{
            operationInfo.birthday
          }}</span></span
        >
        <span
          >年龄/Age
          <span style="margin-left: 5px">{{ operationInfo.age }}</span></span
        >
        <span
          >科室/Department
          <span style="margin-left: 5px">{{
            operationInfo.inpatientDept
          }}</span></span
        >
        <span
          >麻醉方式：
          <span style="margin-left: 5px">{{
            operationInfo.anesthesiaName
          }}</span></span
        >
        <span
          >术者：
          <span style="margin-left: 5px">{{
            operationInfo.chiefSurgeon
          }}</span></span
        >
        <span
          >手术日期：
          <span style="margin-left: 5px">{{ createTime }}</span></span
        >

        <span style="width: 38%"
          >手术方式：
          <span style="margin-left: 5px">{{
            operationInfo.operationWay
          }}</span></span
        >
      </div>
      <table
        style="border: 1px solid #ddd; border-collapse: collapse; width: 100%"
        cellpadding="0"
        cellspacing="0px"
      >
        <tr style="text-align: center; height: 20px">
          <td>麻醉实施前</td>
          <td>手术开始前</td>
          <td>患者离开手术室前</td>
        </tr>
        <tr>
          <!-- 麻醉实施前 -->
          <td style="position: relative">
            <div class="surgery-item" style="flex-wrap: wrap; height: 35px">
              <div>患者姓名、性别、年龄正确：</div>
              <el-checkbox-group
                class="surgery-item-checkbox"
                :min="1"
                v-model="anesthesiaPatientNameConfirm"
              >
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              手术方式确认：
              <el-checkbox-group :min="1" v-model="anesthesiaOperationConfirm">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              手术部位与标识正确：
              <el-checkbox-group
                :min="1"
                v-model="anesthesiaSiteIdentificationConfirm"
              >
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              手术知情同意：
              <el-checkbox-group
                :min="1"
                v-model="anesthesiaOperationInformedConsent"
              >
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              麻醉知情同意：
              <el-checkbox-group :min="1" v-model="anesthesiaInformedConsent">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              麻醉方式确认：
              <el-checkbox-group
                :min="1"
                v-model="anesthesiaAnaesthesiaConfirm"
              >
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              麻醉设备安全检查完成：
              <el-checkbox-group
                :min="1"
                v-model="anesthesiaAnesthesiaEquipment"
              >
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              皮肤是否完整：
              <el-checkbox-group :min="1" v-model="anesthesiaSkinComplete">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              术野皮肤准备正确：
              <el-checkbox-group :min="1" v-model="anesthesiaFieldSkin">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              静脉通道建立完成：
              <el-checkbox-group :min="1" v-model="anesthesiaVenousaccess">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              患者是否有过敏史：
              <el-checkbox-group :min="1" v-model="anesthesiaAllergichistory">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              抗菌药物皮试结果：
              <el-checkbox-group :min="1" v-model="anesthesiaAntibacterials">
                <el-checkbox
                  v-for="city in have"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              术前备血：
              <el-checkbox-group :min="1" v-model="anesthesiaPreoperativeBlood">
                <el-checkbox
                  v-for="city in have"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              <el-checkbox v-model="anesthesiaProsthesis" disabled
                >假体</el-checkbox
              >
            </div>
            <div class="surgery-item">
              <el-checkbox v-model="anesthesiaInimplantation" disabled
                >体内植入物</el-checkbox
              >
            </div>
            <div class="surgery-item">
              <el-checkbox v-model="anesthesiaImaging" disabled
                >影像学资料</el-checkbox
              >
            </div>
            <div  style="display: flex;justify-content: space-between;">
              其它：
              <el-input
                style="width: 84%"
                 type="textarea"
                  autosize
                v-model="surgeryForm.other"
                disabled
              ></el-input>
            </div>
          </td>
          <!-- 手术开始前 -->
          <td style="position: relative">
            <div class="surgery-item" style="flex-wrap: wrap; height: 35px">
              <div>患者姓名、性别、年龄正确：</div>
              <el-checkbox-group
                class="surgery-item-checkbox"
                :min="1"
                v-model="operationPatientConfirm"
              >
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              手术方式确认：
              <el-checkbox-group :min="1" v-model="operationOperationConfirm">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              手术部位与标识正确：
              <el-checkbox-group :min="1" v-model="operationSiteConfirm">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div
              class="surgery-item"
              style="font-weight: bold; color: #000; margin: 5px 0"
            >
              手术、麻醉风险预警
            </div>
            <div class="surgery-item-block" style="margin-top: 5px">
              手术医师陈述：
              <el-checkbox-group
                :min="1"
                v-model="operationOperationDoctorState"
              >
                <el-checkbox
                  v-for="city in operationState"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item-block" style="margin: 15px 0">
              麻醉医生陈述：
              <el-checkbox-group
                :min="1"
                v-model="operationAnaesthesiaDoctorState"
              >
                <el-checkbox
                  v-for="city in anaesthesiaState"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item-block">
              手术护士陈述：
              <el-checkbox-group
                :min="1"
                v-model="operationOperationNurseState"
              >
                <el-checkbox
                  v-for="city in nurseState"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              是否需要影像学资料:
              <el-checkbox-group :min="1" v-model="operationImaging">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div style="display: flex;justify-content: space-between;">
              其它：
              <el-input
              type="textarea"
                  autosize
                style="width: 80%"
                v-model="operationForm.other"
                disabled
              ></el-input>
            </div>
          </td>
          <!-- 患者离开手术室前 -->
          <td style="position: relative">
            <div class="surgery-item" style="flex-wrap: wrap; height: 35px">
              <div>患者姓名、性别、年龄正确：</div>
              <el-checkbox-group
                class="surgery-item-checkbox"
                :min="1"
                v-model="roomPatientInfoConfirm"
              >
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              实际手术方式确认：
              <el-checkbox-group :min="1" v-model="roomOperationConfirm">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              手术用药、输血的核查:
              <el-checkbox-group :min="1" v-model="roomDrugCheck">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>

            <div class="surgery-item">
              手术用物清点正确:
              <el-checkbox-group :min="1" v-model="roomOperationInventory">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              手术标本确认：
              <el-checkbox-group :min="1" v-model="roomOperationSpecimen">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div class="surgery-item">
              皮肤是否完整：
              <el-checkbox-group :min="1" v-model="roomSkinIntegrity">
                <el-checkbox
                  v-for="city in whether"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>

            <div class="surgery-item-block" style="position: relative">
              各种管路：
              <el-checkbox-group :min="1" v-model="roomPipelines">
                <el-checkbox
                  v-for="city in kinds"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
              <el-input
                style="width: 75%; position: absolute; bottom: 5px; right: 0"
                v-model="roomForm.pipelinesOther"
                disabled
              ></el-input>
            </div>
            <div class="surgery-item-block">
              患者去向：
              <el-checkbox-group :min="1" v-model="roomPatientWhereabouts">
                <el-checkbox
                  v-for="city in patients"
                  :label="city.lable"
                  :key="city.lable"
                  disabled
                  >{{ city.value }}</el-checkbox
                >
              </el-checkbox-group>
            </div>
            <div  style="display: flex;justify-content: space-between;">
              其它：
              <el-input
               type="textarea"
                  autosize
                style="width: 80%"
                v-model="operationForm.other"
                disabled
              ></el-input>
            </div>
          </td>
        </tr>
        <tr>
          <td>
            <div style="display: flex; justify-content: space-between">
              <span>核对时间：</span><span>{{ narcosisTime[0] }}</span
              ><span>时</span><span>{{ narcosisTime[1] }}</span
              ><span>分</span>
            </div>
          </td>
          <td>
            <div style="display: flex; justify-content: space-between">
              <span>核对时间：</span>{{ operationTime[0] }}<span>时</span
              >{{ operationTime[1] }}<span>分</span>
            </div>
          </td>
          <td>
            <div style="display: flex; justify-content: space-between">
              <span>核对时间：</span>{{ roomTime[0] }}<span>时</span
              >{{ roomTime[1] }}<span>分</span>
            </div>
          </td>
        </tr>
        <tr>
          <td>
            <div>
              手术医生签名：
              <img :src="surgeryForm.chiefsurgeonSign" class="signature-show" />
            </div>
            <div>
              手术室护士签名：
              <img :src="surgeryForm.nurseSign" class="signature-show" />
            </div>
            <div>
              麻醉医生签名：<img
                :src="surgeryForm.anesthesiologistSign"
                class="signature-show"
              />
            </div>
          </td>
          <td>
            <div>
              手术医生签名：<img
                :src="operationForm.chiefsurgeonSign"
                class="signature-show"
              />
            </div>
            <div>
              手术室护士签名：<img
                :src="operationForm.nurseSign"
                class="signature-show"
              />
            </div>
            <div>
              麻醉医生签名：<img
                :src="operationForm.anesthesiologistSign"
                class="signature-show"
              />
            </div>
          </td>
          <td>
            <div>
              手术医生签名：<img
                :src="roomForm.chiefsurgeonSign"
                class="signature-show"
              />
            </div>
            <div>
              手术室护士签名：<img
                :src="roomForm.nurseSign"
                class="signature-show"
              />
            </div>
            <div>
              麻醉医生签名：<img
                :src="roomForm.anesthesiologistSign"
                class="signature-show"
              />
            </div>
          </td>
        </tr>
      </table>
    </div>
  </div>
</template>

<script>
import moment from "moment";
import {
  reviewAnesthesia,
  getCheckBeforeOperation, //手术前检查
  getNowOperation,
  getPatientOutConfirmInfo,
} from "@/request/timeline.js";
export default {
  props: ["operationId", "id"],
  data() {
    return {
      surgeryShow: false, //是否展示手术安全核查表
      operationInfo: {}, //患者信息
      checked2: "",
      Identification: [
        { lable: 1, value: "左侧" },
        { lable: 2, value: "右侧" },
        { lable: 0, value: "不适用" },
      ], //手术部位标识确认
      Establishment: [], //静脉通道建立
      input: "",
      surgeryForm: {}, //麻醉实施前前表格里面数据
      selectItem: [],
      have: [
        { lable: 1, value: "有" },
        { lable: 0, value: "无" },
      ],
      whether: [
        { lable: 1, value: "是" },
        { lable: 0, value: "否" },
      ],
      patientInfo: {}, //患者信息
      narcosisTime: "", //麻醉实施前核对时间
      operationTime: "", //手术开始前核对时间
      operationForm: {}, //手术开始前表格里面数据
      //手术卧位
      decubitus: [
        { lable: 1, value: "仰卧位" },
        { lable: 2, value: "俯卧位" },
        { lable: 3, value: "截石位" },
        { lable: 4, value: "左侧卧" },
        { lable: 5, value: "右侧卧" },
      ],
      roomForm: {}, // 患者离开手术室表格里面数据
      roomTime: [], //
      // 各种管路
      kinds: [
        { lable: 0, value: "中心静脉通路" },
        { lable: 1, value: "气管插管" },
        { lable: 2, value: "外周静脉通路" },
        { lable: 3, value: "伤口引流" },
        { lable: 4, value: "胃管" },
        { lable: 5, value: "动脉通路" },
        { lable: 6, value: "尿管" },
        { lable: 7, value: "其他" },
      ],
      // 患者去向
      patients: [
       { lable: 0, value: "恢复室" },
        { lable: 1, value: "病房" },
        { lable: 2, value: "急诊" },
        { lable: 3, value: "ICU" },
        { lable: 4, value: "转院" },
        { lable: 5, value: "离院" },
      ],
      //医师陈述
      operationState: [
        { lable: 0, value: "预计手术时间" },
        { lable: 1, value: "预计失血量" },
        { lable: 2, value: "手术关注点" },
        { lable: 3, value: "其他" },
      ],
      anaesthesiaState: [
        { lable: 0, value: "麻醉关注点" },
        { lable: 1, value: "其他" },
      ],
      nurseState: [
        { lable: 0, value: "物品灭菌合格 " },
        { lable: 1, value: "仪器设备" },
        { lable: 2, value: "手术术前术中特殊用药情况关注点" },
        { lable: 3, value: "其他" },
      ],
    };
  },
  async created() {
    this.initData(); //初始化数据
  },
  watch: {},
  methods: {
    // 初始化
    initData() {
      Promise.all([
        this.reviewAnesthesiaData(), //麻醉实施前
        this.getCheckBeforeOperationData(), //手术开始前确认清单
        this.getPatientOutConfirmData(), //患者离室前数据
        this.getNowOperationData(), //患者头部信息
      ]).then(() => {});
    },
    // 麻醉实施前
    async reviewAnesthesiaData() {
      let res = await reviewAnesthesia(this.operationId);
      if (res.code == 0) {
        this.surgeryForm = res.data;
        this.narcosisTime = this.surgeryForm.confirmTime
          ? this.surgeryForm.confirmTime.split(":")
          : "";
      } else {
        this.$message.error(res.msg);
      }
    },
    // 手术开始前确认清单
    async getCheckBeforeOperationData() {
      let res = await getCheckBeforeOperation(this.operationId);
      if (res.code == 0) {
        this.operationForm = res.data; //手术开始前表格里面数据
        this.operationTime = this.operationForm.confirmTime
          ? this.operationForm.confirmTime.split(":")
          : "";
      } else {
        this.$message.error(res.msg);
      }
    },
    // 患者离室前数据
    async getPatientOutConfirmData() {
      let res = await getPatientOutConfirmInfo({
        operationId: this.operationId,
      });
      if (res.code == 0) {
        this.roomForm = res.data;
        this.roomTime = this.roomForm.confirmTime
          ? this.roomForm.confirmTime.split(":")
          : "";
      } else {
        this.$message.error(res.msg);
      }
    },
    // 患者头部信息
    async getNowOperationData() {
      let res = await getNowOperation(this.operationId);
      if (res.code == 0) {
        this.operationInfo = res.data;
      } else {
        this.$message.error(res.msg);
      }
    },
  },
  computed: {
    createTime() {
      return moment(this.operationInfo.createTime).format("YYYY-MM-DD");
    },
    // 麻醉实施前
    // 患者姓名、性别、年龄正确
    anesthesiaPatientNameConfirm: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.patientNameConfirm);
      return selectItem;
    },
    // 手术方式确认
    anesthesiaOperationConfirm: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.operationConfirm);
      return selectItem;
    },
    // 手术部位与标识正确
    anesthesiaSiteIdentificationConfirm: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.siteIdentificationConfirm);
      return selectItem;
    },
    // 手术知情同意
    anesthesiaOperationInformedConsent: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.operationInformedConsent);
      return selectItem;
    },
    // 麻醉知情同意
    anesthesiaInformedConsent: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.informedConsent);
      return selectItem;
    },
    // 麻醉方式确认
    anesthesiaAnaesthesiaConfirm: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.anaesthesiaConfirm);
      return selectItem;
    },
    // 麻醉设备安全检查完成
    anesthesiaAnesthesiaEquipment: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.anesthesiaEquipment);
      return selectItem;
    },
    // 皮肤是否完整
    anesthesiaSkinComplete: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.skinComplete);
      return selectItem;
    },
    // 术野皮肤准备正确
    anesthesiaFieldSkin: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.fieldSkin);
      return selectItem;
    },
    // 静脉通道建立完成
    anesthesiaVenousaccess: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.venousaccess);
      return selectItem;
    },
    // 患者是否有过敏史
    anesthesiaAllergichistory: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.allergichistory);
      return selectItem;
    },
    // 抗菌药物皮试结果
    anesthesiaAntibacterials: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.antibacterials);
      return selectItem;
    },
    // 术前备血
    anesthesiaPreoperativeBlood: function () {
      let selectItem = [];
      selectItem.push(this.surgeryForm.preoperativeBlood);
      return selectItem;
    },
    // 假体
    anesthesiaProsthesis: function () {
      return this.surgeryForm.prosthesis == 1 ? true : false;
    },
    // 体内植入物
    anesthesiaInimplantation: function () {
      return this.surgeryForm.inimplantation == 1 ? true : false;
    },
    // 影像学资料
    anesthesiaImaging: function () {
      return this.surgeryForm.imaging == 1 ? true : false;
    },

    // 手术开始前
    // 患者姓名、性别、年龄正确
    operationPatientConfirm: function () {
      let selectItem = [];
      selectItem.push(this.operationForm.patientConfirm);
      return selectItem;
    },
    // 手术方式确认
    operationOperationConfirm: function () {
      let selectItem = [];
      selectItem.push(this.operationForm.operationConfirm);
      return selectItem;
    },
    // 手术部位与标识正确
    operationSiteConfirm: function () {
      let selectItem = [];
      selectItem.push(this.operationForm.siteConfirm);
      return selectItem;
    },
    // 手术、麻醉风险预警
    // 手术医师陈述
    operationOperationDoctorState: function () {
      let siteIdenti = this.operationForm.operationDoctorState;
      let selectItem = [];
      selectItem = siteIdenti ? siteIdenti.split(",") : [];
      selectItem = selectItem.map((item) => {
        return Number(item);
      });
      return selectItem;
    },
    // 麻醉医生陈述
    operationAnaesthesiaDoctorState: function () {
      let siteIdenti = this.operationForm.anaesthesiaDoctorState;
      let selectItem = [];
      selectItem = siteIdenti ? siteIdenti.split(",") : [];
      selectItem = selectItem.map((item) => {
        return Number(item);
      });
      return selectItem;
    },
    // 手术护士陈述
    operationOperationNurseState: function () {
      let siteIdenti = this.operationForm.operationNurseState;
      let selectItem = [];
      selectItem = siteIdenti ? siteIdenti.split(",") : [];
      selectItem = selectItem.map((item) => {
        return Number(item);
      });
      return selectItem;
    },
    // 是否需要影像学资料
    operationImaging: function () {
      let selectItem = [];
      selectItem.push(this.operationForm.imaging);
      return selectItem;
    },

    // 患者离开手术室前
    // 患者姓名、性别、年龄正确
    roomPatientInfoConfirm: function () {
      let selectItem = [];
      selectItem.push(this.roomForm.patientInfoConfirm);
      return selectItem;
    },
    // 实际手术方式确认
    roomOperationConfirm: function () {
      let selectItem = [];
      selectItem.push(this.roomForm.operationConfirm);
      return selectItem;
    },
    // 手术用药、输血的核查
    roomDrugCheck: function () {
      let selectItem = [];
      selectItem.push(this.roomForm.drugCheck);
      return selectItem;
    },
    // 手术用物清点正确
    roomOperationInventory: function () {
      let selectItem = [];
      selectItem.push(this.roomForm.operationInventory);
      return selectItem;
    },
    // 手术标本确认
    roomOperationSpecimen: function () {
      let selectItem = [];
      selectItem.push(this.roomForm.operationSpecimen);
      return selectItem;
    },
    // 皮肤是否完整
    roomSkinIntegrity: function () {
      let selectItem = [];
      selectItem.push(this.roomForm.skinIntegrity);
      return selectItem;
    },
    // 各种管路
    roomPipelines: function () {
      let siteIdenti = this.roomForm.pipelines;
      let selectItem = [];
      selectItem = siteIdenti ? siteIdenti.split(",") : [];
      selectItem = selectItem.map((item) => {
        return Number(item);
      });
      return selectItem;
    },
    // 患者去向
    roomPatientWhereabouts: function () {
      let siteIdenti = [];
      siteIdenti.push(this.roomForm.patientWhereabouts);
      let selectItem = [];
      selectItem = siteIdenti.map((item) => {
        if (item) {
          return Number(item);
        }
      });
      return selectItem;
    },
  },
};
</script>

<style lang="less" scoped>
/deep/.el-textarea__inner {
  background-color: #fff !important;
  font-size: 11px;
  padding: 0 ;
  font-weight: 400 !important;
      font-family: PingFangSC, PingFangSC-Regular;
    color: #000 !important;
  border-bottom: 1px solid #c0c4cc;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}
.main {
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.dialog {
  // padding: 20px 400px;
  width: 970px;
  // height: 651px;
  height: 92%;
  margin: 20px auto;
  overflow-x: hidden;
  overflow-y: scroll;
  position: relative;
  // overflow-y: scroll;
  .signature-show {
    width: 70px;
    height: 20px;
    margin-right: 8px;
    // background: #f6f9ff;
    border-radius: 4px;
  }
  h2 {
    color: #000000;
    font-family: PingFangSC, PingFangSC-Regular;
    font-size: 20px;
    font-weight: 400;
    text-align: center;
  }
  .agency-con {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    span {
      width: 30%;
      font-family: PingFangSC, PingFangSC-Regular;
      font-size: 14px;
      margin-bottom: 5px;
      font-weight: 400;
      opacity: 1;
      line-height: 21px;
      color: #000;
    }
    .bottom-line {
      border-bottom: 1px solid #000000;
    }
  }
  table {
    width: 100%;
    min-height: 20px;
    line-height: 18px;
    // border-color: #ddd;
    border-collapse: collapse;
    td {
      border: 1px solid #ddd;
      padding: 6px 5px;
      vertical-align: top;
      font-size: 14px !important;
      font-family: PingFangSC, PingFangSC-Regular;
      font-weight: 400;
      opacity: 1;
      line-height: 21px;
      color: #000;
      .surgery-item {
        display: flex;
        justify-content: space-between;
        margin: 5px 0;
        .surgery-item-checkbox {
          // margin-left: 135px;
          position: absolute;
          right: 5px;
          top: 25px;
        }
      }
      .surgery-item-block {
        margin-top: 5px;
        font-weight: bold;
        /deep/.el-checkbox {
          display: block;
          margin: 3px 0;
        }
      }
      /deep/.el-checkbox__input.is-disabled .el-checkbox__inner {
        background-color: #fff;
        border: 1px solid #000;
      }
      /deep/.el-checkbox__input.is-disabled.is-checked
        .el-checkbox__inner::after {
        border-color: #000;
      }
      /deep/.el-checkbox {
        margin-right: 5px;
        font-weight: 400;
        color: #000;
      }
      /deep/.el-checkbox__input.is-disabled + span.el-checkbox__label {
        color: #000;
        font-weight: 400;
        color: #000;
        padding-left: 5px;
      }
      /deep/.el-checkbox-group {
        font-weight: 400;
        color: #000;
        margin-left: 18px;
      }
      /deep/.el-input.is-disabled .el-input__inner {
        background-color: #fff;
        border-bottom: 1px solid #000;
        border-radius: 0;
        border-top: 0;
        border-right: 0;
        border-left: 0;
        height: 20px;
        font-size: 14px;
        font-weight: 400;
        color: #000;
        font-family: PingFangSC, PingFangSC-Regular;
        padding: 0;
        opacity: 1;
      }
      /deep/.el-input {
        // width: 75%;
        margin-left: -5px;
      }
    }
  }
}
</style>