liuzhihui 2 lat temu
rodzic
commit
5d6f60ccae

Plik diff jest za duży
+ 544 - 616
CallCenterWeb.UI/RMYY/src/views/orderManage/components/orderDetail.vue


+ 132 - 77
CallCenterWeb.UI/RMYYAPP/pages/myTask/Hardware/Hardware.vue

@@ -2,16 +2,49 @@
2 2
 	<view class="wrapper">
3 3
 		<view class="contentbox">
4 4
 			<view class="titlebox">{{titlebox}}</view>
5
-			<view id="echartbox"></view>
5
+			<view id="echartbox">
6
+				<qiun-data-charts type="bar" :opts="opts" :chartData="chartData" />
7
+			</view>
6 8
 		</view>
7 9
 	</view>
8 10
 </template>
9 11
 
10 12
 <script>
11
-	import * as echarts from 'echarts'
13
+	// import * as echarts from 'echarts'
12 14
 	export default {
13 15
 		data() {
14 16
 			return {
17
+				chartData: {},
18
+				opts: {
19
+					color: ["#7b9df2", "#8ebb75", "#dabe4f", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
20
+						"#ea7ccc"
21
+					],
22
+					padding: [15, 30, 0, 5],
23
+					enableScroll: false,
24
+					legend: {
25
+						position:'top',
26
+						float:'left'
27
+					},
28
+					xAxis: {
29
+						boundaryGap: "justify",
30
+						disableGrid: false,
31
+						min: 0,
32
+						axisLine: false,
33
+						max: 70
34
+					},
35
+					yAxis: {},
36
+					extra: {
37
+						bar: {
38
+							type: "stack",
39
+							width: 30,
40
+							meterBorde: 1,
41
+							meterFillColor: "#FFFFFF",
42
+							activeBgColor: "#000000",
43
+							activeBgOpacity: 0.08,
44
+							categoryGap: 2
45
+						}
46
+					}
47
+				},
15 48
 				titlebox: "硬件服务TOP20"
16 49
 			}
17 50
 		},
@@ -25,12 +58,12 @@
25 58
 			this.getListData(option)
26 59
 		},
27 60
 		onReady() {
28
-			this.chart = echarts.init(document.getElementById('echartbox'))
61
+			// this.chart = echarts.init(document.getElementById('echartbox'))
29 62
 			// this.chartData()
30 63
 		},
31 64
 		methods: {
32
-			getListData(option){
33
-				const params={
65
+			getListData(option) {
66
+				const params = {
34 67
 					starttime: option.starttime,
35 68
 					endtime: option.endtime,
36 69
 					type: option.waretype
@@ -41,21 +74,43 @@
41 74
 						var colData1 = []
42 75
 						var colData2 = []
43 76
 						var colData3 = []
77
+						var res = {}
44 78
 						if (response.data.length > 0) {
45 79
 							response.data.forEach((item, index) => {
46
-								if(item.deptname){
47
-									rowData.push(item.deptname)
48
-								}
49
-								if(Number(item.finish)!=0){
50
-									colData1.push(Number(item.finish))
51
-								}
52
-								if(Number(item.unfinish)!=0){
53
-									colData2.push(Number(item.unfinish))
54
-								}
55
-								if(Number(item.fx)!=0){
56
-									colData3.push(Number(item.fx))
57
-								}
58
-								this.chartData(rowData, colData1, colData2, colData3)
80
+								rowData.push(item.deptname || '')
81
+								colData1.push(Number(item.finish))
82
+								colData2.push(Number(item.unfinish))
83
+								colData3.push(Number(item.fx))
84
+								// if (item.deptname) {
85
+								// 	rowData.push(item.deptname)
86
+								// }
87
+								// if (Number(item.finish) != 0) {
88
+								// 	colData1.push(Number(item.finish))
89
+								// }
90
+								// if (Number(item.unfinish) != 0) {
91
+								// 	colData2.push(Number(item.unfinish))
92
+								// }
93
+								// if (Number(item.fx) != 0) {
94
+								// 	colData3.push(Number(item.fx))
95
+								// }
96
+								res = {
97
+									categories: rowData,
98
+									series: [{
99
+											name: "完成量",
100
+											data: colData1
101
+										},
102
+										{
103
+											name: "未完成量",
104
+											data: colData2
105
+										},
106
+										{
107
+											name: "返修量",
108
+											data: colData3
109
+										}
110
+									]
111
+								};
112
+								this.chartData = JSON.parse(JSON.stringify(res));
113
+								// this.chartData(rowData, colData1, colData2, colData3)
59 114
 							})
60 115
 						} else {
61 116
 							rowData = ['科室名称', '科室名称', '科室名称']
@@ -68,65 +123,65 @@
68 123
 				})
69 124
 			},
70 125
 			//图表
71
-			chartData(rowd, cold1, cold2, cold3) {
72
-				this.chart.setOption({
73
-					tooltip: {
74
-						trigger: 'axis',
75
-						axisPointer: {
76
-							type: 'shadow'
77
-						}
78
-					},
79
-					legend: {
80
-						x:'left',
81
-						y:'left',
82
-						data:['完成量','未完成量','返修量'],
83
-						selectedMode:false
84
-					},
85
-					color:["#7b9df2","#8ebb75","#dabe4f"],
86
-					grid: {
87
-						left: '1%',
88
-						right: '1%',
89
-						bottom: '3%',
90
-						containLabel: true
91
-					},
92
-					xAxis: {
93
-						axisLine: false,
94
-						type: 'value'
95
-					},
96
-					yAxis: {
97
-						type: 'category',
98
-						data: rowd
99
-					},
100
-					series: [{
101
-							name: '完成量',
102
-							type: 'bar',
103
-							stack: 'total',
104
-							label: {
105
-								show: true
106
-							},
107
-							data: cold1
108
-						},
109
-						{
110
-							name: '未完成量',
111
-							type: 'bar',
112
-							stack: 'total',
113
-							label: {
114
-								show: true
115
-							},
116
-							data: cold2
117
-						},
118
-						{
119
-							name: '返修量',
120
-							type: 'bar',
121
-							stack: 'total',
122
-							label: {
123
-								show: true
124
-							},
125
-							data: cold3
126
-						},
127
-					]
128
-				})
129
-			},
126
+			// chartData(rowd, cold1, cold2, cold3) {
127
+			// 	this.chart.setOption({
128
+			// 		tooltip: {
129
+			// 			trigger: 'axis',
130
+			// 			axisPointer: {
131
+			// 				type: 'shadow'
132
+			// 			}
133
+			// 		},
134
+			// 		legend: {
135
+			// 			x: 'left',
136
+			// 			y: 'left',
137
+			// 			data: ['完成量', '未完成量', '返修量'],
138
+			// 			selectedMode: false
139
+			// 		},
140
+			// 		color: ["#7b9df2", "#8ebb75", "#dabe4f"],
141
+			// 		grid: {
142
+			// 			left: '1%',
143
+			// 			right: '1%',
144
+			// 			bottom: '3%',
145
+			// 			containLabel: true
146
+			// 		},
147
+			// 		xAxis: {
148
+			// 			axisLine: false,
149
+			// 			type: 'value'
150
+			// 		},
151
+			// 		yAxis: {
152
+			// 			type: 'category',
153
+			// 			data: rowd
154
+			// 		},
155
+			// 		series: [{
156
+			// 				name: '完成量',
157
+			// 				type: 'bar',
158
+			// 				stack: 'total',
159
+			// 				label: {
160
+			// 					show: true
161
+			// 				},
162
+			// 				data: cold1
163
+			// 			},
164
+			// 			{
165
+			// 				name: '未完成量',
166
+			// 				type: 'bar',
167
+			// 				stack: 'total',
168
+			// 				label: {
169
+			// 					show: true
170
+			// 				},
171
+			// 				data: cold2
172
+			// 			},
173
+			// 			{
174
+			// 				name: '返修量',
175
+			// 				type: 'bar',
176
+			// 				stack: 'total',
177
+			// 				label: {
178
+			// 					show: true
179
+			// 				},
180
+			// 				data: cold3
181
+			// 			},
182
+			// 		]
183
+			// 	})
184
+			// },
130 185
 		}
131 186
 	}
132 187
 </script>

+ 146 - 36
CallCenterWeb.UI/RMYYAPP/pages/myTask/reportForm/reportForm.vue

@@ -137,8 +137,9 @@
137 137
 			<custom-tab-pane label="返修" name="c1_3_fx"></custom-tab-pane>
138 138
 			<custom-tab-pane label="挂起" name="c1_3_gq"></custom-tab-pane>
139 139
 		</custom-tabs>
140
-		<view style="margin-bottom: 30rpx;">
141
-			<uni-table ref="table" border stripe emptyText="暂无更多数据" style="height: 700rpx;">
140
+		<view style="margin-bottom: 30rpx;height: 700rpx;overflow-y: scroll;">
141
+			<zb-table :show-header="true" :columns="columnone" :fit="false" :border="false" :data="dataone"></zb-table>
142
+			<!-- <uni-table ref="table" border stripe emptyText="暂无更多数据" style="height: 700rpx;">
142 143
 				<uni-tr>
143 144
 					<uni-th align="center" width="145rpx" class="thcol">报工科室</uni-th>
144 145
 					<uni-th align="center" width="145rpx" class="thcol">工单类别</uni-th>
@@ -153,9 +154,9 @@
153 154
 					<uni-td align="center" class="tdcol">{{ item.gapTime }}</uni-td>
154 155
 					<uni-td align="center" class="tdcol">{{ item.Maintenancer }}</uni-td>
155 156
 				</uni-tr>
156
-			</uni-table>
157
-			<view class="uni-pagination-box"><uni-pagination show-icon :page-size="pageSize" :current="pageCurrent"
158
-					:total="total" @change="change" /></view>
157
+			</uni-table> -->
158
+			<!-- <view class="uni-pagination-box"><uni-pagination show-icon :page-size="pageSize" :current="pageCurrent"
159
+					:total="total" @change="change" /></view> -->
159 160
 		</view>
160 161
 		<view class="bbottom" style="padding-bottom: 50rpx;">
161 162
 			<view>
@@ -188,8 +189,9 @@
188 189
 			</view>
189 190
 		</view>
190 191
 		<view class="worktit">人员接单数据</view>
191
-		<view style="margin-bottom: 40rpx;margin-top: 20rpx;">
192
-			<uni-table ref="table2" border stripe emptyText="暂无更多数据" style="height: 500rpx;">
192
+		<view style="margin-bottom: 40rpx;margin-top: 20rpx;height: 700rpx;overflow-y: scroll;">
193
+			<zb-table :show-header="true" :columns="columntwo" :fit="false" :border="false" :data="datatwo"></zb-table>
194
+			<!-- <uni-table ref="table2" border stripe emptyText="暂无更多数据" style="height: 500rpx;">
193 195
 				<uni-tr>
194 196
 					<uni-th align="center" width="100rpx" class="thcol">姓名</uni-th>
195 197
 					<uni-th align="center" width="150rpx" class="thcol">班组</uni-th>
@@ -208,7 +210,7 @@
208 210
 				</uni-tr>
209 211
 			</uni-table>
210 212
 			<view class="uni-pagination-box"><uni-pagination show-icon :page-size="pageSize2" :current="pageCurrent2"
211
-					:total="total2" @change="change2" /></view>
213
+					:total="total2" @change="change2" /></view> -->
212 214
 		</view>
213 215
 	</view>
214 216
 </template>
@@ -222,6 +224,76 @@
222 224
 		},
