meixioacomponent 2.0.45 → 2.0.47
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/components/base/baseGuide/GuideControl.d.ts +44 -44
- package/lib/components/base/baseGuide/GuideControl.js +238 -238
- package/lib/components/dynamicmount/DynamicMountClass.d.ts +15 -15
- package/lib/components/dynamicmount/DynamicMountClass.js +65 -65
- package/lib/components/dynamicmount/index.d.ts +4 -4
- package/lib/components/dynamicmount/index.js +71 -71
- package/lib/components/index.d.ts +110 -110
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +242 -242
- package/lib/config/LinkViewClass.d.ts +56 -56
- package/lib/config/LinkViewClass.js +154 -154
- package/lib/config/ProTableLocalConfigManage/ProTableLocalConfigManage.d.ts +12 -12
- package/lib/config/ProTableLocalConfigManage/ProTableLocalConfigManage.js +68 -68
- package/lib/config/componentConfig.d.ts +3 -3
- package/lib/config/componentConfig.js +71 -71
- package/lib/config/uploadRequest.d.ts +2 -2
- package/lib/config/uploadRequest.js +87 -87
- package/lib/config/use/UseGuide.d.ts +8 -8
- package/lib/config/use/UseGuide.js +33 -33
- package/lib/config/use/UseImg.d.ts +9 -9
- package/lib/config/use/UseImg.js +44 -44
- package/lib/config/use/UseUpload.d.ts +12 -12
- package/lib/config/use/UseUpload.js +79 -79
- package/lib/config/use/UseViewVideo.d.ts +11 -11
- package/lib/config/use/UseViewVideo.js +41 -41
- package/lib/config/use/UseWait.d.ts +4 -4
- package/lib/config/use/UseWait.js +21 -21
- package/lib/config/use/WaitPlugin.d.ts +25 -25
- package/lib/config/use/WaitPlugin.js +106 -106
- package/lib/config/use/useConfirm/UseConfirm.d.ts +6 -6
- package/lib/config/use/useConfirm/UseConfirm.js +33 -33
- package/lib/config/use/useConfirm/UseNotify.d.ts +6 -6
- package/lib/config/use/useConfirm/UseNotify.js +18 -18
- package/lib/config/use/useConfirm/executeConfirm.d.ts +2 -2
- package/lib/config/use/useConfirm/executeConfirm.js +11 -11
- package/lib/config/use/useConfirm/registerConfirm.d.ts +4 -4
- package/lib/config/use/useConfirm/registerConfirm.js +8 -8
- package/lib/meixioacomponent.common.js +23005 -22961
- package/lib/meixioacomponent.umd.js +23123 -23079
- package/lib/meixioacomponent.umd.min.js +3 -3
- package/lib/style/tableStyle.less +5 -5
- package/lib/style/tdesignStyle.less +21 -21
- package/lib/typings/type.d.ts +405 -405
- package/lib/typings/type.js +2 -2
- package/lib/useType/useType.d.ts +27 -27
- package/lib/useType/useType.js +89 -89
- package/package.json +1 -1
- package/packages/components/base/baseAnchor/baseAnchor.vue +168 -168
- package/packages/components/base/baseAnchor/baseAnchorV2.vue +165 -165
- package/packages/components/base/baseArea/api.js +6 -6
- package/packages/components/base/baseArea/area.js +14979 -14979
- package/packages/components/base/baseArea/areaConfig.js +7 -7
- package/packages/components/base/baseArea/baseArea.vue +590 -590
- package/packages/components/base/baseArea/baseAreaV2.vue +144 -144
- package/packages/components/base/baseArea/baseAreaV21.vue +156 -156
- package/packages/components/base/baseArea/index.js +6 -6
- package/packages/components/base/baseAreaByMultiple/baseAreaByMultiple.vue +70 -70
- package/packages/components/base/baseAreaByMultiple/index.js +7 -7
- package/packages/components/base/baseButton/baseButton.vue +85 -85
- package/packages/components/base/baseButton/index.js +6 -6
- package/packages/components/base/baseInput/baseInput.vue +98 -98
- package/packages/components/base/baseSelect/baseSelect.vue +102 -102
- package/packages/components/base/baseSelect/index.js +6 -6
- package/packages/components/base/baseText/index.vue +4 -4
- package/packages/components/base/baseTimeRangePicker/baseTimeRangePicker.vue +59 -59
- package/packages/components/base/baseTimeRangePicker/index.js +7 -7
- package/packages/components/base/baseToggle/toggle.vue +59 -13
- package/packages/components/base/tDateRangePicker/index.js +5 -5
- package/packages/components/base/tDateRangePicker/tDateRangePicker.vue +95 -95
- package/packages/components/dynamicmount/DynamicMountClass.js +64 -64
- package/packages/components/dynamicmount/index.js +69 -69
- package/packages/components/hooks/useHookByBaseArea.js +49 -49
- package/packages/components/hooks/useHookByGuide.js +46 -46
- package/packages/components/hooks/useHookByUpload.js +130 -130
- package/packages/components/index.js +239 -239
- package/packages/components/index.ts +0 -2
- package/packages/components/mixins/mixinsByBaseArea.js +53 -53
- package/packages/components/proPageTable/oa_pro_table.vue +13 -13
- package/packages/components/searchHeader/searchHeader.vue +2 -2
- package/packages/components/style/tableStyle.less +5 -5
- package/packages/components/style/tdesignStyle.less +21 -21
- package/packages/config/LinkViewClass.js +152 -152
- package/packages/config/ProTableLocalConfigManage/ProTableLocalConfigManage.js +75 -75
- package/packages/config/ProTableLocalConfigManage/ProTableLocalConfigManage.ts +99 -99
- package/packages/config/componentConfig.js +68 -68
- package/packages/config/use/UseGuide.js +43 -43
- package/packages/config/use/UseImg.js +44 -44
- package/packages/config/use/UseUpload.js +79 -79
- package/packages/config/use/UseViewVideo.js +40 -40
- package/packages/config/use/UseWait.js +18 -18
- package/packages/config/use/WaitPlugin.js +106 -106
- package/packages/config/use/useConfirm/UseConfirm.js +31 -31
- package/packages/config/use/useConfirm/UseConfirm.ts +34 -34
- package/packages/config/use/useConfirm/UseNotify.js +16 -16
- package/packages/config/use/useConfirm/UseNotify.ts +18 -18
- package/packages/config/use/useConfirm/executeConfirm.js +8 -8
- package/packages/config/use/useConfirm/executeConfirm.ts +6 -6
- package/packages/config/use/useConfirm/registerConfirm.js +8 -8
- package/packages/config/use/useConfirm/registerConfirm.ts +7 -7
- package/packages/typings/type.js +2 -2
- package/packages/useType/useType.js +90 -90
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
v-show="!isCheckTableRow || !isHasHandlePlugin"
|
|
31
31
|
ref="oaProTableSearch"
|
|
32
32
|
v-model="module"
|
|
33
|
+
:size="`small`"
|
|
33
34
|
:placeholder="placeholder"
|
|
34
35
|
:pro-screen-model="proScreenModel"
|
|
35
36
|
:proScreenConfig="privateProScreenConfig"
|
|
@@ -233,6 +234,8 @@ import TableCheckControl from "./TableCheckControl";
|
|
|
233
234
|
import proTableLocalConfigManage from "../../config/ProTableLocalConfigManage/ProTableLocalConfigManage";
|
|
234
235
|
import {TransomTableCheckConfig, TransomTableConfig} from "../../utils/utils";
|
|
235
236
|
|
|
237
|
+
|
|
238
|
+
const tableContentClassName = 't-table__content';
|
|
236
239
|
export default {
|
|
237
240
|
name: "baseProTable",
|
|
238
241
|
data() {
|
|
@@ -1006,9 +1009,9 @@ export default {
|
|
|
1006
1009
|
}
|
|
1007
1010
|
|
|
1008
1011
|
this.$nextTick(() => {
|
|
1009
|
-
if (refreshLayout) {
|
|
1012
|
+
// if (refreshLayout) {
|
|
1010
1013
|
this.daLayoutTable();
|
|
1011
|
-
}
|
|
1014
|
+
// }
|
|
1012
1015
|
});
|
|
1013
1016
|
}
|
|
1014
1017
|
},
|
|
@@ -1028,23 +1031,20 @@ export default {
|
|
|
1028
1031
|
scrollToTop() {
|
|
1029
1032
|
const {isAuth} = this.$props;
|
|
1030
1033
|
if (!isAuth) return;
|
|
1031
|
-
|
|
1032
1034
|
try {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
// }
|
|
1035
|
+
let tableContent = this.$refs.enhancedTableRef.$el;
|
|
1036
|
+
let target = tableContent.querySelector(`.${tableContentClassName}`);
|
|
1037
|
+
if (target) {
|
|
1038
|
+
target.scrollTop = 0;
|
|
1039
|
+
}
|
|
1039
1040
|
} catch (error) {
|
|
1040
1041
|
}
|
|
1041
1042
|
},
|
|
1042
1043
|
// element表格的重新渲染方法
|
|
1043
1044
|
daLayoutTable() {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
// });
|
|
1045
|
+
this.$nextTick(()=>{
|
|
1046
|
+
console.log(this.$refs.enhancedTableRef);
|
|
1047
|
+
})
|
|
1048
1048
|
},
|
|
1049
1049
|
// 清空高级筛选的条件
|
|
1050
1050
|
cleanProscreenCondition(flag = false) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
v-if="input"
|
|
6
6
|
v-model="module"
|
|
7
7
|
:placeholder="placeholder"
|
|
8
|
-
size="
|
|
8
|
+
size="medium"
|
|
9
9
|
style="width: 220px"
|
|
10
10
|
@keyup.enter.native="handleSearch"
|
|
11
11
|
>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
v-for="(item, index) in searchList.list"
|
|
26
26
|
:key="index"
|
|
27
27
|
variant="light"
|
|
28
|
-
size="
|
|
28
|
+
size="medium"
|
|
29
29
|
:theme="index === searchList.index ? 'primary' : 'default'"
|
|
30
30
|
@click="handleScreen(index)"
|
|
31
31
|
>
|
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
text-overflow: ellipsis;
|
|
8
8
|
font-weight: var(--font-weight-m);
|
|
9
9
|
color: var(--font-color-d) !important;
|
|
10
|
-
font-size: var(--font-size-
|
|
10
|
+
font-size: var(--font-size-l) !important;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.warn {
|
|
14
|
-
font-size: var(--font-size-
|
|
14
|
+
font-size: var(--font-size-l) !important;
|
|
15
15
|
color: var(--color-warn) !important;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.error {
|
|
19
|
-
font-size: var(--font-size-
|
|
19
|
+
font-size: var(--font-size-l) !important;
|
|
20
20
|
color: var(--color-error) !important;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.success {
|
|
24
|
-
font-size: var(--font-size-
|
|
24
|
+
font-size: var(--font-size-l) !important;
|
|
25
25
|
color: var(--color-success) !important;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
.primary,
|
|
30
30
|
.fun, .handle-primary {
|
|
31
31
|
color: var(--color-primary) !important;
|
|
32
|
-
font-size: var(--font-size-
|
|
32
|
+
font-size: var(--font-size-l) !important;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.fun, .handle-primary {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
.t-drawer__content-wrapper {
|
|
2
|
-
background: transparent !important;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.t-drawer {
|
|
6
|
-
box-shadow: none !important;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.t-drawer__body {
|
|
10
|
-
padding: 0 !important;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.t-list__inner {
|
|
14
|
-
height: 100% !important;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
.t-form__item {
|
|
19
|
-
.t-is-error {
|
|
20
|
-
margin-bottom: var(--td-line-height-body-small) !important;
|
|
21
|
-
}
|
|
1
|
+
.t-drawer__content-wrapper {
|
|
2
|
+
background: transparent !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.t-drawer {
|
|
6
|
+
box-shadow: none !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.t-drawer__body {
|
|
10
|
+
padding: 0 !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.t-list__inner {
|
|
14
|
+
height: 100% !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
.t-form__item {
|
|
19
|
+
.t-is-error {
|
|
20
|
+
margin-bottom: var(--td-line-height-body-small) !important;
|
|
21
|
+
}
|
|
22
22
|
}
|
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
var utils_1 = require("../utils/utils");
|
|
4
|
-
var componentConfig_1 = require("./componentConfig");
|
|
5
|
-
var LinkViewClass = /** @class */ (function () {
|
|
6
|
-
function LinkViewClass(params) {
|
|
7
|
-
this.delFn = null;
|
|
8
|
-
this.exportFn = null;
|
|
9
|
-
this.tableData = [];
|
|
10
|
-
this.pageProps = {
|
|
11
|
-
size: 15, total: 100, current: 1
|
|
12
|
-
};
|
|
13
|
-
this.pageConfig = null;
|
|
14
|
-
this.activeIndex = 0;
|
|
15
|
-
this.tablePermission = {
|
|
16
|
-
key: "", value: true
|
|
17
|
-
};
|
|
18
|
-
this.editPermission = {
|
|
19
|
-
key: "", value: true
|
|
20
|
-
};
|
|
21
|
-
this.delPermission = {
|
|
22
|
-
key: "", value: true
|
|
23
|
-
};
|
|
24
|
-
this.addPermission = {
|
|
25
|
-
key: "", value: true
|
|
26
|
-
};
|
|
27
|
-
this.refreshTableData = null;
|
|
28
|
-
this.drawerInstance = null;
|
|
29
|
-
this.superDrawerMountedCallback = null;
|
|
30
|
-
this.isLocalTablePagination = null;
|
|
31
|
-
this.init(params);
|
|
32
|
-
this.setPermissions(params);
|
|
33
|
-
}
|
|
34
|
-
LinkViewClass.prototype.setPermissions = function (param) {
|
|
35
|
-
var permissions = param.permissions;
|
|
36
|
-
if (permissions) {
|
|
37
|
-
this.tablePermission.key = permissions[0];
|
|
38
|
-
this.addPermission.key = permissions[1];
|
|
39
|
-
this.editPermission.key = permissions[2];
|
|
40
|
-
this.delPermission.key = permissions[3];
|
|
41
|
-
}
|
|
42
|
-
this.jugePermission();
|
|
43
|
-
};
|
|
44
|
-
LinkViewClass.prototype.jugePermission = function () {
|
|
45
|
-
var _a = this, tablePermission = _a.tablePermission, addPermission = _a.addPermission, editPermission = _a.editPermission, delPermission = _a.delPermission;
|
|
46
|
-
var permissionList = componentConfig_1["default"].store["getters"]["permissions"];
|
|
47
|
-
tablePermission.value = (0, utils_1.judgeButtonPermission)(permissionList, tablePermission.key);
|
|
48
|
-
editPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, editPermission.key);
|
|
49
|
-
delPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, delPermission.key);
|
|
50
|
-
addPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, addPermission.key);
|
|
51
|
-
};
|
|
52
|
-
LinkViewClass.prototype.init = function (params) {
|
|
53
|
-
this.tableData = [];
|
|
54
|
-
this.activeIndex = 0;
|
|
55
|
-
this.refreshTableData = null;
|
|
56
|
-
this.setPageProps(params);
|
|
57
|
-
this.pageConfig = {
|
|
58
|
-
size: "size", page: "current", total: "total"
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
LinkViewClass.prototype.setPageProps = function (params) {
|
|
62
|
-
try {
|
|
63
|
-
var isLocalTablePagination = params["isLocalTablePagination"];
|
|
64
|
-
if (!isLocalTablePagination) {
|
|
65
|
-
this.setDefaultPageProps();
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
this.isLocalTablePagination = isLocalTablePagination;
|
|
69
|
-
var localTablePagination = window.localStorage.getItem('LocalTablePagination');
|
|
70
|
-
if (localTablePagination) {
|
|
71
|
-
var localTablePaginationObj = JSON.parse(localTablePagination);
|
|
72
|
-
var value = localTablePaginationObj["".concat(isLocalTablePagination)];
|
|
73
|
-
if (value) {
|
|
74
|
-
this.pageProps = {
|
|
75
|
-
size: value, total: 100, current: 1
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
this.setDefaultPageProps();
|
|
80
|
-
this.setLocalPagination(localTablePaginationObj);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
this.setDefaultPageProps();
|
|
85
|
-
var value = {};
|
|
86
|
-
this.setLocalPagination(value);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
catch (error) { }
|
|
91
|
-
};
|
|
92
|
-
LinkViewClass.prototype.setLocalPagination = function (value) {
|
|
93
|
-
value["".concat(this.isLocalTablePagination)] = this.pageProps.size;
|
|
94
|
-
window.localStorage.setItem('LocalTablePagination', JSON.stringify(value));
|
|
95
|
-
};
|
|
96
|
-
LinkViewClass.prototype.setDefaultPageProps = function () {
|
|
97
|
-
this.pageProps = {
|
|
98
|
-
size: 15, total: 100, current: 1
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
LinkViewClass.prototype.onHandNextData = function () {
|
|
102
|
-
if (this.hasNextTableData()) {
|
|
103
|
-
this.activeIndex += 1;
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
this.activeIndex = this.tableData.length - 1;
|
|
107
|
-
};
|
|
108
|
-
LinkViewClass.prototype.onHandPreData = function () {
|
|
109
|
-
if (this.hasPreTableData()) {
|
|
110
|
-
this.activeIndex -= 1;
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
this.activeIndex = 0;
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
LinkViewClass.prototype.hasNextTableData = function () {
|
|
117
|
-
return this.tableData.length > 0 ? this.activeIndex !== this.tableData.length - 1 : false;
|
|
118
|
-
};
|
|
119
|
-
LinkViewClass.prototype.hasPreTableData = function () {
|
|
120
|
-
return this.activeIndex > 0;
|
|
121
|
-
};
|
|
122
|
-
LinkViewClass.prototype.getTableDataForActiveIndex = function () {
|
|
123
|
-
return this.tableData[this.activeIndex];
|
|
124
|
-
};
|
|
125
|
-
LinkViewClass.prototype.getPageProps = function () {
|
|
126
|
-
return this.pageProps;
|
|
127
|
-
};
|
|
128
|
-
LinkViewClass.prototype.getTableData = function () {
|
|
129
|
-
return {
|
|
130
|
-
_class: this, tableData: this.tableData
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
LinkViewClass.prototype.getPageConfig = function () {
|
|
134
|
-
return this.pageConfig;
|
|
135
|
-
};
|
|
136
|
-
LinkViewClass.prototype.getPermission = function (key) {
|
|
137
|
-
return this["".concat(key)].value;
|
|
138
|
-
};
|
|
139
|
-
LinkViewClass.prototype.setActiveIndex = function (index) {
|
|
140
|
-
this.activeIndex = index;
|
|
141
|
-
};
|
|
142
|
-
LinkViewClass.prototype.deleteTableDataItemByProperty = function (property, value) {
|
|
143
|
-
var index = this.tableData.findIndex(function (item) {
|
|
144
|
-
return item["".concat(property)] === value;
|
|
145
|
-
});
|
|
146
|
-
if (index > -1) {
|
|
147
|
-
this.tableData.splice(index, 1);
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
return LinkViewClass;
|
|
151
|
-
}());
|
|
152
|
-
exports["default"] = LinkViewClass;
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var utils_1 = require("../utils/utils");
|
|
4
|
+
var componentConfig_1 = require("./componentConfig");
|
|
5
|
+
var LinkViewClass = /** @class */ (function () {
|
|
6
|
+
function LinkViewClass(params) {
|
|
7
|
+
this.delFn = null;
|
|
8
|
+
this.exportFn = null;
|
|
9
|
+
this.tableData = [];
|
|
10
|
+
this.pageProps = {
|
|
11
|
+
size: 15, total: 100, current: 1
|
|
12
|
+
};
|
|
13
|
+
this.pageConfig = null;
|
|
14
|
+
this.activeIndex = 0;
|
|
15
|
+
this.tablePermission = {
|
|
16
|
+
key: "", value: true
|
|
17
|
+
};
|
|
18
|
+
this.editPermission = {
|
|
19
|
+
key: "", value: true
|
|
20
|
+
};
|
|
21
|
+
this.delPermission = {
|
|
22
|
+
key: "", value: true
|
|
23
|
+
};
|
|
24
|
+
this.addPermission = {
|
|
25
|
+
key: "", value: true
|
|
26
|
+
};
|
|
27
|
+
this.refreshTableData = null;
|
|
28
|
+
this.drawerInstance = null;
|
|
29
|
+
this.superDrawerMountedCallback = null;
|
|
30
|
+
this.isLocalTablePagination = null;
|
|
31
|
+
this.init(params);
|
|
32
|
+
this.setPermissions(params);
|
|
33
|
+
}
|
|
34
|
+
LinkViewClass.prototype.setPermissions = function (param) {
|
|
35
|
+
var permissions = param.permissions;
|
|
36
|
+
if (permissions) {
|
|
37
|
+
this.tablePermission.key = permissions[0];
|
|
38
|
+
this.addPermission.key = permissions[1];
|
|
39
|
+
this.editPermission.key = permissions[2];
|
|
40
|
+
this.delPermission.key = permissions[3];
|
|
41
|
+
}
|
|
42
|
+
this.jugePermission();
|
|
43
|
+
};
|
|
44
|
+
LinkViewClass.prototype.jugePermission = function () {
|
|
45
|
+
var _a = this, tablePermission = _a.tablePermission, addPermission = _a.addPermission, editPermission = _a.editPermission, delPermission = _a.delPermission;
|
|
46
|
+
var permissionList = componentConfig_1["default"].store["getters"]["permissions"];
|
|
47
|
+
tablePermission.value = (0, utils_1.judgeButtonPermission)(permissionList, tablePermission.key);
|
|
48
|
+
editPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, editPermission.key);
|
|
49
|
+
delPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, delPermission.key);
|
|
50
|
+
addPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, addPermission.key);
|
|
51
|
+
};
|
|
52
|
+
LinkViewClass.prototype.init = function (params) {
|
|
53
|
+
this.tableData = [];
|
|
54
|
+
this.activeIndex = 0;
|
|
55
|
+
this.refreshTableData = null;
|
|
56
|
+
this.setPageProps(params);
|
|
57
|
+
this.pageConfig = {
|
|
58
|
+
size: "size", page: "current", total: "total"
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
LinkViewClass.prototype.setPageProps = function (params) {
|
|
62
|
+
try {
|
|
63
|
+
var isLocalTablePagination = params["isLocalTablePagination"];
|
|
64
|
+
if (!isLocalTablePagination) {
|
|
65
|
+
this.setDefaultPageProps();
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this.isLocalTablePagination = isLocalTablePagination;
|
|
69
|
+
var localTablePagination = window.localStorage.getItem('LocalTablePagination');
|
|
70
|
+
if (localTablePagination) {
|
|
71
|
+
var localTablePaginationObj = JSON.parse(localTablePagination);
|
|
72
|
+
var value = localTablePaginationObj["".concat(isLocalTablePagination)];
|
|
73
|
+
if (value) {
|
|
74
|
+
this.pageProps = {
|
|
75
|
+
size: value, total: 100, current: 1
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
this.setDefaultPageProps();
|
|
80
|
+
this.setLocalPagination(localTablePaginationObj);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.setDefaultPageProps();
|
|
85
|
+
var value = {};
|
|
86
|
+
this.setLocalPagination(value);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (error) { }
|
|
91
|
+
};
|
|
92
|
+
LinkViewClass.prototype.setLocalPagination = function (value) {
|
|
93
|
+
value["".concat(this.isLocalTablePagination)] = this.pageProps.size;
|
|
94
|
+
window.localStorage.setItem('LocalTablePagination', JSON.stringify(value));
|
|
95
|
+
};
|
|
96
|
+
LinkViewClass.prototype.setDefaultPageProps = function () {
|
|
97
|
+
this.pageProps = {
|
|
98
|
+
size: 15, total: 100, current: 1
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
LinkViewClass.prototype.onHandNextData = function () {
|
|
102
|
+
if (this.hasNextTableData()) {
|
|
103
|
+
this.activeIndex += 1;
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this.activeIndex = this.tableData.length - 1;
|
|
107
|
+
};
|
|
108
|
+
LinkViewClass.prototype.onHandPreData = function () {
|
|
109
|
+
if (this.hasPreTableData()) {
|
|
110
|
+
this.activeIndex -= 1;
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
this.activeIndex = 0;
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
LinkViewClass.prototype.hasNextTableData = function () {
|
|
117
|
+
return this.tableData.length > 0 ? this.activeIndex !== this.tableData.length - 1 : false;
|
|
118
|
+
};
|
|
119
|
+
LinkViewClass.prototype.hasPreTableData = function () {
|
|
120
|
+
return this.activeIndex > 0;
|
|
121
|
+
};
|
|
122
|
+
LinkViewClass.prototype.getTableDataForActiveIndex = function () {
|
|
123
|
+
return this.tableData[this.activeIndex];
|
|
124
|
+
};
|
|
125
|
+
LinkViewClass.prototype.getPageProps = function () {
|
|
126
|
+
return this.pageProps;
|
|
127
|
+
};
|
|
128
|
+
LinkViewClass.prototype.getTableData = function () {
|
|
129
|
+
return {
|
|
130
|
+
_class: this, tableData: this.tableData
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
LinkViewClass.prototype.getPageConfig = function () {
|
|
134
|
+
return this.pageConfig;
|
|
135
|
+
};
|
|
136
|
+
LinkViewClass.prototype.getPermission = function (key) {
|
|
137
|
+
return this["".concat(key)].value;
|
|
138
|
+
};
|
|
139
|
+
LinkViewClass.prototype.setActiveIndex = function (index) {
|
|
140
|
+
this.activeIndex = index;
|
|
141
|
+
};
|
|
142
|
+
LinkViewClass.prototype.deleteTableDataItemByProperty = function (property, value) {
|
|
143
|
+
var index = this.tableData.findIndex(function (item) {
|
|
144
|
+
return item["".concat(property)] === value;
|
|
145
|
+
});
|
|
146
|
+
if (index > -1) {
|
|
147
|
+
this.tableData.splice(index, 1);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
return LinkViewClass;
|
|
151
|
+
}());
|
|
152
|
+
exports["default"] = LinkViewClass;
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
var ProTableLocalConfigManage = /** @class */ (function () {
|
|
4
|
-
function ProTableLocalConfigManage() {
|
|
5
|
-
var _this = this;
|
|
6
|
-
this.setProTableLocalConfigByTableKey = function (tableKey, value) {
|
|
7
|
-
_this.localConfig["".concat(tableKey)] = value;
|
|
8
|
-
console.log(_this.localConfig);
|
|
9
|
-
_this.setProTableLocalConfigByLocalStorage();
|
|
10
|
-
};
|
|
11
|
-
this.checkRenderTableConfigAccordLocal = function (tableKey, renderTable) {
|
|
12
|
-
var _value = _this.hasConfigByTableKey(tableKey);
|
|
13
|
-
var checkFlag = true;
|
|
14
|
-
if (_value) {
|
|
15
|
-
console.log(renderTable);
|
|
16
|
-
console.log(_value);
|
|
17
|
-
if (_value.length !== renderTable.length) {
|
|
18
|
-
checkFlag = false;
|
|
19
|
-
_this.deleteProTableLocalConfigByTableKey(tableKey);
|
|
20
|
-
return checkFlag;
|
|
21
|
-
}
|
|
22
|
-
var _loop_1 = function (i) {
|
|
23
|
-
var item = renderTable[i];
|
|
24
|
-
var index = _value.findIndex(function (cItem) {
|
|
25
|
-
return item.key === cItem.key;
|
|
26
|
-
});
|
|
27
|
-
if (index < 0) {
|
|
28
|
-
checkFlag = false;
|
|
29
|
-
_this.deleteProTableLocalConfigByTableKey(tableKey);
|
|
30
|
-
return "break";
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
for (var i = 0; i < renderTable.length; i++) {
|
|
34
|
-
var state_1 = _loop_1(i);
|
|
35
|
-
if (state_1 === "break")
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
return checkFlag;
|
|
39
|
-
}
|
|
40
|
-
return false;
|
|
41
|
-
};
|
|
42
|
-
this.deleteProTableLocalConfigByTableKey = function (tableKey) {
|
|
43
|
-
console.log('deleteProTableLocalConfigByTableKey');
|
|
44
|
-
var _value = _this.hasConfigByTableKey(tableKey);
|
|
45
|
-
if (_value) {
|
|
46
|
-
delete _this.localConfig["".concat(tableKey)];
|
|
47
|
-
_this.setProTableLocalConfigByLocalStorage();
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
this.hasConfigByTableKey = function (tableKey) {
|
|
51
|
-
var value = _this.localConfig["".concat(tableKey)];
|
|
52
|
-
if (value) {
|
|
53
|
-
return value;
|
|
54
|
-
}
|
|
55
|
-
return false;
|
|
56
|
-
};
|
|
57
|
-
this.setProTableLocalConfigByLocalStorage = function () {
|
|
58
|
-
window.localStorage.setItem('proTableLocalConfig', JSON.stringify(_this.localConfig));
|
|
59
|
-
console.log('setProTableLocalConfigByLocalStorage');
|
|
60
|
-
};
|
|
61
|
-
this.localConfig = {};
|
|
62
|
-
}
|
|
63
|
-
ProTableLocalConfigManage.prototype.initByProTableLocalConfigManage = function () {
|
|
64
|
-
var _localConfig = window.localStorage.getItem('proTableLocalConfig');
|
|
65
|
-
if (_localConfig) {
|
|
66
|
-
this.localConfig = JSON.parse(_localConfig);
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
this.setProTableLocalConfigByLocalStorage();
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
return ProTableLocalConfigManage;
|
|
73
|
-
}());
|
|
74
|
-
var proTableLocalConfigManage = new ProTableLocalConfigManage();
|
|
75
|
-
exports["default"] = proTableLocalConfigManage;
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var ProTableLocalConfigManage = /** @class */ (function () {
|
|
4
|
+
function ProTableLocalConfigManage() {
|
|
5
|
+
var _this = this;
|
|
6
|
+
this.setProTableLocalConfigByTableKey = function (tableKey, value) {
|
|
7
|
+
_this.localConfig["".concat(tableKey)] = value;
|
|
8
|
+
console.log(_this.localConfig);
|
|
9
|
+
_this.setProTableLocalConfigByLocalStorage();
|
|
10
|
+
};
|
|
11
|
+
this.checkRenderTableConfigAccordLocal = function (tableKey, renderTable) {
|
|
12
|
+
var _value = _this.hasConfigByTableKey(tableKey);
|
|
13
|
+
var checkFlag = true;
|
|
14
|
+
if (_value) {
|
|
15
|
+
console.log(renderTable);
|
|
16
|
+
console.log(_value);
|
|
17
|
+
if (_value.length !== renderTable.length) {
|
|
18
|
+
checkFlag = false;
|
|
19
|
+
_this.deleteProTableLocalConfigByTableKey(tableKey);
|
|
20
|
+
return checkFlag;
|
|
21
|
+
}
|
|
22
|
+
var _loop_1 = function (i) {
|
|
23
|
+
var item = renderTable[i];
|
|
24
|
+
var index = _value.findIndex(function (cItem) {
|
|
25
|
+
return item.key === cItem.key;
|
|
26
|
+
});
|
|
27
|
+
if (index < 0) {
|
|
28
|
+
checkFlag = false;
|
|
29
|
+
_this.deleteProTableLocalConfigByTableKey(tableKey);
|
|
30
|
+
return "break";
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
for (var i = 0; i < renderTable.length; i++) {
|
|
34
|
+
var state_1 = _loop_1(i);
|
|
35
|
+
if (state_1 === "break")
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
return checkFlag;
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
};
|
|
42
|
+
this.deleteProTableLocalConfigByTableKey = function (tableKey) {
|
|
43
|
+
console.log('deleteProTableLocalConfigByTableKey');
|
|
44
|
+
var _value = _this.hasConfigByTableKey(tableKey);
|
|
45
|
+
if (_value) {
|
|
46
|
+
delete _this.localConfig["".concat(tableKey)];
|
|
47
|
+
_this.setProTableLocalConfigByLocalStorage();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
this.hasConfigByTableKey = function (tableKey) {
|
|
51
|
+
var value = _this.localConfig["".concat(tableKey)];
|
|
52
|
+
if (value) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return false;
|
|
56
|
+
};
|
|
57
|
+
this.setProTableLocalConfigByLocalStorage = function () {
|
|
58
|
+
window.localStorage.setItem('proTableLocalConfig', JSON.stringify(_this.localConfig));
|
|
59
|
+
console.log('setProTableLocalConfigByLocalStorage');
|
|
60
|
+
};
|
|
61
|
+
this.localConfig = {};
|
|
62
|
+
}
|
|
63
|
+
ProTableLocalConfigManage.prototype.initByProTableLocalConfigManage = function () {
|
|
64
|
+
var _localConfig = window.localStorage.getItem('proTableLocalConfig');
|
|
65
|
+
if (_localConfig) {
|
|
66
|
+
this.localConfig = JSON.parse(_localConfig);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
this.setProTableLocalConfigByLocalStorage();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
return ProTableLocalConfigManage;
|
|
73
|
+
}());
|
|
74
|
+
var proTableLocalConfigManage = new ProTableLocalConfigManage();
|
|
75
|
+
exports["default"] = proTableLocalConfigManage;
|