WXL (wul)
5 天以前 77970a545af56e946e439ead97b23557d0b44f0f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<template>
  <div class="relay-container">
    <div class="relay-card">
      <!-- 加载动画 -->
      <div class="loading-spinner">
        <div class="spinner-dot"></div>
        <div class="spinner-dot"></div>
        <div class="spinner-dot"></div>
      </div>
      <!-- 标题 -->
      <h1 class="relay-title">正在加载服务</h1>
      <!-- 描述 -->
      <p class="relay-desc">请稍候,即将为您跳转至问卷页面</p>
      <!-- 进度条装饰 -->
      <div class="progress-bar">
        <div class="progress-fill"></div>
      </div>
    </div>
  </div>
</template>
 
<script>
import { scanGenerateSubtask } from '@/api/AiCentre/index';
 
export default {
  name: 'RelayPage',
  created() {
    this.handleRedirect();
  },
  methods: {
    handleRedirect() {
      const { taskid, deptcode, leaveldeptcodes } = this.$route.query;
      if (!taskid) {
        this.$message.error('缺少任务标识,请重新扫码');
        return;
      }
      const params = {
        taskid: taskid,
        deptcode: deptcode ,
        leaveldeptcodes: leaveldeptcodes
      };
      scanGenerateSubtask(params).then(res => {
        return
        if (res.code === 200 ) {
          window.location.href = res.msg;
        } else {
          this.$message.error('获取问卷链接失败:' + (res.msg || '未知错误'));
        }
      }).catch(err => {
        console.error(err);
        this.$message.error('服务异常,请稍后重试');
      });
    }
  }
};
</script>
 
<style scoped>
/* 全局重置 */
.relay-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  background: linear-gradient(145deg, #f5f9ff 0%, #e8f0fe 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
 
/* 卡片容器 */
.relay-card {
  max-width: 420px;
  width: 100%;
  padding: 48px 36px 40px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(64, 158, 255, 0.15),
              0 8px 20px rgba(0, 0, 0, 0.04);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
 
/* 加载动画 — 三点波浪 */
.loading-spinner {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
 
.spinner-dot {
  width: 14px;
  height: 14px;
  background: #409EFF;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}
 
.spinner-dot:nth-child(1) {
  animation-delay: -0.32s;
  background: #409EFF;
}
 
.spinner-dot:nth-child(2) {
  animation-delay: -0.16s;
  background: #66b1ff;
}
 
.spinner-dot:nth-child(3) {
  animation-delay: 0s;
  background: #8cc5ff;
}
 
@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
 
/* 标题 */
.relay-title {
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 10px 0;
  letter-spacing: 1px;
}
 
/* 描述文字 */
.relay-desc {
  font-size: 16px;
  color: #7f8c8d;
  margin: 0 0 30px 0;
  line-height: 1.6;
}
 
/* 进度条(装饰) */
.progress-bar {
  width: 100%;
  height: 4px;
  background: #e0e7f1;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
 
.progress-fill {
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, #409EFF, #79bbff);
  border-radius: 4px;
  animation: progressMove 1.8s ease-in-out infinite alternate;
}
 
@keyframes progressMove {
  0% { transform: translateX(-10%); width: 40%; }
  100% { transform: translateX(10%); width: 80%; }
}
 
/* 移动端适配 */
@media (max-width: 480px) {
  .relay-card {
    padding: 32px 20px 28px;
  }
  .relay-title {
    font-size: 20px;
  }
  .relay-desc {
    font-size: 14px;
  }
}
</style>