223 225
 		data() {
224 226
 			return {
227
+				columnone: [{
228
+						name: 'ApplicationDept',
229
+						label: '报工科室',
230
+						// fixed: true,
231
+						width:100,
232
+						align: 'center'
233
+					},
234
+					{
235
+						name: 'categoryname',
236
+						label: '工单类别',
237
+						width:80,
238
+						align: 'center'
239
+					},
240
+					{
241
+						name: 'StateName',
242
+						label: '状态',
243
+						width:70,
244
+						align: 'center'
245
+					},
246
+					{
247
+						name: 'gapTime',
248
+						label: '时效',
249
+						width:90,
250
+						align: 'center'
251
+					},
252
+					{
253
+						name: 'Maintenancer',
254
+						label: '接单人',
255
+						width:70,
256
+						align: 'center'
257
+					}
258
+				],
259
+				dataone: [],
260
+				columntwo:[{
261
+						name: 'Maintenancer',
262
+						label: '姓名',
263
+						// fixed: true,
264
+						width:65,
265
+						align: 'center'
266
+					},{
267
+						name: 'deptname',
268
+						label: '班组',
269
+						width:120,
270
+						align: 'center'
271
+					},{
272
+						name: 'jdcount',
273
+						label: '接单量',
274
+						sorter: true,
275
+						width:65,
276
+						align: 'center'
277
+					},{
278
+						name: 'unfinishcount',
279
+						label: '未完成',
280
+						sorter: true,
281
+						width:65,
282
+						align: 'center'
283
+					},{
284
+						name: 'overcount',
285
+						label: '超时工单',
286
+						sorter: true,
287
+						width:80,
288
+						align: 'center'
289
+					},{
290
+						name: 'bumanyi',
291
+						label: '不满意',
292
+						sorter: true,
293
+						width:65,
294
+						align: 'center'
295
+					}],
296
+				datatwo:[],
225 297
 				items: ['周', '月', '年', '全'],
226 298
 				current: 0,
227 299
 				biechartData: {},
@@ -229,7 +301,7 @@
229 301
 					rotate: false,
230 302
 					rotateLock: false,
231 303
 					color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
232
-						"#ea7ccc"
304
+						"#ea7ccc", "#aaaa7f", "#00aaff", "#ff5500"
233 305
 					],
234 306
 					padding: [5, 5, 5, 5],
235 307
 					dataLabel: true,
@@ -237,7 +309,8 @@
237 309
 					legend: {
238 310
 						show: true,
239 311
 						position: "right",
240
-						lineHeight: 25
312
+						lineHeight: 20,
313
+						fontSize: 12
241 314
 					},
242 315
 					title: {
243 316
 						name: "报工类型",
@@ -288,7 +361,7 @@
288 361
 						}
289 362
 					},
290 363
 				},
