<template>
    <section class="box-sjtj">
      <section class="content">
        <section class="totalbox">
          <MOSTY.Assort :title="'通知公告分类'" style="padding: 0;" />
          <section class="flex">
            <section class="left-tj">
              <Sjtj :info="pageData.defaultLeftList" :isShowTip="false" :isShowBottom="false" :width="265" mb="6px" />
            </section>
          </section>
        </section>
      </section>
    </section>
  </template>
  <script setup>
  import * as MOSTY from "@/components/MyComponents/index"
  import Sjtj from '@/views/dataReportWork/aqjypx/components/sjtj.vue'
  import { postApi } from "@/api/tobAcco_api.js";
  import { reactive, onMounted } from "vue";
  const props = defineProps({
    obj: {
      type: Object,
      default: () => { }
    }
  });
  const pageData = reactive({
    defaultLeftList: [
      { title: '通知数量', num: 0, dm: 'tz', icon: 'ccss/icon_01.png' },
      { title: '公告数量', num: 0, dm: 'gg', icon: 'ccss/icon_01.png' },
    ],
  })
  onMounted(() => {
    getscsbsscount()
  })
  const getscsbsscount = () => {
    postApi({}, '/mosty-jcgl/noticeController/queryCountNoticeInfo').then(res => {
      if (res) {
        for (const key in res) {
          let _item = pageData.defaultLeftList.find(v => v.dm == key)
          if (_item) {
            _item.num = res[key] || 0
          }
        }
      }
    })
  }
//   defineExpose({ getscsbsscount })
  </script>
  
  <style lang="scss" scoped>
  .box-sjtj {
    .content {
      .totalbox {
        flex: 1;
        padding-right: 8px;
        box-sizing: border-box;
        .flex {
          display: flex;
          align-items: center;
          justify-content: space-between;
          .right-tj {
            flex: 1;
            margin-left: 13px;
          }
        }
      }
      .center {
        flex: 1;
        padding-right: 8px;
        box-sizing: border-box;
        margin-left: 12px;
        .flex {
          display: flex;
          justify-content: space-between;
  
          .left-tj {
            flex: 1;
          }
          .right-tj {
            flex: 1;
            margin-left: 13px;
          }
        }
      }
      .right {
        flex: 1;
        margin-left: 12px;
      }
    }
  }
  </style>