<template>
  <div class="page_container">
        <div class="bg-breadcrumb">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item> 组织管理 </el-breadcrumb-item>
                <el-breadcrumb-item :to="{ path: '/system/organization' }"> 组织管理 </el-breadcrumb-item>
                <el-breadcrumb-item> 组织详情 </el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="page_content apaas_scroll">
                <div class="info_row">
                <div class="title">
                    <div><span  class="icon_box"></span> 基础信息</div>
                    <div class="dashed_line">
                    </div>
                </div>
                <div class="info_content">
                    <div class="info_box">
                        <bg-info :data="baseInfo"></bg-info>
                    </div>
                    <div class="org_file info_box">
                      <div class="pl-1">组织附件</div>
                      <div>
                        <div class="file_item pl-1">
                          <span><bg-icon  style="font-size: 24px" icon="#bg-ic-c-file-doc"></bg-icon></span>
                          <span class="file_name">xxxxxxx协议.doc</span>
                          <span class="fr download_btn">
                            <el-button type="primary" @click="downloadFile"><bg-icon  icon="#bg-ic-to-bottom"></bg-icon>下载</el-button>
                          </span>
                        </div>
                        <div class="file_item pl-1">
                          <span><bg-icon  style="font-size: 24px" icon="#bg-ic-c-file-zip"></bg-icon></span>
                          <span class="file_name">xxxxxxx协议.zip</span>
                          <span class="fr download_btn">
                            <el-button type="primary"><bg-icon  icon="#bg-ic-to-bottom"></bg-icon>下载</el-button>
                          </span>
                        </div>
                        <div class="file_item pl-1">
                          <span><bg-icon  style="font-size: 24px" icon="#bg-ic-c-file-image"></bg-icon></span>
                          <span class="file_name">xxxxxxx协议.jpg</span>
                          <span class="fr download_btn">
                            <el-button type="primary"><bg-icon  icon="#bg-ic-to-bottom"></bg-icon>下载</el-button>
                          </span>
                        </div>
                      </div>
                    </div>
                </div>
            </div>
            <div>
                <div class="title">
                    <div><span  class="icon_box"></span> 业务系统信息</div>
                    <div class="dashed_line">
                    </div>
                </div>
                <div class="info_content info_box">
                    <bg-table ref="bgTable" :headers="headers" :rows="tableRows" :isIndex="true" :stripe="true">
                       
                      </bg-table>
                      <div class="pagination_box">
                     <bg-pagination
                        :page="1"
                        :size="10"
                        :total="100"
                        @change-page="changePage"
                        @change-size="changeSize"
                      >
                      </bg-pagination>
                  </div>       
                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
import { reactive, toRefs, ref, } from '@vue/reactivity'
import { getCurrentInstance } from 'vue'
import { computed, onBeforeMount } from '@vue/runtime-core'
import { useRouter } from 'vue-router';

const baseInfo = reactive(
    [
    {
      name: "机构名称",
      value: "大数据局",
      nameWidth: 130
    },
    {
      name: "组织机构代码",
      value: "00000001",
      nameWidth: 130
    },
    {
      name: "组织管理员数量",
      value: "15",
      nameWidth: 130
    },
    {
      name: "业务系统数量",
      value: "10",
      nameWidth: 130
    },
    {
      name: "组织描述",
      value: "组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述",
      nameWidth: 130
    },
  ])

  const headers = reactive([
        {
          label: "业务系统名称",
          prop: "name",
        },
        {
          label: "是否启用",
          prop: "is_use",
        },
        {
          label: "业务系统账号",
          prop: "account",
        },
      ])
 
  const tableRows = reactive([
    {name: '大数据处理系统',is_use: "是",account: "admin"},
    {name: '大数据处理系统',is_use: "是",account: "admin"},
    // {name: '大数据处理系统',is_use: "是",account: "admin"},
    // {name: '大数据处理系统',is_use: "是",account: "admin"},
    // {name: '大数据处理系统',is_use: "是",account: "admin"},
    // {name: '大数据处理系统',is_use: "是",account: "admin"},
    // {name: '大数据处理系统',is_use: "是",account: "admin"},
    // {name: '大数据处理系统',is_use: "是",account: "admin"},
    // {name: '大数据处理系统',is_use: "是",account: "admin"},
    // {name: '大数据处理系统',is_use: "是",account: "admin"},
    // {name: '大数据处理系统',is_use: "是",account: "admin"},
    // {name: '大数据处理系统',is_use: "是",account: "admin"},
    
  ])

  const changeSize = (size) => {

  }

  const changePage = (size) => {

  }

  const downloadFile = (data) => {

  }

  onBeforeMount(() => {
     
 })
</script>

<style scoped>
.page_content {
    padding: 15px;
    overflow: auto;
    font-size: 14px;
	  color: #202531;
}
.info_content {
    /* display: flex; */
}
.org_file {
  margin-top: 15px;
}
.file_item {
  height: 48px;
  line-height: 48px;
	background-color: #fafafa;
	border-radius: 4px;
  font-size: 14px;
  margin-bottom: 8px;
}
.file_name {
  padding-left: 10px;
	color: #202531;
}
.download_btn {
  padding-right: 4px;
}
.info_row {
    margin-bottom: 40px;
}
.img_box {
    width: 120px;
}
.info_box {
    width: 60%;
}

.title {
  font-size: 18px;
  color: #1a1a1a;
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}
.dashed_line {
    flex: 1;
    height: 1px;
    margin: 0 10px;
	border-bottom: dashed 1px #dadee7;
}

.icon_box {
    display: inline-block;
    width: 4px;
	height: 14px;
	background-color: #3759be;
	border-radius: 2px;
    margin-right: 5px;
}

.pagination_box {
  position: sticky;
  position: -webkit-sticky;
  margin-top: 16px;
  bottom: -15px;
  background-color: #fff;
  z-index: 1024;
  height: 40px;
  line-height: 40px;
  padding-top: 5px;
}

</style>