agilebuilder-ui 1.1.65-tmp23 → 1.1.65-tmp24
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/dist/index.full.min.js +462 -281
- package/dist/style.css +181 -175
- package/es/chat-embed/src/chat-sender.vue.mjs +1 -1
- package/es/chat-embed/src/chat-sender.vue2.mjs +26 -28
- package/es/chat-embed/src/index.vue.mjs +1 -1
- package/es/chat-embed/src/index.vue2.mjs +29 -29
- package/es/department-tree-mobile/src/department-tree-inline-app.vue.mjs +68 -68
- package/es/department-tree-mobile/src/department-tree-service.mjs +20 -18
- package/es/department-tree-mobile/src/dept-result.vue.mjs +12 -11
- package/es/department-user-tree-inline/src/department-user-single-tree-inline.vue.mjs +3 -3
- package/es/department-user-tree-inline/src/department-user-tree-inline.vue.mjs +6 -6
- package/es/department-user-tree-inline/src/department-user-tree-single-service.mjs +1 -1
- package/es/fs-preview/src/fs-preview.vue.mjs +26 -18
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.mjs +1 -1
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-input.vue.mjs +1 -1
- package/es/index.mjs +2 -1
- package/es/src/components/Card/index.mjs +34 -31
- package/es/src/components/Scrollbar/index.vue.mjs +6 -6
- package/es/src/i18n/langs/cn.mjs +1 -1
- package/es/src/i18n/langs/en.mjs +1 -1
- package/es/src/utils/common-util.mjs +47 -39
- package/es/style.css +738 -732
- package/es/super-grid/src/apis.mjs +199 -173
- package/es/super-grid/src/components/mobile-table-card.mjs +53 -53
- package/es/super-grid/src/normal-column-content.vue.mjs +12 -12
- package/es/super-grid/src/normal-column.vue.mjs +4 -5
- package/es/super-grid/src/search-button.vue.mjs +4 -2
- package/es/super-grid/src/search-form-dialog.vue.mjs +22 -11
- package/es/super-grid/src/search-form-item.vue.mjs +5 -5
- package/es/super-grid/src/search-form-mobile.vue.mjs +19 -19
- package/es/super-grid/src/search-form-open.vue.mjs +5 -3
- package/es/super-grid/src/search-form-ordinarySearch.vue.mjs +3 -1
- package/es/super-grid/src/search-form.vue.mjs +19 -13
- package/es/super-grid/src/super-grid.vue.mjs +271 -209
- package/es/super-grid/src/utils.mjs +346 -300
- package/es/utils/organization.mjs +24 -11
- package/lib/chat-embed/src/chat-sender.vue.cjs +1 -1
- package/lib/chat-embed/src/chat-sender.vue2.cjs +44 -46
- package/lib/chat-embed/src/index.vue.cjs +1 -1
- package/lib/chat-embed/src/index.vue2.cjs +14 -14
- package/lib/department-tree-mobile/src/department-tree-inline-app.vue.cjs +58 -58
- package/lib/department-tree-mobile/src/department-tree-service.cjs +10 -8
- package/lib/department-tree-mobile/src/dept-result.vue.cjs +10 -10
- package/lib/department-user-tree-inline/src/department-user-single-tree-inline.vue.cjs +16 -16
- package/lib/department-user-tree-inline/src/department-user-tree-inline.vue.cjs +5 -5
- package/lib/department-user-tree-inline/src/department-user-tree-single-service.cjs +1 -1
- package/lib/fs-preview/src/fs-preview.vue.cjs +13 -5
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.cjs +1 -1
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-input.vue.cjs +13 -13
- package/lib/index.cjs +7 -7
- package/lib/src/components/Card/index.cjs +14 -11
- package/lib/src/components/Scrollbar/index.vue.cjs +2 -2
- package/lib/src/i18n/langs/cn.cjs +1 -1
- package/lib/src/i18n/langs/en.cjs +1 -1
- package/lib/src/utils/common-util.cjs +24 -17
- package/lib/style.css +665 -659
- package/lib/super-grid/src/apis.cjs +190 -164
- package/lib/super-grid/src/components/mobile-table-card.cjs +37 -37
- package/lib/super-grid/src/normal-column-content.vue.cjs +2 -2
- package/lib/super-grid/src/normal-column.vue.cjs +10 -11
- package/lib/super-grid/src/search-button.vue.cjs +3 -1
- package/lib/super-grid/src/search-form-dialog.vue.cjs +19 -8
- package/lib/super-grid/src/search-form-item.vue.cjs +2 -2
- package/lib/super-grid/src/search-form-mobile.vue.cjs +7 -7
- package/lib/super-grid/src/search-form-open.vue.cjs +7 -5
- package/lib/super-grid/src/search-form-ordinarySearch.vue.cjs +3 -1
- package/lib/super-grid/src/search-form.vue.cjs +15 -10
- package/lib/super-grid/src/super-grid.vue.cjs +220 -158
- package/lib/super-grid/src/utils.cjs +349 -274
- package/lib/utils/organization.cjs +35 -24
- package/package.json +1 -1
- package/src/components/Card/index.jsx +12 -2
- package/src/components/Scrollbar/index.vue +165 -154
- package/src/i18n/langs/cn.js +10 -2
- package/src/i18n/langs/en.js +10 -2
- package/src/styles/index.scss +9 -2
- package/src/styles/theme/default.scss +18 -13
- package/src/styles/theme/tiffany-blue-mobile/home.scss +44 -1
- package/src/utils/auth-api.js +1 -0
- package/src/utils/common-util.js +13 -0
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { getToken
|
|
3
|
-
import { isPlateSys
|
|
4
|
-
import { getEntityFieldValue
|
|
5
|
-
import { doFormatWithValueSet
|
|
6
|
-
import
|
|
7
|
-
import { parseSubTablePermissionCondition
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
for (const
|
|
11
|
-
|
|
12
|
-
return
|
|
13
|
-
}
|
|
14
|
-
function
|
|
15
|
-
const
|
|
16
|
-
let
|
|
17
|
-
for (let
|
|
18
|
-
if (0 ===
|
|
19
|
-
|
|
20
|
-
else if (
|
|
21
|
-
let
|
|
22
|
-
const
|
|
23
|
-
for (let
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import * as Vue from "vue";
|
|
2
|
+
import { getToken } from "../../src/utils/auth.mjs";
|
|
3
|
+
import { isPlateSys } from "../../src/utils/common-util.mjs";
|
|
4
|
+
import { getEntityFieldValue } from "../../src/utils/util.mjs";
|
|
5
|
+
import { doFormatWithValueSet } from "./formatter.mjs";
|
|
6
|
+
import store from "./store.mjs";
|
|
7
|
+
import { parseSubTablePermissionCondition, executeExpression } from "../../src/utils/calculator/calculator-util.mjs";
|
|
8
|
+
function getColumnValues(t, e) {
|
|
9
|
+
const o = [];
|
|
10
|
+
for (const n of t)
|
|
11
|
+
o.push(n[e]);
|
|
12
|
+
return o;
|
|
13
|
+
}
|
|
14
|
+
function getSpanValuesForColumn(t, e, o) {
|
|
15
|
+
const n = [];
|
|
16
|
+
let i = 0;
|
|
17
|
+
for (let a = 0; a < t.length; a++)
|
|
18
|
+
if (0 === a)
|
|
19
|
+
n.push(1), i = 0;
|
|
20
|
+
else if (o && "" !== o) {
|
|
21
|
+
let e2 = "", r = "";
|
|
22
|
+
const s = o.split(",");
|
|
23
|
+
for (let o2 = 0; o2 < s.length; o2++)
|
|
24
|
+
e2 += t[a][s[o2]], r += t[a - 1][s[o2]];
|
|
25
|
+
e2 === r ? (n[i] += 1, n.push(0)) : (n.push(1), i = a);
|
|
26
26
|
} else
|
|
27
|
-
|
|
28
|
-
return
|
|
29
|
-
}
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
for (const
|
|
33
|
-
if (
|
|
34
|
-
return
|
|
27
|
+
t[a][e] === t[a - 1][e] ? (n[i] += 1, n.push(0)) : (n.push(1), i = a);
|
|
28
|
+
return n;
|
|
29
|
+
}
|
|
30
|
+
function getFirstEditableColumn(t) {
|
|
31
|
+
t || (t = store.get("_list_code"));
|
|
32
|
+
for (const e of store.get(t).columns)
|
|
33
|
+
if (e.editable)
|
|
34
|
+
return e.prop;
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
let
|
|
39
|
-
for (const
|
|
40
|
-
if (
|
|
41
|
-
return
|
|
42
|
-
|
|
37
|
+
const ArrowKeyAction = { getIndex(t) {
|
|
38
|
+
let e = 0;
|
|
39
|
+
for (const o of store.columns) {
|
|
40
|
+
if (o.prop === t)
|
|
41
|
+
return e;
|
|
42
|
+
e++;
|
|
43
43
|
}
|
|
44
|
-
}, getLeftColumn(
|
|
45
|
-
let
|
|
46
|
-
for (
|
|
47
|
-
return
|
|
44
|
+
}, getLeftColumn(t) {
|
|
45
|
+
let e = 0;
|
|
46
|
+
for (e = ArrowKeyAction.getIndex(t) - 1; e >= 0; e--)
|
|
47
|
+
return store.columns[e].editable ? store.columns[e].prop : null;
|
|
48
48
|
} };
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
49
|
+
function setCurrentRow(t, e) {
|
|
50
|
+
e || (e = store.get("_list_code"));
|
|
51
|
+
const o = store.get(e);
|
|
52
|
+
t < o.gridData.length && (o.isMulitiSelect ? (o.superGrid.clearSelection(), o.superGrid.toggleRowSelection(o.gridData[t], true)) : o.superGrid.setCurrentRow(o.gridData[t]));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
if (!
|
|
54
|
+
function isObjectValueEqual(t, e) {
|
|
55
|
+
if (!t && !e)
|
|
56
56
|
return true;
|
|
57
|
-
if (
|
|
58
|
-
var
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
for (var
|
|
62
|
-
var
|
|
63
|
-
if ("$editing" !==
|
|
64
|
-
if (
|
|
57
|
+
if (t && e) {
|
|
58
|
+
var o = getProps(t), n = getProps(e);
|
|
59
|
+
let r = o;
|
|
60
|
+
r = o.length > n.length ? o : n;
|
|
61
|
+
for (var i = 0; i < r.length; i++) {
|
|
62
|
+
var a = r[i];
|
|
63
|
+
if ("$editing" !== a) {
|
|
64
|
+
if (t[a] !== e[a])
|
|
65
65
|
return false;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -69,287 +69,333 @@ function d(t2, e2) {
|
|
|
69
69
|
}
|
|
70
70
|
return false;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
const
|
|
74
|
-
for (var
|
|
75
|
-
|
|
76
|
-
return
|
|
77
|
-
}
|
|
78
|
-
function
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
return (void 0 ===
|
|
82
|
-
}
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
if (void 0 !==
|
|
72
|
+
function getProps(t) {
|
|
73
|
+
const e = [];
|
|
74
|
+
for (var o in t)
|
|
75
|
+
e.push(o);
|
|
76
|
+
return e;
|
|
77
|
+
}
|
|
78
|
+
function isLastEditRowSave(t) {
|
|
79
|
+
t || (t = store.get("_list_code"));
|
|
80
|
+
const e = store.get(t);
|
|
81
|
+
return (void 0 === e.isEditRow || true !== e.isEditRow) && (void 0 === e.$rowIndex || null === e.$rowIndex || (void 0 === e.$lastSaveRowIndex || null === e.$lastSaveRowIndex || e.$rowIndex === e.$lastSaveRowIndex));
|
|
82
|
+
}
|
|
83
|
+
function isCanRefreshGrid(t) {
|
|
84
|
+
t || (t = store.get("_list_code"));
|
|
85
|
+
const e = store.get(t);
|
|
86
|
+
if (void 0 !== e.isEditRow && true === e.isEditRow)
|
|
87
87
|
return false;
|
|
88
|
-
return !!
|
|
89
|
-
}
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
88
|
+
return !!isLastEditRowSave() && (void 0 === e.isCreateRow || true !== e.isCreateRow);
|
|
89
|
+
}
|
|
90
|
+
function getEntityId(t) {
|
|
91
|
+
return t && t.id ? t.id : t && t.ID ? t.ID : void 0;
|
|
92
|
+
}
|
|
93
|
+
function isDisableEdit(t, e, o, n) {
|
|
94
|
+
e || (e = store.get("_list_code"));
|
|
95
|
+
let i = false;
|
|
96
|
+
const a = store.get(e), r = isHasEditOption("disableEditProps", e) ? a.options.lineEditOptions.disableEditProps : null;
|
|
97
|
+
if (r) {
|
|
98
|
+
const e2 = r.split(",");
|
|
99
|
+
e2 && e2.indexOf(t) >= 0 && (i = true);
|
|
97
100
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
o3 = void 0 === n3[t3].rowIndexes || null === n3[t3].rowIndexes ? n3[t3].canEdit : !(n3[t3].rowIndexes.indexOf(s2) >= 0) || n3[t3].canEdit;
|
|
109
|
-
false === o3 && (i2 = true);
|
|
101
|
+
const s = getEntityId(o);
|
|
102
|
+
if (false === i && a.options) {
|
|
103
|
+
const e2 = a.options.validateRules;
|
|
104
|
+
if (e2) {
|
|
105
|
+
const o2 = e2.filter((e3) => e3.name && (e3.name === t || "all_fields" === e3.name));
|
|
106
|
+
let n2 = true;
|
|
107
|
+
if (o2 && o2.length > 0) {
|
|
108
|
+
for (let t2 = 0; t2 < o2.length; t2++)
|
|
109
|
+
n2 = void 0 === o2[t2].rowIndexes || null === o2[t2].rowIndexes ? o2[t2].canEdit : !(o2[t2].rowIndexes.indexOf(s) >= 0) || o2[t2].canEdit;
|
|
110
|
+
false === n2 && (i = true);
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
|
-
if (false ===
|
|
113
|
-
|
|
114
|
-
let n3 = true;
|
|
115
|
-
const o3 = t4;
|
|
116
|
-
o3 && void 0 !== o3.canUpdate && false === o3.canUpdate && void 0 !== e4 && o3.updateRowIndexes && o3.updateRowIndexes.indexOf(e4) >= 0 && (n3 = false);
|
|
117
|
-
return n3;
|
|
118
|
-
}(r2.options.actionPermission, s2);
|
|
119
|
-
false === t3 && (i2 = true);
|
|
113
|
+
if (false === i) {
|
|
114
|
+
false === isRowCanUpdate(a.options.actionPermission, s) && (i = true);
|
|
120
115
|
}
|
|
121
|
-
if (false ===
|
|
122
|
-
const
|
|
123
|
-
let
|
|
124
|
-
|
|
116
|
+
if (false === i && a.options.customRules && (a.options.customRules[t] || a.options.customRules._all_fields)) {
|
|
117
|
+
const e3 = a.options.customRules[t] ? a.options.customRules[t] : a.options.customRules._all_fields;
|
|
118
|
+
let o2 = true;
|
|
119
|
+
e3 && e3.disabled && false !== o2 && (i = true);
|
|
125
120
|
}
|
|
126
121
|
}
|
|
127
|
-
return
|
|
128
|
-
}
|
|
129
|
-
function
|
|
130
|
-
const
|
|
131
|
-
return
|
|
132
|
-
}
|
|
133
|
-
function
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
let
|
|
137
|
-
const
|
|
138
|
-
if (
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
} else if (
|
|
144
|
-
const
|
|
145
|
-
|
|
122
|
+
return i;
|
|
123
|
+
}
|
|
124
|
+
function rowBeforeValidate(t, e, o, n) {
|
|
125
|
+
const i = { parent: e.options.extraParam.entityMap, row: o, pageContext: e.options.pageContext, configure: e.options.configureObj, rowIndex: n };
|
|
126
|
+
return t.beforeValidate(i);
|
|
127
|
+
}
|
|
128
|
+
function isRequiredEdit(t, e) {
|
|
129
|
+
const o = t.prop;
|
|
130
|
+
e || (e = store.get("_list_code"));
|
|
131
|
+
let n = false;
|
|
132
|
+
const i = store.get(e);
|
|
133
|
+
if (i && i.options) {
|
|
134
|
+
const e2 = i.options.validateRules;
|
|
135
|
+
if (e2) {
|
|
136
|
+
const t2 = e2.filter((t3) => t3.name && (t3.name === o || "all_fields" === t3.name) && void 0 !== t3.canEdit && true === t3.canEdit);
|
|
137
|
+
t2 && t2.length > 0 && (n = true);
|
|
138
|
+
} else if (t.validations) {
|
|
139
|
+
const e3 = JSON.parse(t.validations).filter((t2) => true === t2.required);
|
|
140
|
+
e3 && e3.length > 0 && (n = true);
|
|
146
141
|
}
|
|
147
142
|
}
|
|
148
|
-
return
|
|
149
|
-
}
|
|
150
|
-
function
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
return
|
|
154
|
-
}
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
return !(!
|
|
159
|
-
}
|
|
160
|
-
function
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
return !(!
|
|
164
|
-
}
|
|
165
|
-
function
|
|
166
|
-
|
|
143
|
+
return n;
|
|
144
|
+
}
|
|
145
|
+
function isRowCanUpdate(t, e) {
|
|
146
|
+
let o = true;
|
|
147
|
+
const n = t;
|
|
148
|
+
return n && void 0 !== n.canUpdate && false === n.canUpdate && void 0 !== e && n.updateRowIndexes && n.updateRowIndexes.indexOf(e) >= 0 && (o = false), o;
|
|
149
|
+
}
|
|
150
|
+
function isHasEditOption(t, e) {
|
|
151
|
+
e || (e = store.get("_list_code"));
|
|
152
|
+
const o = store.get(e);
|
|
153
|
+
return !(!o.options.lineEditOptions || !o.options.lineEditOptions[t]);
|
|
154
|
+
}
|
|
155
|
+
function isEditOptionFunction(t, e) {
|
|
156
|
+
e || (e = store.get("_list_code"));
|
|
157
|
+
const o = store.get(e);
|
|
158
|
+
return !(!o.options.lineEditOptions || "function" != typeof o.options.lineEditOptions[t]);
|
|
159
|
+
}
|
|
160
|
+
function isHasOptionFunction(t, e) {
|
|
161
|
+
e || (e = store.get("_list_code"));
|
|
162
|
+
const o = store.get(e);
|
|
163
|
+
return !(!o.options || "function" != typeof o.options[t]);
|
|
164
|
+
}
|
|
165
|
+
function getGridParams() {
|
|
166
|
+
return Vue.reactive({ columns: [], gridData: [], orgGridData: [], canSaveRow: true, showValidateError: true, defaultLineEditOptions: { aftersaveIsCreateRow: true, autoSave: true, isSaveByEnter: true, isRestoreByEsc: true, aftersaveIsCancelEditState: true, afterRestoreIsCancelEditState: true, input: function() {
|
|
167
167
|
} }, options: { lineEditOptions: {} } });
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
const
|
|
171
|
-
if (1 ===
|
|
172
|
-
return void (
|
|
173
|
-
let
|
|
174
|
-
for (let
|
|
175
|
-
void 0 ===
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
function
|
|
179
|
-
const
|
|
180
|
-
if (1 ===
|
|
181
|
-
return void (
|
|
182
|
-
let
|
|
183
|
-
for (let
|
|
184
|
-
void 0 ===
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
function
|
|
188
|
-
let
|
|
189
|
-
|
|
190
|
-
let
|
|
191
|
-
|
|
192
|
-
return window.innerHeight - ((
|
|
193
|
-
}
|
|
194
|
-
function
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
for (const
|
|
198
|
-
|
|
199
|
-
return
|
|
200
|
-
}
|
|
201
|
-
function
|
|
202
|
-
let
|
|
203
|
-
return
|
|
204
|
-
}
|
|
205
|
-
function
|
|
206
|
-
const
|
|
207
|
-
if (
|
|
208
|
-
if (
|
|
209
|
-
for (var
|
|
210
|
-
const
|
|
211
|
-
|
|
169
|
+
function addDynamicProp(t, e, o) {
|
|
170
|
+
const n = e.split(".");
|
|
171
|
+
if (1 === n.length)
|
|
172
|
+
return void (t[e] = void 0 !== o ? o : null);
|
|
173
|
+
let i = t;
|
|
174
|
+
for (let t2 = 0; t2 < n.length - 1; t2++)
|
|
175
|
+
void 0 === i[n[t2]] && (i[n[t2]] = {}), i = i[n[t2]];
|
|
176
|
+
i[n[n.length - 1]] = void 0 !== o ? o : null;
|
|
177
|
+
}
|
|
178
|
+
function addDynamicPropDateSection(t, e, o) {
|
|
179
|
+
const n = e.split(".");
|
|
180
|
+
if (1 === n.length)
|
|
181
|
+
return void (t[e] = void 0 !== o ? o : [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()]);
|
|
182
|
+
let i = t;
|
|
183
|
+
for (let t2 = 0; t2 < n.length - 1; t2++)
|
|
184
|
+
void 0 === i[n[t2]] && (i[n[t2]] = {}), i = i[n[t2]];
|
|
185
|
+
i[n[n.length - 1]] = void 0 !== o ? o : [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()];
|
|
186
|
+
}
|
|
187
|
+
function getTableHeight(t, e, o, n) {
|
|
188
|
+
let i;
|
|
189
|
+
t && (i = t.$el.getBoundingClientRect());
|
|
190
|
+
let a = n ? 115 : 85;
|
|
191
|
+
isPlateSys(window.$vueApp.config.globalProperties.systemCode) && (a = 130);
|
|
192
|
+
return window.innerHeight - ((i == null ? void 0 : i.y) ?? 0) - a;
|
|
193
|
+
}
|
|
194
|
+
function getExtraParam(t, e) {
|
|
195
|
+
const o = { searchParam: t };
|
|
196
|
+
if (o.withDataPermission = e.options.isWithDataPermission, o.isWorkflowEntity = e.options.isWorkflowEntity, e.options.extraParam)
|
|
197
|
+
for (const t2 in e.options.extraParam)
|
|
198
|
+
o[t2] = e.options.extraParam[t2];
|
|
199
|
+
return o;
|
|
200
|
+
}
|
|
201
|
+
function analysisFileSetObj(t, e) {
|
|
202
|
+
let o = "", n = "";
|
|
203
|
+
return t && (t.showNameData && (e ? t.showNameData.dbName && (o = t.showNameData.dbName) : t.showNameData.name && (o = t.showNameData.name)), t.serverNameData && (e ? t.serverNameData.dbName && (n = t.serverNameData.dbName) : t.serverNameData.name && (n = t.serverNameData.name))), { showName: o, serverPath: n };
|
|
204
|
+
}
|
|
205
|
+
function otherFilesToStandard(t, e, o, n) {
|
|
206
|
+
const i = [];
|
|
207
|
+
if (o) {
|
|
208
|
+
if (o && o.length > 0)
|
|
209
|
+
for (var a = 0; a < o.length; a++) {
|
|
210
|
+
const t2 = o[a], n2 = packageFile(t2[e.showName], t2[e.serverPath]);
|
|
211
|
+
i.push(n2);
|
|
212
212
|
}
|
|
213
|
-
} else if (
|
|
214
|
-
const
|
|
215
|
-
if (
|
|
216
|
-
const
|
|
217
|
-
for (var
|
|
218
|
-
const
|
|
219
|
-
|
|
213
|
+
} else if (n) {
|
|
214
|
+
const t2 = n.showName, e2 = n.serverPath;
|
|
215
|
+
if (t2 && e2) {
|
|
216
|
+
const o2 = t2.split(","), n2 = e2.split(",");
|
|
217
|
+
for (var r = 0; r < o2.length; r++) {
|
|
218
|
+
const t3 = packageFile(o2[r], n2[r]);
|
|
219
|
+
i.push(t3);
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
return
|
|
224
|
-
}
|
|
225
|
-
function
|
|
226
|
-
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
let
|
|
231
|
-
|
|
232
|
-
const
|
|
233
|
-
return
|
|
234
|
-
}
|
|
235
|
-
function
|
|
236
|
-
let
|
|
237
|
-
if (
|
|
238
|
-
const
|
|
239
|
-
if (
|
|
240
|
-
if (
|
|
241
|
-
|
|
223
|
+
return i;
|
|
224
|
+
}
|
|
225
|
+
function packageFile(t, e) {
|
|
226
|
+
t && (t = t.replace("#", "~~").replace("?", "~$").replace("&", "$"));
|
|
227
|
+
const o = {};
|
|
228
|
+
o.showName = t, o.serverPath = e, o.showName && /\.(jpg|JPG|jpeg|JPEG|png|PNG|gif|GIF|bmp|BMP|psd|PSD|tif|TIF)$/.test(t) && (o.isImg = true);
|
|
229
|
+
const n = getToken();
|
|
230
|
+
let i = window.$vueApp.config.globalProperties.baseURL + "/common/super-form/downloads?jwt=" + n;
|
|
231
|
+
isPlateSys(window.$vueApp.config.globalProperties.systemCode) && (i = window.$vueApp.config.globalProperties.baseAPI + "/component/super-form/downloads?jwt=" + n);
|
|
232
|
+
const a = i + "&showName=" + encodeURI(o.showName) + "&serverPath=" + o.serverPath;
|
|
233
|
+
return o.src = a, o;
|
|
234
|
+
}
|
|
235
|
+
function getFileList(t, e, o) {
|
|
236
|
+
let n = [];
|
|
237
|
+
if (e.fileSet && "" !== e.fileSet && ("annex" === e.componentType || "multipartUpload" === e.componentType)) {
|
|
238
|
+
const i = JSON.parse(e.fileSet), a = analysisFileSetObj(i, o);
|
|
239
|
+
if (i && i.multiple)
|
|
240
|
+
if (i.childAnnexDataTableCode) {
|
|
241
|
+
n = otherFilesToStandard(i, a, t[e.prop], null);
|
|
242
242
|
} else {
|
|
243
|
-
|
|
243
|
+
n = otherFilesToStandard(i, a, null, { showName: getEntityFieldValue(t, a.showName), serverPath: getEntityFieldValue(t, a.serverPath) });
|
|
244
244
|
}
|
|
245
245
|
else {
|
|
246
|
-
const
|
|
247
|
-
|
|
246
|
+
const e2 = getEntityFieldValue(t, a.showName), o2 = getEntityFieldValue(t, a.serverPath);
|
|
247
|
+
n.push(packageFile(e2, o2));
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
return
|
|
251
|
-
}
|
|
252
|
-
function
|
|
253
|
-
let
|
|
254
|
-
|
|
255
|
-
const
|
|
256
|
-
if (
|
|
257
|
-
const
|
|
258
|
-
|
|
250
|
+
return n;
|
|
251
|
+
}
|
|
252
|
+
function getDynamicDataSourceOptions(t, e, o, n) {
|
|
253
|
+
let i;
|
|
254
|
+
o && (o && "object" == typeof o ? i = JSON.stringify(o) : o && "" !== o && (i = o));
|
|
255
|
+
const a = { isSql: e, additionalParameter: i, backendUrl: n };
|
|
256
|
+
if (t.valueSetOptions) {
|
|
257
|
+
const e2 = JSON.parse(t.valueSetOptions);
|
|
258
|
+
e2 && e2.valueSetOptions && (a.valueSetOptions = e2.valueSetOptions), e2.dynamicDataSourceCode && "" !== e2.dynamicDataSourceCode && (a.dynamicDataSourceCode = e2.dynamicDataSourceCode);
|
|
259
259
|
}
|
|
260
|
-
return
|
|
260
|
+
return a.controlConfig = getControlConfig(t), a;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
263
|
-
if (
|
|
264
|
-
const
|
|
265
|
-
if (
|
|
262
|
+
function isDynamicDataSourceSource(t) {
|
|
263
|
+
if (t.valueSetOptions) {
|
|
264
|
+
const e = JSON.parse(t.valueSetOptions);
|
|
265
|
+
if (e.type && "dynamicData" === e.type || e.dynamicDataSourceCode)
|
|
266
266
|
return true;
|
|
267
267
|
}
|
|
268
|
-
return !!(
|
|
268
|
+
return !!(t.valueSet && t.valueSet.length > 0 && "dynamicDataSource" === t.valueSet[0].value);
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
return null ==
|
|
270
|
+
function getRowIndexPage(t, e) {
|
|
271
|
+
return null == t || 0 === t || null == e || 0 === e ? 1 : Math.ceil(e / t);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
const
|
|
275
|
-
|
|
273
|
+
function scrollYToBottom(t) {
|
|
274
|
+
const e = document.querySelector("." + t + " .el-table--scrollable-y .el-table__body-wrapper");
|
|
275
|
+
e && null !== e && (e.scrollTop = e.scrollHeight);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
let
|
|
279
|
-
return
|
|
277
|
+
function getAdditionalParamMap(t) {
|
|
278
|
+
let e = null;
|
|
279
|
+
return t.additionalParamMap && "object" == typeof t.additionalParamMap ? e = t.additionalParamMap : t.additionalParamMap && "" !== t.additionalParamMap && (e = JSON.parse(t.additionalParamMap)), e;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
let
|
|
283
|
-
return
|
|
281
|
+
function getControlConfig(t) {
|
|
282
|
+
let e = {};
|
|
283
|
+
return t && t.controlConfig && (e = JSON.parse(t.controlConfig)), e;
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function getContentAlign(t, e) {
|
|
286
286
|
var _a;
|
|
287
|
-
let
|
|
288
|
-
return ((_a =
|
|
287
|
+
let o;
|
|
288
|
+
return ((_a = e.options) == null ? void 0 : _a.align) && "" !== e.options.align ? o = e.options.align : t.contAlign && "" !== t.contAlign && (o = t.contAlign), o;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function getHeaderAlign(t, e) {
|
|
291
291
|
var _a;
|
|
292
|
-
let
|
|
293
|
-
return ((_a =
|
|
292
|
+
let o;
|
|
293
|
+
return ((_a = e.options) == null ? void 0 : _a.headerAlign) && "" !== e.options.headerAlign ? o = e.options.headerAlign : t.titleAlign && "" !== t.titleAlign && (o = t.titleAlign), o;
|
|
294
|
+
}
|
|
295
|
+
function getHeaderLable(t) {
|
|
296
|
+
let e = t.label;
|
|
297
|
+
return e = e && !t.titleValueSet ? e.replace(/\\n/g, "</br>") : formatHeader(t), null != e && "" !== e || (e = t.prop), e;
|
|
294
298
|
}
|
|
295
|
-
function
|
|
296
|
-
|
|
297
|
-
return e2 = t2.titleValueSet ? function(t3) {
|
|
298
|
-
return i(t3.titleValueSetValue, t3.label);
|
|
299
|
-
}(t2) : e2.replace(/\\n/g, "</br>"), null != e2 && "" !== e2 || (e2 = t2.prop), e2;
|
|
299
|
+
function formatHeader(t) {
|
|
300
|
+
return doFormatWithValueSet(t.titleValueSetValue, t.label);
|
|
300
301
|
}
|
|
301
|
-
function
|
|
302
|
+
function parseSubTableActionCondition(t, e, o, n) {
|
|
302
303
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
303
|
-
if (!
|
|
304
|
+
if (!n)
|
|
304
305
|
return;
|
|
305
|
-
let
|
|
306
|
-
return
|
|
307
|
-
}
|
|
308
|
-
function
|
|
309
|
-
if (null !=
|
|
310
|
-
let
|
|
311
|
-
return "string" == typeof
|
|
312
|
-
|
|
313
|
-
}) : (
|
|
314
|
-
|
|
315
|
-
|
|
306
|
+
let i = true;
|
|
307
|
+
return n.parentCondition && (i = parseSubTablePermissionCondition(n.parentCondition.replaceAll("${field[", "${parent["), (_a = t.pageContext) == null ? void 0 : _a.dataTypeMaps, e, o, t.additionalParamMap, (_c = (_b = t.pageContext) == null ? void 0 : _b.entity) == null ? void 0 : _c.task, ((_d = t.pageContext) == null ? void 0 : _d.contextParam) || t.contextParameter)), false !== i && (!n.condition || parseSubTablePermissionCondition(n.condition, t.$dataTypeMap, e, o, t.additionalParamMap, (_f = (_e = t.pageContext) == null ? void 0 : _e.entity) == null ? void 0 : _f.task, ((_g = t.pageContext) == null ? void 0 : _g.contextParam) || t.contextParameter));
|
|
308
|
+
}
|
|
309
|
+
function getClassOptionTitleCommon(t, e) {
|
|
310
|
+
if (null != t && "" !== t && t.length > 0) {
|
|
311
|
+
let o = "";
|
|
312
|
+
return "string" == typeof t ? e == null ? void 0 : e.forEach((e2) => {
|
|
313
|
+
e2.value === t && (o = e2.label);
|
|
314
|
+
}) : (e == null ? void 0 : e.forEach((e2) => {
|
|
315
|
+
t.forEach((t2) => {
|
|
316
|
+
e2.value === t2 && (o = o + e2.label + ",");
|
|
316
317
|
});
|
|
317
|
-
}),
|
|
318
|
+
}), o = o.slice(0, o.length - 1)), o;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
function caculateCondition(t, e, o, n) {
|
|
322
|
+
let i;
|
|
323
|
+
try {
|
|
324
|
+
i = executeExpression(t, e, o, n);
|
|
325
|
+
} catch (t2) {
|
|
326
|
+
i = false;
|
|
327
|
+
}
|
|
328
|
+
return i;
|
|
329
|
+
}
|
|
330
|
+
function caculateSearchCondition(searchConditions, row) {
|
|
331
|
+
if (!searchConditions || 0 == searchConditions.length || !row)
|
|
332
|
+
return true;
|
|
333
|
+
let conditions = "";
|
|
334
|
+
const maxLen = searchConditions.length;
|
|
335
|
+
for (let t = 0; t < maxLen; t++) {
|
|
336
|
+
const e = searchConditions[t], o = e.propName;
|
|
337
|
+
let n = e.operator;
|
|
338
|
+
if (!o || "" === o)
|
|
339
|
+
continue;
|
|
340
|
+
n || (n = "EQ");
|
|
341
|
+
const i = getEntityFieldValue(row, o, false);
|
|
342
|
+
let a = e.propValue, r = e.startValue, s = e.endValue;
|
|
343
|
+
const l = e.dataType;
|
|
344
|
+
"CONTAIN" != n && "NOT_CONTAIN" != n || i && !i.includes && (n = "CONTAIN" == n ? "EQ" : "NET");
|
|
345
|
+
let c = e.variableIsNull, u;
|
|
346
|
+
if (c || (c = "null"), "IS_NULL" !== n && "IS_NOT_NULL" !== n && (void 0 !== a && "" !== a || (a = null, "null" === c ? n = "IS_NULL" : "notequal" === c ? n = "IS_NOT_NULL" : u = true)), null == u)
|
|
347
|
+
if (void 0 === a && null != r && void 0 !== s && (l && ("DATE" === l || "TIME" === l) || (l && "INTEGER" === l || "LONG" === l || "DOUBLE" === l) && "BETWEEN" === n)) {
|
|
348
|
+
const t2 = "GET", e2 = caculateCondition(i, t2, a, l), o2 = "LET", n2 = caculateCondition(i, o2, a, l);
|
|
349
|
+
u = "(" + e2 + "&&" + n2 + ")";
|
|
350
|
+
} else
|
|
351
|
+
u = caculateCondition(i, n, a, l);
|
|
352
|
+
const d = e.leftBracket, p = e.rightBracket;
|
|
353
|
+
let f = e.joinSign;
|
|
354
|
+
if (d && null !== d && "" !== d && (conditions += d, conditions += " "), conditions += u + " ", p && null !== p && "" !== p && (conditions += p, conditions += " "), t < maxLen - 1 && f && null !== f && "" !== f) {
|
|
355
|
+
const t2 = f.toLowerCase();
|
|
356
|
+
"and" === t2 ? f = t2.replace("and", "&&") : "or" === t2 && (f = t2.replace("or", "||")), conditions += f + " ";
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (conditions) {
|
|
360
|
+
const result = eval("(" + conditions + ")");
|
|
361
|
+
return result;
|
|
318
362
|
}
|
|
363
|
+
return true;
|
|
319
364
|
}
|
|
320
365
|
export {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
366
|
+
ArrowKeyAction,
|
|
367
|
+
addDynamicProp,
|
|
368
|
+
addDynamicPropDateSection,
|
|
369
|
+
analysisFileSetObj,
|
|
370
|
+
caculateSearchCondition,
|
|
371
|
+
getAdditionalParamMap,
|
|
372
|
+
getClassOptionTitleCommon,
|
|
373
|
+
getColumnValues,
|
|
374
|
+
getContentAlign,
|
|
375
|
+
getControlConfig,
|
|
376
|
+
getDynamicDataSourceOptions,
|
|
377
|
+
getExtraParam,
|
|
378
|
+
getFileList,
|
|
379
|
+
getFirstEditableColumn,
|
|
380
|
+
getGridParams,
|
|
381
|
+
getHeaderAlign,
|
|
382
|
+
getHeaderLable,
|
|
383
|
+
getRowIndexPage,
|
|
384
|
+
getSpanValuesForColumn,
|
|
385
|
+
getTableHeight,
|
|
386
|
+
isCanRefreshGrid,
|
|
387
|
+
isDisableEdit,
|
|
388
|
+
isDynamicDataSourceSource,
|
|
389
|
+
isEditOptionFunction,
|
|
390
|
+
isHasEditOption,
|
|
391
|
+
isHasOptionFunction,
|
|
392
|
+
isLastEditRowSave,
|
|
393
|
+
isObjectValueEqual,
|
|
394
|
+
isRequiredEdit,
|
|
395
|
+
otherFilesToStandard,
|
|
396
|
+
packageFile,
|
|
397
|
+
parseSubTableActionCondition,
|
|
398
|
+
rowBeforeValidate,
|
|
399
|
+
scrollYToBottom,
|
|
400
|
+
setCurrentRow
|
|
355
401
|
};
|