|
|
@@ -49,14 +49,10 @@
|
|
49
|
49
|
const segmenterData = {
|
|
50
|
50
|
0: ["待接单", "待完成", "已完成"], // 已办待回访
|
|
51
|
51
|
}
|
|
52
|
|
- const urlData = [
|
|
53
|
|
- "FaultRepair/MaintenancerList"
|
|
54
|
|
- ]
|
|
55
|
52
|
export default {
|
|
56
|
53
|
data() {
|
|
57
|
54
|
return {
|
|
58
|
55
|
that: this,
|
|
59
|
|
- urlIndex: 0,
|
|
60
|
56
|
departList: [],
|
|
61
|
57
|
listData: [],
|
|
62
|
58
|
paramsData: {},
|
|
|
@@ -71,19 +67,7 @@
|
|
71
|
67
|
},
|
|
72
|
68
|
}
|
|
73
|
69
|
},
|
|
74
|
|
- filters: {
|
|
75
|
|
- // 工单状态过滤
|
|
76
|
|
- workOrderState(value, options) {
|
|
77
|
|
- var resultData = ""
|
|
78
|
|
- switch (value + "") {
|
|
79
|
|
- case "0":
|
|
80
|
|
- break
|
|
81
|
|
- }
|
|
82
|
|
- return resultData
|
|
83
|
|
- },
|
|
84
|
|
- },
|
|
85
|
70
|
onLoad(optioin) {
|
|
86
|
|
- this.urlIndex = optioin.urlIndex
|
|
87
|
71
|
this.init(optioin)
|
|
88
|
72
|
pageData.getDet((res, data) => {
|
|
89
|
73
|
this.departList = data
|
|
|
@@ -101,7 +85,6 @@
|
|
101
|
85
|
init(optioin) {
|
|
102
|
86
|
optioin.page = 1 // 页码
|
|
103
|
87
|
optioin.pagesize = 10 // 条数
|
|
104
|
|
- console.log(optioin.segmenter)
|
|
105
|
88
|
if (optioin.segmenter == 0) {
|
|
106
|
89
|
optioin.state = 1
|
|
107
|
90
|
}
|
|
|
@@ -134,15 +117,13 @@
|
|
134
|
117
|
state: optioin.state == undefined ? "" : optioin.state,
|
|
135
|
118
|
workordercode: optioin.workordercode == undefined ? "" : optioin.workordercode
|
|
136
|
119
|
}
|
|
137
|
|
- let url = urlData[this.urlIndex]
|
|
138
|
|
- this.$http.get(url, params).then((response) => {
|
|
|
120
|
+ this.$http.get("FaultRepair/MaintenancerList", params).then((response) => {
|
|
139
|
121
|
if (response.state.toLowerCase() === "success") {
|
|
140
|
122
|
this.listData = response.rows
|
|
141
|
123
|
}
|
|
142
|
124
|
}).catch((e) => {
|
|
143
|
125
|
console.log(e);
|
|
144
|
126
|
})
|
|
145
|
|
-
|
|
146
|
127
|
},
|
|
147
|
128
|
searchList(e) {
|
|
148
|
129
|
this.resetListData()
|
|
|
@@ -157,21 +138,12 @@
|
|
157
|
138
|
|
|
158
|
139
|
onClickSegmentedControl(e) {
|
|
159
|
140
|
this.resetListData()
|
|
160
|
|
- console.log(e.currentIndex)
|
|
161
|
141
|
switch (String(e.currentIndex)) {
|
|
162
|
142
|
case "0":
|
|
163
|
|
- if (this.segmenter.type == 1) {
|
|
164
|
|
- this.paramsData.state = 2
|
|
165
|
|
- } else if (this.segmenter.type == 0) {
|
|
166
|
|
- this.paramsData.state = 1
|
|
167
|
|
- }
|
|
|
143
|
+ this.paramsData.state = 1
|
|
168
|
144
|
break
|
|
169
|
145
|
case "1":
|
|
170
|
|
- if (this.segmenter.type == 1) {
|
|
171
|
|
- this.paramsData.state = 3
|
|
172
|
|
- } else if (this.segmenter.type == 0) {
|
|
173
|
|
- this.paramsData.state = 2
|
|
174
|
|
- }
|
|
|
146
|
+ this.paramsData.state = 2
|
|
175
|
147
|
break
|
|
176
|
148
|
case "2":
|
|
177
|
149
|
this.paramsData.state = 3
|