htui-yllkbz 2.0.13 → 2.0.15
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 +394 -263
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +394 -263
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +22 -22
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +2 -2
- package/src/packages/HtBaseData/index.vue +2 -2
- package/src/packages/HtMore/index.vue +1 -1
- package/src/packages/HtPopover/index.vue +1 -1
- package/src/packages/HtSelectBaseData/index.vue +2 -2
- package/src/packages/HtSelectBaseDataTable/index.vue +0 -0
- package/src/packages/HtSelectOrg/index.vue +2 -2
- package/src/packages/HtSelectUser/index.vue +2 -2
- package/src/packages/HtTable/htTableColumn.vue +156 -56
- package/src/packages/HtTable/index.vue +173 -113
- package/src/packages/common.ts +16 -8
- package/src/views/About.vue +10 -12
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-11 11:23:24
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2026-01-29
|
|
7
|
+
* @LastEditTime: 2026-01-29 18:07:56
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div v-loading="state.loading">
|
|
@@ -39,39 +39,23 @@
|
|
|
39
39
|
:data="data"
|
|
40
40
|
tooltip-effect="dark"
|
|
41
41
|
:tree-props="treeProps"
|
|
42
|
-
@row-click="
|
|
43
|
-
|
|
44
|
-
@row-
|
|
45
|
-
|
|
46
|
-
@
|
|
47
|
-
"
|
|
48
|
-
@header-click="(column, event) => $emit('header-click', column, event)"
|
|
49
|
-
@header-contextmenu="(column, event) => $emit('header-contextmenu', column, event)
|
|
50
|
-
"
|
|
42
|
+
@row-click="emitRowClick"
|
|
43
|
+
@row-contextmenu="emitRowContextmenu"
|
|
44
|
+
@row-dblclick="emitRowDblclick"
|
|
45
|
+
@header-click="emitHeaderClick"
|
|
46
|
+
@header-contextmenu="emitHeaderContextmenu"
|
|
51
47
|
@header-dragend="headerDragend"
|
|
52
|
-
@sort-change="
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
@
|
|
56
|
-
@
|
|
57
|
-
@
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
@
|
|
61
|
-
@
|
|
62
|
-
@
|
|
63
|
-
@cell-mouse-enter="(row, column, cell, event) =>
|
|
64
|
-
$emit('cell-mouse-enter', row, column, cell, event)
|
|
65
|
-
"
|
|
66
|
-
@cell-mouse-leave="(row, column, cell, event) =>
|
|
67
|
-
$emit('cell-mouse-leave', row, column, cell, event)
|
|
68
|
-
"
|
|
69
|
-
@cell-click="(row, column, cell, event) =>
|
|
70
|
-
$emit('cell-click', row, column, cell, event)
|
|
71
|
-
"
|
|
72
|
-
@cell-dblclick="(row, column, cell, event) =>
|
|
73
|
-
$emit('cell-dblclick', row, column, cell, event)
|
|
74
|
-
">
|
|
48
|
+
@sort-change="emitSortChange"
|
|
49
|
+
@expand-change="emitExpandChange"
|
|
50
|
+
@filter-change="emitFilterChange"
|
|
51
|
+
@current-change="emitCurrentChange"
|
|
52
|
+
@select="emitSelect"
|
|
53
|
+
@select-all="emitSelectAll"
|
|
54
|
+
@selection-change="emitSelectionChange"
|
|
55
|
+
@cell-mouse-enter="emitCellMouseEnter"
|
|
56
|
+
@cell-mouse-leave="emitCellMouseLeave"
|
|
57
|
+
@cell-click="emitCellClick"
|
|
58
|
+
@cell-dblclick="emitCellDblclick">
|
|
75
59
|
<template slot="empty">
|
|
76
60
|
<slot name="empty"> </slot>
|
|
77
61
|
</template>
|
|
@@ -79,7 +63,7 @@
|
|
|
79
63
|
:resizable="false"
|
|
80
64
|
v-if="checked"
|
|
81
65
|
:reserve-selection="reserveSelection"
|
|
82
|
-
:selectable="
|
|
66
|
+
:selectable="isSelectableRow"
|
|
83
67
|
type="selection">
|
|
84
68
|
</el-table-column>
|
|
85
69
|
<el-table-column v-if="isExpand"
|
|
@@ -175,7 +159,7 @@
|
|
|
175
159
|
<PageInfo :hide-on-single-page="pagination && pagination.hideOnSinglePage"
|
|
176
160
|
:small="pagination && pagination.small"
|
|
177
161
|
:style="pageStyle"
|
|
178
|
-
@onchange="
|
|
162
|
+
@onchange="emitPageChange"
|
|
179
163
|
:page-sizes="pagination && pagination.pageSizes"
|
|
180
164
|
:page-info="state.pageInfo"></PageInfo>
|
|
181
165
|
</el-col>
|
|
@@ -258,23 +242,22 @@
|
|
|
258
242
|
</template>
|
|
259
243
|
<script lang="ts">
|
|
260
244
|
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
|
261
|
-
import { Column, PageInfoType } from "
|
|
262
|
-
import PageInfo from "
|
|
263
|
-
import HtUploadFiles from "
|
|
264
|
-
import HtShowBaseData from "
|
|
265
|
-
import HtOrgInfo from "
|
|
266
|
-
import HtSelectUnit from "
|
|
245
|
+
import { Column, PageInfoType } from "../type";
|
|
246
|
+
import PageInfo from "../PageInfo/index.vue";
|
|
247
|
+
import HtUploadFiles from "../HtUploadFiles/index.vue";
|
|
248
|
+
import HtShowBaseData from "../HtShowBaseData";
|
|
249
|
+
import HtOrgInfo from "../HtOrgInfo";
|
|
250
|
+
import HtSelectUnit from "../HtSelectUnit";
|
|
267
251
|
import HtTableColumn from "./htTableColumn.vue";
|
|
268
252
|
import ElmentUI from "element-ui";
|
|
269
253
|
import { getSpanMethod } from "./table-span-method";
|
|
270
|
-
import {CreateJsonSettingDto, JsonSettingApi, JsonSettingDto} from "
|
|
254
|
+
import {CreateJsonSettingDto, JsonSettingApi, JsonSettingDto} from "../../plugins/jsonsetting"
|
|
271
255
|
import {
|
|
272
256
|
getAllBaseData,
|
|
273
257
|
getAllOrg,
|
|
274
258
|
getAllRole,
|
|
275
259
|
getAllUser,
|
|
276
260
|
getCurrentUser,
|
|
277
|
-
trackPageAndGenerateNumber,
|
|
278
261
|
} from "../common";
|
|
279
262
|
import { _axios } from "vue-kst-auth";
|
|
280
263
|
Vue.use(ElmentUI);
|
|
@@ -283,8 +266,12 @@ interface State {
|
|
|
283
266
|
loading: boolean;
|
|
284
267
|
/** 展示出来的列表名 */
|
|
285
268
|
showColumns: Column[];
|
|
269
|
+
/** 实际渲染的列 */
|
|
270
|
+
renderColumns: Column[];
|
|
286
271
|
/** 全部的列 */
|
|
287
272
|
allColumns: Column[];
|
|
273
|
+
/** 插槽转发需要的子列 */
|
|
274
|
+
slotColumns: Column[];
|
|
288
275
|
/** 列表展示的列 */
|
|
289
276
|
showColumnKeys: string[];
|
|
290
277
|
/** 自定义列表选中的列 */
|
|
@@ -314,6 +301,8 @@ interface State {
|
|
|
314
301
|
},
|
|
315
302
|
})
|
|
316
303
|
export default class HtTable extends Vue {
|
|
304
|
+
private layoutPending = false;
|
|
305
|
+
|
|
317
306
|
/** 默认的table头 */
|
|
318
307
|
@Prop({ default: [] }) columns!: Column[];
|
|
319
308
|
@Prop({ default: "file-management-service" }) proxy?: string;
|
|
@@ -404,7 +393,9 @@ export default class HtTable extends Vue {
|
|
|
404
393
|
totalCount: 0,
|
|
405
394
|
},
|
|
406
395
|
showColumns: [],
|
|
396
|
+
renderColumns: [],
|
|
407
397
|
allColumns: [],
|
|
398
|
+
slotColumns: [],
|
|
408
399
|
currentColumn: undefined,
|
|
409
400
|
settingColumns:[],
|
|
410
401
|
settingColumnId: undefined,
|
|
@@ -428,26 +419,76 @@ export default class HtTable extends Vue {
|
|
|
428
419
|
//console.log(trackPageAndGenerateNumber());
|
|
429
420
|
//console.log("this.columns", data);
|
|
430
421
|
}
|
|
422
|
+
cloneColumns(columns: Column[] = []): Column[] {
|
|
423
|
+
return columns.map((item) => ({
|
|
424
|
+
...item,
|
|
425
|
+
children: item.children?.length ? this.cloneColumns(item.children) : undefined,
|
|
426
|
+
}));
|
|
427
|
+
}
|
|
428
|
+
syncRenderColumns(columns: Column[] = []) {
|
|
429
|
+
const renderColumns = this.cloneColumns(columns);
|
|
430
|
+
|
|
431
|
+
renderColumns.forEach((item: Column) => {
|
|
432
|
+
if (item.children?.length && item.checked === false) {
|
|
433
|
+
const visibleChildren = item.children.filter(
|
|
434
|
+
(child: Column) => child.checked !== false
|
|
435
|
+
);
|
|
436
|
+
item.checked = visibleChildren.length > 0;
|
|
437
|
+
item.children = visibleChildren;
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
this.state.renderColumns = renderColumns;
|
|
442
|
+
this.state.slotColumns = columns.reduce((result: Column[], item) => {
|
|
443
|
+
if (item.children?.length) {
|
|
444
|
+
result.push(...item.children);
|
|
445
|
+
}
|
|
446
|
+
return result;
|
|
447
|
+
}, []);
|
|
448
|
+
}
|
|
449
|
+
scheduleLayout() {
|
|
450
|
+
if (this.layoutPending) {
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
this.layoutPending = true;
|
|
454
|
+
this.$nextTick(() => {
|
|
455
|
+
this.layoutPending = false;
|
|
456
|
+
const table = this.$refs.comTable as any;
|
|
457
|
+
if (table && table.doLayout) {
|
|
458
|
+
table.doLayout();
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
normalizeColumns(columns: Column[] = []) {
|
|
463
|
+
const nextColumns = this.cloneColumns(columns);
|
|
464
|
+
const checkTrueArr = nextColumns.filter((item) => item.checked !== false);
|
|
465
|
+
if (!checkTrueArr.length) {
|
|
466
|
+
nextColumns.forEach((item) => {
|
|
467
|
+
item.checked = true;
|
|
468
|
+
});
|
|
469
|
+
} else {
|
|
470
|
+
nextColumns.forEach((item) => {
|
|
471
|
+
item.checked = item.checked === false ? false : true;
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
return nextColumns;
|
|
475
|
+
}
|
|
431
476
|
resetColumn() {
|
|
477
|
+
let resetColumns: Column[] = [];
|
|
432
478
|
if (this._configShow) {
|
|
433
|
-
this.columns
|
|
479
|
+
const columns = this.cloneColumns(this.columns || []);
|
|
480
|
+
columns.forEach((item: Column) => {
|
|
434
481
|
item.checked = !!item.deafaultShow;
|
|
435
482
|
});
|
|
436
483
|
|
|
437
|
-
this.
|
|
484
|
+
resetColumns = this.normalizeColumns(columns);
|
|
485
|
+
this.creatInitColumnKey(resetColumns);
|
|
438
486
|
} else {
|
|
439
|
-
this.
|
|
487
|
+
resetColumns = this.normalizeColumns(this.columns || []);
|
|
488
|
+
this.creatInitColumnKey(resetColumns);
|
|
440
489
|
}
|
|
441
490
|
|
|
442
491
|
this.state.visibleFilter = false;
|
|
443
|
-
if (this.uuId) {
|
|
444
|
-
|
|
445
|
-
this.settingColums(this.uuId,this.columns)
|
|
446
|
-
// window.localStorage.setItem(
|
|
447
|
-
// "table_" + this.uuId,
|
|
448
|
-
// JSON.stringify(this.columns || [])
|
|
449
|
-
// );
|
|
450
|
-
}
|
|
451
492
|
}
|
|
452
493
|
settingColums(id: string,columns: Column[]){
|
|
453
494
|
const data: CreateJsonSettingDto =new CreateJsonSettingDto ({
|
|
@@ -463,6 +504,7 @@ export default class HtTable extends Vue {
|
|
|
463
504
|
}
|
|
464
505
|
else{
|
|
465
506
|
this.JsonSettingApi.jsonsetting(data).then((res)=>{
|
|
507
|
+
this.state.settingColumnId=res.id;
|
|
466
508
|
this.state.settingColumns=res.value?JSON.parse(res.value):[];
|
|
467
509
|
});
|
|
468
510
|
}
|
|
@@ -487,26 +529,12 @@ export default class HtTable extends Vue {
|
|
|
487
529
|
}
|
|
488
530
|
/** 初始化columns */
|
|
489
531
|
creatInitColumnKey(columns: Column[]) {
|
|
490
|
-
this.state.allColumns = columns;
|
|
491
|
-
/** 如果没有配置默认展示的字段则展示全部字段 */
|
|
492
|
-
const checkTrueArr = columns.filter((item) => item.checked !== false);
|
|
493
|
-
if (!checkTrueArr.length) {
|
|
494
|
-
this.state.allColumns.forEach((item) => {
|
|
495
|
-
item.checked = true;
|
|
496
|
-
});
|
|
497
|
-
} else {
|
|
498
|
-
this.state.allColumns.forEach((item) => {
|
|
499
|
-
item.checked = item.checked === false ? false : true;
|
|
500
|
-
});
|
|
501
|
-
}
|
|
532
|
+
this.state.allColumns = this.normalizeColumns(columns);
|
|
502
533
|
this.setTableHeader(this.state.allColumns);
|
|
503
534
|
this.getShowKeys(this.state.allColumns);
|
|
504
535
|
}
|
|
505
536
|
doLayout() {
|
|
506
|
-
this
|
|
507
|
-
(this.$refs.comTable as any).doLayout();
|
|
508
|
-
// el-table加ref="comTable"
|
|
509
|
-
});
|
|
537
|
+
this.scheduleLayout();
|
|
510
538
|
}
|
|
511
539
|
/** 展示附件信息 */
|
|
512
540
|
showFiles(val = "") {
|
|
@@ -526,8 +554,8 @@ export default class HtTable extends Vue {
|
|
|
526
554
|
handleDragOver() {
|
|
527
555
|
// console.log("tree drag over: ", dropNode.label);
|
|
528
556
|
}
|
|
529
|
-
handleDragEnd(
|
|
530
|
-
const {
|
|
557
|
+
handleDragEnd() {
|
|
558
|
+
const { currentColumn, checkedColumnKeys } = this.state;
|
|
531
559
|
// if ((dropType === "before" || dropType === "after") && currentColumn) {
|
|
532
560
|
// const data = showColumns.filter(
|
|
533
561
|
// (item) => item.key !== currentColumn?.key
|
|
@@ -562,8 +590,7 @@ export default class HtTable extends Vue {
|
|
|
562
590
|
async headerDragend(
|
|
563
591
|
newWidth: number,
|
|
564
592
|
_oldWidth: number,
|
|
565
|
-
column: any
|
|
566
|
-
_event: MouseEvent
|
|
593
|
+
column: any
|
|
567
594
|
) {
|
|
568
595
|
// const data: JsonSettingDto =await this.JsonSettingApi.jsonsetting2( "table_" + this.uuId,undefined,undefined);
|
|
569
596
|
// const allColumnsStr=data.value;
|
|
@@ -617,16 +644,17 @@ const Columns: any = this.state.settingColumns || [];
|
|
|
617
644
|
// );
|
|
618
645
|
}
|
|
619
646
|
this.state.showColumns = allColumns;
|
|
647
|
+
this.syncRenderColumns(allColumns);
|
|
620
648
|
|
|
621
649
|
this.state.visibleFilter = false;
|
|
622
650
|
this.state.loading = false;
|
|
623
|
-
this.
|
|
651
|
+
this.scheduleLayout();
|
|
624
652
|
}
|
|
625
653
|
/** 现在自定义列弹窗 */
|
|
626
654
|
showFilterModel() {
|
|
627
655
|
this.state.visibleFilter = true;
|
|
628
656
|
this.state.checkedColumnKeys = this.state.showColumnKeys;
|
|
629
|
-
this.state.allColumns =
|
|
657
|
+
this.state.allColumns = this.cloneColumns(this.state.showColumns);
|
|
630
658
|
}
|
|
631
659
|
/** 自定义列表时候选中列 */
|
|
632
660
|
changeColumns() {
|
|
@@ -635,8 +663,7 @@ const Columns: any = this.state.settingColumns || [];
|
|
|
635
663
|
/** 自定义列排序的确定功能 */
|
|
636
664
|
confirmSortAndshow() {
|
|
637
665
|
this.state.loading = true;
|
|
638
|
-
this.state.
|
|
639
|
-
this.state.allColumns = this.getAllColumns;
|
|
666
|
+
this.state.allColumns = this.cloneColumns(this.getAllColumns);
|
|
640
667
|
const { allColumns, checkedColumnKeys } = this.state;
|
|
641
668
|
|
|
642
669
|
function findChecked(colums: Column[]) {
|
|
@@ -663,29 +690,11 @@ const Columns: any = this.state.settingColumns || [];
|
|
|
663
690
|
|
|
664
691
|
/** 获取显示出来的table头信息 */
|
|
665
692
|
get showColumns() {
|
|
666
|
-
|
|
667
|
-
JSON.stringify(this.state.showColumns)
|
|
668
|
-
);
|
|
669
|
-
stateColumns.forEach((item) => {
|
|
670
|
-
if (item.children?.length && item.checked == false) {
|
|
671
|
-
const isChecked = !!item.children.find((item) => item.checked);
|
|
672
|
-
item.checked = isChecked;
|
|
673
|
-
item.children = item.children.filter((item) => item.checked !== false);
|
|
674
|
-
}
|
|
675
|
-
});
|
|
676
|
-
//console.log("showColumns", stateColumns);
|
|
677
|
-
return stateColumns;
|
|
693
|
+
return this.state.renderColumns;
|
|
678
694
|
}
|
|
679
695
|
|
|
680
696
|
get allChildren() {
|
|
681
|
-
|
|
682
|
-
let allchildren: Column[] = [];
|
|
683
|
-
showColumns.forEach((item) => {
|
|
684
|
-
if (item.children) {
|
|
685
|
-
allchildren = [...allchildren, ...item.children];
|
|
686
|
-
}
|
|
687
|
-
});
|
|
688
|
-
return allchildren;
|
|
697
|
+
return this.state.slotColumns;
|
|
689
698
|
}
|
|
690
699
|
/** 获取所有基础信息 */
|
|
691
700
|
get getAllBaseData() {
|
|
@@ -726,11 +735,6 @@ const Columns: any = this.state.settingColumns || [];
|
|
|
726
735
|
|
|
727
736
|
return allColumns.filter((item) => !item.hide);
|
|
728
737
|
}
|
|
729
|
-
@Watch("showColumns")
|
|
730
|
-
resetShowCOlums() {
|
|
731
|
-
// console.log("重置");
|
|
732
|
-
this.doLayout();
|
|
733
|
-
}
|
|
734
738
|
@Watch("columns", { immediate: true })
|
|
735
739
|
async setColumns(columns?: Column[]) {
|
|
736
740
|
if (!columns||!columns.length) {
|
|
@@ -755,30 +759,86 @@ const Columns: any = this.state.settingColumns || [];
|
|
|
755
759
|
// );
|
|
756
760
|
const allColumns=allColumnsStr?JSON.parse(allColumnsStr):[];
|
|
757
761
|
if (allColumnsStr && allColumns?.length) {
|
|
758
|
-
|
|
759
|
-
this.state.
|
|
760
|
-
this.state.
|
|
762
|
+
const normalizedColumns = this.normalizeColumns(allColumns);
|
|
763
|
+
this.state.allColumns = normalizedColumns;
|
|
764
|
+
this.state.showColumns = normalizedColumns;
|
|
765
|
+
this.syncRenderColumns(normalizedColumns);
|
|
766
|
+
this.state.settingColumns = normalizedColumns;
|
|
761
767
|
this.getShowKeys(this.state.allColumns);
|
|
762
768
|
} else {
|
|
763
769
|
if (this._configShow) {
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
this.creatInitColumnKey(
|
|
770
|
+
const nextColumns = this.cloneColumns(columns);
|
|
771
|
+
nextColumns.forEach((item: Column) => (item.checked = !!item.deafaultShow));
|
|
772
|
+
this.creatInitColumnKey(nextColumns);
|
|
767
773
|
} else {
|
|
768
|
-
// console.log('this.configShow22222222222222222222222222222222',columns);
|
|
769
774
|
this.creatInitColumnKey(columns || []);
|
|
770
775
|
}
|
|
771
776
|
}
|
|
772
777
|
} else {
|
|
773
|
-
|
|
774
778
|
if (this._configShow) {
|
|
775
|
-
|
|
776
|
-
|
|
779
|
+
const nextColumns = this.cloneColumns(columns);
|
|
780
|
+
nextColumns.forEach((item: Column) => (item.checked = !!item.deafaultShow));
|
|
781
|
+
this.creatInitColumnKey(nextColumns);
|
|
777
782
|
} else {
|
|
778
783
|
this.creatInitColumnKey(columns || []);
|
|
779
784
|
}
|
|
780
785
|
}
|
|
781
786
|
}
|
|
787
|
+
isSelectableRow(row: any) {
|
|
788
|
+
const selectKey = this.selectKey || "selectable";
|
|
789
|
+
return row[selectKey] !== false;
|
|
790
|
+
}
|
|
791
|
+
emitPageChange(event: any) {
|
|
792
|
+
this.$emit("onchange", event);
|
|
793
|
+
}
|
|
794
|
+
emitRowClick(row: any, column: any, event: MouseEvent) {
|
|
795
|
+
this.$emit("row-click", row, column, event);
|
|
796
|
+
}
|
|
797
|
+
emitRowContextmenu(row: any, column: any, event: MouseEvent) {
|
|
798
|
+
this.$emit("row-contextmenu", row, column, event);
|
|
799
|
+
}
|
|
800
|
+
emitRowDblclick(row: any, column: any, event: MouseEvent) {
|
|
801
|
+
this.$emit("row-dblclick", row, column, event);
|
|
802
|
+
}
|
|
803
|
+
emitHeaderClick(column: any, event: MouseEvent) {
|
|
804
|
+
this.$emit("header-click", column, event);
|
|
805
|
+
}
|
|
806
|
+
emitHeaderContextmenu(column: any, event: MouseEvent) {
|
|
807
|
+
this.$emit("header-contextmenu", column, event);
|
|
808
|
+
}
|
|
809
|
+
emitSortChange(payload: { column: any; prop: string; order: string }) {
|
|
810
|
+
this.$emit("sort-change", payload);
|
|
811
|
+
}
|
|
812
|
+
emitExpandChange(row: any, data: any) {
|
|
813
|
+
this.$emit("expand-change", row, data);
|
|
814
|
+
}
|
|
815
|
+
emitFilterChange(filter: any) {
|
|
816
|
+
this.$emit("filter-change", filter);
|
|
817
|
+
}
|
|
818
|
+
emitCurrentChange(currentRow: any, oldCurrentRow: any) {
|
|
819
|
+
this.$emit("current-change", currentRow, oldCurrentRow);
|
|
820
|
+
}
|
|
821
|
+
emitSelect(selection: any[], row: any) {
|
|
822
|
+
this.$emit("select", selection, row);
|
|
823
|
+
}
|
|
824
|
+
emitSelectAll(selection: any[]) {
|
|
825
|
+
this.$emit("select-all", selection);
|
|
826
|
+
}
|
|
827
|
+
emitSelectionChange(selection: any[]) {
|
|
828
|
+
this.$emit("selection-change", selection);
|
|
829
|
+
}
|
|
830
|
+
emitCellMouseEnter(row: any, column: any, cell: HTMLElement, event: MouseEvent) {
|
|
831
|
+
this.$emit("cell-mouse-enter", row, column, cell, event);
|
|
832
|
+
}
|
|
833
|
+
emitCellMouseLeave(row: any, column: any, cell: HTMLElement, event: MouseEvent) {
|
|
834
|
+
this.$emit("cell-mouse-leave", row, column, cell, event);
|
|
835
|
+
}
|
|
836
|
+
emitCellClick(row: any, column: any, cell: HTMLElement, event: MouseEvent) {
|
|
837
|
+
this.$emit("cell-click", row, column, cell, event);
|
|
838
|
+
}
|
|
839
|
+
emitCellDblclick(row: any, column: any, cell: HTMLElement, event: MouseEvent) {
|
|
840
|
+
this.$emit("cell-dblclick", row, column, cell, event);
|
|
841
|
+
}
|
|
782
842
|
get spanMethodCom() {
|
|
783
843
|
return this.spanMethod
|
|
784
844
|
? this.spanMethod
|
package/src/packages/common.ts
CHANGED
|
@@ -246,7 +246,7 @@ export const roundHalfToEven = (num: number, precision = 2) => {
|
|
|
246
246
|
|
|
247
247
|
/** 获取所有部门信息 */
|
|
248
248
|
export const getAllOrg = () => {
|
|
249
|
-
if (dataCache.allOrg) {
|
|
249
|
+
if (dataCache.allOrg && Object.keys(dataCache.allOrg).length) {
|
|
250
250
|
return dataCache.allOrg;
|
|
251
251
|
}
|
|
252
252
|
const baseDataItem: any = {}
|
|
@@ -288,12 +288,14 @@ export const getAllOrg = () => {
|
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
290
|
getBaseDataItem(organizationUnit);
|
|
291
|
-
|
|
291
|
+
if (Object.keys(baseDataItem).length) {
|
|
292
|
+
dataCache.allOrg = baseDataItem;
|
|
293
|
+
}
|
|
292
294
|
return baseDataItem
|
|
293
295
|
}
|
|
294
296
|
/** 获取所有角色信息 */
|
|
295
297
|
export const getAllRole = () => {
|
|
296
|
-
if (dataCache.allRole) {
|
|
298
|
+
if (dataCache.allRole && Object.keys(dataCache.allRole).length) {
|
|
297
299
|
return dataCache.allRole;
|
|
298
300
|
}
|
|
299
301
|
const baseDataItem: any = {}
|
|
@@ -335,12 +337,14 @@ export const getAllRole = () => {
|
|
|
335
337
|
});
|
|
336
338
|
}
|
|
337
339
|
getBaseDataItem(roleList);
|
|
338
|
-
|
|
340
|
+
if (Object.keys(baseDataItem).length) {
|
|
341
|
+
dataCache.allRole = baseDataItem;
|
|
342
|
+
}
|
|
339
343
|
return baseDataItem
|
|
340
344
|
}
|
|
341
345
|
/** 获取所有用户信息 */
|
|
342
346
|
export const getAllUser = () => {
|
|
343
|
-
if (dataCache.allUser) {
|
|
347
|
+
if (dataCache.allUser && Object.keys(dataCache.allUser).length) {
|
|
344
348
|
return dataCache.allUser;
|
|
345
349
|
}
|
|
346
350
|
const baseDataItem: any = {}
|
|
@@ -383,13 +387,15 @@ export const getAllUser = () => {
|
|
|
383
387
|
});
|
|
384
388
|
}
|
|
385
389
|
getBaseDataItem(items);
|
|
386
|
-
|
|
390
|
+
if (Object.keys(baseDataItem).length) {
|
|
391
|
+
dataCache.allUser = baseDataItem;
|
|
392
|
+
}
|
|
387
393
|
return baseDataItem
|
|
388
394
|
}
|
|
389
395
|
|
|
390
396
|
/** 获取所有的base信息通过KEY:VALUE形式 */
|
|
391
397
|
export const getAllBaseData = () => {
|
|
392
|
-
if (dataCache.allBaseData) {
|
|
398
|
+
if (dataCache.allBaseData && Object.keys(dataCache.allBaseData).length) {
|
|
393
399
|
return dataCache.allBaseData;
|
|
394
400
|
}
|
|
395
401
|
const baseDataItem: any = {}
|
|
@@ -432,7 +438,9 @@ export const getAllBaseData = () => {
|
|
|
432
438
|
}
|
|
433
439
|
getBaseDataItem(items);
|
|
434
440
|
|
|
435
|
-
|
|
441
|
+
if (Object.keys(baseDataItem).length) {
|
|
442
|
+
dataCache.allBaseData = baseDataItem;
|
|
443
|
+
}
|
|
436
444
|
return baseDataItem
|
|
437
445
|
}
|
|
438
446
|
export function getCurrentTime() {
|
package/src/views/About.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-15 14:41:40
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2026-01
|
|
7
|
+
* @LastEditTime: 2026-04-01 16:59:57
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div>
|
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
<!-- <ht-md v-model="state.content" :subfield="true"></ht-md> -->
|
|
43
43
|
<div ref="ht-pdf">
|
|
44
44
|
<HtTable :data="state.data"
|
|
45
|
-
|
|
46
|
-
:uuId="'dhjdsfgsdfs4443334'"
|
|
47
|
-
|
|
45
|
+
:uuId="'dhjdsfgsdf111s4443334'"
|
|
48
46
|
:checked="true"
|
|
49
47
|
:isExpand="false"
|
|
50
48
|
:height="500"
|
|
@@ -123,10 +121,10 @@ export default class Index extends Vue {
|
|
|
123
121
|
colData: [],
|
|
124
122
|
data: [
|
|
125
123
|
{
|
|
126
|
-
name: "胡涛",
|
|
127
|
-
userId: "
|
|
128
|
-
basedata: "
|
|
129
|
-
orgId: "
|
|
124
|
+
name: "胡涛333",
|
|
125
|
+
userId: "97647de0-e220-72da-f384-3a152fde09dc",
|
|
126
|
+
basedata: "8544c882-a62a-de52-89b3-3a1ddb2fe980",
|
|
127
|
+
orgId: "d3a872be-582e-70c4-e43b-3a13f4f0b3e0",
|
|
130
128
|
selectable: true,
|
|
131
129
|
times: 1,
|
|
132
130
|
|
|
@@ -138,7 +136,7 @@ export default class Index extends Vue {
|
|
|
138
136
|
},
|
|
139
137
|
{
|
|
140
138
|
name: "胡涛",
|
|
141
|
-
userId: "
|
|
139
|
+
userId: "97647de0-e220-72da-f384-3a152fde09dc",
|
|
142
140
|
times: 1,
|
|
143
141
|
age: 12,
|
|
144
142
|
selectable: false,
|
|
@@ -149,7 +147,7 @@ export default class Index extends Vue {
|
|
|
149
147
|
},
|
|
150
148
|
{
|
|
151
149
|
name: "胡涛1",
|
|
152
|
-
userId: "
|
|
150
|
+
userId: "97647de0-e220-72da-f384-3a152fde09dc",
|
|
153
151
|
age: 13,
|
|
154
152
|
times: 1,
|
|
155
153
|
sex: "tt",
|
|
@@ -159,7 +157,7 @@ export default class Index extends Vue {
|
|
|
159
157
|
},
|
|
160
158
|
{
|
|
161
159
|
name: "胡涛",
|
|
162
|
-
userId: "
|
|
160
|
+
userId: "97647de0-e220-72da-f384-3a152fde09dc",
|
|
163
161
|
age: 13,
|
|
164
162
|
times: 4,
|
|
165
163
|
file: [],
|
|
@@ -170,7 +168,7 @@ export default class Index extends Vue {
|
|
|
170
168
|
},
|
|
171
169
|
{
|
|
172
170
|
name: "胡涛",
|
|
173
|
-
userId: "
|
|
171
|
+
userId: "97647de0-e220-72da-f384-3a152fde09dc",
|
|
174
172
|
age: 12,
|
|
175
173
|
times: 8,
|
|
176
174
|
sex: "tt",
|