291
-				binname:'900',
364
+				binname: '900',
292 365
 				pageSize: 5,
293 366
 				pageCurrent: 1,
294 367
 				total: 0,
@@ -404,7 +477,7 @@
404 477
 					this.defaultEndTime = this.getDateTime()
405 478
 					ordertype = 3
406 479
 				}
407
-				console.log(this.defaultStartTime,this.defaultEndTime)
480
+				console.log(this.defaultStartTime, this.defaultEndTime)
408 481
 				const option = {
409 482
 					reportType: ordertype
410 483
 				}
@@ -416,9 +489,9 @@
416 489
 				this.initCircle(option) //环形图
417 490
 			},
418 491
 			//排序触发
419
-			sortChange(data) {
420
-				console.log(data)
421
-			},
492
+			// sortChange(data) {
493
+			// 	console.log(data)
494
+			// },
422 495
 			gotoDetail(num) {
423 496
 				console.log(num)
424 497
 				uni.navigateTo({
@@ -449,7 +522,7 @@
449 522
 								data.push(response.data.dt[i])
450 523
 							}
451 524
 							if (i > 11) {
452
-								othercon += response.data.dt[i].value
525
+								othercon += Number(response.data.dt[i].value)
453 526
 								data.push({
454 527
 									name: "其他",
455 528
 									value: othercon
@@ -472,6 +545,33 @@
472 545
 						}, {
473 546
 							name: "网络",
474 547
 							value: 10
548
+						}, {
549
+							name: "电视",
550
+							value: 10
551
+						}, {
552
+							name: "电脑",
553
+							value: 10
554
+						}, {
555
+							name: "网络",
556
+							value: 10
557
+						}, {
558
+							name: "电视",
559
+							value: 10
560
+						}, {
561
+							name: "电脑",
562
+							value: 10
563
+						}, {
564
+							name: "网络",
565
+							value: 10
566
+						}, {
567
+							name: "电视",
568
+							value: 10
569
+						}, {
570
+							name: "电脑",
571
+							value: 10
572
+						}, {
573
+							name: "网络",
574
+							value: 10
475 575
 						}]
476 576
 						var res = {
477 577
 							series: [{
@@ -528,13 +628,13 @@
528 628
 						var res = {}
529 629
 						if (response.data.dt.length > 0) {
530 630
 							response.data.dt.forEach((item, index) => {
531
-								if (this.reportType == 1) {//日
631
+								if (item.dateshownew.length == 10) { //日
532 632
 									rowData.push(item.dateshownew.substring(5, 10))
533 633
 									colData.push(Number(item.allcountnew))
534
-								}else if (this.reportType == 0) {//点
634
+								} else if (this.reportType == 0) { //点
535 635
 									rowData.push(item.dateshownew.split(" ")[1].substring(0, 5))
536 636
 									colData.push(Number(item.allcountnew))
537
-								}else{//月,年
637
+								} else { //月,年
538 638
 									rowData.push(item.dateshownew)
539 639
 									colData.push(Number(item.allcountnew))
540 640
 								}
@@ -547,7 +647,6 @@
547 647
 								}]
548 648
 							}
549 649
 							this.chartDatas = JSON.parse(JSON.stringify(res))
550
-							// console.log(this.chartDatas)
551 650
 						} else {
552 651
 							rowData = ['0:00', '4:00', '8:00', '12:00']
553 652
 							colData = [{
@@ -624,8 +723,8 @@
624 723
 					ordertype = 1
625 724
 				}
626 725
 				const params = {
627
-					page: this.pageCurrent,
628
-					pagesize: this.pageSize,
726
+					// page: this.pageCurrent,
727
+					// pagesize: this.pageSize,
629 728
 					starttime: this.defaultStartTime,
630 729
 					endtime: this.defaultEndTime,
631 730
 					type: ordertype
@@ -634,26 +733,31 @@
634 733
 					if (response.state.toLowerCase() === "success") {
635 734
 						this.yichangData = response.rows
636 735
 						this.total = response.total
736
+						response.rows.forEach(item=>{
737
+							item.categoryname = item.categoryname.split('/')[2]
738
+						})
739
+						this.dataone = response.rows
740
+						// console.log(this.dataone)
637 741
 					}
638 742
 				}).catch((e) => {
639 743
 					console.log(e);
640 744
 				})
641 745
 			},
642 746
 			// 分页触发
643
-			change(e) {
644
-				this.$refs.table.clearSelection()
645
-				this.pageCurrent = e.current
646
-				this.initExceptionOrder("", this.valuesname)
647
-			},
648
-			change2(e) {
649
-				this.$refs.table2.clearSelection()
650
-				this.pageCurrent2 = e.current
651
-				this.initAcceptOrder()
652
-			},
747
+			// change(e) {
748
+			// 	this.$refs.table.clearSelection()
749
+			// 	this.pageCurrent = e.current
750
+			// 	this.initExceptionOrder("", this.valuesname)
751
+			// },
752
+			// change2(e) {
753
+			// 	this.$refs.table2.clearSelection()
754
+			// 	this.pageCurrent2 = e.current
755
+			// 	this.initAcceptOrder()
756
+			// },
653 757
 			initAcceptOrder(option) {
654 758
 				const params = {
655
-					page: this.pageCurrent2,
656
-					pagesize: this.pageSize2,
759
+					// page: this.pageCurrent2,
760
+					// pagesize: this.pageSize2,
657 761
 					starttime: this.defaultStartTime,
658 762
 					endtime: this.defaultEndTime,
659 763
 				}
@@ -661,6 +765,7 @@
661 765
 					if (response.state.toLowerCase() === "success") {
662 766
 						this.total2 = response.total
663 767
 						this.renyuanData = response.data
768
+						this.datatwo = response.data
664 769
 					}
665 770
 				}).catch((e) => {
666 771
 					console.log(e);
@@ -790,10 +895,15 @@
790 895
 </script>
791 896
 
792 897
 <style scoped>
793
-	/deep/.segmented-control__item--button{
898
+	/deep/.zb-table-thead .item-th{
899
+		background: #bdd7fb;
900
+	}
901
+	
902
+	/deep/.segmented-control__item--button {
794 903
 		border: none;
795 904
 		border-radius: 0;
796 905
 	}
906
+
797 907
 	/deep/.tab .tab-bar-item {
798 908
 		width: 19%;
799 909
 	}
@@ -829,7 +939,7 @@
829 939
 		height: 27px;
830 940
 		margin: 0 auto;
831 941
 		background-color: #ffffff;
832
-		box-shadow: 0px 5px 5px 0px rgb(213,224,233);
942
+		box-shadow: 0px 5px 5px 0px rgb(213, 224, 233);
833 943
 	}
834 944
 
835 945
 	.timebox {

+ 3 - 2
CallCenterWeb.UI/RMYYAPP/pages/noDing/noDing.vue

@@ -27,10 +27,11 @@
27 27
 	.wrap{
28 28
 		width: 100%;
29 29
 		height: 100vh;
30
-		// background-color: #fff;
31
-		// background-image: url('/static/home.png');
30
+		background-color: #f8f8f8;
31
+		// background-image: url('/static/404.png');
32 32
 	}
33 33
 	.header{
34
+		height: 100%;
34 35
 		// position: absolute;
35 36
 		// left: 36%;
36 37
 		// top: 25%;

+ 106 - 0
CallCenterWeb.UI/RMYYAPP/uni_modules/zb-table/changelog.md

@@ -0,0 +1,106 @@
1
+## 1.2.18(2023-06-01)
2
+更新
3
+## 1.2.16(2023-05-10)
4
+增加单元格点击事件
5
+完善文档
6
+增加示例
7
+## 1.2.15(2022-08-25)
8
+优化部分细节
9
+## 1.2.14(2022-04-25)
10
+修改vue 3 报错小程序Generated an empty chunk: "uni_modules/zb-table/components/zb-table/js/util"
11
+## 1.2.13(2022-04-22)
12
+增加图片宽度设置
13
+## 1.2.12(2022-04-22)
14
+修复pc端 滚动条占位问题
15
+## 1.2.11(2022-04-22)
16
+增加多图片展示
17
+## 1.2.10(2022-04-19)
18
+版本解决冲突
19
+## 1.2.9(2022-04-19)
20
+暂时去掉多级表头...有着某些问题,正在修复中
21
+## 1.1.9(2022-04-19)
22
+暂时去掉多级表头...有着某些问题,正在修复中
23
+## 1.1.23(2022-04-19)
24
+暂时去掉多级表头,有着某些问题,修复中。。。
25
+## 1.1.22(2022-04-19)
26
+暂时去掉多级表头,存在某些问题 ,正在修复中
27
+## 1.1.21(2022-03-29)
28
+优化数字问题
29
+## 1.1.20(2022-03-29)
30
+优化按钮,可以自定义按钮,自定义添加class
31
+## 1.1.19(2022-03-28)
32
+进行优化加载
33
+## 1.1.18(2022-03-28)
34
+修复pc端滚动条问题
35
+## 1.1.17(2022-03-25)
36
+修改 数据回显的时候,全选框没有选中效果
37
+## 1.1.16(2022-03-25)
38
+新增:table属性 cell-style 修改单元格样式
39
+## 1.1.15(2022-03-23)
40
+fix:支付宝小程序上拉加载e.detail 没有值导致上拉加载失效 ,已修复
41
+## 1.1.14(2022-03-23)
42
+fix: 支付宝小程序左右无法滑动的问题
43
+## 1.1.13(2022-03-21)
44
+fix:英文宽度自适应问题
45
+## 1.1.12(2022-03-20)
46
+修改自适应宽度问题
47
+## 1.1.11(2022-03-19)
48
+增加上拉加载功能
49
+## 1.1.10(2022-03-18)
50
+修改合计不更新问题
51
+## 1.1.9(2022-03-16)
52
+优化css 样式
53
+## 1.1.8(2022-03-16)
54
+增加表尾合计行
55
+## 1.1.7(2022-03-15)
56
+修改css样式
57
+## 1.1.6(2022-03-14)
58
+进行代码优化
59
+## 1.1.5(2022-03-12)
60
+更新一个操作按钮的时候 报错问题,进行代码优化
61
+## 1.1.4(2022-03-12)
62
+增加图片统一高度
63
+## 1.1.3(2022-03-12)
64
+增加图片地址 ,并且图片支持预览功能
65
+## 1.1.2(2022-03-11)
66
+新增默认 是否选中功能,进行优化
67
+## 1.1.1(2022-03-10)
68
+新增单击事件
69
+## 1.1.0(2022-03-10)
70
+- 增加单击事件
71
+
72
+## 1.1.0(2022-03-10)
73
+- 增加checkbox功能 ,进行优化
74
+
75
+## 1.0.11(2022-03-09)
76
+- 修改小程序中排序问题
77
+
78
+## 1.0.10(2022-03-09)
79
+- 做了兼容性处理
80
+
81
+## 1.0.8(2022-03-09)
82
+- 进行优化滚动防止 多次计算
83
+
84
+## 1.0.7(2022-03-09)
85
+- 修改一些问题 新增过滤器
86
+
87
+## 1.0.6(2022-03-08)
88
+- 修改样式 按钮自适应宽度
89
+
90
+## 1.0.5(2022-03-08)
91
+- 新增按钮 修改问题
92
+
93
+## 1.0.4(2022-03-04)
94
+- 增加空占位符"--"
95
+
96
+## 1.0.3(2022-03-02)
97
+- 新增表格斑马纹配置、列宽配置、表头显示配置
98
+
99
+## 1.0.2(2022-03-02)
100
+- 新增排序功能,优化样式
101
+
102
+## 1.0.1(2022-03-01)
103
+- 可以传入动态数据,可以对左边列表进行是否固定首列
104
+
105
+## 1.0.0(2022-03-01)
106
+- 初始化

+ 180 - 0
CallCenterWeb.UI/RMYYAPP/uni_modules/zb-table/components/zb-table/components/table-checkbox.vue

@@ -0,0 +1,180 @@
1
+<template>
2
+	<view class="uni-table-checkbox" @click.stop="selected">
3
+		<view v-if="!indeterminate" class="checkbox__inner" :class="{'is-checked':isChecked,'is-disable':isDisabled}">
4
+			<view class="checkbox__inner-icon"></view>
5
+		</view>
6
+		<view v-else class="checkbox__inner checkbox--indeterminate">
7
+			<view class="checkbox__inner-icon"></view>
8
+		</view>
9
+	</view>
10
+</template>
11
+
12
+<script>
13
+	export default {
14
+		name: 'TableCheckbox',
15
+		emits:['checkboxSelected'],
16
+		props: {
17
+			indeterminate: {
18
+				type: Boolean,
19
+				default: false
20
+			},
21
+			checked: {
22
+				type: [Boolean,String],
23
+				default: false
24
+			},
25
+			disabled: {
26
+				type: Boolean,
27
+				default: false
28
+			},
29
+			index: {
30
+				type: Number,
31
+				default: -1
32
+			},
33
+			cellData: {
34
+				type: Object,
35
+				default () {
36
+					return {}
37
+				}
38
+			}
39
+		},
40
+		watch:{
41
+			checked(newVal){
42
+				if(typeof this.checked === 'boolean'){
43
+					this.isChecked = newVal
44
+				}else{
45
+					this.isChecked = true
46
+				}
47
+			},
48
+			indeterminate(newVal){
49
+				this.isIndeterminate = newVal
50
+			}
51
+		},
52
+		data() {
53
+			return {
54
+				isChecked: false,
55
+				isDisabled: false,
56
+				isIndeterminate:false
57
+			}
58
+		},
59
+		created() {
60
+			if(typeof this.checked === 'boolean'){
61
+				this.isChecked = this.checked
62
+			}
63
+			this.isDisabled = this.disabled
64
+		},
65
+		methods: {
66
+			selected() {
67
+				if (this.isDisabled) return
68
+				this.isIndeterminate = false
69
+				this.isChecked = !this.isChecked
70
+        console.log('===',this.indeterminate,this.isChecked)
71
+				this.$emit('checkboxSelected', {
72
+					checked: this.isChecked,
73
+					data: this.cellData
74
+				})
75
+			}
76
+		}
77
+	}
78
+</script>
79
+
80
+<style lang="scss">
81
+	$checked-color: #007aff;
82
+	$border-color: #DCDFE6;
83
+	$disable:0.4;
84
+
85
+	.uni-table-checkbox {
86
+		display: flex;
87
+		flex-direction: row;
88
+		align-items: center;
89
+		justify-content: center;
90
+		position: relative;
91
+		margin: 5px 0;
92
+		cursor: pointer;
93
+
94
+		// 多选样式
95
+		.checkbox__inner {
96
+			/* #ifndef APP-NVUE */
97
+			flex-shrink: 0;
98
+			box-sizing: border-box;
99
+			/* #endif */
100
+			position: relative;
101
+			width: 16px;
102
+			height: 16px;
103
+			border: 1px solid $border-color;
104
+			border-radius: 2px;
105
+			background-color: #fff;
106
+			z-index: 1;
107
+
108
+			.checkbox__inner-icon {
109
+				position: absolute;
110
+				/* #ifdef APP-NVUE */
111
+				top: 2px;
112
+				/* #endif */
113
+				/* #ifndef APP-NVUE */
114
+				top: 2px;
115
+				/* #endif */
116
+				left: 5px;
117
+				height: 7px;
118
+				width: 3px;
119
+				border: 1px solid #fff;
120
+				border-left: 0;
121
+				border-top: 0;
122
+				opacity: 0;
123
+				transform-origin: center;
124
+				transform: rotate(45deg);
125
+				box-sizing: content-box;
126
+			}
127
+
128
+			&.checkbox--indeterminate {
129
+				border-color: $checked-color;
130
+				background-color: $checked-color;
131
+
132
+				.checkbox__inner-icon {
133
+					position: absolute;
134
+					opacity: 1;
135
+					transform: rotate(0deg);
136
+					height: 2px;
137
+					top: 0;
138
+					bottom: 0;
139
+					margin: auto;
140
+					left: 0px;
141
+					right: 0px;
142
+					bottom: 0;
143
+					width: auto;
144
+					border: none;
145
+					border-radius: 2px;
146
+					transform: scale(0.5);
147
+					background-color: #fff;
148
+				}
149
+			}
150
+			&:hover{
151
+				border-color: $checked-color;
152
+			}
153
+			// 禁用
154
+			&.is-disable {
155
+				/* #ifdef H5 */
156
+				cursor: not-allowed;
157
+				/* #endif */
158
+				background-color: #F2F6FC;
159
+				border-color: $border-color;
160
+			}
161
+
162
+			// 选中
163
+			&.is-checked {
164
+				border-color: $checked-color;
165
+				background-color: $checked-color;
166
+
167
+				.checkbox__inner-icon {
168
+					opacity: 1;
169
+					transform: rotate(45deg);
170
+				}
171
+
172
+				// 选中禁用
173
+				&.is-disable {
174
+					opacity: $disable;
175
+				}
176
+			}
177
+
178
+		}
179
+	}
180
+</style>

+ 78 - 0
CallCenterWeb.UI/RMYYAPP/uni_modules/zb-table/components/zb-table/components/table-h5-summary.vue

@@ -0,0 +1,78 @@
1
+<template>
2
+  <view class="table-h5-footer top-header-uni" :style="{paddingRight:`${scrollbarSize}px`}">
3
+    <scroll-view class="zb-table-headers"
4
+                 @scroll="handleFooterTableScrollLeft"
5
+                 scroll-x="true"
6
+                 scroll-y="false"
7
+                 id="tableFooterHeaders"
8
+                 scroll-anchoring="true"
9
+                 :scroll-left="headerFooterTableLeft"
10
+                 style="padding-bottom: 0px;
11
+						background: #fafafa;height: 100%">
12
+      <view class="zb-table-fixed" >
13
+        <view class="zb-table-thead" style="position: relative;" >
14
+          <view class="item-tr">
15
+            <view
16
+                class="item-th"
17
+                :style="{
18
+	                              width:`${item.width?item.width:'100'}px`,
19
+															  flex:index===transColumns.length-1?1:'none',
20
+															  minWidth:`${item.width?item.width:'100'}px`,
21
+															  borderRight:`${border?'1px solid #e8e8e8':''}`,
22
+															  borderTop:`${border?'1px solid #e8e8e8':''}`,
23
+															  textAlign:item.align||'left'
24
+														  }"
25
+                v-for="(item,index) in transColumns" :key="index">
26
+              {{ sums[index] }}
27
+            </view>
28
+          </view>
29
+        </view>
30
+      </view>
31
+    </scroll-view>
32
+  </view>
33
+</template>
34
+<script>
35
+import summary from '../js/summary.js'
36
+export default {
37
+  name:'table-footer',
38
+  mixins:[summary],
39
+}
40
+</script>
41
+<style lang="scss" scoped>
42
+.table-h5-footer {
43
+  background: #fafafa;
44
+  /*每个页面公共css */
45
+  scroll-view ::-webkit-scrollbar {
46
+    display: none !important;
47
+    width: 0 !important;
48
+    height: 0 !important;
49
+    -webkit-appearance: none;
50
+    background: transparent;
51
+  }
52
+  //第二种
53
+  ::-webkit-scrollbar{
54
+    display: none;
55
+  }
56
+  .item-tr{
57
+    display: flex;
58
+  }
59
+  .item-th{
60
+    padding-left: 8px;
61
+    line-height: 39px;
62
+    height: 40px;
63
+    //display: flex;
64
+    //align-items: center;
65
+    box-sizing: border-box;
66
+    flex-shrink: 0;
67
+    width: 100px;
68
+    padding-right: 20px;
69
+    word-break: keep-all;
70
+    white-space: nowrap;
71
+    overflow: hidden;
72
+    text-overflow: ellipsis;
73
+    overflow-wrap: break-word;
74
+    border-bottom: 1px solid #e8e8e8;
75
+  }
76
+
77
+}
78
+</style>

+ 59 - 0
CallCenterWeb.UI/RMYYAPP/uni_modules/zb-table/components/zb-table/components/table-side-summary.vue

@@ -0,0 +1,59 @@
1
+<template>
2
+  <view class="zb-table-header" style="display: flex;" >
3
+    <view class="item-tr" >
4
+      <view class='item-td'
5
+            :style="{
6
+	                       width:`${item.width?item.width:'100'}px`,
7
+	                       borderRight:`${border?'1px solid #e8e8e8':''}`,
8
+	                       textAlign:item.align||'left'
9
+	                      }"
10
+            :key="`15255966555${index}`"
11
+            v-for="(item,index) in fixedLeftColumns">
12
+        <template >
13
+          {{sums[index]}}
14
+        </template>
15
+      </view>
16
+    </view>
17
+  </view>
18
+
19
+</template>
20
+<script>
21
+import summary from '../js/summary.js'
22
+export default {
23
+  mixins:[summary]
24
+}
25
+</script>
26
+<style lang="scss" scoped>
27
+.zb-table-header {
28
+  overflow: hidden;
29
+  background: #fafafa;
30
+  .item-th{
31
+    padding-left: 8px;
32
+    line-height: 39px;
33
+    height: 40px;
34
+    //display: flex;
35
+    //align-items: center;
36
+    box-sizing: border-box;
37
+  }
38
+}
39
+.item-tr{
40
+  display: flex;
41
+  box-sizing: border-box;
42
+}
43
+.item-td{
44
+  flex-shrink: 0;
45
+  width: 100px;
46
+  padding-left: 8px;
47
+  height: 40px;
48
+  line-height: 40px;
49
+  padding-right: 20px;
50
+  box-sizing: border-box;
51
+  word-break: keep-all;
52
+  white-space: nowrap;
53
+  overflow: hidden;
54
+  text-overflow: ellipsis;
55
+  overflow-wrap: break-word;
56
+  border-bottom: 1px solid #e8e8e8;
57
+  background: rgb(250, 250, 250);
58
+}
59
+</style>

+ 77 - 0
CallCenterWeb.UI/RMYYAPP/uni_modules/zb-table/components/zb-table/components/table-summary.vue

@@ -0,0 +1,77 @@
1
+<template>
2
+  <view class="zb-table-footer" style="height: 40px;">
3
+    <view class="zb-table-fixed" >
4
+      <view class="zb-table-thead" style="position: relative;" >
5
+        <view class="item-tr">
6
+          <view
7
+              :class="['item-th',index <fixedLeftColumns.length&&'zb-stick-side']"
8
+              :style="{
9
+	                              left:`${item.left}px`,
10
+	                              width:`${item.width?item.width:'100'}px`,
11
+															  flex:index===transColumns.length-1?1:'none',
12
+															  minWidth:`${item.width?item.width:'100'}px`,
13
+															   borderRight:`${border?'1px solid #e8e8e8':''}`,
14
+															  borderTop:`${border?'1px solid #e8e8e8':''}`,
15
+															   textAlign:item.align||'left'
16
+														  }"
17
+              v-for="(item,index) in transColumns" :key="index">
18
+            <template>
19
+              {{ sums[index]||item.emptyString }}
20
+            </template>
21
+          </view>
22
+        </view>
23
+      </view>
24
+    </view>
25
+  </view>
26
+</template>
27
+<script>
28
+  import summary from '../js/summary.js'
29
+  export default {
30
+    mixins:[summary]
31
+  }
32
+</script>
33
+<style lang="scss" scoped>
34
+  .zb-table-footer {
35
+    background: #fafafa;
36
+    width: fit-content;
37
+    min-width: 100%;
38
+    position: sticky;
39
+    bottom: 0;
40
+    z-index: 2;
41
+    .item-tr{
42
+      display: flex;
43
+      min-width: 100%;
44
+    }
45
+    .item-th{
46
+      padding-left: 8px;
47
+      line-height: 39px;
48
+      height: 40px;
49
+      //display: flex;
50
+      //align-items: center;
51
+      box-sizing: border-box;
52
+      flex-shrink: 0;
53
+      width: 100px;
54
+      padding-right: 20px;
55
+      word-break: keep-all;
56
+      white-space: nowrap;
57
+      overflow: hidden;
58
+      text-overflow: ellipsis;
59
+      overflow-wrap: break-word;
60
+      border-bottom: 1px solid #e8e8e8;
61
+    }
62
+    .zb-table-fixed{
63
+      min-width: 100%;
64
+
65
+    }
66
+    .zb-stick-side{
67
+      position: sticky;
68
+      bottom:0 ;
69
+      left: 0;
70
+      z-index: 2;
71
+      //border-right: solid 1rpx #dbdbdb;
72
+      box-sizing: border-box;
73
+      background: #fafafa;
74
+      //box-shadow: 6px 0 6px -4px #ccc;
75
+    }
76
+  }
77
+</style>

Plik diff jest za duży
+ 50 - 0
CallCenterWeb.UI/RMYYAPP/uni_modules/zb-table/components/zb-table/components/zb-load-more.vue


+ 88 - 0
CallCenterWeb.UI/RMYYAPP/uni_modules/zb-table/components/zb-table/js/summary.js

@@ -0,0 +1,88 @@
1
+export default {
2
+    props:{
3
+        scrollbarSize:{
4
+            type:Number,
5
+            default:0
6
+        },
7
+        fixedLeftColumns:{
8
+            type:Array,
9
+            default:()=>[]
10
+        },
11
+        data:{
12
+            type:Array,
13
+            default:()=>[]
14
+        },
15
+        transColumns:{
16
+            type:Array,
17
+            default:()=>[]
18
+        },
19
+        border:{
20
+            type:Boolean,
21
+            default:false
22
+        },
23
+        showSummary:{
24
+            type:Boolean,
25
+            default:false
26
+        },
27
+        summaryMethod:{
28
+            type:Function
29
+        },
30
+        sumText:{
31
+            type:String,
32
+            default:'合计'
33
+        },
34
+        headerFooterTableLeft:{
35
+            type:Number,
36
+            default:0
37
+        },
38
+        handleFooterTableScrollLeft:Function,
39
+    },
40
+    data(){
41
+        return{
42
+            sums:[]
43
+        }
44
+    },
45
+    watch:{
46
+        'data':{
47
+            deep:true,
48
+            immediate:true,
49
+            handler(newValue,oldValue){
50
+                let sums = [];
51
+                if (this.summaryMethod) {
52
+                    sums = this.summaryMethod({ columns: this.transColumns, data: this.data });
53
+                } else {
54
+                    this.transColumns.forEach((column, index) => {
55
+                        if (index === 0) {
56
+                            sums[index] = this.sumText;
57
+                            return;
58
+                        }
59
+                        const values = this.data.map(item => Number(item[column.name]));
60
+                        const precisions = [];
61
+                        let notNumber = true;
62
+                        values.forEach(value => {
63
+                            if (!isNaN(value)) {
64
+                                notNumber = false;
65
+                                let decimal = ('' + value).split('.')[1];
66
+                                precisions.push(decimal ? decimal.length : 0);
67
+                            }
68
+                        });
69
+                        const precision = Math.max.apply(null, precisions);
70
+                        if (!notNumber) {
71
+                            sums[index] = values.reduce((prev, curr) => {
72
+                                const value = Number(curr);
73
+                                if (!isNaN(value)) {
74
+                                    return parseFloat((prev + curr).toFixed(Math.min(precision, 20)));
75
+                                } else {
76
+                                    return prev;
77
+                                }
78
+                            }, 0);
79
+                        } else {
80
+                            sums[index] = '';
81
+                        }
82
+                    });
83
+                }
84
+                this.sums = sums
85
+            },
86
+        }
87
+    }
88
+}

+ 51 - 0
CallCenterWeb.UI/RMYYAPP/uni_modules/zb-table/components/zb-table/js/util.js

@@ -0,0 +1,51 @@
1
+/**
2
+ * 获取滚动条宽度
3
+ */
4
+let cached = undefined;
5
+
6
+export const getScrollbarSize = fresh => {
7
+	// #ifdef H5
8
+	
9
+    if (fresh || cached === undefined) {
10
+        let inner = document.createElement("div");
11
+        let innerStyle = inner.style;
12
+
13
+        innerStyle.width = "100%";
14
+        innerStyle.height = "200px";
15
+
16
+        let outer = document.createElement("div");
17
+        let outerStyle = outer.style;
18
+
19
+        outerStyle.position = "absolute";
20
+        outerStyle.top = 0;
21
+        outerStyle.left = 0;
22
+        outerStyle.pointerEvents = "none";
23
+        outerStyle.width = "200px";
24
+        outerStyle.height = "150px";
25
+        outerStyle.visibility = "hidden";
26
+
27
+        outer.appendChild(inner);
28
+        document.body.appendChild(outer);
29
+
30
+        // 设置子元素超出部分隐藏
31
+        outerStyle.overflow = "hidden";
32
+
33
+        let width1 = inner.offsetWidth;
34
+
35
+        // 设置子元素超出部分滚动
36
+        outer.style.overflow = "scroll";
37
+
38
+        let width2 = inner.offsetWidth;
39
+
40
+        if (width1 === width2) {
41
+            width2 = outer.clientWidth;
42
+        }
43
+
44
+        document.body.removeChild(outer);
45
+
46
+        cached = width1 - width2;
47
+    }
48
+	//#endif
49
+
50
+    return cached;
51
+};

Plik diff jest za duży
+ 1342 - 0
CallCenterWeb.UI/RMYYAPP/uni_modules/zb-table/components/zb-table/zb-table.vue


+ 81 - 0
CallCenterWeb.UI/RMYYAPP/uni_modules/zb-table/package.json

@@ -0,0 +1,81 @@
1
+{
2
+  "id": "zb-table",
3
+  "displayName": "zb-table(多功能表格)",
4
+  "version": "1.2.18",
5
+  "description": "表格组件 支持固定表头和首列、上拉加载更多、及固定多列,表格自适应内容,排序,多选checkbox、可点击删除,编辑、合计功能,兼容多端",
6
+  "keywords": [
7
+    "table",
8
+    "表格",
9
+    "固定表头、固定首列、多列",
10
+    "上拉加载更多、",
11
+    "排序、自适应列宽、多选checkbox、编辑、删除、按钮、合计"
12
+],
13
+  "repository": "https://github.com/zouzhibin/zb-table.git",
14
+  "engines": {
15
+    "HBuilderX": "^3.1.0"
16
+  },
17
+"dcloudext": {
18
+    "sale": {
19
+      "regular": {
20
+        "price": "0.00"
21
+      },
22
+      "sourcecode": {
23
+        "price": "0.00"
24
+      }
25
+    },
26
+    "contact": {
27
+      "qq": ""
28
+    },
29
+    "declaration": {
30
+      "ads": "无",
31
+      "data": "无",
32
+      "permissions": "无"
33
+    },
34
+    "npmurl": "",
35
+    "type": "component-vue"
36
+  },
37
+  "uni_modules": {
38
+    "dependencies": [],
39
+    "encrypt": [],
40
+    "platforms": {
41
+      "cloud": {
42
+        "tcb": "y",
43
+        "aliyun": "y"
44
+      },
45
+      "client": {
46
+        "Vue": {
47
+          "vue2": "y",
48
+          "vue3": "y"
49
+        },
50
+        "App": {
51
+          "app-vue": "y",
52
+          "app-nvue": "u"
53
+        },
54
+        "H5-mobile": {
55
+          "Safari": "y",
56
+          "Android Browser": "y",
57
+          "微信浏览器(Android)": "y",
58
+          "QQ浏览器(Android)": "y"
59
+        },
60
+        "H5-pc": {
61
+          "Chrome": "y",
62
+          "IE": "y",
63
+          "Edge": "y",
64
+          "Firefox": "y",
65
+          "Safari": "y"
66
+        },
67
+        "小程序": {
68
+          "微信": "y",
69
+          "阿里": "y",
70
+          "百度": "y",
71
+          "字节跳动": "y",
72
+          "QQ": "y"
73
+        },
74
+        "快应用": {
75
+          "华为": "y",
76
+          "联盟": "y"
77
+        }
78
+      }
79
+    }
80
+  }
81
+}

+ 189 - 0
CallCenterWeb.UI/RMYYAPP/uni_modules/zb-table/readme.md

@@ -0,0 +1,189 @@
1
+
2
+## 介绍
3
+基于uni-app开发的一个普通的表格组件,功能有固定首列和表头、排序、操作按钮、
4
+table 表格 固定表头、固定首列、多列 上拉加载更多、 排序、自适应列宽、多选checkbox、编辑、删除、按钮、合计
5
+已用于生产环境
6
+
7
+微信=》 19550102670 拉进群
8
+## -- github 第一时间会更新到github,永远保持最新,有啥想法的可以提PR,共同开发 [地址](https://github.com/zouzhibin/zb-ui)
9
+
10
+## 友情链接
11
+### 在线预览点击 —— [企业级、通用型中后台前端解决方案 ](https://yuanzbz.gitee.io/vue-admin-perfect/#/login?redirect=/home)
12
+### vue-admin-perfect —— [企业级、通用型中后台前端解决方案(基于vue3.0+TS+Element-Plus  最新版,同时支持电脑,手机,平板)](https://github.com/zouzhibin/vue-admin-perfect)
13
+
14
+
15
+## table 属性
16
+| 参数 | 说明 | 类型 | 可选值 | 默认值 |是否必须|
17
+| ------ | ------ | ------ | ------ | ------ |------ |
18
+| data | 显示的数据 | array |-- | -- |必须 |
19
+| column | 显示的列数据 | array |-- | -- |必须 |
20
+| stripe | 是否为斑马纹 table| boolean | - |false | 否 |
21
+| fit | 列的宽度是否自撑开 | boolean |true,false | false |否 |
22
+| show-header | 是否显示表头 | boolean |true,false | true |否 |
23
+| cell-style | 单元格的 style 的回调方法,也可以使用一个固定的 Object 为所有单元格设置一样的 Style。 | Function({row, column, rowIndex, columnIndex})/Object |-- | -- |否 |
24
+| cell-header-style | 头部单元格的 style 的回调方法,也可以使用一个固定的 Object 为所有单元格设置一样的 Style。 | Function({ column, columnIndex})/Object |-- | -- |否 |
25
+| formatter | colomn =》formatter 必须设置为true,才有作用,进行格式化数据,进行数据的转换 | Function({row, column, rowIndex, columnIndex})/Object |-- | -- |否 |
26
+| border | 是否带有纵向边框 | boolean |true,false | true |否 |
27
+| highlight | 是否要高亮当前行 | boolean |true,false | false |否 |
28
+| show-summary | 是否在表尾显示合计行 | boolean |true,false | false |否 |
29
+| sum-text | 合计行第一列的文本 | String |- | 合计 |否 |
30
+| summary-method | 自定义的合计计算方法 | Function({ columns, data }) |- | - |否 |
31
+| permissionBtn | 是否动态控制按钮的显示隐藏 | Function({ row, renders,index }) |- | - |否 |
32
+| isShowLoadMore | 是否开启上拉加载 | boolean |true,false | false |否 |
33
+| pullUpLoading | 开启上拉加载后的返回函数,接收参数done是函数,done(type),type为空代表还有数据,继续开启上拉加载,type='ok',代表结束上拉加载 | Function(done) |-- | -- |否 |
34
+
35
+```
36
+关闭上拉加载的方式1:pullUpLoading((done)=>{
37
+	done(type)
38
+})
39
+done 接收参数为 type ,type为空代表还有数据,可以继续加载,无数据的时候传入 'ok'代表结束
40
+```
41
+
42
+## table 事件
43
+| 参数 | 说明 | 类型 | 可选值                      | 默认值 |是否必须|
44
+| ------ | ------ | ------ |--------------------------| ------ |------ |
45
+| 事件名自定义 | 取决于type类型为operation的 renders参数里面 func 的参数名 | Function | (row,index)=>{}          | -- |否 |
46
+| sort-change | 取决于type类型为operation的 renders参数里面 func 的参数名 | Function | (column,model,index)=>{} | -- |否 |
47
+| currentChange | 当表格的当前行发生变化的时候会触发该事件,如果要高亮当前行,请打开表格的 highlight属性,this.$refs.table.resetHighlight()清除选中 | Function | (row,index)=>{}          | -- |否 |
48
+| toggleRowSelection | 用于多选表格,切换某一行的选中状态,第一个参数代表选中状态,参数二代表选中的对象 | Function | (selected ,array)=>{}    | -- |否 |
49
+| toggleAllSelection | 用于多选表格,切换所有行的选中状态 ,第一个参数代表选中状态,参数二代表选中的对象| Function | (selected ,array)=>{}    | -- |否 |
50
+| rowClick | 单击某行 ,第一个参数代表选中对象,参数二代表选中的index| Function | (row ,index)=>{}         | -- |否 |
51
+| cellClick | 单击单元格 ,当某个单元格被点击时会触发该事件| Function | (row ,index,column)=>{}        | -- |否 |
52
+| pullUpLoading | 开启上拉加载后的返回函数,无参数| Function  | --                       |-- |否 |
53
+
54
+```
55
+关闭上拉加载的方式2:this.$refs.zbTable.pullUpCompleteLoading('ok')
56
+接收参数为 type ,type为空代表还有数据,可以继续加载,无数据的时候传入 'ok'代表结束
57
+```
58
+
59
+## data 属性
60
+| 参数 | 说明 | 类型 | 可选值 | 默认值 |
61
+| ------ | ------ | ------ | ------ | ------ |
62
+| checked | 是否被勾选 | boolean |true,false | 无 |
63
+
64
+
65
+## column 属性
66
+| 参数 | 说明 | 类型 | 可选值 | 默认值 |
67
+| ------ | ------ | ------ | ------ | ------ |
68
+| name | 属性值 | string |-- | 无 |
69
+| label | 显示的标题 | string |-- | 无 |
70
+| width | 列的宽度 | number |-- | 100 |
71
+| fixed | 列是否固定在左侧,true 表示固定在左侧 | boolean |true,false | true |
72
+| sorter | 排序,当设置为custom的时候代表自定义排序,不会再触发默认排序,会触发table事件@sort-change,可以通过接口来进行排序 | boolean |true,false,'custom' | false |
73
+| emptyString | 当值为空的时候默认显示的值 | string |  | -- |
74
+| filters | 对象过滤的选项,对象格式,对象中的元素需要有 key 和 value 属性。 | Object | {key:value} | -- |
75
+| align | 对齐方式 | String | left/center/right | left |
76
+| type | 为 operation 的时候代表为操作按钮,img的时候代表图片地址,index代表序列号 | string | operation,img,index | -- |
77
+| renders | type 为operation的时候 必传 | Array | {name:'名字',func:"父元素接收事件名",type:"按钮的类型",size:"大小"} | -- |
78
+```
79
+type 为 operation 的时候代表为操作按钮
80
+renders 代表传入的按钮  Array  =>[
81
+    {
82
+        name:'编辑',
83
+        class:"", // 添加class
84
+        type:'primary',代表按钮的类型  type 为custom的时候自定义按钮 其他类型取决于uniapp buttom组件按钮
85
+        size:'mini',代表按钮的大小
86
+        func:'edit' // func 代表操作按钮点击的事件名字 父元素接收的事件 父元素 @edit
87
+        例如:// <zb-table @edit=""/> 
88
+        
89
+    }
90
+]
91
+```
92
+## 示例
93
+```
94
+<zb-table
95
+            :show-header="true"
96
+            :columns="column"
97
+            :stripe="true"
98
+            :fit="false"
99
+            show-summary
100
+            sum-text="合计"
101
+            @rowClick="rowClick"
102
+            :summary-method="getSummaries"
103
+            @toggleRowSelection="toggleRowSelection"
104
+            @toggleAllSelection="toggleAllSelection"
105
+            :border="true"
106
+            @edit="buttonEdit"
107
+            @dele="dele"
108
+            :data="data"></zb-table>
109
+```
110
+
111
+## 数据格式
112
+```
113
+column:[
114
+          { type:'selection', fixed:true,width:50 },
115
+          { name: 'name', label: '姓名',fixed:false,width:80,emptyString:'--' },
116
+          { name: 'age', label: '年纪',sorter:false,align:'right', },
117
+          { name: 'sex', label: '性别',filters:{0:'男',1:'女'}},
118
+		  { name: 'img', label: '图片',type:"img" },
119
+          { name: 'address', label: '地址' },
120
+          { name: 'date', label: '日期',sorter:true },
121
+          { name: 'province', label: '省份' },
122
+          { name: 'city', label: '城市' },
123
+          { name: 'zip', label: '邮编' },
124
+          { name: 'operation', type:'operation',label: '操作',renders:[
125
+              {
126
+                name:'编辑',
127
+                func:'edit' // func 代表子元素点击的事件 父元素接收的事件 父元素 @edit
128
+              },
129
+              {
130
+                name:'删除',
131
+                type:'warn',
132
+                func:"dele"
133
+              },
134
+            ]},
135
+        ],
136
+ data:[
137
+          {
138
+            date: '2016-05-02',
139
+            name: '王小虎1',
140
+            province: '上海',
141
+            sex:'男',
142
+            age:'18',
143
+			img:"https://img1.baidu.com/it/u=300787145,1214060415&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
144
+            city: '普陀区',
145
+            address: '上海市普',
146
+            zip: 200333
147
+          },
148
+          {
149
+            date: '2016-05-02',
150
+            name: '王小虎2',
151
+            province: '上海',
152
+            sex:'男',
153
+            age:'18',
154
+            city: '普陀区',
155
+            address: '上海市普',
156
+            zip: 200333
157
+          },
158
+          {
159
+            date: '2016-05-02',
160
+            name: '王小虎3',
161
+            province: '上海',
162
+            sex:'男',
163
+            age:'18',
164
+            city: '普陀区',
165
+            address: '上海市普',
166
+            zip: 200333
167
+          },
168
+          {
169
+            date: '2016-05-02',
170
+            name: '王小虎4',
171
+            province: '上海',
172
+            sex:'男',
173
+            age:'18',
174
+            city: '普陀区',
175
+            address: '上海市普',
176
+            zip: 200333
177
+          },
178
+          {
179
+            date: '2016-05-02',
180
+            name: '王小虎5',
181
+            province: '上海',
182
+            sex:'男',
183
+            age:'18',
184
+            city: '普陀区',
185
+            address: '上海市普',
186
+            zip: 200333
187
+          }
188
+        ]       
189
+```