[...all].vue
6.52 KB
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<route lang="yaml">
name: notFound
meta:
title: 可信数据空间
constant: true
layout: false
</route>
<script lang="ts" setup>
import useUserStore from '@/store/modules/user';
import { ElMessage } from 'element-plus';
const userStore = useUserStore()
const router = useRouter()
const route = useRoute()
/** 对话框显示隐藏 */
const dialogVisible = computed(() => {
return route.query.code && userStore.isGetCurrUserInfo;
});
const loading = ref(false);
/** 记录用户选择的角色 */
const selectRole = ref('use');
onBeforeRouteLeave(() => {
})
onMounted(() => {
goBack()
})
function goBack() {
}
const beforeLogin = () => {
if (userStore.getTokenPromise) {
userStore.getTokenPromise.then(() => {
userStore.getUserSystemMenuByRole(selectRole.value).then((res) => {
if (res === true) {
userStore.isGetCurrUserInfo = false;
}
router.push('/')
})
});
} else {
userStore.getUserSystemMenuByRole(selectRole.value).then((res) => {
if (res === true) {
userStore.isGetCurrUserInfo = false;
}
router.push('/')
})
}
}
</script>
<template>
<div class="full-page">
<div class="notfound" v-show="!dialogVisible">
<img style="width: 480px; height: 110px;" src="../../public/swzl_logo.gif">
</div>
<div class="bg-banner" v-if="dialogVisible">
<div id="login-box">
<div class="login_form login-size">
<div class="login-title">选择角色</div>
<div class="row-main">
<div class="per" :class="selectRole == 'use' ? 'selected' : ''" @click="selectRole = 'use'">
<div class="img-use"></div>
<div class="title">数据使用方</div>
</div>
<div class="per" :class="selectRole == 'provider' ? 'selected' : ''" @click="selectRole = 'provider'">
<div class="img-provider"></div>
<div class="title">数据提供方</div>
</div>
<div class="per" :class="selectRole == 'operation' ? 'selected' : ''" @click="selectRole = 'operation'">
<div class="img-operation"></div>
<div class="title">平台运营方</div>
</div>
</div>
<div class="login-footer">
<el-button :loading="loading" ref="loginButton" type="primary" size="large" style="width: 100%;"
@click.prevent="beforeLogin">确认</el-button>
</div>
</div>
</div>
<div class="copyright_text">
<span>Copyright © 2015-2024</span>
<a style="color: #4FA1A4;margin: 0 8px;" href="https://beian.miit.gov.cn" target="_blank">京ICP备2024044205号</a>
<span>北京传世博润科技有限公司</span>
</div>
</div>
</div>
</template>
<style lang="scss" scoped>
.full-page {
height: 100%;
width: 100%;
}
.notfound {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
@include position-center(xy);
.icon {
width: 400px;
height: 400px;
}
.content {
h1 {
margin: 0;
font-size: 72px;
color: var(--el-text-color-primary);
}
.desc {
margin: 20px 0 30px;
font-size: 20px;
color: var(--el-text-color-secondary);
}
}
}
.bg-banner {
// position: fixed;
// z-index: 1001;
width: 100%;
height: 100%;
background-image: url('@/assets/images/login-bg.png');
background-size: cover;
/* 背景图覆盖整个元素 */
background-position: center;
/* 背景图居中 */
background-repeat: no-repeat;
/* 防止背景图重复 */
}
#login-box {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
.login-form {
display: flex;
flex-direction: column;
justify-content: center;
min-height: 500px;
width: 368px;
overflow: hidden;
.title-container {
position: relative;
.title {
font-size: 28px;
color: #212121;
letter-spacing: 0;
text-align: center;
line-height: 42px;
font-weight: 600;
margin-bottom: 32px;
}
}
}
}
.login-title {
font-family: PingFangSC-Semibold;
font-size: 24px;
color: #212121;
letter-spacing: 0;
line-height: 36px;
font-weight: 600;
margin-bottom: 33px;
}
.login_form {
position: relative;
background: #FFFFFF;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.2);
border-radius: 2px;
.row-main {
display: flex;
flex-direction: row;
column-gap: 40px;
.per {
cursor: pointer;
&.selected {
.img-use {
background-image: url('@/assets/images/dataUser-select.png');
}
.img-provider {
background-image: url('@/assets/images/dataProvider-select.png');
}
.img-operation {
background-image: url('@/assets/images/dataOperation-select.png');
}
.title {
color: #1478E9;
}
}
.img-use {
width: 100px;
height: 100px;
background-image: url('@/assets/images/dataUser-default.png');
background-size: cover;
/* 背景图覆盖整个元素 */
background-position: center;
/* 背景图居中 */
background-repeat: no-repeat;
}
.img-provider {
width: 100px;
height: 100px;
background-image: url('@/assets/images/dataProvider-default.png');
background-size: cover;
/* 背景图覆盖整个元素 */
background-position: center;
/* 背景图居中 */
background-repeat: no-repeat;
}
.img-operation {
width: 100px;
height: 100px;
background-image: url('@/assets/images/dataOperation-default.png');
background-size: cover;
/* 背景图覆盖整个元素 */
background-position: center;
/* 背景图居中 */
background-repeat: no-repeat;
}
.title {
margin-top: 8px;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #666666;
line-height: 21px;
font-weight: 400;
text-align: center;
}
}
}
}
.login-size {
padding: 40px 32px;
width: 444px;
height: 420px;
}
.login-footer {
display: flex;
flex-direction: column;
margin-top: 54px;
}
:deep(.el-button--primary) {
background-image: linear-gradient(116deg, #0C48F5 0%, #23D6D1 95%);
}
.copyright_text {
width: 100%;
font-size: 12px;
color: #2c3e50;
line-height: 18px;
text-align: center;
font-weight: 400;
position: absolute;
bottom: 2px;
left: 50%;
transform: translateX(-50%);
}
</style>