|
@@ -29,7 +29,7 @@ |
|
@@ -29,7 +29,7 @@ |
29
|
</Form>
|
29
|
</Form>
|
30
|
</div>
|
30
|
</div>
|
31
|
<Table :columns="columns" :data="list"></Table>
|
31
|
<Table :columns="columns" :data="list"></Table>
|
32
|
- <Page :total="pager.rows" :current="pager.page" :page-size="pager.size" @on-change="onPageChange" show-elevator style="margin-top:20px;text-align: right;"></Page>
|
32
|
+ <Page ref="page" :total="pager.rows" :current="pager.page" :page-size="pager.size" @on-change="onPageChange" show-elevator style="margin-top:20px;text-align: right;"></Page>
|
33
|
</div>
|
33
|
</div>
|
34
|
</template>
|
34
|
</template>
|
35
|
<script>
|
35
|
<script>
|
|
@@ -53,7 +53,7 @@ export default { |
|
@@ -53,7 +53,7 @@ export default { |
53
|
}
|
53
|
}
|
54
|
});
|
54
|
});
|
55
|
},
|
55
|
},
|
56
|
- className: 'top'
|
56
|
+ className: "top"
|
57
|
},
|
57
|
},
|
58
|
{
|
58
|
{
|
59
|
title: "相似图",
|
59
|
title: "相似图",
|
|
@@ -83,7 +83,7 @@ export default { |
|
@@ -83,7 +83,7 @@ export default { |
83
|
</div>
|
83
|
</div>
|
84
|
);
|
84
|
);
|
85
|
},
|
85
|
},
|
86
|
- className: 'top'
|
86
|
+ className: "top"
|
87
|
}
|
87
|
}
|
88
|
],
|
88
|
],
|
89
|
list: [],
|
89
|
list: [],
|
|
@@ -107,6 +107,12 @@ export default { |
|
@@ -107,6 +107,12 @@ export default { |
107
|
this.api = new ApiService();
|
107
|
this.api = new ApiService();
|
108
|
this.getList();
|
108
|
this.getList();
|
109
|
},
|
109
|
},
|
|
|
110
|
+ mounted() {
|
|
|
111
|
+ document.addEventListener("keydown", this.keydown);
|
|
|
112
|
+ },
|
|
|
113
|
+ destroyed() {
|
|
|
114
|
+ document.removeEventListener("keydown", this.keydown);
|
|
|
115
|
+ },
|
110
|
methods: {
|
116
|
methods: {
|
111
|
onPageChange(page) {
|
117
|
onPageChange(page) {
|
112
|
this.pager.page = page;
|
118
|
this.pager.page = page;
|
|
@@ -160,7 +166,7 @@ export default { |
|
@@ -160,7 +166,7 @@ export default { |
160
|
this.pager.size = result.size;
|
166
|
this.pager.size = result.size;
|
161
|
|
167
|
|
162
|
this.$nextTick(() => {
|
168
|
this.$nextTick(() => {
|
163
|
- this.$emit('backtop');
|
169
|
+ this.$emit("backtop");
|
164
|
});
|
170
|
});
|
165
|
|
171
|
|
166
|
msg();
|
172
|
msg();
|
|
@@ -169,6 +175,19 @@ export default { |
|
@@ -169,6 +175,19 @@ export default { |
169
|
msg();
|
175
|
msg();
|
170
|
this.$Message.error("查询失败");
|
176
|
this.$Message.error("查询失败");
|
171
|
});
|
177
|
});
|
|
|
178
|
+ },
|
|
|
179
|
+ keydown(evt) {
|
|
|
180
|
+ if (evt.code === "ArrowLeft") {
|
|
|
181
|
+ this.goBack();
|
|
|
182
|
+ } else if (evt.code === "ArrowRight") {
|
|
|
183
|
+ this.goNext();
|
|
|
184
|
+ }
|
|
|
185
|
+ },
|
|
|
186
|
+ goNext() {
|
|
|
187
|
+ this.$refs.page.next()
|
|
|
188
|
+ },
|
|
|
189
|
+ goBack() {
|
|
|
190
|
+ this.$refs.page.prev()
|
172
|
}
|
191
|
}
|
173
|
},
|
192
|
},
|
174
|
components: {
|
193
|
components: {
|