yh-pub 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +19 -0
- package/layout/admin/adminIndex.vue +104 -0
- package/layout/admin/api/loginApi.js +24 -0
- package/layout/admin/api/routers.js +93 -0
- package/layout/admin/api/tenantApi.js +123 -0
- package/layout/admin/home/homeIndex.vue +25 -0
- package/layout/admin/login/login.vue +161 -0
- package/layout/admin/menu/MenuIndex.vue +648 -0
- package/layout/admin/menu/icon.vue +108 -0
- package/layout/admin/menu/iconList.js +934 -0
- package/layout/admin/saTenant/saTenant.js +0 -0
- package/layout/admin/saTenant/saTenant.vue +173 -0
- package/layout/admin/saTenant/saTenantForm.js +80 -0
- package/layout/admin/saTenant/saTenantForm.vue +61 -0
- package/layout/admin/saTenant/saTenantRoleManage.js +417 -0
- package/layout/admin/saTenant/saTenantRoleManage.vue +99 -0
- package/layout/admin/user/saUser.less +6 -0
- package/layout/admin/user/saUser.vue +72 -0
- package/layout/main/components/console/console.vue +205 -0
- package/layout/main/components/error-store/error-store.vue +72 -0
- package/layout/main/components/error-store/index.js +2 -0
- package/layout/main/components/fullscreen/fullscreen.vue +57 -0
- package/layout/main/components/fullscreen/index.js +2 -0
- package/layout/main/components/language/language.vue +71 -0
- package/layout/main/components/side-menu/side-menu.less +74 -0
- package/layout/main/components/side-menu/side-menu.vue +75 -0
- package/layout/main/components/tags-nav/tags-nav.less +45 -0
- package/layout/main/components/tags-nav/tags-nav.vue +144 -0
- package/layout/main/components/user/user.less +12 -0
- package/layout/main/components/user/user.vue +185 -0
- package/layout/main/home/home.vue +480 -0
- package/layout/main/home/index.js +2 -0
- package/layout/main/home/toDoList.vue +32 -0
- package/layout/main/login/login.less +93 -0
- package/layout/main/login/login.vue +151 -0
- package/layout/main/main.less +81 -0
- package/layout/main/main.vue +202 -0
- package/layout/main/system/dict.vue +64 -0
- package/layout/main/system/orgManage.vue +473 -0
- package/layout/main/system/roleManage.js +755 -0
- package/layout/main/system/roleManage.vue +399 -0
- package/package.json +12 -0
- package/view/basic/error-logger.vue +74 -0
- package/view/basic/error-page/401.vue +22 -0
- package/view/basic/error-page/404.vue +22 -0
- package/view/basic/error-page/500.vue +22 -0
- package/view/basic/error-page/back-btn-group.vue +48 -0
- package/view/basic/error-page/error-content.vue +28 -0
- package/view/basic/error-page/error.less +46 -0
- package/view/config/component/confFormItem.vue +49 -0
- package/view/config/config.scss +45 -0
- package/view/config/configIndex.vue +150 -0
- package/view/config/subPage/router-config.vue +5 -0
- package/view/config/subPage/sys-config.vue +249 -0
- package/view/window/IframeFReportView.vue +28 -0
- package/view/window/windowIndex.vue +22 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="search">
|
|
3
|
+
<el-row class="operation">
|
|
4
|
+
<div style="padding: 5px 15px 5px 2px; font-size: 13px">角色名称</div>
|
|
5
|
+
<el-input
|
|
6
|
+
v-model="searchForm.key"
|
|
7
|
+
@search="getDataList"
|
|
8
|
+
placeholder="输入关键词搜索"
|
|
9
|
+
style="width: 300px; margin-left: 12px"
|
|
10
|
+
clearable
|
|
11
|
+
enter-button />
|
|
12
|
+
</el-row>
|
|
13
|
+
<el-row class="operation">
|
|
14
|
+
<div style="padding: 5px 15px 5px 2px; font-size: 18px; font-weight: bold">角色管理</div>
|
|
15
|
+
<el-button
|
|
16
|
+
@click="addRole"
|
|
17
|
+
type="primary">
|
|
18
|
+
<i class="iconfont icon-plus"></i>
|
|
19
|
+
添加角色
|
|
20
|
+
</el-button>
|
|
21
|
+
<el-popconfirm
|
|
22
|
+
title="确定要删除所选的角色吗?"
|
|
23
|
+
ok-text="删除"
|
|
24
|
+
cancel-text="取消"
|
|
25
|
+
@confirm="delAll"
|
|
26
|
+
style="margin-left: 12px">
|
|
27
|
+
<el-button>
|
|
28
|
+
<i class="iconfont icon-delete"></i>
|
|
29
|
+
批量删除
|
|
30
|
+
</el-button>
|
|
31
|
+
</el-popconfirm>
|
|
32
|
+
<el-button
|
|
33
|
+
@click="init"
|
|
34
|
+
style="margin-left: 12px">
|
|
35
|
+
<i class="iconfont icon-refresh"></i>
|
|
36
|
+
查询
|
|
37
|
+
</el-button>
|
|
38
|
+
</el-row>
|
|
39
|
+
<el-table
|
|
40
|
+
v-loading="loading"
|
|
41
|
+
row-key="ad_role_id"
|
|
42
|
+
:data="data"
|
|
43
|
+
ref="table"
|
|
44
|
+
highlight-current-row
|
|
45
|
+
:header-cell-style="{ background: '#f8f8f8', color: '#606266', fontSize: '13px' }"
|
|
46
|
+
stripe>
|
|
47
|
+
<el-table-column
|
|
48
|
+
label="#"
|
|
49
|
+
width="50">
|
|
50
|
+
<template #default="scope">{{ scope.$index + 1 }}</template>
|
|
51
|
+
</el-table-column>
|
|
52
|
+
<el-table-column
|
|
53
|
+
label="所属机构"
|
|
54
|
+
min-width="150"
|
|
55
|
+
prop="org_name"></el-table-column>
|
|
56
|
+
<el-table-column
|
|
57
|
+
label="角色名称"
|
|
58
|
+
min-width="300"
|
|
59
|
+
prop="name"></el-table-column>
|
|
60
|
+
<el-table-column
|
|
61
|
+
label="角色管理员"
|
|
62
|
+
min-width="300"
|
|
63
|
+
prop="is_admin"></el-table-column>
|
|
64
|
+
<el-table-column
|
|
65
|
+
label="备注"
|
|
66
|
+
min-width="200"
|
|
67
|
+
prop="description"></el-table-column>
|
|
68
|
+
<el-table-column
|
|
69
|
+
width="300"
|
|
70
|
+
label="操作">
|
|
71
|
+
<template #default="{ row }">
|
|
72
|
+
<el-button
|
|
73
|
+
size="small"
|
|
74
|
+
type="primary"
|
|
75
|
+
@click="editPerm(row)">
|
|
76
|
+
菜单权限
|
|
77
|
+
</el-button>
|
|
78
|
+
<el-button
|
|
79
|
+
size="small"
|
|
80
|
+
type="success"
|
|
81
|
+
@click="editOrg(row)">
|
|
82
|
+
角色机构
|
|
83
|
+
</el-button>
|
|
84
|
+
<el-button
|
|
85
|
+
size="small"
|
|
86
|
+
type="info"
|
|
87
|
+
@click="edit(row)">
|
|
88
|
+
编辑
|
|
89
|
+
</el-button>
|
|
90
|
+
<el-popconfirm
|
|
91
|
+
title="你确定要删除吗"
|
|
92
|
+
ok-text="确定"
|
|
93
|
+
cancel-text="取消"
|
|
94
|
+
@confirm="remove(row)">
|
|
95
|
+
<template #reference>
|
|
96
|
+
<el-button
|
|
97
|
+
title="删除"
|
|
98
|
+
size="small"
|
|
99
|
+
type="danger">
|
|
100
|
+
删除
|
|
101
|
+
</el-button>
|
|
102
|
+
</template>
|
|
103
|
+
</el-popconfirm>
|
|
104
|
+
</template>
|
|
105
|
+
</el-table-column>
|
|
106
|
+
</el-table>
|
|
107
|
+
<el-pagination
|
|
108
|
+
v-model:current-page="pagination.currentPage"
|
|
109
|
+
v-model:page-size="pagination.pageSize"
|
|
110
|
+
:page-sizes="[15, 30, 50, 100]"
|
|
111
|
+
layout="prev, pager, next, sizes, total, jumper"
|
|
112
|
+
:total="pagination.total"
|
|
113
|
+
@size-change="getDataList"
|
|
114
|
+
@current-change="getDataList" />
|
|
115
|
+
<!-- 编辑 -->
|
|
116
|
+
<el-dialog
|
|
117
|
+
:title="modalTitle"
|
|
118
|
+
v-model="roleModalVisible"
|
|
119
|
+
:mask-closable="false"
|
|
120
|
+
@cancel="cancelRole"
|
|
121
|
+
:width="500">
|
|
122
|
+
<el-form
|
|
123
|
+
ref="roleForm"
|
|
124
|
+
:model="roleForm"
|
|
125
|
+
:label-width="100"
|
|
126
|
+
:rules="roleFormValidate">
|
|
127
|
+
<el-form-item
|
|
128
|
+
label="组织机构"
|
|
129
|
+
prop="ad_org_id">
|
|
130
|
+
<dict
|
|
131
|
+
dict="ad_org_id"
|
|
132
|
+
url="/orgController/getGroupOrgs"
|
|
133
|
+
_select_id="2E72E905E55540FA8D2C297A362A2677"
|
|
134
|
+
_field_id="FBDE07DC546E453EABBBA45046FF335A"
|
|
135
|
+
_region_id="0944A00F8A434099BA2D9B6FA46F35F9"
|
|
136
|
+
v-model="roleForm.ad_org_id"
|
|
137
|
+
placeholder="请选择或输入搜索"
|
|
138
|
+
filterable
|
|
139
|
+
clearable />
|
|
140
|
+
</el-form-item>
|
|
141
|
+
<el-form-item
|
|
142
|
+
label="角色名称"
|
|
143
|
+
prop="name">
|
|
144
|
+
<el-input
|
|
145
|
+
v-model="roleForm.name"
|
|
146
|
+
placeholder="请输入" />
|
|
147
|
+
</el-form-item>
|
|
148
|
+
<el-form-item label="角色管理员">
|
|
149
|
+
<el-switch
|
|
150
|
+
v-model="roleForm.isAdmin"
|
|
151
|
+
true-value="Y"
|
|
152
|
+
false-value="N"
|
|
153
|
+
size="large">
|
|
154
|
+
<span slot="Y">Y</span>
|
|
155
|
+
<span slot="N">N</span>
|
|
156
|
+
</el-switch>
|
|
157
|
+
</el-form-item>
|
|
158
|
+
<el-form-item
|
|
159
|
+
label="备注"
|
|
160
|
+
prop="description">
|
|
161
|
+
<el-input v-model="roleForm.description" />
|
|
162
|
+
</el-form-item>
|
|
163
|
+
</el-form>
|
|
164
|
+
<div
|
|
165
|
+
slot="footer"
|
|
166
|
+
style="padding-left: 150px">
|
|
167
|
+
<el-button
|
|
168
|
+
text
|
|
169
|
+
@click="cancelRole">
|
|
170
|
+
取消
|
|
171
|
+
</el-button>
|
|
172
|
+
<el-button
|
|
173
|
+
type="primary"
|
|
174
|
+
:loading="submitLoading"
|
|
175
|
+
@click="submitRole">
|
|
176
|
+
提交
|
|
177
|
+
</el-button>
|
|
178
|
+
</div>
|
|
179
|
+
</el-dialog>
|
|
180
|
+
<!-- 菜单权限 -->
|
|
181
|
+
<el-drawer
|
|
182
|
+
:title="modalTitle"
|
|
183
|
+
v-model="permModalVisible"
|
|
184
|
+
:mask-closable="false"
|
|
185
|
+
:width="800"
|
|
186
|
+
@close="cancelPermEdit">
|
|
187
|
+
<el-row>
|
|
188
|
+
<el-col
|
|
189
|
+
:span="12"
|
|
190
|
+
style="overflow: auto; height: 100%">
|
|
191
|
+
<el-tree
|
|
192
|
+
ref="tree"
|
|
193
|
+
v-loading="treeLoading"
|
|
194
|
+
:data="permData"
|
|
195
|
+
:props="{ label: 'title' }"
|
|
196
|
+
show-checkbox
|
|
197
|
+
default-expand-all
|
|
198
|
+
node-key="adMenuId"
|
|
199
|
+
@current-change="selectTree"
|
|
200
|
+
@check-change="checkedMenuTree"></el-tree>
|
|
201
|
+
</el-col>
|
|
202
|
+
<el-col :span="12">
|
|
203
|
+
<div class="ivu-card-head"><p style="margin-bottom: 0px">按钮权限</p></div>
|
|
204
|
+
<div style="height: 100%; overflow-y: auto; padding: 0 10px">
|
|
205
|
+
<el-card
|
|
206
|
+
v-for="(item, key) in curWindowBtnList"
|
|
207
|
+
:key="key"
|
|
208
|
+
shadow="never"
|
|
209
|
+
style="margin-top: 5px">
|
|
210
|
+
<template #header>
|
|
211
|
+
{{ item.NAME }}
|
|
212
|
+
<el-checkbox
|
|
213
|
+
style="margin-left: 10px"
|
|
214
|
+
:indeterminate="item.indeterminate"
|
|
215
|
+
v-model="item.checkAll"
|
|
216
|
+
:key="item.ID"
|
|
217
|
+
@change="handleCheckAll(item, key)">
|
|
218
|
+
全选
|
|
219
|
+
</el-checkbox>
|
|
220
|
+
</template>
|
|
221
|
+
<el-checkbox-group
|
|
222
|
+
v-model="item.checkChilds"
|
|
223
|
+
:options="
|
|
224
|
+
item.childs.map((item) => {
|
|
225
|
+
return { value: item.ID, label: item.NAME };
|
|
226
|
+
})
|
|
227
|
+
"
|
|
228
|
+
@change="checkAllGroupChange($event, key)">
|
|
229
|
+
<el-checkbox
|
|
230
|
+
v-for="child in item.childs"
|
|
231
|
+
:key="child.ID"
|
|
232
|
+
:label="child.ID">
|
|
233
|
+
{{ child.NAME }}
|
|
234
|
+
</el-checkbox>
|
|
235
|
+
</el-checkbox-group>
|
|
236
|
+
</el-card>
|
|
237
|
+
<el-empty
|
|
238
|
+
description="暂无按钮权限数据"
|
|
239
|
+
v-if="curWindowBtnList.length === 0"></el-empty>
|
|
240
|
+
</div>
|
|
241
|
+
</el-col>
|
|
242
|
+
</el-row>
|
|
243
|
+
<template #footer>
|
|
244
|
+
<el-button
|
|
245
|
+
type="primary"
|
|
246
|
+
:loading="submitPermLoading"
|
|
247
|
+
@click="submitPermEdit">
|
|
248
|
+
提交
|
|
249
|
+
</el-button>
|
|
250
|
+
<el-button
|
|
251
|
+
text
|
|
252
|
+
@click="cancelPermEdit">
|
|
253
|
+
取消
|
|
254
|
+
</el-button>
|
|
255
|
+
</template>
|
|
256
|
+
</el-drawer>
|
|
257
|
+
<!-- 角色机构所属 -->
|
|
258
|
+
<el-dialog
|
|
259
|
+
:title="modalTitle"
|
|
260
|
+
v-model="orgModalVisible"
|
|
261
|
+
:close-on-click-modal="false"
|
|
262
|
+
:width="500"
|
|
263
|
+
class="depModal yh-el-dialog">
|
|
264
|
+
<el-alert
|
|
265
|
+
show-icon
|
|
266
|
+
title="请勾选下方组织机构,选中复选框为角色管理员"></el-alert>
|
|
267
|
+
<div style="margin-top: 15px">
|
|
268
|
+
<div style="position: relative">
|
|
269
|
+
<el-tree
|
|
270
|
+
ref="depTree"
|
|
271
|
+
:data="orgData"
|
|
272
|
+
:props="{ label: 'title' }"
|
|
273
|
+
show-checkbox
|
|
274
|
+
default-expand-all
|
|
275
|
+
node-key="adOrgId"
|
|
276
|
+
check-on-click-node
|
|
277
|
+
:selectedKeys.sync="selectedKeys"
|
|
278
|
+
v-model="deptCheckedKeys"
|
|
279
|
+
@check-change="checkOrgTree"></el-tree>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
<template #footer>
|
|
283
|
+
<el-button
|
|
284
|
+
type="primary"
|
|
285
|
+
:loading="submitDepLoading"
|
|
286
|
+
@click="submitRoleOrg">
|
|
287
|
+
提交
|
|
288
|
+
</el-button>
|
|
289
|
+
<el-button
|
|
290
|
+
text
|
|
291
|
+
@click="orgModalVisible = false">
|
|
292
|
+
取消
|
|
293
|
+
</el-button>
|
|
294
|
+
</template>
|
|
295
|
+
</el-dialog>
|
|
296
|
+
</div>
|
|
297
|
+
</template>
|
|
298
|
+
|
|
299
|
+
<script src="./roleManage.js"></script>
|
|
300
|
+
<style lang="scss">
|
|
301
|
+
.search {
|
|
302
|
+
padding: 10px 0;
|
|
303
|
+
.operation {
|
|
304
|
+
margin-bottom: 2vh;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.select-count {
|
|
308
|
+
font-weight: 600;
|
|
309
|
+
color: #40a9ff;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.select-clear {
|
|
313
|
+
margin-left: 10px;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.page {
|
|
317
|
+
margin-top: 2vh;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.drop-down {
|
|
321
|
+
margin-left: 5px;
|
|
322
|
+
}
|
|
323
|
+
.el-pagination {
|
|
324
|
+
padding: 10px 0;
|
|
325
|
+
justify-content: flex-end;
|
|
326
|
+
}
|
|
327
|
+
.el-drawer__body {
|
|
328
|
+
overflow: hidden;
|
|
329
|
+
.el-row {
|
|
330
|
+
height: 100%;
|
|
331
|
+
overflow: hidden;
|
|
332
|
+
.el-card__header {
|
|
333
|
+
padding: 5px 10px;
|
|
334
|
+
}
|
|
335
|
+
.el-card__body {
|
|
336
|
+
padding: 7px 10px;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.tree-list {
|
|
343
|
+
position: relative;
|
|
344
|
+
min-height: 80px;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.drawer-footer {
|
|
348
|
+
z-index: 10;
|
|
349
|
+
width: 100%;
|
|
350
|
+
position: absolute;
|
|
351
|
+
bottom: 0;
|
|
352
|
+
left: 0;
|
|
353
|
+
border-top: 1px solid #e8e8e8;
|
|
354
|
+
padding: 10px 16px;
|
|
355
|
+
text-align: left;
|
|
356
|
+
background: #fff;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.drawer-footer {
|
|
360
|
+
z-index: 10;
|
|
361
|
+
width: 100%;
|
|
362
|
+
position: absolute;
|
|
363
|
+
bottom: 0;
|
|
364
|
+
left: 0;
|
|
365
|
+
border-top: 1px solid #e8e8e8;
|
|
366
|
+
padding: 10px 16px;
|
|
367
|
+
text-align: left;
|
|
368
|
+
background: #fff;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.drawer-content {
|
|
372
|
+
overflow: auto;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.drawer-header {
|
|
376
|
+
display: flex;
|
|
377
|
+
align-items: center;
|
|
378
|
+
margin-bottom: 16px;
|
|
379
|
+
font-size: 16px;
|
|
380
|
+
color: rgba(0, 0, 0, 0.85);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.drawer-title {
|
|
384
|
+
font-size: 16px;
|
|
385
|
+
color: rgba(0, 0, 0, 0.85);
|
|
386
|
+
display: block;
|
|
387
|
+
margin-bottom: 16px;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.permModal .ivu-modal-body {
|
|
391
|
+
max-height: 560px;
|
|
392
|
+
overflow: auto;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.depModal .ivu-modal-body {
|
|
396
|
+
max-height: 500px;
|
|
397
|
+
overflow: auto;
|
|
398
|
+
}
|
|
399
|
+
</style>
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<a-button
|
|
4
|
+
@click="exportData"
|
|
5
|
+
type="primary"
|
|
6
|
+
style="margin: 0 10px 10px 0">
|
|
7
|
+
导出日志记录
|
|
8
|
+
</a-button>
|
|
9
|
+
<b>注:这里只会显示成功保存到服务端的错误日志,而且页面错误日志不会在浏览器持久化存储,刷新页面即会丢失</b>
|
|
10
|
+
<a-table
|
|
11
|
+
ref="table"
|
|
12
|
+
:columns="columns"
|
|
13
|
+
:data="errorList"></a-table>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import { useAppStore } from "@/store/app";
|
|
19
|
+
import dayjs from "dayjs";
|
|
20
|
+
export default {
|
|
21
|
+
name: "error_logger_page",
|
|
22
|
+
data() {
|
|
23
|
+
return {
|
|
24
|
+
columns: [
|
|
25
|
+
{
|
|
26
|
+
type: "index",
|
|
27
|
+
title: "序号",
|
|
28
|
+
width: 100,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
key: "type",
|
|
32
|
+
title: "类型",
|
|
33
|
+
width: 100,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "code",
|
|
37
|
+
title: "编码",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: "mes",
|
|
41
|
+
title: "信息",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: "url",
|
|
45
|
+
title: "URL",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: "time",
|
|
49
|
+
title: "时间",
|
|
50
|
+
sortable: true,
|
|
51
|
+
sortType: "desc",
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
computed: {
|
|
57
|
+
errorList() {
|
|
58
|
+
return this.$store.state.app.errorList;
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
methods: {
|
|
62
|
+
exportData() {
|
|
63
|
+
this.$refs.table.exportCsv({
|
|
64
|
+
filename: "错误日志.csv",
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
activated() {},
|
|
69
|
+
mounted() {},
|
|
70
|
+
};
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<style></style>
|
|
74
|
+
@/store/app
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<error-content
|
|
3
|
+
code="401"
|
|
4
|
+
desc="Oh~~您没有浏览这个页面的权限~"
|
|
5
|
+
:src="src" />
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import error401 from "@/assets/images/error-page/error-401.svg";
|
|
10
|
+
import errorContent from "./error-content.vue";
|
|
11
|
+
export default {
|
|
12
|
+
name: "error_401",
|
|
13
|
+
components: {
|
|
14
|
+
errorContent,
|
|
15
|
+
},
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
src: error401,
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<error-content
|
|
3
|
+
code="404"
|
|
4
|
+
desc="Oh~~您的页面好像飞走了~"
|
|
5
|
+
:src="src" />
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import error404 from "@/assets/images/error-page/error-404.svg";
|
|
10
|
+
import errorContent from "./error-content.vue";
|
|
11
|
+
export default {
|
|
12
|
+
name: "error_404",
|
|
13
|
+
components: {
|
|
14
|
+
errorContent,
|
|
15
|
+
},
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
src: error404,
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<error-content
|
|
3
|
+
code="500"
|
|
4
|
+
desc="Oh~~鬼知道服务器经历了什么~"
|
|
5
|
+
:src="src" />
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import error404 from "@/assets/images/error-page/error-500.svg";
|
|
10
|
+
import errorContent from "./error-content.vue";
|
|
11
|
+
export default {
|
|
12
|
+
name: "error_500",
|
|
13
|
+
components: {
|
|
14
|
+
errorContent,
|
|
15
|
+
},
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
src: error404,
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-button
|
|
4
|
+
size="large"
|
|
5
|
+
text
|
|
6
|
+
@click="backHome">
|
|
7
|
+
返回首页
|
|
8
|
+
</el-button>
|
|
9
|
+
<el-button
|
|
10
|
+
size="large"
|
|
11
|
+
text
|
|
12
|
+
@click="backPrev">
|
|
13
|
+
返回上一页({{ second }}s)
|
|
14
|
+
</el-button>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import "./error.less";
|
|
20
|
+
export default {
|
|
21
|
+
name: "backBtnGroup",
|
|
22
|
+
data() {
|
|
23
|
+
return {
|
|
24
|
+
second: 5,
|
|
25
|
+
timer: null,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
methods: {
|
|
29
|
+
backHome() {
|
|
30
|
+
this.$router.replace({
|
|
31
|
+
name: this.$config.homeName,
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
backPrev() {
|
|
35
|
+
this.$router.go(-1);
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
mounted() {
|
|
39
|
+
this.timer = setInterval(() => {
|
|
40
|
+
if (this.second === 0) this.backPrev();
|
|
41
|
+
else this.second--;
|
|
42
|
+
}, 1000);
|
|
43
|
+
},
|
|
44
|
+
beforeUnmount() {
|
|
45
|
+
clearInterval(this.timer);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="error-page">
|
|
3
|
+
<div class="content-con">
|
|
4
|
+
<img :src="src" :alt="code">
|
|
5
|
+
<div class="text-con">
|
|
6
|
+
<h4>{{ code }}</h4>
|
|
7
|
+
<h5>{{ desc }}</h5>
|
|
8
|
+
</div>
|
|
9
|
+
<back-btn-group class="back-btn-group"></back-btn-group>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import './error.less'
|
|
16
|
+
import backBtnGroup from './back-btn-group.vue'
|
|
17
|
+
export default {
|
|
18
|
+
name: 'error_content',
|
|
19
|
+
components: {
|
|
20
|
+
backBtnGroup
|
|
21
|
+
},
|
|
22
|
+
props: {
|
|
23
|
+
code: String,
|
|
24
|
+
desc: String,
|
|
25
|
+
src: String
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.error-page{
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
position: relative;
|
|
5
|
+
background: #f8f8f9;
|
|
6
|
+
.content-con{
|
|
7
|
+
width: 700px;
|
|
8
|
+
height: 600px;
|
|
9
|
+
position: absolute;
|
|
10
|
+
left: 50%;
|
|
11
|
+
top: 50%;
|
|
12
|
+
transform: translate(-50%, -60%);
|
|
13
|
+
img{
|
|
14
|
+
display: block;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
.text-con{
|
|
19
|
+
position: absolute;
|
|
20
|
+
left: 0px;
|
|
21
|
+
top: 0px;
|
|
22
|
+
h4{
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: 0px;
|
|
25
|
+
top: 0px;
|
|
26
|
+
font-size: 80px;
|
|
27
|
+
font-weight: 700;
|
|
28
|
+
color: #348EED;
|
|
29
|
+
}
|
|
30
|
+
h5{
|
|
31
|
+
position: absolute;
|
|
32
|
+
width: 700px;
|
|
33
|
+
left: 0px;
|
|
34
|
+
top: 100px;
|
|
35
|
+
font-size: 20px;
|
|
36
|
+
font-weight: 700;
|
|
37
|
+
color: #67647D;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
.back-btn-group{
|
|
41
|
+
position: absolute;
|
|
42
|
+
right: 0px;
|
|
43
|
+
bottom: 20px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|