<!-- 表格里的管理弹出框 -->
<template>
  <div>
    <el-dialog v-model="props.Showrzqd" :before-close="handleClose" width="60%" draggable>
      <template #default>

        <!-- <div class="tabBox"> -->
        <div style="margin-top: 48px;height: 40vh;">
          <el-table :data="tableData" border stripe>
            <el-table-column property="checklibName" label="检查项" />
            <el-table-column property="description" label="危险源描述" />
          </el-table>

        </div>

      </template>
      <template #title>
        <div>隐患检查日志清单</div>
        <div @click="handleClose">
          <el-button type="primary">
            <el-icon>
              <Close />
            </el-icon>
          </el-button>
        </div>
      </template>

    </el-dialog>

  </div>
</template>

<script setup>
// 引入
import {
  ref,
  onMounted,
  defineProps,
  defineEmits,
  getCurrentInstance,
  watch
} from "vue";

import { getApi, deleteApi, putApi, postApi } from "@/api/tobAcco_api.js";
const { proxy } = getCurrentInstance();

const { D_DBZ_YHDJ, D_BZ_SF, NSFBXSCTP, NJCXLY, NYHBZ } = proxy.$dict(
  "D_DBZ_YHDJ",
  "D_BZ_SF",
  "NSFBXSCTP",
  "NJCXLY",
  "NYHBZ"
);
// 数据
const props = defineProps({
  Showrzqd: {
    type: Boolean,
    default: true
  },
  xqId: String,
  objid: String,
  checktype: String

});


const emits = defineEmits(["changeShow"]);
const tableData = ref([
]);

onMounted(() => {
  getPcxData();
});

// 关闭
const handleClose = () => {
  emits("changeShow", false);
};



// 获取排查项列表
const getPcxData = () => {
  getApi({}, "/mosty-jcgl/gwzc/getYhList?logid=" + props.xqId).then((res) => {

    tableData.value = res.yhbList;
  });
};


</script>

<style lang="scss" scoped>
::v-deep .el-dialog {
  --el-dialog-width: 35% !important;
}

::v-deep .el-dialog__body {
  height: 550px !important;
  overflow-y: scroll;
}

.newAdd {
  margin-top: 6px;
  position: absolute;
  right: 20px;
}

.el-table {
  border-left: 1px solid green;
  border-right: 1px solid green;

  height: 100%;
}

.fenye {
  top: 100%;
}

::v-deep .el-dialog__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
}
</style>