step.vue 1.04 KB
<template>
  <div v-if="rInx">
    <h2>审核进度</h2>
    <el-steps :active="rInx" finish-status="success" style="width: 80%; margin: 0 auto;">
      <el-step v-for="item in rList" :key="item" :title="typeList[item]" />
    </el-steps>
  </div>
</template>

<script setup >
import { ref } from 'vue'
import { getProcessInfo } from '@/api/member/memberPay.js'

const rList = ref([])
const rInx = ref()
const rangeId = ref()
const typeList = ref(['', '中跆协', '省协会', '直属协会', '市协会', '区协会', '道馆'])

function openFN(id) {
  rangeId.value = id
  if (id) schedule()
}

// 进度
async function schedule() {
  const res = await getProcessInfo(rangeId.value)
  if (res.code == 200) {
    rList.value = res.data.rules
    if (res.data.nowLevel < 0) {
      const num = (res.data.nowLevel * -1)
      rInx.value = res.data.rules.findIndex(item => item == num)
    } else {
      rInx.value = res.data.rules.findIndex(item => item == res.data.nowLevel) + 1
    }
  }
}


defineExpose({
  openFN
 
})

</script>

<style scope>

</style>