meixioacomponent 1.1.43 → 1.1.45
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/meixioacomponent.common.js +88 -73
- package/lib/meixioacomponent.umd.js +92 -77
- package/lib/meixioacomponent.umd.min.js +2 -2
- package/package.json +1 -1
- package/packages/components/proPageTable/oa_pro_colum_config.vue +0 -3
- package/packages/components/proPageTable/oa_pro_table.vue +74 -46
package/package.json
CHANGED
|
@@ -145,10 +145,7 @@ export default {
|
|
|
145
145
|
},
|
|
146
146
|
setTableHeaderConfig() {
|
|
147
147
|
if (this.isDrag) {
|
|
148
|
-
const {useLocalTableConfig} = this.$props;
|
|
149
148
|
this.$emit('setTableHeaderConfig', this.dragConfigList)
|
|
150
|
-
console.log(useLocalTableConfig);
|
|
151
|
-
|
|
152
149
|
}
|
|
153
150
|
this.popoverFlag = false
|
|
154
151
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
:proScreenConfig="privateProScreenConfig"
|
|
36
36
|
:proScreenList="proScreenList"
|
|
37
37
|
:screenList="screenList"
|
|
38
|
-
:table-config="
|
|
38
|
+
:table-config="tableConfigColumnList"
|
|
39
39
|
:use-pro-screen-list="useProScreenList"
|
|
40
40
|
:use-search="useSearch"
|
|
41
41
|
:use-local-table-config="useLocalTableConfig"
|
|
@@ -146,6 +146,9 @@
|
|
|
146
146
|
<slot :scope="props.row" name="tableExpand"></slot>
|
|
147
147
|
</template>
|
|
148
148
|
</el-table-column>
|
|
149
|
+
<!--序号-->
|
|
150
|
+
<el-table-column type="index" width="50" v-if="useIndex" label="序号"></el-table-column>
|
|
151
|
+
|
|
149
152
|
<el-table-column
|
|
150
153
|
v-for="(item, index) in showTableHeader"
|
|
151
154
|
:key="index"
|
|
@@ -303,11 +306,14 @@ export default {
|
|
|
303
306
|
|
|
304
307
|
// 表格勾选的控制
|
|
305
308
|
tableCheckControl: null,
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
tableConfigColumnList: []
|
|
312
|
+
|
|
306
313
|
};
|
|
307
314
|
},
|
|
308
315
|
created() {
|
|
309
316
|
this.init();
|
|
310
|
-
|
|
311
317
|
componentConfig.eventBus.$on("handleTableBorder", this.handleTableBorder);
|
|
312
318
|
},
|
|
313
319
|
mounted() {
|
|
@@ -509,6 +515,11 @@ export default {
|
|
|
509
515
|
useLocalTableConfig: {
|
|
510
516
|
type: String,
|
|
511
517
|
default: ''
|
|
518
|
+
},
|
|
519
|
+
// 使用序号下标
|
|
520
|
+
useIndex: {
|
|
521
|
+
type: Boolean,
|
|
522
|
+
default: false
|
|
512
523
|
}
|
|
513
524
|
|
|
514
525
|
},
|
|
@@ -537,7 +548,7 @@ export default {
|
|
|
537
548
|
);
|
|
538
549
|
},
|
|
539
550
|
fixedList() {
|
|
540
|
-
return this
|
|
551
|
+
return this.tableConfigColumnList.filter((item) => {
|
|
541
552
|
const {lock} = item;
|
|
542
553
|
return lock && lock !== "right";
|
|
543
554
|
});
|
|
@@ -553,38 +564,21 @@ export default {
|
|
|
553
564
|
},
|
|
554
565
|
|
|
555
566
|
showTableHeader() {
|
|
556
|
-
if (this.$props.tableConfig) {
|
|
557
|
-
|
|
558
567
|
|
|
559
|
-
|
|
568
|
+
return this.tableConfigColumnList.filter((item) => {
|
|
560
569
|
|
|
561
|
-
if (
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
const checkAccordFlag = proTableLocalConfigManage.checkRenderTableConfigAccordLocal(useLocalTableConfig, this.$props.tableConfig);
|
|
565
|
-
|
|
566
|
-
if (checkAccordFlag) {
|
|
567
|
-
return proTableLocalConfigManage.hasConfigByTableKey(useLocalTableConfig);
|
|
570
|
+
if (item.hasOwnProperty('disabledSortable')) {
|
|
571
|
+
if (!item.disabledSortable) {
|
|
572
|
+
item.disabledSortable = false;
|
|
568
573
|
}
|
|
569
|
-
|
|
574
|
+
} else {
|
|
575
|
+
item.disabledSortable = false;
|
|
570
576
|
}
|
|
571
577
|
|
|
572
578
|
|
|
573
|
-
return
|
|
574
|
-
|
|
575
|
-
if (item.hasOwnProperty('disabledSortable')) {
|
|
576
|
-
if (!item.disabledSortable) {
|
|
577
|
-
item.disabledSortable = false;
|
|
578
|
-
}
|
|
579
|
-
} else {
|
|
580
|
-
item.disabledSortable = false;
|
|
581
|
-
}
|
|
582
|
-
|
|
579
|
+
return item.show;
|
|
580
|
+
});
|
|
583
581
|
|
|
584
|
-
return item.show;
|
|
585
|
-
});
|
|
586
|
-
}
|
|
587
|
-
return [];
|
|
588
582
|
},
|
|
589
583
|
|
|
590
584
|
isCheckTableRow() {
|
|
@@ -644,6 +638,7 @@ export default {
|
|
|
644
638
|
return value.toString().length > 10;
|
|
645
639
|
},
|
|
646
640
|
init() {
|
|
641
|
+
this.setTableConfigColumList();
|
|
647
642
|
const {rowKey} = this.$props;
|
|
648
643
|
if (rowKey) {
|
|
649
644
|
this.initTableControl();
|
|
@@ -651,15 +646,15 @@ export default {
|
|
|
651
646
|
// canPush = !this.isAverageWidth;
|
|
652
647
|
this.initProScreenConfig();
|
|
653
648
|
this.initFooterHandleConfig();
|
|
654
|
-
this
|
|
649
|
+
this.tableConfigColumnList.forEach((item, index) => {
|
|
655
650
|
item.preIndex = index;
|
|
656
|
-
|
|
651
|
+
|
|
652
|
+
if (!item.hasOwnProperty('show')) {
|
|
653
|
+
this.$set(item, "show", true);
|
|
654
|
+
}
|
|
657
655
|
if (!item.width || item.width <= 80) {
|
|
658
656
|
item.width = 80;
|
|
659
657
|
}
|
|
660
|
-
// if (item.lock === "right") {
|
|
661
|
-
// canPush = false;
|
|
662
|
-
// }
|
|
663
658
|
});
|
|
664
659
|
|
|
665
660
|
// if (canPush) {
|
|
@@ -669,16 +664,44 @@ export default {
|
|
|
669
664
|
this.refreshData();
|
|
670
665
|
},
|
|
671
666
|
|
|
667
|
+
setTableConfigColumList() {
|
|
668
|
+
if (this.$props.tableConfig) {
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
const useLocalTableConfig = this.$props.useLocalTableConfig;
|
|
672
|
+
|
|
673
|
+
if (useLocalTableConfig) {
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
const checkAccordFlag = proTableLocalConfigManage.checkRenderTableConfigAccordLocal(useLocalTableConfig, this.$props.tableConfig);
|
|
677
|
+
|
|
678
|
+
if (checkAccordFlag) {
|
|
679
|
+
proTableLocalConfigManage.hasConfigByTableKey(useLocalTableConfig).forEach(item => {
|
|
680
|
+
this.tableConfigColumnList.push(item);
|
|
681
|
+
})
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
this.tableConfigColumnList = JSON.parse(JSON.stringify(this.$props.tableConfig));
|
|
689
|
+
|
|
690
|
+
console.log(this.tableConfigColumnList);
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
|
|
694
|
+
|
|
672
695
|
tableConfigPushEmpty() {
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
});
|
|
696
|
+
//
|
|
697
|
+
// this.tableConfigColumnList.push({
|
|
698
|
+
// label: "",
|
|
699
|
+
// key: "noData",
|
|
700
|
+
// lock: false,
|
|
701
|
+
// width: 40,
|
|
702
|
+
// show: true,
|
|
703
|
+
// template: false,
|
|
704
|
+
// });
|
|
682
705
|
},
|
|
683
706
|
|
|
684
707
|
initTableControl() {
|
|
@@ -699,7 +722,7 @@ export default {
|
|
|
699
722
|
const tableWidth = this.$refs.elTable.$el.offsetWidth;
|
|
700
723
|
let totalWidth = 0;
|
|
701
724
|
let staticLength = 0;
|
|
702
|
-
const
|
|
725
|
+
const tableConfig = this.tableConfigColumnList;
|
|
703
726
|
tableConfig.forEach((item) => {
|
|
704
727
|
if (item.lock || item.staticWidth) {
|
|
705
728
|
staticLength += 1;
|
|
@@ -728,7 +751,7 @@ export default {
|
|
|
728
751
|
|
|
729
752
|
headerItemLock(params) {
|
|
730
753
|
let {preIndex, index} = {...params};
|
|
731
|
-
let tableConfig = this
|
|
754
|
+
let tableConfig = this.tableConfigColumnList;
|
|
732
755
|
tableConfig[index].lock = true;
|
|
733
756
|
if (tableConfig[index].preIndex === undefined) {
|
|
734
757
|
tableConfig[index].preIndex = preIndex;
|
|
@@ -751,7 +774,7 @@ export default {
|
|
|
751
774
|
},
|
|
752
775
|
headerItemUnlock(params) {
|
|
753
776
|
let {preIndex, index} = {...params};
|
|
754
|
-
let tableConfig = this
|
|
777
|
+
let tableConfig = this.tableConfigColumnList;
|
|
755
778
|
tableConfig[index].lock = false;
|
|
756
779
|
|
|
757
780
|
tableConfig.splice(
|
|
@@ -792,7 +815,7 @@ export default {
|
|
|
792
815
|
// 初始化高级筛选
|
|
793
816
|
initProScreenConfig() {
|
|
794
817
|
this.privateProScreenConfig = [];
|
|
795
|
-
this
|
|
818
|
+
this.tableConfigColumnList.forEach((item) => {
|
|
796
819
|
if (item.proScreenItem) {
|
|
797
820
|
this.$set(item.proScreenItem, "label", item.label);
|
|
798
821
|
this.$set(item.proScreenItem, "isCheck", false);
|
|
@@ -1129,6 +1152,11 @@ export default {
|
|
|
1129
1152
|
|
|
1130
1153
|
|
|
1131
1154
|
},
|
|
1155
|
+
watch: {
|
|
1156
|
+
tableConfig() {
|
|
1157
|
+
this.setTableConfigColumList();
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1132
1160
|
};
|
|
1133
1161
|
</script>
|
|
1134
1162
|
|