<script setup lang="ts">
const props = defineProps<{
  d: any
}>()
const info_jcxx = [
  {
    name: '学校名称',
    key: 'sm_name',
  },
  {
    name: '学校地址',
    key: 'sm_address',
  }, {
    name: '学校代码',
    key: 'sm_code',
  }, {
    name: '学校邮政编码',
    key: 'sm_zipcode',
  }, {
    name: '学校办学类型',
    key: 'sm_bxlx',
  }, {
    name: '学校办学类型码',
    key: 'sm_xxbxlxm',
  }, {
    name: '学校主管部门码',
    key: 'sm_xxzgbmm',
  }, {
    name: '组织机构码',
    key: 'sm_zzjgm',
  }, {
    name: '校庆日',
    key: 'sm_xqr',
  }, {
    name: '行政区编码',
    key: 'sm_xzqmbm',
  },
  {
    name: '法定代表人号',
    key: 'sm_frdbrh',
  }, {
    name: '法人证书号',
    key: 'sm_frzsh',
  }, {
    name: '校长姓名',
    key: 'sm_xzxm',
  },
  {
    name: '校长工号',
    key: 'sm_xzgh',
  },
]
const info_lxfs = [
  {
    name: '联系电话',
    key: 'sm_lxr_contact',
  },
  {
    name: '电子邮箱',
    key: 'sm_email',
  }, {
    name: '传真电话',
    key: 'sm_czdh',
  },
]
</script>

<template>
  <div class="flex justify-around h-auto">
    <div class="w-1/2">
      <p class="font-semibold text-hex-3f8cff mb-6">
        基础信息
      </p>
      <img class="w-20 h-20 mb-8" :src="getFullUrl(d.sm_logo)" alt="">
      <div class="flex flex-wrap">
        <div v-for="item in info_jcxx" :key="item.key" class="w-1/2 mb-8">
          <p class="text-hex-4b4b4b font-normal text-xs mb-4">
            {{ item.name }}
          </p>
          <p class="text-black text-sm font-semibold">
            {{ !!d[item.key] ? d[item.key] : '暂未填写' }}
          </p>
        </div>
      </div>
    </div>
    <div class="w-1/2">
      <p class="font-semibold text-hex-3f8cff mb-6">
        联系方式
      </p>
      <div class="flex flex-wrap">
        <div v-for="item in info_lxfs" :key="item.key" class="w-1/2 mb-8">
          <p class="text-hex-4b4b4b font-normal text-xs mb-4">
            {{ item.name }}
          </p>
          <p class="text-black text-sm font-semibold">
            {{ !!d[item.key] ? d[item.key] : '暂未填写' }}
          </p>
        </div>
      </div>
      <p class="font-semibold text-hex-3f8cff mb-6">
        学校风采
      </p>
      <el-scrollbar height="500px">
        <div class="text-sm font-semibold text-black space-y-3" v-html="!!d.sm_xxfc ? d.sm_xxfc : '暂未填写'" />
      </el-scrollbar>
    </div>
  </div>
</template>

