examinationDialog.vue 3.72 KB
<template>
  <div>
    <el-dialog
      v-model="visible"
      :close-on-press-escape="false"
      align-top
      class="membership-dialog"
      title="温馨提示"
      width="500px"
    >
      <div class="dialog-content">
        <!-- 图标区域 -->
        <div class="icon-wrapper">
          <el-icon :size="48" color="#67C23A">
            <CircleCheck />
          </el-icon>
        </div>

        <!-- 标题 -->
        <h2 class="dialog-title">申请成为考点</h2>

        <!-- 描述文本 -->
        <div class="dialog-message">
          恭喜您成为中国跆拳道协会单位会员!<br>
          根据协会考点管理办法,需成为考点单位才能进行考级业务的办理,是否现在申请成为考点。
        </div>

        <!-- 按钮组 -->
        <div class="button-group">
          <el-button class="btn-cancel" round @click="handleCancel">取消</el-button>
          <el-button class="btn-confirm" round type="primary" @click="handleSubmit">去申请</el-button>
        </div>

        <!-- 不再显示 -->
        <div class="no-display-wrapper">
          <el-button class="no-display-btn" link @click="handleHint">不再显示</el-button>
        </div>
      </div>
    </el-dialog>
    <kaoDianShenQingXuZhi ref="kaoDianShenQingXuZhiRef" @close="visible=false" />
  </div>
</template>

<script setup>
import { noDisplay } from '@/api/system/user'
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import kaoDianShenQingXuZhi from '@/views/groupMember/components/kaoDianShenQingXuZhi.vue'
import useUserStore from '@/store/modules/user'

const visible = ref(false)
const router = useRouter()
const kaoDianShenQingXuZhiRef = ref(null)
const userStore = useUserStore()

async function handleHint() {
  await noDisplay()
  await userStore.getInfo()
  await userStore.getMemInfo()
  visible.value = false
}

function open() {
  visible.value = true
}

function handleCancel() {
  visible.value = false
}

function handleSubmit() {
  // router.push({
  //   path: '/user/profile',
  //   query: { type: '2' }
  // })
  // visible.value = false
  // kaoDianShenQingXuZhiRef.value.open()
  visible.value = false
  router.push({
    path: '/group/examination',
    query: {
      type: '1'
    }
  })
}

defineExpose({
  open
})
</script>

<style lang="scss" scoped>
.membership-dialog :deep(.el-dialog) {
  border-radius: 16px;
  background: linear-gradient(135deg, #fff 0%, #f8f9fc 100%);
}

.membership-dialog :deep(.el-dialog__header) {
  display: none;
}

.membership-dialog :deep(.el-dialog__body) {
  padding: 32px 28px 28px;
}

.dialog-content {
  text-align: center;
}

.icon-wrapper {
  margin-bottom: 20px;
}

.dialog-title {
  font-size: 22px;
  font-weight: 600;
  color: #303133;
  margin: 0 0 12px 0;
  letter-spacing: 0.5px;
}

.dialog-message {
  font-size: 15px;
  color: #606266;
  line-height: 1.6;
  margin-bottom: 32px;
  padding: 0 8px;
  text-align: left;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.btn-cancel,
.btn-confirm {
  width: 130px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-cancel {
  border-color: #dcdfe6;
  color: #606266;
}

.btn-cancel:hover {
  background-color: #f5f7fa;
  border-color: #c0c4cc;
  color: #303133;
}

.btn-confirm {
  //background: linear-gradient(135deg, #409eff, #66b1ff);
  border: none;
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}

.btn-confirm:hover {
  //background: linear-gradient(135deg, #66b1ff, #79bbff);
  box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4);
  transform: translateY(-1px);
}

.no-display-wrapper {
  text-align: right;
}

.no-display-btn {
  font-size: 12px;
  color: #909399;
  padding: 4px 8px;
}

.no-display-btn:hover {
  color: #409eff;
}
</style>