list.vue
2.43 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
<template>
<layout-body>
<layout-filter>
<filter-item :label="filters.subject.label">
<Input v-model.trim="filters.subject.model"
:placeholder="filters.subject.holder"></Input>
</filter-item>
<filter-item :label="filters.emergency.label">
<Select v-model.trim="filters.emergency.model">
<Option v-for="option in filters.emergency.options"
:value="option.value"
:key="option.value">{{option.label}}</Option>
</Select>
</filter-item>
<filter-item :label="filters.brand.label">
<select-brand v-model="filters.brand.model"></select-brand>
</filter-item>
<filter-item :label="filters.status.label">
<Select v-model.trim="filters.status.model">
<Option v-for="option in filters.status.options"
:value="option.value"
:key="option.value">{{option.label}}</Option>
</Select>
</filter-item>
<filter-item>
<Button type="primary" @click="filterSearch">筛选</Button>
<Button @click="clearFilter">清空条件</Button>
</filter-item>
</layout-filter>
<layout-list>
<Table border :columns="columns" :data="dataList"></Table>
<Page :total="page.total" :current="page.current"
@on-change="pageChange" :page-size="20" show-total></Page>
</layout-list>
</layout-body>
</template>
<script>
import {list as diffList} from './store';
import {DiffService} from 'services/repository';
import {SelectBrand} from 'components/select';
export default {
data() {
return diffList.apply(this);
},
created() {
this.DiffService = new DiffService();
this.DiffService.list().then(res => {
this.$Loading.finish();
this.dataList = res.records;
});
},
methods: {
clearFilter() {
},
filterSearch() {
},
pageChange() {
},
goDetail(id) {
this.$router.push({
query: {
id
},
name: 'repository.diff.detail',
});
}
},
components: {
SelectBrand
}
};
</script>
<style lang="scss">
</style>