haiwei-module-admin 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/package.json +54 -0
- package/src/api/components/account.js +58 -0
- package/src/api/components/auditInfo.js +30 -0
- package/src/api/components/auth.js +47 -0
- package/src/api/components/cache.js +16 -0
- package/src/api/components/config.js +34 -0
- package/src/api/components/file.js +41 -0
- package/src/api/components/log.js +22 -0
- package/src/api/components/menu.js +68 -0
- package/src/api/components/mime.js +10 -0
- package/src/api/components/module.js +18 -0
- package/src/api/components/permission.js +25 -0
- package/src/api/components/role.js +73 -0
- package/src/api/components/tool.js +29 -0
- package/src/api/index.js +13 -0
- package/src/components/config-admin/index.vue +47 -0
- package/src/components/enum-checkbox/index.vue +31 -0
- package/src/components/enum-radio/index.vue +31 -0
- package/src/components/enum-select/index.vue +31 -0
- package/src/components/file-download/index.vue +81 -0
- package/src/components/file-img/index.vue +55 -0
- package/src/components/file-upload/index.vue +140 -0
- package/src/components/file-upload-img/index.vue +263 -0
- package/src/components/index.js +10 -0
- package/src/components/login-mode-select/index.vue +11 -0
- package/src/components/module-select/index.vue +11 -0
- package/src/components/platform-select/index.vue +28 -0
- package/src/components/role-select/index.vue +11 -0
- package/src/components/upload-mixins.js +127 -0
- package/src/config/index.js +18 -0
- package/src/index.js +69 -0
- package/src/main.js +5 -0
- package/src/module.js +10 -0
- package/src/routes/index.js +3 -0
- package/src/store/index.js +4 -0
- package/src/views/account/components/save/index.vue +65 -0
- package/src/views/account/index/cols.js +50 -0
- package/src/views/account/index/index.vue +127 -0
- package/src/views/account/index/page.js +57 -0
- package/src/views/auditInfo/components/details/index.vue +64 -0
- package/src/views/auditInfo/index/cols.js +63 -0
- package/src/views/auditInfo/index/index.vue +118 -0
- package/src/views/auditInfo/index/page.js +34 -0
- package/src/views/button/permission-bind/index.vue +50 -0
- package/src/views/cache/index/cols.js +10 -0
- package/src/views/cache/index/index.vue +64 -0
- package/src/views/cache/index/page.js +29 -0
- package/src/views/config/index.vue +43 -0
- package/src/views/config/library/components/auth/index.vue +165 -0
- package/src/views/config/library/components/component/index.vue +149 -0
- package/src/views/config/library/components/path/index.vue +45 -0
- package/src/views/config/library/components/quartz/index.vue +66 -0
- package/src/views/config/library/components/system/index.vue +58 -0
- package/src/views/config/library/form-mixins.js +25 -0
- package/src/views/config/library/index.vue +76 -0
- package/src/views/config/module/index.vue +64 -0
- package/src/views/config/page.js +21 -0
- package/src/views/file/index/cols.js +53 -0
- package/src/views/file/index/index.vue +52 -0
- package/src/views/file/index/page.js +42 -0
- package/src/views/home/components/bottom/index.vue +217 -0
- package/src/views/home/components/top-left/index.vue +43 -0
- package/src/views/home/components/top-right/index.vue +148 -0
- package/src/views/home/index.vue +27 -0
- package/src/views/home/page.js +15 -0
- package/src/views/icon/index.vue +92 -0
- package/src/views/icon/page.js +15 -0
- package/src/views/log/login-log/cols.js +43 -0
- package/src/views/log/login-log/index.vue +86 -0
- package/src/views/log/login-log/page.js +27 -0
- package/src/views/menu/components/add/components/link/index.vue +106 -0
- package/src/views/menu/components/add/components/mixins.js +83 -0
- package/src/views/menu/components/add/components/node/index.vue +53 -0
- package/src/views/menu/components/add/components/route/index.vue +122 -0
- package/src/views/menu/components/add/index.vue +86 -0
- package/src/views/menu/components/edit/components/link/index.vue +106 -0
- package/src/views/menu/components/edit/components/mixins.js +80 -0
- package/src/views/menu/components/edit/components/node/index.vue +53 -0
- package/src/views/menu/components/edit/components/route/index.vue +122 -0
- package/src/views/menu/components/edit/index.vue +95 -0
- package/src/views/menu/components/tree/index.vue +153 -0
- package/src/views/menu/index/cols.js +46 -0
- package/src/views/menu/index/index.vue +175 -0
- package/src/views/menu/index/page.js +48 -0
- package/src/views/mime/components/save/index.vue +45 -0
- package/src/views/mime/index/cols.js +16 -0
- package/src/views/mime/index/index.vue +55 -0
- package/src/views/mime/index/page.js +42 -0
- package/src/views/module/components/page-list/index.vue +234 -0
- package/src/views/module/components/permission-list/cols.js +36 -0
- package/src/views/module/components/permission-list/index.vue +90 -0
- package/src/views/module/index/index.vue +226 -0
- package/src/views/module/index/page.js +21 -0
- package/src/views/role/components/menu-bind/index.vue +85 -0
- package/src/views/role/components/page-bind/index.vue +221 -0
- package/src/views/role/components/platform-bind/index.vue +105 -0
- package/src/views/role/components/save/index.vue +45 -0
- package/src/views/role/components/tree/index.vue +112 -0
- package/src/views/role/index/index.vue +67 -0
- package/src/views/role/index/page.js +64 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nm-box header title="柱状图" icon="chart-bar">
|
|
3
|
+
<template v-slot:toolbar-before>
|
|
4
|
+
<el-date-picker
|
|
5
|
+
size="mini"
|
|
6
|
+
style="width: 221px !important;"
|
|
7
|
+
v-model="date"
|
|
8
|
+
type="daterange"
|
|
9
|
+
align="right"
|
|
10
|
+
valueFormat="yyyy-MM-dd"
|
|
11
|
+
range-separator="至"
|
|
12
|
+
start-placeholder="开始日期"
|
|
13
|
+
end-placeholder="结束日期"
|
|
14
|
+
></el-date-picker>
|
|
15
|
+
</template>
|
|
16
|
+
<template v-slot:toolbar>
|
|
17
|
+
<nm-button icon="refresh" />
|
|
18
|
+
</template>
|
|
19
|
+
<div ref="chart" style="width:100%;height:100%"></div>
|
|
20
|
+
</nm-box>
|
|
21
|
+
</template>
|
|
22
|
+
<script>
|
|
23
|
+
export default {
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
chart: null,
|
|
27
|
+
date: [],
|
|
28
|
+
xData: ['芝罘区', '福山区', '莱山区', '牟平区', '海阳市', '莱阳市', '蓬莱市', '栖霞市', '龙口市', '长岛县', '招远市', '莱州市', '开发区', '高新区', '昆嵛山', '龙海', '机场', '核电'],
|
|
29
|
+
y1Data: [10758, 3975, 2980, 1831, 2122, 3018, 3525, 1729, 2764, 380, 3988, 2333, 3596, 453, 365, 9, 67, 48],
|
|
30
|
+
y2Data: [28, 4.4, 5.9, 0.9, 0.7, 1.1, 2.1, 0.4, 1.9, 3.8, 1.6, 0.7, 5.7, 6.1]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
computed: {
|
|
34
|
+
options() {
|
|
35
|
+
return {
|
|
36
|
+
grid: {
|
|
37
|
+
left: '5%',
|
|
38
|
+
right: '5%',
|
|
39
|
+
top: '20%',
|
|
40
|
+
bottom: '10%'
|
|
41
|
+
},
|
|
42
|
+
title: {
|
|
43
|
+
show: false
|
|
44
|
+
},
|
|
45
|
+
tooltip: {
|
|
46
|
+
trigger: 'axis',
|
|
47
|
+
axisPointer: {
|
|
48
|
+
type: 'shadow'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
legend: {
|
|
52
|
+
data: ['监控数量', '监控密度'],
|
|
53
|
+
right: '3%',
|
|
54
|
+
top: '5%',
|
|
55
|
+
itemWidth: 11,
|
|
56
|
+
itemHeight: 11,
|
|
57
|
+
textStyle: {
|
|
58
|
+
fontSize: 13
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
toolbox: {
|
|
62
|
+
show: false
|
|
63
|
+
},
|
|
64
|
+
xAxis: [
|
|
65
|
+
{
|
|
66
|
+
type: 'category',
|
|
67
|
+
boundaryGap: true,
|
|
68
|
+
show: true,
|
|
69
|
+
axisTick: {
|
|
70
|
+
show: false
|
|
71
|
+
},
|
|
72
|
+
axisLabel: {
|
|
73
|
+
fontSize: 15,
|
|
74
|
+
margin: 8,
|
|
75
|
+
interval: 0,
|
|
76
|
+
formatter: function(val) {
|
|
77
|
+
return val.split('').join('\n')
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
axisLine: {
|
|
81
|
+
lineStyle: {
|
|
82
|
+
type: 'solid',
|
|
83
|
+
color: '#4e608b',
|
|
84
|
+
width: '1'
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
data: this.xData
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
yAxis: [
|
|
91
|
+
{
|
|
92
|
+
type: 'value',
|
|
93
|
+
scale: true,
|
|
94
|
+
name: '',
|
|
95
|
+
axisLine: {
|
|
96
|
+
show: false
|
|
97
|
+
},
|
|
98
|
+
splitNumber: 4,
|
|
99
|
+
axisTick: {
|
|
100
|
+
show: false
|
|
101
|
+
},
|
|
102
|
+
splitLine: {
|
|
103
|
+
lineStyle: {
|
|
104
|
+
// 使用深浅的间隔色
|
|
105
|
+
color: '#4e608b'
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
axisLabel: {
|
|
109
|
+
fontSize: 13,
|
|
110
|
+
margin: 12
|
|
111
|
+
},
|
|
112
|
+
max: 12000,
|
|
113
|
+
min: 0,
|
|
114
|
+
boundaryGap: [0.2, 0.2]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: 'value',
|
|
118
|
+
scale: true,
|
|
119
|
+
axisLine: {
|
|
120
|
+
show: false
|
|
121
|
+
},
|
|
122
|
+
splitNumber: 3,
|
|
123
|
+
axisTick: {
|
|
124
|
+
show: false
|
|
125
|
+
},
|
|
126
|
+
axisLabel: {
|
|
127
|
+
fontSize: 13,
|
|
128
|
+
margin: 12
|
|
129
|
+
},
|
|
130
|
+
splitLine: {
|
|
131
|
+
lineStyle: {
|
|
132
|
+
// 使用深浅的间隔色
|
|
133
|
+
color: '#4e608b'
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
name: '',
|
|
137
|
+
max: 30,
|
|
138
|
+
min: 0,
|
|
139
|
+
boundaryGap: [0.2, 0.2]
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
series: [
|
|
143
|
+
{
|
|
144
|
+
name: '监控数量',
|
|
145
|
+
type: 'bar',
|
|
146
|
+
label: {
|
|
147
|
+
normal: {
|
|
148
|
+
show: true,
|
|
149
|
+
position: 'top',
|
|
150
|
+
textStyle: {
|
|
151
|
+
color: '#1dacfe'
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
itemStyle: {
|
|
156
|
+
normal: {
|
|
157
|
+
color: new this.$echarts.graphic.LinearGradient(
|
|
158
|
+
0,
|
|
159
|
+
1,
|
|
160
|
+
0,
|
|
161
|
+
0,
|
|
162
|
+
[
|
|
163
|
+
{
|
|
164
|
+
offset: 0,
|
|
165
|
+
color: '#4889fb' // 0% 处的颜色
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
offset: 1,
|
|
169
|
+
color: '#15b3ff' // 100% 处的颜色
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
false
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
barWidth: '40%',
|
|
177
|
+
yAxisIndex: 0,
|
|
178
|
+
data: this.y1Data
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: '监控密度',
|
|
182
|
+
yAxisIndex: 1,
|
|
183
|
+
color: '#ffd300',
|
|
184
|
+
label: {
|
|
185
|
+
normal: {
|
|
186
|
+
show: true,
|
|
187
|
+
position: 'top',
|
|
188
|
+
textStyle: {
|
|
189
|
+
color: '#ffd300'
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
lineStyle: {
|
|
194
|
+
color: '#ffd300'
|
|
195
|
+
},
|
|
196
|
+
type: 'line',
|
|
197
|
+
data: this.y2Data
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
methods: {
|
|
204
|
+
init() {
|
|
205
|
+
let chart = this.$echarts.init(this.$refs.chart)
|
|
206
|
+
this.chart = chart
|
|
207
|
+
this.chart.setOption(this.options)
|
|
208
|
+
window.addEventListener('resize', function() {
|
|
209
|
+
chart.resize()
|
|
210
|
+
})
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
mounted() {
|
|
214
|
+
this.init()
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
</script>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nm-box v-bind="box">
|
|
3
|
+
<template v-slot:toolbar>
|
|
4
|
+
<nm-button icon="refresh" @click="refresh" />
|
|
5
|
+
</template>
|
|
6
|
+
<ve-line :data="chartData"></ve-line>
|
|
7
|
+
</nm-box>
|
|
8
|
+
</template>
|
|
9
|
+
<script>
|
|
10
|
+
// 接口
|
|
11
|
+
const api = $api.admin.auditInfo
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
box: {
|
|
17
|
+
title: '最近一周审计日志数量',
|
|
18
|
+
icon: 'chart-line',
|
|
19
|
+
header: true,
|
|
20
|
+
border: true
|
|
21
|
+
},
|
|
22
|
+
chartData: {
|
|
23
|
+
columns: ['日期', '数量'],
|
|
24
|
+
rows: []
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
methods: {
|
|
29
|
+
async refresh() {
|
|
30
|
+
this.chartData.rows = []
|
|
31
|
+
const data = await api.queryLatestWeekPv()
|
|
32
|
+
let rows = []
|
|
33
|
+
data.map(m => {
|
|
34
|
+
rows.push({ 日期: m.key, 数量: m.value })
|
|
35
|
+
})
|
|
36
|
+
this.chartData.rows = rows
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
created() {
|
|
40
|
+
this.refresh()
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nm-box header title="折线图" icon="chart-line">
|
|
3
|
+
<template v-slot:toolbar-before>
|
|
4
|
+
<el-date-picker
|
|
5
|
+
size="mini"
|
|
6
|
+
style="width: 221px !important;"
|
|
7
|
+
v-model="date"
|
|
8
|
+
type="daterange"
|
|
9
|
+
align="right"
|
|
10
|
+
valueFormat="yyyy-MM-dd"
|
|
11
|
+
range-separator="至"
|
|
12
|
+
start-placeholder="开始日期"
|
|
13
|
+
end-placeholder="结束日期"
|
|
14
|
+
></el-date-picker>
|
|
15
|
+
</template>
|
|
16
|
+
<template v-slot:toolbar>
|
|
17
|
+
<nm-button icon="refresh" />
|
|
18
|
+
</template>
|
|
19
|
+
<div ref="chart" style="width:100%;height:100%"></div>
|
|
20
|
+
</nm-box>
|
|
21
|
+
</template>
|
|
22
|
+
<script>
|
|
23
|
+
export default {
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
chart: null,
|
|
27
|
+
date: []
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
computed: {
|
|
31
|
+
options() {
|
|
32
|
+
return {
|
|
33
|
+
backgroundColor: '#FFF',
|
|
34
|
+
grid: {
|
|
35
|
+
top: '9%',
|
|
36
|
+
bottom: '19%',
|
|
37
|
+
left: '6%',
|
|
38
|
+
right: '4%'
|
|
39
|
+
},
|
|
40
|
+
tooltip: {
|
|
41
|
+
trigger: 'axis',
|
|
42
|
+
label: {
|
|
43
|
+
show: true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
xAxis: {
|
|
47
|
+
boundaryGap: true, // 默认,坐标轴留白策略
|
|
48
|
+
axisLine: {
|
|
49
|
+
show: false
|
|
50
|
+
},
|
|
51
|
+
splitLine: {
|
|
52
|
+
show: false
|
|
53
|
+
},
|
|
54
|
+
axisTick: {
|
|
55
|
+
show: false,
|
|
56
|
+
alignWithLabel: true
|
|
57
|
+
},
|
|
58
|
+
data: ['武汉', '襄阳', '黄冈', '荆门', '十堰', '随州', '鄂州', '恩施', '宜昌', '孝感', '咸宁', '仙桃', '潜江', '天门', '黄石', '荆州', '神农架']
|
|
59
|
+
},
|
|
60
|
+
yAxis: {
|
|
61
|
+
axisLine: {
|
|
62
|
+
show: false
|
|
63
|
+
},
|
|
64
|
+
splitLine: {
|
|
65
|
+
show: true,
|
|
66
|
+
lineStyle: {
|
|
67
|
+
type: 'dashed',
|
|
68
|
+
color: 'rgba(33,148,246,0.2)'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
axisTick: {
|
|
72
|
+
show: false
|
|
73
|
+
},
|
|
74
|
+
splitArea: {
|
|
75
|
+
show: true,
|
|
76
|
+
areaStyle: {
|
|
77
|
+
color: 'rgb(245,250,254)'
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
series: [
|
|
82
|
+
{
|
|
83
|
+
type: 'line',
|
|
84
|
+
symbol: 'circle',
|
|
85
|
+
symbolSize: 7,
|
|
86
|
+
lineStyle: {
|
|
87
|
+
color: 'rgb(33,148,246)',
|
|
88
|
+
shadowBlur: 12,
|
|
89
|
+
shadowColor: 'rgb(33,148,246,0.9)',
|
|
90
|
+
shadowOffsetX: 1,
|
|
91
|
+
shadowOffsetY: 1
|
|
92
|
+
},
|
|
93
|
+
itemStyle: {
|
|
94
|
+
color: 'rgb(33,148,246)',
|
|
95
|
+
borderWidth: 1,
|
|
96
|
+
borderColor: '#FFF'
|
|
97
|
+
},
|
|
98
|
+
label: {
|
|
99
|
+
show: false,
|
|
100
|
+
distance: 1,
|
|
101
|
+
emphasis: {
|
|
102
|
+
show: true,
|
|
103
|
+
offset: [25, -2],
|
|
104
|
+
color: '#FFF',
|
|
105
|
+
padding: [8, 20, 8, 6],
|
|
106
|
+
// width:60,
|
|
107
|
+
height: 36,
|
|
108
|
+
formatter: function(params) {
|
|
109
|
+
var name = params.name
|
|
110
|
+
var value = params.data
|
|
111
|
+
var str = name + '\n数据量:' + value
|
|
112
|
+
return str
|
|
113
|
+
},
|
|
114
|
+
rich: {
|
|
115
|
+
bg: {
|
|
116
|
+
width: 78,
|
|
117
|
+
// height:42,
|
|
118
|
+
color: '#FFF',
|
|
119
|
+
padding: [20, 0, 20, 10]
|
|
120
|
+
},
|
|
121
|
+
br: {
|
|
122
|
+
width: '100%',
|
|
123
|
+
height: '100%'
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
data: [2000, 1800, 2800, 900, 1600, 2000, 3000, 2030, 1356, 1900, 4000, 3000, 2000, 3000, 4200, 3200, 3800]
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
methods: {
|
|
135
|
+
init() {
|
|
136
|
+
let chart = this.$echarts.init(this.$refs.chart)
|
|
137
|
+
this.chart = chart
|
|
138
|
+
this.chart.setOption(this.options)
|
|
139
|
+
window.addEventListener('resize', function() {
|
|
140
|
+
chart.resize()
|
|
141
|
+
})
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
mounted() {
|
|
145
|
+
this.init()
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
</script>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nm-container scrollbar>
|
|
3
|
+
<nm-box-row height="400px">
|
|
4
|
+
<nm-box-col :span="12">
|
|
5
|
+
<top-left />
|
|
6
|
+
</nm-box-col>
|
|
7
|
+
<nm-box-col :span="12">
|
|
8
|
+
<top-right />
|
|
9
|
+
</nm-box-col>
|
|
10
|
+
</nm-box-row>
|
|
11
|
+
<nm-box-row height="500px">
|
|
12
|
+
<nm-box-col :span="24">
|
|
13
|
+
<bottom />
|
|
14
|
+
</nm-box-col>
|
|
15
|
+
</nm-box-row>
|
|
16
|
+
</nm-container>
|
|
17
|
+
</template>
|
|
18
|
+
<script>
|
|
19
|
+
import page from './page'
|
|
20
|
+
import TopLeft from './components/top-left'
|
|
21
|
+
import TopRight from './components/top-right'
|
|
22
|
+
import Bottom from './components/bottom'
|
|
23
|
+
export default {
|
|
24
|
+
name: page.name,
|
|
25
|
+
components: { TopLeft, TopRight, Bottom }
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 页面信息 */
|
|
2
|
+
const page = new (function() {
|
|
3
|
+
this.title = '首页'
|
|
4
|
+
this.icon = 'home'
|
|
5
|
+
this.name = 'home'
|
|
6
|
+
this.path = '/admin/home'
|
|
7
|
+
this.icon = 'home'
|
|
8
|
+
})()
|
|
9
|
+
|
|
10
|
+
export const route = {
|
|
11
|
+
page,
|
|
12
|
+
component: () => import('./index')
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default page
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nm-container>
|
|
3
|
+
<nm-box v-bind="box">
|
|
4
|
+
<template v-slot:toolbar>
|
|
5
|
+
<el-color-picker v-model="color" size="small" style="position: absolute;top:3px;left:-40px" />
|
|
6
|
+
<el-input class="nm-icon-picker-panel-filter" v-model="filter" placeholder="请输入英文或中文名称" clearable></el-input>
|
|
7
|
+
</template>
|
|
8
|
+
<div v-for="icon in filterList" :key="icon" class="nm-admin-icon-item">
|
|
9
|
+
<div class="icon">
|
|
10
|
+
<nm-icon :name="icon" :style="{ color }" />
|
|
11
|
+
</div>
|
|
12
|
+
<span class="text">{{ icon }}</span>
|
|
13
|
+
</div>
|
|
14
|
+
</nm-box>
|
|
15
|
+
</nm-container>
|
|
16
|
+
</template>
|
|
17
|
+
<script>
|
|
18
|
+
import page from './page'
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: page.name,
|
|
22
|
+
data() {
|
|
23
|
+
return {
|
|
24
|
+
list: [],
|
|
25
|
+
color: '#333',
|
|
26
|
+
filter: '',
|
|
27
|
+
box: {
|
|
28
|
+
header: true,
|
|
29
|
+
title: '图标',
|
|
30
|
+
icon: 'icon',
|
|
31
|
+
page: true,
|
|
32
|
+
fullscreen: true
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
computed: {
|
|
37
|
+
filterList() {
|
|
38
|
+
if (!this.filter) {
|
|
39
|
+
return this.list
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let list = []
|
|
43
|
+
this.list.forEach(icon => {
|
|
44
|
+
if (icon.indexOf(this.filter) > -1 || icon.indexOf(this.filter) > -1) {
|
|
45
|
+
list.push(icon)
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
return list
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
created() {
|
|
52
|
+
var symbols = document.querySelectorAll('body>svg>symbol')
|
|
53
|
+
symbols.forEach(m => {
|
|
54
|
+
this.list.push(m.id.replace('icon-', ''))
|
|
55
|
+
})
|
|
56
|
+
},
|
|
57
|
+
destroyed() {
|
|
58
|
+
this.list = null
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
62
|
+
<style lang="scss">
|
|
63
|
+
.nm-admin-icon-item {
|
|
64
|
+
margin: 5px;
|
|
65
|
+
padding: 5px;
|
|
66
|
+
text-align: center;
|
|
67
|
+
width: 80px;
|
|
68
|
+
height: 80px;
|
|
69
|
+
border: 1px solid #ccc;
|
|
70
|
+
float: left;
|
|
71
|
+
.icon {
|
|
72
|
+
margin: 3px 0 10px 0;
|
|
73
|
+
font-size: 2.5em;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
transition: all 0.25s ease-in;
|
|
76
|
+
|
|
77
|
+
&:hover {
|
|
78
|
+
transform: scale(1.2);
|
|
79
|
+
color: #f39c12;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.text,
|
|
84
|
+
.code {
|
|
85
|
+
display: block;
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
}
|
|
88
|
+
.text {
|
|
89
|
+
margin-bottom: 3px;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 页面信息 */
|
|
2
|
+
const page = new (function() {
|
|
3
|
+
this.title = '图标预览'
|
|
4
|
+
this.icon = 'icon'
|
|
5
|
+
this.name = 'admin_icon'
|
|
6
|
+
this.path = '/admin/icon'
|
|
7
|
+
})()
|
|
8
|
+
|
|
9
|
+
/** 路由信息 */
|
|
10
|
+
export const route = {
|
|
11
|
+
page,
|
|
12
|
+
component: () => import(/* webpackChunkName: "admin.icon" */ './index')
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default page
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
name: 'id',
|
|
4
|
+
label: '编号',
|
|
5
|
+
show: false
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
name: 'platformName',
|
|
9
|
+
label: '登录平台'
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: 'loginModeName',
|
|
13
|
+
label: '登录方式'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'userName',
|
|
17
|
+
label: '用户名'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'email',
|
|
21
|
+
label: '邮箱'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'phone',
|
|
25
|
+
label: '手机号'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'loginTime',
|
|
29
|
+
label: '登录时间'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'ip',
|
|
33
|
+
label: 'IP'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'success',
|
|
37
|
+
label: '结果'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'userAgent',
|
|
41
|
+
label: 'UA'
|
|
42
|
+
}
|
|
43
|
+
]
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nm-container>
|
|
3
|
+
<nm-list ref="list" v-bind="list">
|
|
4
|
+
<!--查询条件-->
|
|
5
|
+
<template v-slot:querybar>
|
|
6
|
+
<el-form-item label="账户编号:" prop="accountId">
|
|
7
|
+
<el-input v-model="list.model.accountId" clearable />
|
|
8
|
+
</el-form-item>
|
|
9
|
+
<el-form-item label="登录平台:" prop="platform">
|
|
10
|
+
<nm-platform-select v-model="list.model.platform" clearable />
|
|
11
|
+
</el-form-item>
|
|
12
|
+
<el-form-item label="登录方式:" prop="loginMode">
|
|
13
|
+
<nm-login-mode-select v-model="list.model.loginMode" clearable />
|
|
14
|
+
</el-form-item>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<template v-slot:header-toolbar>
|
|
18
|
+
<nm-date-range-picker size="mini" :start.sync="list.model.startDate" :end.sync="list.model.endDate" @change="refresh" />
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<template v-slot:col-success="{ row }">
|
|
22
|
+
<el-tag v-if="row.success" type="success" effect="dark" size="mini">成功</el-tag>
|
|
23
|
+
<el-tooltip v-else effect="dark" :content="row.error" placement="top">
|
|
24
|
+
<el-tag type="danger" effect="dark" size="mini">失败</el-tag>
|
|
25
|
+
</el-tooltip>
|
|
26
|
+
</template>
|
|
27
|
+
</nm-list>
|
|
28
|
+
</nm-container>
|
|
29
|
+
</template>
|
|
30
|
+
<script>
|
|
31
|
+
import page from './page'
|
|
32
|
+
import cols from './cols'
|
|
33
|
+
|
|
34
|
+
// 接口
|
|
35
|
+
const api = $api.admin.log
|
|
36
|
+
|
|
37
|
+
export default {
|
|
38
|
+
name: page.name,
|
|
39
|
+
data() {
|
|
40
|
+
return {
|
|
41
|
+
list: {
|
|
42
|
+
title: page.title,
|
|
43
|
+
action: api.queryLogin,
|
|
44
|
+
noOperation: true,
|
|
45
|
+
model: {
|
|
46
|
+
accountId: '',
|
|
47
|
+
platform: '',
|
|
48
|
+
loginMode: '',
|
|
49
|
+
startDate: null,
|
|
50
|
+
endDate: null
|
|
51
|
+
},
|
|
52
|
+
cols,
|
|
53
|
+
/**导出配置 */
|
|
54
|
+
exportOptions: {
|
|
55
|
+
/**启用导出按钮 */
|
|
56
|
+
enabled: true,
|
|
57
|
+
/**导出数据的方法 */
|
|
58
|
+
action: api.exportLogin,
|
|
59
|
+
/**启用高级配置 */
|
|
60
|
+
advanced: true,
|
|
61
|
+
/**导出按钮位置 */
|
|
62
|
+
btnLocation: 'querybar',
|
|
63
|
+
/**导出按钮权限编码 */
|
|
64
|
+
btnCode: page.buttons.export.code,
|
|
65
|
+
/**默认是否显示标题 */
|
|
66
|
+
showTitle: true,
|
|
67
|
+
/**默认是否显示版权信息 */
|
|
68
|
+
showCopyright: true,
|
|
69
|
+
/**默认是否显示列名 */
|
|
70
|
+
showColName: true,
|
|
71
|
+
/**默认是否显示导出日期 */
|
|
72
|
+
showExportDate: true,
|
|
73
|
+
/**默认是否显示导出人 */
|
|
74
|
+
showExportPeople: true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
buttons: page.buttons
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
refresh() {
|
|
82
|
+
this.$refs.list.refresh()
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</script>
|