ソースを参照

mod:app工单列表

weieryang 3 年 前
コミット
31e48e8d56
共有2 個のファイルを変更した205 個の追加82 個の削除を含む
  1. 79 82
      anyangWebAPP/pages/myTask/workOrderList/workOrderList.vue
  2. 126 0
      anyangWebAPP/utils/listUrl.js

+ 79 - 82
anyangWebAPP/pages/myTask/workOrderList/workOrderList.vue

1
 <template>
1
 <template>
2
 	<view class="wrapper">
2
 	<view class="wrapper">
3
 
3
 
4
-		<div  style="width: 96%;margin:10px  auto; ">
4
+		<div style="width: 96%;margin:10px  auto; ">
5
 			<input type="text" v-model="keyWords" placeholder="请输入工单标题" class="orderState key" @confirm="searchList">
5
 			<input type="text" v-model="keyWords" placeholder="请输入工单标题" class="orderState key" @confirm="searchList">
6
 		</div>
6
 		</div>
7
-		<div style="width: 96%;margin: 0 auto;" v-if=" tap == '查询工单' ">
8
-			<uni-data-select v-model="orderState" :localdata="range" class="orderState" @change="chageList" placeholder="请输入工单状态"></uni-data-select>
9
-			<depart-select @post-select-data = "postSelectData" class="orderState"></depart-select>
10
-		</div>
7
+		<!-- <div style="width: 96%;margin: 0 auto;" v-if="tap == '查询工单' ">
8
+			<uni-data-select v-model="orderState" :localdata="range" class="orderState" @change="chageList"
9
+				placeholder="请输入工单状态"></uni-data-select>
10
+			<depart-select @post-select-data="postSelectData" class="orderState"></depart-select>
11
+		</div> -->
11
 
12
 
12
-		<view v-if="isDisplay.displaySegmentedControl" class="segmentedControlWrapper">
13
+		<view v-if="segmenter.isShow" class="segmentedControlWrapper">
13
 			<uni-segmented-control :current="segmenter.current" :values="segmenter.items"
14
 			<uni-segmented-control :current="segmenter.current" :values="segmenter.items"
14
-				@clickItem="onClickSegmentedControl" styleType="text" activeColor="#007aff"/>
15
+				@clickItem="onClickSegmentedControl" styleType="text" activeColor="#007aff" />
15
 		</view>
16
 		</view>
16
 		<view class="tableWrapper">
17
 		<view class="tableWrapper">
17
 			<!-- 基于 uni-list 的页面布局 -->
18
 			<!-- 基于 uni-list 的页面布局 -->
37
 							<view class="textState">{{ item.F_WorkState | workOrderState(item)}}</view>
38
 							<view class="textState">{{ item.F_WorkState | workOrderState(item)}}</view>
38
 						</view>
39
 						</view>
39
 					</template>
40
 					</template>
40
-					
41
+
41
 				</uni-list-item>
42
 				</uni-list-item>
42
 			</uni-list>
43
 			</uni-list>
43
 			<uni-load-more :status="loadMoreState"></uni-load-more>
44
 			<uni-load-more :status="loadMoreState"></uni-load-more>
47
 </template>
48
 </template>
48
 
49
 
49
 <script>
50
 <script>
