examination.vue 3.47 KB
<template>
  <div v-loading="loadingContent" class="app-container">
    <el-card class="box-card">
      <div>
        <el-button :disabled="form.isPoints==0||formInfo.auditStatus==1" class="btn" icon="plus" type="primary" @click="handelExamination">考点申请</el-button>
      </div>
      
      <br>
      <br>
      <el-table v-loading="loading" :data="listInfo" border>
        <el-table-column align="center" label="序号" type="index" width="55" />
        <el-table-column
          align="center" label="审核协会" min-width="160px" prop="auditDeptName" show-overflow-tooltip
        />
        <el-table-column align="center" label="审核日期" min-width="100" prop="auditTime">
          <template #default="{row}">
            <span>{{ parseTime(row.auditTime, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="审核状态" min-width="110">
          <template #default="{row}">
            <div v-if="row.auditResult==1" class="text-success">审核通过</div>
            <div v-else-if="row.auditResult==0" class="text-danger"> 审核拒绝</div>
            <div v-else>待审核</div>
          </template>
        </el-table-column>
        <el-table-column align="center" label="理由" min-width="100" prop="auditMsg">
          <template #default="{row}">
            <div>{{ row.auditMsg ? row.auditMsg : '/' }}</div>
          </template>
        </el-table-column>
      </el-table>
      <kaoDianShenQingXuZhi ref="kaoDianShenQingXuZhiRef" @handel-next="handelNext" />
      <cangGuanImage ref="cangGuanImageRef" @handel-next="handelNext2" />
      <applyNow ref="applyNowRef" @handel-submit="handelSubmit" />
    </el-card>
  </div>
</template>

<script setup >
import { getCurrentInstance, ref, onMounted, computed } from 'vue'
// import { getMyRecent } from '@/api/system/config'
import applyNow from '@/views/system/user/profile/components/applyNow'
import useUserStore from '@/store/modules/user'
import kaoDianShenQingXuZhi from '@/views/groupMember/components/kaoDianShenQingXuZhi.vue'
import cangGuanImage from '@/views/groupMember/components/cangGuanImage.vue'
import { getMyOwnMemberInfo } from '@/api/system/userInfo'
import { useRoute } from 'vue-router'
import { getMyRecent } from '@/api/system/userInfo'

const memId = computed(() => useUserStore().memId)
const { proxy } = getCurrentInstance()
const loading = ref(false)
const loadingContent = ref(false)
const listInfo = ref([])
const form = ref({})
const formInfo = ref({})
const route = useRoute()

onMounted(() => {
  if (route.query.type == 1) {
    handelExamination()
  }
  getMyCertStageFN()
  initData()
})


async function getMyCertStageFN() {
  loading.value = true
  const res = await getMyRecent()
  loading.value = false
  formInfo.value = res.data ?? {}
  if (res.data && res.data.auditLogs) listInfo.value = JSON.parse(res.data.auditLogs)
}

async function initData() {
  loadingContent.value = true
  const res = await getMyOwnMemberInfo()
  form.value = res.data.memberInfo ?? {}
  loadingContent.value = false
}

function handelExamination() {
  proxy.$refs['kaoDianShenQingXuZhiRef'].open()
}

function handelNext() {
  // proxy.$refs['applyNowRef'].open(memId.value)
  proxy.$refs['cangGuanImageRef'].open()
}

function handelNext2(photos) {
  proxy.$refs['applyNowRef'].open(memId.value, photos)
}

function handelSubmit() {
  initData()
  getMyCertStageFN()
}

</script>


<style lang="scss" scoped>
.box-card{
  width: 1000px;
  margin:  0 auto;
}


</style>