index.vue
5.78 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
<template>
<div class="app-container">
<el-form ref="form" :model="form" label-width="68px" inline>
<el-form-item label="菜单名称" size="small">
<el-input v-model="form.name" placeholder="请输入菜单名称"></el-input>
</el-form-item>
<el-form-item label="状态" size="small">
<el-select v-model="form.region" placeholder="菜单状态">
<el-option label="正常" value="1"></el-option>
<el-option label="停用" value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item size="small">
<el-button size="small" type="primary" icon="el-icon-search" @click="onSubmit">搜索</el-button>
<el-button size="small" icon="el-icon-refresh">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="5" class="mb8">
<el-col :span="1.5">
<el-button size="small" type="primary" icon="el-icon-plus">新增</el-button>
</el-col>
<div class="top-right-btn">
<el-row>
<el-tooltip class="item" effect="dark" content="隐藏搜索" placement="top">
<el-button icon="el-icon-search" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
<el-button icon="el-icon-refresh" circle></el-button>
</el-tooltip>
</el-row>
</div>
</el-row>
<el-table
:data="tableData"
:header-cell-style="{background:'#F8F8F9',color:'#515A6E'}"
style="width: 100%;"
row-key="id"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column
prop="date"
label="菜单名称"
>
</el-table-column>
<el-table-column
prop="name"
label="图标"
header-align="center" align="center">
</el-table-column>
<el-table-column
prop="address"
label="排序" header-align="center" align="center">
</el-table-column>
<el-table-column
prop="address"
label="权限标识">
</el-table-column>
<el-table-column
prop="address"
label="组件路径">
</el-table-column>
<el-table-column
prop="address"
label="状态" header-align="center" align="center">
</el-table-column>
<el-table-column
prop="address"
label="创建时间"
header-align="center" align="center"
>
</el-table-column>
<el-table-column
prop="address"
label="操作" header-align="center" align="center">
</el-table-column>
</el-table>
<div class="pagination-container">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage4"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="100"
layout="total, sizes, prev, pager, next, jumper"
:total="100"
></el-pagination>
</div>
</div>
</template>
<script>
export default {
data() {
return {
form: {},
tableData: [{
id: 1,
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄',
children: [{
id: 11,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
children: [{
id: 111,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
}]
}, {
id: 12,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
children: [{
id: 121,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
}]
}]
}, {
id: 2,
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄',
children: [{
id: 21,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
children: [{
id: 211,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
}]
}, {
id: 22,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
children: [{
id: 221,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
}]
}]
}, {
id: 3,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
children: [{
id: 31,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
children: [{
id: 311,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
}]
}, {
id: 32,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
children: [{
id: 321,
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄',
}]
}]
}],
};
},
};
</script>
<style lang="scss">
</style>