50
-	import departSelect from '@/pages/components/commonSelect/departSelect/departSelect.vue'
51
-	const urlData = [
52
-		"WorkOrder/GetList",
53
-		"WorkOrder/GetLDDealList",
54
-		"WorkOrder/GetDWDealList",
55
-		"WorkOrder/GetZXDealList",
56
-		"WorkOrder/GetTimeOutList",
57
-		"workorder/GetSupervList",
58
-		"workorder/GetEJDWDealList"
59
-	]
60
-	const segmenterData = {
61
-		0: ["热线件", "督办件"], // 已办待回访
62
-		1: ["未追加回复", "已追加回复"], // 已办未果
63
-		2: ["督办待办", "督办重办"], // 督办工单
64
-	}
51
+	import departSelect from '@/pages/components/commonSelect/departSelect/departSelect.vue';
52
+	import listUrl from '@/utils/listUrl.js'
53
+
65
 	export default {
54
 	export default {
66
 		components: {
55
 		components: {
67
 			departSelect
56
 			departSelect
76
 				range: [{
65
 				range: [{
77
 					value: 0,
66
 					value: 0,
78
 					text: '新工单'
67
 					text: '新工单'
79
-				},{
68
+				}, {
80
 					value: 1,
69
 					value: 1,
81
 					text: '待交办'
70
 					text: '待交办'
82
-				},{
71
+				}, {
83
 					value: 2,
72
 					value: 2,
84
 					text: '待查收'
73
 					text: '待查收'
85
-				},{
74
+				}, {
86
 					value: 3,
75
 					value: 3,
87
 					text: '退回审核中'
76
 					text: '退回审核中'
88
-				},{
77
+				}, {
89
 					value: 4,
78
 					value: 4,
90
 					text: '办理中'
79
 					text: '办理中'
91
-				},{
80
+				}, {
92
 					value: 5,
81
 					value: 5,
93
 					text: '延时审核中'
82
 					text: '延时审核中'
94
-				},{
83
+				}, {
95
 					value: 6,
84
 					value: 6,
96
 					text: '已办待审核'
85
 					text: '已办待审核'
97
-				},{
86
+				}, {
98
 					value: 7,
87
 					value: 7,
99
 					text: '已办待回访'
88
 					text: '已办待回访'
100
-				},{
89
+				}, {
101
 					value: 8,
90
 					value: 8,
102
 					text: '重办中'
91
 					text: '重办中'
103
-				},{
92
+				}, {
104
 					value: 9,
93
 					value: 9,
105
 					text: '已结案'
94
 					text: '已结案'
106
-				},{
95
+				}, {
107
 					value: 11,
96
 					value: 11,
108
 					text: '重办待交办'
97
 					text: '重办待交办'
109
-				},{
98
+				}, {
110
 					value: 13,
99
 					value: 13,
111
 					text: '重办驳回'
100
 					text: '重办驳回'
112
 				}],
101
 				}],
114
 				paramsData: {},
103
 				paramsData: {},
115
 				loadMoreState: 'more', //more loading  no-more
104
 				loadMoreState: 'more', //more loading  no-more
116
 				segmenter: {
105
 				segmenter: {
106
+					isShow: false,
117
 					current: 0,
107
 					current: 0,
118
-					items: ["0", "1", "2"],
119
-					type: "",
108
+					items: [],
120
 				},
109
 				},
121
 				isDisplay: {
110
 				isDisplay: {
122
 					displaySegmentedControl: false, // 分段器
111
 					displaySegmentedControl: false, // 分段器
123
 				},
112
 				},
113
+				urlData: null,
124
 			}
114
 			}
125
 		},
115
 		},
126
 		onLoad(optioin) {
116
 		onLoad(optioin) {
117
+			console.log(optioin, 'optioin')
118
+			this.urlData = listUrl.getUrlData(optioin.menuCode);
119
+			if (!this.urlData) {
120
+				return;
121
+			}
122
+			if (this.urlData.tabs && this.urlData.tabs.length > 1) {
123
+				this.segmenter.isShow = true;
124
+				this.segmenter.items = this.urlData.tabs.map((o) => {
125
+					return o.label;
126
+				})
127
+				this.segmenter.current = 0;
128
+			}
127
 			this.tap = optioin.stingText
129
 			this.tap = optioin.stingText
128
 			this.init(optioin)
130
 			this.init(optioin)
129
 		},
131
 		},
142
 				this.getList(this.paramsData)
144
 				this.getList(this.paramsData)
143
 				// this.departid = data
145
 				// this.departid = data
144
 			},
146
 			},
145
-			init(optioin){
146
-				
147
+			init(optioin) {
148
+
147
 				optioin.page = 1 // 页码
149
 				optioin.page = 1 // 页码
148
 				optioin.pagesize = 10 // 条数
150
 				optioin.pagesize = 10 // 条数
149
 				optioin.keyWords = ''
151
 				optioin.keyWords = ''
165
 					this.getList(this.paramsData)
167
 					this.getList(this.paramsData)
166
 				})
168
 				})
167
 			},
169
 			},
