<script>
import { defineComponent, ref, getCurrentInstance, reactive } from "@vue/composition-api";
import request from '~/utils/request';
import { Message } from 'element-ui'

export default defineComponent({
  props: ['id'],
  setup(props) {
    // #region (constant)
    const TABLE_KEY = 'jxjd_id'
    const URL_CUT = '/jdbg/xxgzjc_jcbd'
    // #endregion
    const instance = getCurrentInstance().proxy
    const route = instance.$route
    const { jxj_id, jxjx_to_id } = route.query

    // #region (variable)
    const loading = ref(true)
    // #endregion


    function detailApi() {
      return request({
        url: URL_CUT + '/index',
        data: {
          jxj_id,
          jxjd_sm_id: jxjx_to_id,
        }
      })
    }

    const detail_Data = ref({})

    // #region (page init)
    async function init() {
      const res = await detailApi()
      detail_Data.value = (res.data.page_data)[0]
      loading.value = false
    }
    init()
    // #endregion

    return {
      loading,
      detail_Data
    }
  }
})




</script>

<template>
  <div :loading="loading" class="text-sm">
    <template v-if="detail_Data.jxjd_name">
      <div class="flex">
        <!-- <div>检查任务名称</div> -->
        <div class="text-lg">{{ detail_Data.jxjd_name }}</div>
      </div>
      <!-- <div class="flex">
        <div>检查任务编号</div>
        <div>{{detail_Data.jxj_id}}</div>
      </div> -->
      <div class="flex py-2">
        <div>学校名称</div>
        <div class="text-hex-969696 ml-4">{{ detail_Data.jxjd_sm_name }}</div>
      </div>
      <!-- <div class="flex">
        <div>学校编号</div>
        <div>{{detail_Data.jxjd_sm_id}}</div>
      </div> -->
      <div class="flex py-2">
        <div>检查组成员</div>
        <div class="text-hex-969696 ml-4">{{ detail_Data.jxjd_jczcy }}</div>
      </div>
      <!-- <div class="flex">
        <div>检查组成员JSON</div>
        <div>{{detail_Data.jxjd_jczcy_json}}</div>
      </div> -->
      <div class="flex flex-col mt-4">
        <div>检查组意见</div>
        <div class="text-hex-969696 mt-2">{{ detail_Data.jxjd_jczyj }}</div>
      </div>
      <div class="flex flex-col mt-4">
        <div>学校困难及问题</div>
        <div class="text-hex-969696 mt-2">{{ detail_Data.jxj_xxknjwt }}</div>
      </div>
    </template>
    <el-empty v-else description="无反馈意见"></el-empty>
  </div>

</template>
