diff.vue
2.29 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
<template>
<LayoutBody>
<LayoutFilter>
<FilterItem :label="filterOptions.handleActions.label">
<Select v-model.trim="filters.handleActions">
<Option v-for="option in filterOptions.handleActions.options"
:value="option.value"
:key="option.value">{{option.label}}</Option>
</Select>
</FilterItem>
<FilterItem :label="filterOptions.handleStatus.label">
<Select v-model.trim="filters.handleStatus">
<Option v-for="option in filterOptions.handleStatus.options"
:value="option.value"
:key="option.value">{{option.label}}</Option>
</Select>
</FilterItem>
<FilterItem>
<Button type="primary" @click="filterSearch">筛选</Button>
<Button @click="clearFilter">清空条件</Button>
</FilterItem>
</LayoutFilter>
<LayoutList>
<Table border :context="self" :columns="table.cols" :data="table.data"></Table>
<Page :total="pager.total" :current="pager.current"
@on-change="pageChange" :page-size="20" show-total></Page>
</LayoutList>
</LayoutBody>
</template>
<script>
import Vue from 'vue';
import _ from 'lodash';
import {filterFields, table} from './store';
export default {
data() {
return {
self: this,
filters: {
handleActions: '',
handleStatus: ''
},
filterOptions: filterFields,
table: {
cols: table.cols,
data: []
},
pager: {
total: 0,
current: 1
}
}
},
created() {
},
methods: {
clearFilter() {
this.filters.handleActions = '';
this.filters.handleStatus = '';
},
filterSearch() {
},
pageChange() {
}
},
}
</script>
<style lang="scss">
.btn-row-space {
margin-top: 10px;
}
</style>