168
-			
170
+
169
 			getList(optioin) {
171
 			getList(optioin) {
170
-				const params = {
172
+				let params = {
171
 					page: optioin.page,
173
 					page: optioin.page,
172
 					pagesize: optioin.pagesize,
174
 					pagesize: optioin.pagesize,
173
 					ComTitle: optioin.keyWords,
175
 					ComTitle: optioin.keyWords,
174
-					deptid:  optioin.departid == undefined ? "" : optioin.departid,
175
-					tab: optioin.tab == undefined ? "" : optioin.tab,
176
-					state: optioin.state == undefined ? "" : optioin.state,
177
-					db: optioin.db == undefined ? "" : optioin.db,
178
-					isproresult: optioin.isproresult == undefined ? "" : optioin.isproresult,
179
-					Supervisor: optioin.Supervisor == undefined ? "" : optioin.Supervisor,
180
-					iscb: optioin.iscb == undefined ? "" : optioin.iscb,
181
-					tobereply: optioin.tobereply == undefined ? "" : optioin.tobereply,
182
-					distribute: optioin.distribute == undefined ? "" : optioin.distribute,
176
+					// deptid: optioin.departid == undefined ? "" : optioin.departid,
177
+					// tab: optioin.tab == undefined ? "" : optioin.tab,
178
+					// state: optioin.state == undefined ? "" : optioin.state,
179
+					// db: optioin.db == undefined ? "" : optioin.db,
180
+					// isproresult: optioin.isproresult == undefined ? "" : optioin.isproresult,
181
+					// Supervisor: optioin.Supervisor == undefined ? "" : optioin.Supervisor,
182
+					// iscb: optioin.iscb == undefined ? "" : optioin.iscb,
183
+					// tobereply: optioin.tobereply == undefined ? "" : optioin.tobereply,
184
+					// distribute: optioin.distribute == undefined ? "" : optioin.distribute,
183
 					token: uni.getStorageSync("token"),
185
 					token: uni.getStorageSync("token"),
184
 				}
186
 				}
185
-				let workOrderListType = Number(optioin.workOrderListType)
186
-				let url = urlData[workOrderListType]
187
+
188
+				params = {
189
+					...params,
190
+					...this.urlData.params
191
+				};
192
+
193
+				if (this.segmenter.isShow) {
194
+					const current = this.urlData.tabs[this.segmenter.current]
195
+					params = {
196
+						...params,
197
+						...{
198
+							[`${current.field}`]: current.value,
199
+						},
200
+					}
201
+				}
202
+
203
+
204
+				let url = this.urlData.url
187
 				this.$http
205
 				this.$http
188
 					.get(url, params)
206
 					.get(url, params)
189
 					.then((response) => {
207
 					.then((response) => {
222
 
240
 
223
 			onClickSegmentedControl(e) {
241
 			onClickSegmentedControl(e) {
224
 				this.resetListData()
242
 				this.resetListData()
225
-				switch (String(this.segmenter.type)) {
226
-					case "0":
227
-						if (String(e.currentIndex) === "0") {
228
-							this.paramsData.db = 0
229
-						} else if (String(e.currentIndex) === "1") {
230
-							this.paramsData.db = 1
231
-						}
232
-						break
233
-					case "1":
234
-						if (String(e.currentIndex) === "0") {
235
-							this.paramsData.isproresult = 1
236
-						} else if (String(e.currentIndex) === "1") {
237
-							this.paramsData.isproresult = 2
238
-						}
239
-						break
240
-					case "2":
241
-						if (String(e.currentIndex) === "0") {
242
-							this.paramsData.iscb = 0
243
-						} else if (String(e.currentIndex) === "1") {
244
-							this.paramsData.iscb = 1
245
-						}
246
-						break
247
-				}
248
-
243
+				this.segmenter.current = e.currentIndex;
249
 				this.getList(this.paramsData)
244
 				this.getList(this.paramsData)
250
 			},
245
 			},
251
-			resetListData(){
246
+			resetListData() {
252
 				this.listData = []
247
 				this.listData = []
253
 				this.paramsData.page = 1
248
 				this.paramsData.page = 1
254
 				this.paramsData.pagesize = 10
249
 				this.paramsData.pagesize = 10
320
 		 */
315
 		 */
321
 		onReachBottom() {
316
 		onReachBottom() {
322
 			if (this.listData.length >= 6) {
317
 			if (this.listData.length >= 6) {
323
-				console.loh(22222)
324
 				this.loadMoreState = 'loading'
318
 				this.loadMoreState = 'loading'
325
 				this.paramsData.page = this.paramsData.page + 1
319
 				this.paramsData.page = this.paramsData.page + 1
326
 				this.getList(this.paramsData)
320
 				this.getList(this.paramsData)
334
 
328
 
335
 <style lang="scss">
329
 <style lang="scss">
336
 	@import '@/common/uni-ui.scss';
330
 	@import '@/common/uni-ui.scss';
337
-	.orderState{
331
+
332
+	.orderState {
338
 		background-color: #fff;
333
 		background-color: #fff;
339
-		border: none; 
340
-		padding:2px 15px !important;
334
+		border: none;
335
+		padding: 2px 15px !important;
341
 		outline: none !important;
336
 		outline: none !important;
342
 		margin-bottom: 10px;
337
 		margin-bottom: 10px;
343
 	}
338
 	}
344
-	.key{
339
+
340
+	.key {
345
 		border-radius: 4px;
341
 		border-radius: 4px;
346
-		padding:8px 15px !important;
342
+		padding: 8px 15px !important;
347
 		font-size: 14px !important;
343
 		font-size: 14px !important;
348
 	}
344
 	}
345
+
349
 	.wrapper {
346
 	.wrapper {
350
 		padding: 5px 0 0 0;
347
 		padding: 5px 0 0 0;
351
 
348
 

+ 126 - 0
anyangWebAPP/utils/listUrl.js

1
+/* eslint-disable */
2
+const urlData = {
3
+	'WorkDSZB': { // 审核员-待审转办
4
+		url: 'WorkOrder/GetLDDealList',
5
+		params: {
6
+			tab: 0,
7
+			sourcearea: 0,
8
+			jianhang: 0,
9
+			phoneType: 2
10
+		}
11
+	},
12
+	'ReturnReviewedTransferred': { //审核员-退回待审转办
13
+		url: 'WorkOrder/GetLDDealList',
14
+		params: {
15
+			state: 10,
16
+			tab: 10,
17
+			jianhang: 0,
18
+			phoneType: 2
19
+		}
20
+	},
21
+	'yssh': { //审核员-局委延时审核
22
+		url: 'WorkOrder/GetDWDealList',
23
+		params: {
24
+			tab: 7,
25
+			jianhang: 2,
26
+			phoneType: 2
27
+		}
28
+	},
29
+	'DSHLB': { //审核员-局委退回审核
30
+		url: 'WorkOrder/GetZXDealList',
31
+		params: {
32
+			state: 10,
33
+			tab: 0,
34
+			jianhang: 0,
35
+			phoneType: 2
36
+		}
37
+	},
38
+	'haveDoneToAudit': { //审核员-已办待审核
39
+		url: 'WorkOrder/GetZXDealList',
40
+		tabs: [
41
+			{
42
+				label: '热线件',
43
+				value: 0,
44
+				field: 'db',
45
+			},
46
+			{
47
+				label: '督办件',
48
+				value: 1,
49
+				field: 'db',
50
+			}
51
+		],
52
+		params: {
53
+			state: 6,
54
+			tab: 0,
55
+			jianhang: 0,
56
+			phoneType: 2,
57
+			tobereply: 1,
58
+			db: 0,
59
+		}
60
+	},
61
+	'yblsh': { //审核员-已办待回访
62
+		url: 'WorkOrder/GetZXDealList',
63
+		params: {
64
+			state: 7,
65
+			tab: 0,
66
+			jianhang: 0,
67
+			phoneType: 2,
68
+			tobereply: 1,
69
+			db: 0,
70
+		}
71
+	},
72
+	'YWJD_LYJB': { //审核员-正在办理
73
+		url: 'WorkOrder/GetLDDealList',
74
+		params: {
75
+			tab: 1,
76
+			jianhang: 0,
77
+			phoneType: 2,
78
+		}
79
+	},
80
+	'gdgl_cqgdlb': { // 审核员-超期未果
81
+		url: 'WorkOrder/GetTimeOutList',
82
+		params: {
83
+			tab: 1,
84
+			jianhang: 0,
85
+			phoneType: 2,
86
+		}
87
+	},
88
+	'YWJD_YBWG': { // 审核员-已办未果
89
+		url: 'WorkOrder/GetList',
90
+		params: {
91
+			state: 6,
92
+			tab: 1,
93
+			jianhang: 0,
94
+			phoneType: 2,
95
+			isproresult: 1,
96
+		}
97
+	},
98
+	'YWJD_LYJA': { // 审核员-已办结
99
+		url: 'WorkOrder/GetLDDealList',
100
+		params: {
101
+			tab: 5,
102
+			jianhang: 0,
103
+			phoneType: 2,
104
+		}
105
+	},
106
+	'todb': { // 审核员-已转督办
107
+		url: 'workorder/GetSupervList',
108
+		params: {
109
+			jianhang: 0,
110
+			phoneType: 2,
111
+		}
112
+	},
113
+	'YWJD_WWC': { // 审核员-已退回重办
114
+		url: 'WorkOrder/GetLDDealList',
115
+		params: {
116
+			tab: 4,
117
+			jianhang: 0,
118
+			phoneType: 2,
119
+		}
120
+	}
121
+}
122
+export default {
123
+	getUrlData(code) {
124
+		return urlData[code];
125
+	}
126
+};