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
| <template>
| <basic-container>
| <avue-crud ref="crud"
| :option="option"
| :page.sync="page"
| :table-loading="loading"
| @row-update="rowUpdate"
| @row-save="rowSave"
| @row-del="rowDel"
| @refresh-change="refreshChange"
| @search-reset="searchReset"
| @search-change="searchChange"
| v-model="form"
| :data="data">
| </avue-crud>
| </basic-container>
| </template>
|
| <script>
| import {getUserStatistics} from "@/api/userstatistics/repairtask";
| import {getMonthStart,getMonthEnd} from "@/util/date";
|
| export default {
| name: "repairtask",
| data() {
| return {
| option: {
| border: true,
| stripe: false,
| addBtn: false,
| header: false,
| menu: false,
| searchShow: true,
| searchMenuSpan: 6,
| height: 520,
| menuWidth: 200,
| menuAlign: "center",
| align: "center",
| selection: false,
| showSummary: true,
| indexFixed: false,
| selectionFixed: false,
| expandFixed: false,
| menuFixed: false,
| column: [
| {
| label: "姓名",
| prop: "name",
| },
| {
| label: "维修待完成",
| prop: "wxDaiNum"
| },
| {
| label: "维修已完成",
| prop: "wxOkNum"
| },
| {
| label: "任务待完成",
| prop: "skDaiNum"
| },
| {
| label: "任务已完成",
| prop: "skOkNum"
| }, {
| label: "筛选时间段",
| prop: "releaseTimeRange",
| span: 12,
| hide: true,
| search: true,
| searchSpan: 7,
| searchLabelWidth: 110,
| searchRange: true,
| searchValue: [getMonthStart(), getMonthEnd()],
| type: "date",
| format: "yyyy-MM-dd",
| valueFormat: "yyyy-MM-dd",
| rules: [
| {
| required: true,
| message: "请选择时间",
| trigger: "click",
| },
| ],
| }
| ]
| },
| page:{
| pageSize: 10,
| currentPage: 1,
| total: 0,
| },
| form:{},
| query:{},
| data:[]
| }
| },
| created() {
|
| },
| mounted() {
| this.query.startTime = getMonthStart()
| this.query.endTime = getMonthEnd()
| this.onLoad()
| },
| methods: {
| searchReset() {
| this.query = {};
| this.onLoad();
| },
| searchChange(params, done) {
| if (params.releaseTimeRange){
| this.query.startTime = params.releaseTimeRange[0];
| this.query.endTime = params.releaseTimeRange[1];
| }
| this.onLoad();
| this.query={}
| done();
| },
| onLoad() {
| getUserStatistics(this.page.currentPage,this.page.pageSize,this.query.startTime,this.query.endTime).then(res=>{
| if (res.data.code == 200){
| var data = res.data.data
| this.data = data.records
| }
| })
| }
| }
| }
| </script>
|
| <style scoped>
|
| </style>
|
|