htui-yllkbz 1.2.59 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/htui.common.js +60 -76
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +60 -76
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +3 -3
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtAsyncTable/index.vue +2 -26
- package/src/packages/HtTable/index.vue +20 -33
- package/src/packages/HtUploadFiles/index.vue +2 -2
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @Author: hutao
|
|
6
6
|
* @Date: 2021-11-11 11:23:24
|
|
7
7
|
* @LastEditors: hutao
|
|
8
|
-
* @LastEditTime:
|
|
8
|
+
* @LastEditTime: 2022-02-15 10:14:46
|
|
9
9
|
-->
|
|
10
10
|
<template>
|
|
11
11
|
<div v-loading="state.loading">
|
|
@@ -195,7 +195,6 @@ export default class HtTable extends Vue {
|
|
|
195
195
|
},
|
|
196
196
|
};
|
|
197
197
|
created() {
|
|
198
|
-
// console.log("this", this.$props);
|
|
199
198
|
this.setPageInfo(this.pageInfo);
|
|
200
199
|
}
|
|
201
200
|
getPropByPath(obj: any, path: string, strict: boolean) {
|
|
@@ -224,30 +223,7 @@ export default class HtTable extends Vue {
|
|
|
224
223
|
// };
|
|
225
224
|
return tempObj ? tempObj[keyArr[i]] : null;
|
|
226
225
|
}
|
|
227
|
-
|
|
228
|
-
showValue(row: any, key: string) {
|
|
229
|
-
if (key) {
|
|
230
|
-
if (key.includes(".")) {
|
|
231
|
-
//存在多级的情况
|
|
232
|
-
//console.log("eval", key, eval(row[key]));
|
|
233
|
-
// const arrKey = key.split(".");
|
|
234
|
-
// let data = row;
|
|
235
|
-
// arrKey.forEach((item) => {
|
|
236
|
-
// if (data[item]) {
|
|
237
|
-
// data = data[item];
|
|
238
|
-
// } else {
|
|
239
|
-
// data = "";
|
|
240
|
-
// }
|
|
241
|
-
// });
|
|
242
|
-
return "";
|
|
243
|
-
} else {
|
|
244
|
-
//如果不存在多级数据
|
|
245
|
-
return row[key];
|
|
246
|
-
}
|
|
247
|
-
} else {
|
|
248
|
-
return "";
|
|
249
|
-
}
|
|
250
|
-
}
|
|
226
|
+
|
|
251
227
|
/** 监听 */
|
|
252
228
|
@Watch("pageInfo")
|
|
253
229
|
setPageInfo(val?: PageInfoType) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @Author: hutao
|
|
6
6
|
* @Date: 2021-11-11 11:23:24
|
|
7
7
|
* @LastEditors: hutao
|
|
8
|
-
* @LastEditTime: 2022-02-
|
|
8
|
+
* @LastEditTime: 2022-02-20 18:02:39
|
|
9
9
|
-->
|
|
10
10
|
<template>
|
|
11
11
|
<div v-loading="state.loading"
|
|
@@ -240,6 +240,7 @@
|
|
|
240
240
|
<el-button type="primary"
|
|
241
241
|
@click="confirmSortAndshow">确定</el-button>
|
|
242
242
|
<el-button @click="state.visibleFilter=false">取消</el-button>
|
|
243
|
+
<el-button @click="resetColumn">重置</el-button>
|
|
243
244
|
</span>
|
|
244
245
|
</el-dialog>
|
|
245
246
|
<!-- 附件详情弹框 -->
|
|
@@ -373,6 +374,16 @@ export default class HtTable extends Vue {
|
|
|
373
374
|
this.creatInitColumnKey(this.columns || []);
|
|
374
375
|
}
|
|
375
376
|
}
|
|
377
|
+
resetColumn() {
|
|
378
|
+
this.creatInitColumnKey(this.columns || []);
|
|
379
|
+
this.state.visibleFilter = false;
|
|
380
|
+
if (this.uuId) {
|
|
381
|
+
window.localStorage.setItem(
|
|
382
|
+
"table_" + this.uuId,
|
|
383
|
+
JSON.stringify(this.columns || [])
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
376
387
|
/** 获取展示的keys值 */
|
|
377
388
|
getShowKeys(data: Column[]) {
|
|
378
389
|
const arr: string[] = [];
|
|
@@ -390,11 +401,11 @@ export default class HtTable extends Vue {
|
|
|
390
401
|
this.state.allColumns.forEach((item) => {
|
|
391
402
|
item.checked = true;
|
|
392
403
|
});
|
|
404
|
+
this.$nextTick(() => {
|
|
405
|
+
(this.$refs.comTable as any).doLayout();
|
|
406
|
+
// el-table加ref="comTable"
|
|
407
|
+
});
|
|
393
408
|
this.getShowKeys(this.state.allColumns);
|
|
394
|
-
// this.state.showColumnKeys = this.columns.reduce((arr: string[], item) => {
|
|
395
|
-
// arr.push(item.key);
|
|
396
|
-
// return arr;
|
|
397
|
-
// }, []);
|
|
398
409
|
}
|
|
399
410
|
/** 展示附件信息 */
|
|
400
411
|
showFiles(val = "") {
|
|
@@ -424,15 +435,12 @@ export default class HtTable extends Vue {
|
|
|
424
435
|
// dropType === "before"
|
|
425
436
|
// ? data.splice(index, 0, currentColumn)
|
|
426
437
|
// : data.splice(index + 1, 0, currentColumn);
|
|
427
|
-
|
|
438
|
+
|
|
428
439
|
if (currentColumn && checkedColumnKeys.includes(currentColumn.key)) {
|
|
429
440
|
setTimeout(() => {
|
|
430
441
|
(this.$refs.tree as any).setChecked(currentColumn, true);
|
|
431
442
|
}, 0);
|
|
432
443
|
}
|
|
433
|
-
//console.log("handleDragEnd", this.columns);
|
|
434
|
-
|
|
435
|
-
// }
|
|
436
444
|
}
|
|
437
445
|
handleDrop() {
|
|
438
446
|
// console.log("tree drop: ", dropNode, dropType);
|
|
@@ -492,6 +500,7 @@ export default class HtTable extends Vue {
|
|
|
492
500
|
confirmSortAndshow() {
|
|
493
501
|
this.state.loading = true;
|
|
494
502
|
this.state.showColumns = [];
|
|
503
|
+
this.state.allColumns = this.getAllColumns;
|
|
495
504
|
const { allColumns, checkedColumnKeys } = this.state;
|
|
496
505
|
//对列表check复制
|
|
497
506
|
allColumns.forEach(
|
|
@@ -514,33 +523,11 @@ export default class HtTable extends Vue {
|
|
|
514
523
|
(this.$refs.comTable as any).doLayout();
|
|
515
524
|
// el-table加ref="multipleTable"
|
|
516
525
|
});
|
|
526
|
+
|
|
517
527
|
/** 自定义列回调 */
|
|
518
528
|
this.$emit("customColumn", allColumns);
|
|
519
529
|
}
|
|
520
|
-
|
|
521
|
-
showValue(row: any, key: string) {
|
|
522
|
-
if (key) {
|
|
523
|
-
if (key.includes(".")) {
|
|
524
|
-
//存在多级的情况
|
|
525
|
-
//console.log("eval", key, eval(row[key]));
|
|
526
|
-
// const arrKey = key.split(".");
|
|
527
|
-
// let data = row;
|
|
528
|
-
// arrKey.forEach((item) => {
|
|
529
|
-
// if (data[item]) {
|
|
530
|
-
// data = data[item];
|
|
531
|
-
// } else {
|
|
532
|
-
// data = "";
|
|
533
|
-
// }
|
|
534
|
-
// });
|
|
535
|
-
return "";
|
|
536
|
-
} else {
|
|
537
|
-
//如果不存在多级数据
|
|
538
|
-
return row[key];
|
|
539
|
-
}
|
|
540
|
-
} else {
|
|
541
|
-
return "";
|
|
542
|
-
}
|
|
543
|
-
}
|
|
530
|
+
|
|
544
531
|
/** 获取显示出来的table头信息 */
|
|
545
532
|
get showColumns() {
|
|
546
533
|
const { showColumnKeys, showColumns } = this.state;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2022-02-11 14:26:23
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-02-
|
|
7
|
+
* @LastEditTime: 2022-02-15 10:14:00
|
|
8
8
|
-->
|
|
9
9
|
<!--
|
|
10
10
|
* @Descripttion: 附件列表 ------没有搞完
|
|
@@ -135,7 +135,7 @@ export default class HtUploadFiles extends Vue {
|
|
|
135
135
|
}
|
|
136
136
|
/** 附件上传成功 */
|
|
137
137
|
onSuccess(response: { fileToken: string }) {
|
|
138
|
-
console.log("response, file, fileList", response.fileToken);
|
|
138
|
+
// console.log("response, file, fileList", response.fileToken);
|
|
139
139
|
//this.state.files.push(response.fileToken);
|
|
140
140
|
this.getFileInfo(response.fileToken);
|
|
141
141
|
}
|