<template>
  <MOSTY.PageTree :pageTitle="'安全标识列表'" :searchType="'01'" @getDeptId="getdeptId">
    <template #titleright>
      <!-- 头部 -->
      <div class="headBox" style="justify-content: space-between">
        <div class="toggle" :class="{ active: isOpen }" @click="isOpen = !isOpen">
          <span>统计</span>
          <el-icon>
            <DArrowLeft />
          </el-icon>
        </div>
      </div>
    </template>
    <template #table>
      <Safetysigns :obj='listQuery' :type='"aqbs"' :isShowTotal="isOpen" :tableHeight='isOpen ? "15vh" : "60vh"' />
    </template>
  </MOSTY.PageTree>
</template>

<script setup>
import * as MOSTY from "@/components/MyComponents/index";
import { reactive, ref, onMounted } from "vue";
import Safetysigns from "@/components/MyComponents/TabList/Safetysigns.vue";
const emit = defineEmits("changePage");
const isOpen = ref(false);
// 树的展开与折叠
const listQuery = reactive({
  type: '0',
  orgcode: '',
  saveBtnShow: true
})
onMounted(() => {

})
//获取部门数据
const getdeptId = (val) => {
  listQuery.orgcode = val.id;
};

</script>

<style lang="scss" scoped>
.headBox {
  display: flex;
  justify-content: space-between;
  align-items: center;

  .toggle {
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #0f3916;

    .el-icon {
      transform: rotate(90deg);
      transition: all 0.25s ease;
    }

    &.active {
      .el-icon {
        transform: rotate(-90deg);
      }
    }
  }
}
</style>