日志管理页面修改
Showing
1 changed file
with
17 additions
and
6 deletions
1 | <template> | 1 | <template> |
2 | <div class="log-content"> | 2 | <div class="main"> |
3 | <div class="log-search"> | 3 | <div class="log-search"> |
4 | 开始时间: | 4 | 开始时间: |
5 | <el-date-picker | 5 | <el-date-picker |
... | @@ -47,7 +47,7 @@ | ... | @@ -47,7 +47,7 @@ |
47 | </el-dialog> | 47 | </el-dialog> |
48 | 48 | ||
49 | <div class="log-table"> | 49 | <div class="log-table"> |
50 | <el-table :data="tableData"> | 50 | <el-table :data="tableData" :height="tableHeight" :row-class-name="tableRowClassName"> |
51 | <el-table-column type="index" width="80" align="center" label="序号"> | 51 | <el-table-column type="index" width="80" align="center" label="序号"> |
52 | </el-table-column> | 52 | </el-table-column> |
53 | <el-table-column prop="operationtype" align="center" label="操作类型"> | 53 | <el-table-column prop="operationtype" align="center" label="操作类型"> |
... | @@ -84,7 +84,7 @@ | ... | @@ -84,7 +84,7 @@ |
84 | 84 | ||
85 | total: 0, | 85 | total: 0, |
86 | pageNo: 1, | 86 | pageNo: 1, |
87 | pageSize: 50, | 87 | pageSize: 15, |
88 | 88 | ||
89 | outerVisible: false, | 89 | outerVisible: false, |
90 | innerVisible: false, | 90 | innerVisible: false, |
... | @@ -114,7 +114,7 @@ | ... | @@ -114,7 +114,7 @@ |
114 | }, | 114 | }, |
115 | startValue: '', | 115 | startValue: '', |
116 | endValue:'', | 116 | endValue:'', |
117 | 117 | tableHeight: 0, | |
118 | } | 118 | } |
119 | }, | 119 | }, |
120 | methods:{ | 120 | methods:{ |
... | @@ -140,11 +140,12 @@ | ... | @@ -140,11 +140,12 @@ |
140 | "startTime": this.startValue, | 140 | "startTime": this.startValue, |
141 | "endTime": this.endValue, | 141 | "endTime": this.endValue, |
142 | "pageNo": 1, | 142 | "pageNo": 1, |
143 | "pageSize": 50 | 143 | "pageSize": 15 |
144 | }; | 144 | }; |
145 | getLogData(data).then((res)=>{ | 145 | getLogData(data).then((res)=>{ |
146 | console.log(res.result); | 146 | console.log(res.result); |
147 | this.tableData = res.result.records; | 147 | this.tableData = res.result.records; |
148 | this.total = res.result.total | ||
148 | }) | 149 | }) |
149 | }, | 150 | }, |
150 | getError(){ | 151 | getError(){ |
... | @@ -167,10 +168,20 @@ | ... | @@ -167,10 +168,20 @@ |
167 | openDetail(data){ | 168 | openDetail(data){ |
168 | this.operationDataVisible = true; | 169 | this.operationDataVisible = true; |
169 | this.currentOperationData = data.operationJson; | 170 | this.currentOperationData = data.operationJson; |
171 | }, | ||
172 | tableRowClassName({ row, rowIndex }) { | ||
173 | if (rowIndex % 2 !== 0) { | ||
174 | return "even-row"; | ||
175 | } else { | ||
176 | return ""; | ||
170 | } | 177 | } |
171 | }, | 178 | }, |
179 | }, | ||
172 | mounted() { | 180 | mounted() { |
173 | this.getData(); | 181 | this.getData(); |
182 | this.$nextTick(() => { | ||
183 | this.tableHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 290; | ||
184 | }) | ||
174 | } | 185 | } |
175 | } | 186 | } |
176 | </script> | 187 | </script> |
... | @@ -191,7 +202,7 @@ | ... | @@ -191,7 +202,7 @@ |
191 | .log-table{ | 202 | .log-table{ |
192 | margin-top: 10px; | 203 | margin-top: 10px; |
193 | width: 100%; | 204 | width: 100%; |
194 | border: 1px solid #E6E6E6; | 205 | box-shadow: 0 2px 15px 1px rgba(49, 132, 245, 0.1); |
195 | } | 206 | } |
196 | .el-button { | 207 | .el-button { |
197 | width: 100px; | 208 | width: 100px; | ... | ... |
-
Please register or sign in to post a comment