liyu-pc-base 1.0.951 → 1.0.955
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/components/index.js +3 -3
- package/dist/{components-o7Gji4V9.js → components-arN89fyu.js} +972 -860
- package/dist/{dbViewConfig-CEbm2ugR.js → dbViewConfig-BTj5_Hqd.js} +246 -215
- package/dist/{detailTablePro-BXjYhW_S.js → detailTablePro--vMVL01c.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/liyu-pc-base.css +1 -1
- package/dist/{tablePageHost-BtjFeRVx.js → tablePageHost-B7pQ_AHf.js} +717 -728
- package/package.json +1 -1
|
@@ -16,21 +16,21 @@ import "./TinymceEditor-RuTN5CLa.js";
|
|
|
16
16
|
import { t as x } from "./FieldRender2-DOpum8uI.js";
|
|
17
17
|
import "./SearchRender-CLSUhXHz.js";
|
|
18
18
|
import "./FormRender3-BEhlgl1c.js";
|
|
19
|
-
import { C as S, S as ee, _ as
|
|
20
|
-
import { o as
|
|
21
|
-
import { n as
|
|
22
|
-
import { gridPageStateSymbol as
|
|
23
|
-
import { Fragment as
|
|
24
|
-
import { Modal as
|
|
25
|
-
import
|
|
26
|
-
import { CaretRightOutlined as
|
|
27
|
-
import { useRoute as
|
|
28
|
-
import { useI18n as
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
19
|
+
import { C as S, S as ee, _ as C, b as te, t as ne, v as re, x as w, y as ie } from "./tablePro-CVSKEalh.js";
|
|
20
|
+
import { o as ae, r as T } from "./remotePages-BnSwpcvU.js";
|
|
21
|
+
import { i as oe, n as se, r as E, t as D } from "./tablePageHost-B7pQ_AHf.js";
|
|
22
|
+
import { gridPageStateSymbol as O } from "./components/gridPage/utils.js";
|
|
23
|
+
import { Fragment as k, KeepAlive as A, Transition as j, computed as M, createBlock as N, createCommentVNode as P, createElementBlock as F, createElementVNode as I, createTextVNode as L, createVNode as R, defineComponent as z, getCurrentInstance as ce, inject as le, markRaw as ue, mergeModels as B, mergeProps as de, nextTick as V, normalizeClass as fe, normalizeStyle as pe, onActivated as me, onBeforeMount as he, onBeforeUnmount as ge, onDeactivated as _e, onMounted as ve, onUnmounted as H, openBlock as U, provide as ye, reactive as W, ref as G, renderList as K, renderSlot as be, resolveComponent as q, resolveDynamicComponent as xe, shallowRef as Se, toDisplayString as J, unref as Y, useModel as Ce, vShow as we, watch as X, withCtx as Z, withDirectives as Te, withModifiers as Ee } from "vue";
|
|
24
|
+
import { Modal as De, message as Q } from "ant-design-vue";
|
|
25
|
+
import Oe from "moment";
|
|
26
|
+
import { CaretRightOutlined as ke, CloseCircleOutlined as Ae, CloseOutlined as je, DeleteOutlined as Me, EditOutlined as Ne, ExclamationCircleOutlined as Pe, LeftOutlined as Fe, MenuFoldOutlined as Ie, MenuUnfoldOutlined as Le, PlusOutlined as Re, RightOutlined as ze, SettingOutlined as Be, StarFilled as Ve, StarOutlined as He } from "@ant-design/icons-vue";
|
|
27
|
+
import { useRoute as Ue } from "vue-router";
|
|
28
|
+
import { useI18n as We } from "vue-i18n";
|
|
29
|
+
import Ge from "mitt";
|
|
30
|
+
import Ke from "element-resize-detector";
|
|
31
|
+
import qe from "interactjs";
|
|
32
32
|
//#region src/components/FormRender/GeneralFilter/AddConditionModal/index.vue?vue&type=script&lang.ts
|
|
33
|
-
var
|
|
33
|
+
var Je = z({
|
|
34
34
|
name: "AddConditionModal",
|
|
35
35
|
props: {
|
|
36
36
|
open: {
|
|
@@ -52,7 +52,7 @@ var qe = R({
|
|
|
52
52
|
},
|
|
53
53
|
emits: ["ok", "cancel"],
|
|
54
54
|
setup(e, { emit: t }) {
|
|
55
|
-
let n =
|
|
55
|
+
let n = G("condition_tab_0"), r = G([]);
|
|
56
56
|
e.default_search_condition_config_list.forEach((t, n) => {
|
|
57
57
|
let i = JSON.parse(JSON.stringify(e.base_search_condition_config_list));
|
|
58
58
|
i && i.forEach((e) => {
|
|
@@ -95,10 +95,10 @@ var qe = R({
|
|
|
95
95
|
handleSubmit: i
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
}),
|
|
99
|
-
function
|
|
100
|
-
let o =
|
|
101
|
-
return
|
|
98
|
+
}), Ye = { style: { "font-size": "14px" } }, Xe = { style: { color: "#7d8089" } };
|
|
99
|
+
function Ze(e, t, n, r, i, a) {
|
|
100
|
+
let o = q("a-checkbox"), s = q("a-space"), c = q("a-tab-pane"), l = q("a-tabs"), u = q("a-modal");
|
|
101
|
+
return U(), N(u, {
|
|
102
102
|
title: "添加过滤条件",
|
|
103
103
|
width: "800px",
|
|
104
104
|
open: e.open,
|
|
@@ -112,27 +112,27 @@ function Xe(e, t, n, r, i, a) {
|
|
|
112
112
|
e.$emit("cancel");
|
|
113
113
|
}
|
|
114
114
|
}, {
|
|
115
|
-
default:
|
|
115
|
+
default: Z(() => [R(l, {
|
|
116
116
|
activeKey: e.activeKey,
|
|
117
117
|
"onUpdate:activeKey": t[0] ||= (t) => e.activeKey = t
|
|
118
118
|
}, {
|
|
119
|
-
default:
|
|
119
|
+
default: Z(() => [(U(!0), F(k, null, K(e.tab_list, (e) => (U(), N(c, {
|
|
120
120
|
class: "my-card",
|
|
121
121
|
key: e.key,
|
|
122
122
|
tab: e.tab_name
|
|
123
123
|
}, {
|
|
124
|
-
default:
|
|
124
|
+
default: Z(() => [(U(!0), F(k, null, K(e.base_search_list, (e) => (U(), F("div", { key: e.name }, [I("div", Ye, J(e.name), 1), R(s, {
|
|
125
125
|
wrap: "",
|
|
126
126
|
style: {
|
|
127
127
|
"padding-left": "10px",
|
|
128
128
|
"margin-bottom": "0"
|
|
129
129
|
}
|
|
130
130
|
}, {
|
|
131
|
-
default:
|
|
131
|
+
default: Z(() => [(U(!0), F(k, null, K(e.group, (e) => (U(), F("div", { key: e.field_name }, [R(o, {
|
|
132
132
|
checked: e.checked,
|
|
133
133
|
"onUpdate:checked": (t) => e.checked = t
|
|
134
134
|
}, {
|
|
135
|
-
default:
|
|
135
|
+
default: Z(() => [I("span", Xe, J(e.label), 1)]),
|
|
136
136
|
_: 2
|
|
137
137
|
}, 1032, ["checked", "onUpdate:checked"])]))), 128))]),
|
|
138
138
|
_: 2
|
|
@@ -148,7 +148,7 @@ function Xe(e, t, n, r, i, a) {
|
|
|
148
148
|
"onOk"
|
|
149
149
|
]);
|
|
150
150
|
}
|
|
151
|
-
var
|
|
151
|
+
var Qe = /*#__PURE__*/ f(Je, [["render", Ze], ["__scopeId", "data-v-25d1dc13"]]), $e = z({
|
|
152
152
|
name: "AddConditionGroupModal",
|
|
153
153
|
props: {
|
|
154
154
|
open: {
|
|
@@ -170,7 +170,7 @@ var Ze = /*#__PURE__*/ f(qe, [["render", Xe], ["__scopeId", "data-v-25d1dc13"]])
|
|
|
170
170
|
},
|
|
171
171
|
emits: ["ok", "cancel"],
|
|
172
172
|
setup(e, { emit: t }) {
|
|
173
|
-
let n =
|
|
173
|
+
let n = G([]), r = (e) => e.operator_list_selected ? e.operator_list_selected : e.operator_list ? e.operator_list : [];
|
|
174
174
|
e.default_search_condition_config_list?.forEach((t, r) => {
|
|
175
175
|
let i = JSON.parse(JSON.stringify(e.base_search_condition_config_list));
|
|
176
176
|
i && i.forEach((e) => {
|
|
@@ -209,7 +209,7 @@ var Ze = /*#__PURE__*/ f(qe, [["render", Xe], ["__scopeId", "data-v-25d1dc13"]])
|
|
|
209
209
|
base_search_list: a
|
|
210
210
|
}), {
|
|
211
211
|
props: e,
|
|
212
|
-
activeKey:
|
|
212
|
+
activeKey: G(`condition_tab_${i}`),
|
|
213
213
|
tab_list: n,
|
|
214
214
|
handleSubmit: (e) => {
|
|
215
215
|
e.preventDefault();
|
|
@@ -226,10 +226,10 @@ var Ze = /*#__PURE__*/ f(qe, [["render", Xe], ["__scopeId", "data-v-25d1dc13"]])
|
|
|
226
226
|
get_operator_list_selected: r
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
|
-
}),
|
|
230
|
-
function
|
|
231
|
-
let o =
|
|
232
|
-
return
|
|
229
|
+
}), et = { style: { "font-size": "14px" } }, tt = { style: { color: "#7d8089" } }, nt = { style: { "font-size": "14px" } }, rt = { style: { color: "#7d8089" } };
|
|
230
|
+
function it(e, t, n, r, i, a) {
|
|
231
|
+
let o = q("a-checkbox"), s = q("a-space"), c = q("a-tab-pane"), l = q("a-tabs"), u = q("a-modal");
|
|
232
|
+
return U(), N(u, {
|
|
233
233
|
title: "添加过滤条件组",
|
|
234
234
|
width: "800px",
|
|
235
235
|
open: e.open,
|
|
@@ -243,43 +243,43 @@ function rt(e, t, n, r, i, a) {
|
|
|
243
243
|
e.$emit("cancel");
|
|
244
244
|
}
|
|
245
245
|
}, {
|
|
246
|
-
default:
|
|
246
|
+
default: Z(() => [(U(!0), F(k, null, K(e.tab_list, (e) => (U(), N(c, {
|
|
247
247
|
class: "my-card",
|
|
248
248
|
key: e.key,
|
|
249
249
|
tab: e.tab_name
|
|
250
250
|
}, {
|
|
251
|
-
default:
|
|
252
|
-
default:
|
|
251
|
+
default: Z(() => [(U(!0), F(k, null, K(e.base_search_list, (e) => (U(), F("div", { key: e.name }, [I("div", et, J(e.name), 1), R(s, { wrap: "" }, {
|
|
252
|
+
default: Z(() => [(U(!0), F(k, null, K(e.group, (e) => (U(), F("div", { key: e.field_name }, [R(o, {
|
|
253
253
|
checked: e.checked,
|
|
254
254
|
"onUpdate:checked": (t) => e.checked = t
|
|
255
255
|
}, {
|
|
256
|
-
default:
|
|
256
|
+
default: Z(() => [I("span", tt, J(e.label), 1)]),
|
|
257
257
|
_: 2
|
|
258
258
|
}, 1032, ["checked", "onUpdate:checked"])]))), 128))]),
|
|
259
259
|
_: 2
|
|
260
260
|
}, 1024)]))), 128))]),
|
|
261
261
|
_: 2
|
|
262
|
-
}, 1032, ["tab"]))), 128)),
|
|
262
|
+
}, 1032, ["tab"]))), 128)), R(l, {
|
|
263
263
|
activeKey: e.activeKey,
|
|
264
264
|
"onUpdate:activeKey": t[0] ||= (t) => e.activeKey = t
|
|
265
265
|
}, {
|
|
266
|
-
default:
|
|
266
|
+
default: Z(() => [(U(!0), F(k, null, K(e.tab_list, (e) => (U(), N(c, {
|
|
267
267
|
class: "my-card",
|
|
268
268
|
key: e.key,
|
|
269
269
|
tab: e.tab_name
|
|
270
270
|
}, {
|
|
271
|
-
default:
|
|
271
|
+
default: Z(() => [(U(!0), F(k, null, K(e.base_search_list, (e) => (U(), F("div", { key: e.name }, [I("div", nt, J(e.name), 1), R(s, {
|
|
272
272
|
wrap: "",
|
|
273
273
|
style: {
|
|
274
274
|
"padding-left": "10px",
|
|
275
275
|
"margin-bottom": "0"
|
|
276
276
|
}
|
|
277
277
|
}, {
|
|
278
|
-
default:
|
|
278
|
+
default: Z(() => [(U(!0), F(k, null, K(e.group, (e) => (U(), F("div", { key: e.field_name }, [R(o, {
|
|
279
279
|
checked: e.checked,
|
|
280
280
|
"onUpdate:checked": (t) => e.checked = t
|
|
281
281
|
}, {
|
|
282
|
-
default:
|
|
282
|
+
default: Z(() => [I("span", rt, J(e.label), 1)]),
|
|
283
283
|
_: 2
|
|
284
284
|
}, 1032, ["checked", "onUpdate:checked"])]))), 128))]),
|
|
285
285
|
_: 2
|
|
@@ -295,7 +295,7 @@ function rt(e, t, n, r, i, a) {
|
|
|
295
295
|
"onOk"
|
|
296
296
|
]);
|
|
297
297
|
}
|
|
298
|
-
var
|
|
298
|
+
var at = /*#__PURE__*/ f($e, [["render", it], ["__scopeId", "data-v-52b515e0"]]), ot = (e) => ({ options_eq: [
|
|
299
299
|
{
|
|
300
300
|
value: "上月",
|
|
301
301
|
label: "上月"
|
|
@@ -316,7 +316,7 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
316
316
|
value: "期初",
|
|
317
317
|
label: "期初"
|
|
318
318
|
}
|
|
319
|
-
] }),
|
|
319
|
+
] }), st = z({
|
|
320
320
|
name: "GeneralFilter",
|
|
321
321
|
props: {
|
|
322
322
|
base_search_condition_config_list: { type: Array },
|
|
@@ -348,13 +348,13 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
348
348
|
},
|
|
349
349
|
components: {
|
|
350
350
|
FieldRender2: x,
|
|
351
|
-
CloseOutlined:
|
|
352
|
-
LeftOutlined:
|
|
353
|
-
RightOutlined:
|
|
351
|
+
CloseOutlined: je,
|
|
352
|
+
LeftOutlined: Fe,
|
|
353
|
+
RightOutlined: ze,
|
|
354
354
|
FieldRender: b,
|
|
355
|
-
AddConditionGroupModal:
|
|
356
|
-
AddConditionModal:
|
|
357
|
-
CloseCircleOutlined:
|
|
355
|
+
AddConditionGroupModal: at,
|
|
356
|
+
AddConditionModal: Qe,
|
|
357
|
+
CloseCircleOutlined: Ae
|
|
358
358
|
},
|
|
359
359
|
emits: [
|
|
360
360
|
"search",
|
|
@@ -366,7 +366,7 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
366
366
|
"update:is_clear_model"
|
|
367
367
|
],
|
|
368
368
|
setup(e, { emit: t }) {
|
|
369
|
-
let n =
|
|
369
|
+
let n = G(e.is_massage_default), r = G({}), { t: i } = We(), { options_eq: a } = ot(i), o = G([]), s = {}, c = G(null), l = G([{
|
|
370
370
|
value: "yes",
|
|
371
371
|
label: i("is_or_not_blank_or_null.yes")
|
|
372
372
|
}, {
|
|
@@ -453,7 +453,7 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
453
453
|
a.some((e) => e.value === o.value[n][r.field_name][0]) && (o.value[n][r.field_name] = [null, null]);
|
|
454
454
|
} else o.value[n][r.field_name] = void 0;
|
|
455
455
|
f = e, t("onChangeValue", { model: o.value });
|
|
456
|
-
}, m =
|
|
456
|
+
}, m = W({ open: !1 }), _ = () => {
|
|
457
457
|
m.open = !0;
|
|
458
458
|
}, v = (n) => {
|
|
459
459
|
e.default_search_condition_config_list.forEach((e, t) => {
|
|
@@ -467,7 +467,7 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
467
467
|
}), t("update_default_search_condition_config_list", { new_list: n.new_list }), m.open = !1;
|
|
468
468
|
}, y = () => {
|
|
469
469
|
m.open = !1;
|
|
470
|
-
}, b =
|
|
470
|
+
}, b = W({ open: !1 }), x = () => {
|
|
471
471
|
b.open = !0;
|
|
472
472
|
}, S = (n) => {
|
|
473
473
|
e.default_search_condition_config_list.forEach((e, t) => {
|
|
@@ -481,11 +481,11 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
481
481
|
}), t("update_default_search_condition_config_list", { new_list: n.new_list }), b.open = !1;
|
|
482
482
|
}, ee = () => {
|
|
483
483
|
b.open = !1;
|
|
484
|
-
},
|
|
484
|
+
}, C = () => {
|
|
485
485
|
n.value = !1, console.log("condition_model_dict.value", o.value), t("search", { model: o.value });
|
|
486
|
-
},
|
|
486
|
+
}, te = (t = !1) => {
|
|
487
487
|
e.base_search_condition_config_list.length != 0 && e.default_search_condition_config_list?.forEach((n, r) => {
|
|
488
|
-
|
|
488
|
+
re[r] = {}, o.value[r] || (o.value[r] = {}), e.base_search_condition_config_list.forEach((e) => {
|
|
489
489
|
e.group?.forEach((e) => {
|
|
490
490
|
n.forEach((n) => {
|
|
491
491
|
e.field_name == n.field_name && ((o.value[r][n.field_name] == null || t) && (u[n.operator] == 1 ? n.value === void 0 ? o.value[r][n.field_name] = null : o.value[r][n.field_name] = n.value : u[n.operator] == 2 ? n.value === void 0 ? o.value[r][n.field_name] = [null, null] : o.value[r][n.field_name] = n.value : u[n.operator] == 0 && (n.value === void 0 ? o.value[r][n.field_name] = [] : o.value[r][n.field_name] = n.value)), Object.assign(n, {
|
|
@@ -496,13 +496,13 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
496
496
|
});
|
|
497
497
|
});
|
|
498
498
|
});
|
|
499
|
-
},
|
|
500
|
-
|
|
501
|
-
},
|
|
502
|
-
|
|
503
|
-
},
|
|
504
|
-
|
|
505
|
-
},
|
|
499
|
+
}, ne = () => {
|
|
500
|
+
te(!0);
|
|
501
|
+
}, re = W({}), w = (e, t) => {
|
|
502
|
+
re[e][t.field_name] = !0;
|
|
503
|
+
}, ie = (e, t) => {
|
|
504
|
+
re[e][t.field_name] = !1;
|
|
505
|
+
}, ae = (n, r) => {
|
|
506
506
|
let i = [];
|
|
507
507
|
e.default_search_condition_config_list.forEach((e, t) => {
|
|
508
508
|
if (t !== n) i.push(e);
|
|
@@ -513,9 +513,9 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
513
513
|
}), t.length > 0 && i.push(t);
|
|
514
514
|
}
|
|
515
515
|
}), t("update_default_search_condition_config_list", { new_list: i });
|
|
516
|
-
},
|
|
516
|
+
}, T = (e, n) => {
|
|
517
517
|
o.value[e][n] instanceof Array ? o.value[e][n].length = 0 : o.value[e][n] = null, t("onChangeValue", { model: o.value }), t("delSearch", { model: JSON.parse(JSON.stringify(o.value)) });
|
|
518
|
-
},
|
|
518
|
+
}, oe = (n, r, i, a) => {
|
|
519
519
|
if (n instanceof Array && n.length > 0) {
|
|
520
520
|
let s = n[n.length - 1], c = null;
|
|
521
521
|
if (e.base_search_condition_config_list.forEach((e) => {
|
|
@@ -536,9 +536,9 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
536
536
|
});
|
|
537
537
|
}), t("update_default_search_condition_config_list", { new_list: n });
|
|
538
538
|
}
|
|
539
|
-
|
|
539
|
+
te();
|
|
540
540
|
}
|
|
541
|
-
},
|
|
541
|
+
}, se = M(() => {
|
|
542
542
|
let t = {};
|
|
543
543
|
return e.default_search_condition_config_list.forEach((n, r) => {
|
|
544
544
|
t[r] = [];
|
|
@@ -555,7 +555,7 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
555
555
|
t[r].push(a);
|
|
556
556
|
});
|
|
557
557
|
}), t;
|
|
558
|
-
}),
|
|
558
|
+
}), E = (e, t) => {
|
|
559
559
|
let n = o.value[e]?.[t.field_name];
|
|
560
560
|
if (n instanceof Array) {
|
|
561
561
|
let [e] = n;
|
|
@@ -590,31 +590,31 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
590
590
|
else if (t.type == "monthpicker" && t.dateFormat) if (a instanceof Array) {
|
|
591
591
|
let n = [];
|
|
592
592
|
a.forEach((e) => {
|
|
593
|
-
e ? n.push(
|
|
593
|
+
e ? n.push(Oe(e).format(t.dateFormat)) : n.push(e);
|
|
594
594
|
}), e = n.join(",");
|
|
595
|
-
} else e =
|
|
595
|
+
} else e = Oe(a).format(t.dateFormat);
|
|
596
596
|
else e = a;
|
|
597
597
|
return `${h(t.format, t.operator)} ${e}`;
|
|
598
598
|
}
|
|
599
599
|
}, O = () => {
|
|
600
600
|
t("onShowSearchRender");
|
|
601
601
|
}, k = (e) => e.operator_list_selected ? e.operator_list_selected : e.operator_list ? e.operator_list : [];
|
|
602
|
-
return
|
|
602
|
+
return X(() => o.value, () => {
|
|
603
603
|
t("onChangeValue", { model: o.value });
|
|
604
|
-
}, { deep: !0 }),
|
|
604
|
+
}, { deep: !0 }), X(() => e.default_search_condition_config_list, () => {
|
|
605
605
|
if (e.default_search_condition_config_list?.length == 0) {
|
|
606
606
|
t("update_default_search_condition_config_list", { new_list: c.value });
|
|
607
607
|
return;
|
|
608
608
|
}
|
|
609
|
-
|
|
610
|
-
}, { deep: !0 }),
|
|
611
|
-
|
|
612
|
-
}, { deep: !0 }),
|
|
613
|
-
e.is_clear_model && (o.value = {},
|
|
609
|
+
te();
|
|
610
|
+
}, { deep: !0 }), X(() => e.base_search_condition_config_list, () => {
|
|
611
|
+
te();
|
|
612
|
+
}, { deep: !0 }), X(() => e.is_clear_model, () => {
|
|
613
|
+
e.is_clear_model && (o.value = {}, te(), t("update:is_clear_model", !1));
|
|
614
614
|
}), ve(() => {
|
|
615
|
-
|
|
616
|
-
}),
|
|
617
|
-
e.eventBus && e.eventBus.off("filterChange",
|
|
615
|
+
te(), e.eventBus && e.eventBus.on("filterChange", ne);
|
|
616
|
+
}), H(() => {
|
|
617
|
+
e.eventBus && e.eventBus.off("filterChange", ne);
|
|
618
618
|
}), {
|
|
619
619
|
props: e,
|
|
620
620
|
t: i,
|
|
@@ -628,82 +628,82 @@ var it = /*#__PURE__*/ f(Qe, [["render", rt], ["__scopeId", "data-v-52b515e0"]])
|
|
|
628
628
|
handleAddConditionCancel: y,
|
|
629
629
|
onChangeOperator: p,
|
|
630
630
|
handleAddGroupCondition: x,
|
|
631
|
-
handleSearch:
|
|
631
|
+
handleSearch: C,
|
|
632
632
|
addConditionGroupModal: b,
|
|
633
633
|
handleAddGroupConditionOK: S,
|
|
634
634
|
handleAddGroupConditionCancel: ee,
|
|
635
635
|
validateInfos: s,
|
|
636
|
-
deleteBtnDict:
|
|
637
|
-
handleMouseEnter:
|
|
638
|
-
handleMouseLeave:
|
|
639
|
-
handleDeleteFormItem:
|
|
640
|
-
handleDelSearch:
|
|
641
|
-
searchItemOptionsDict:
|
|
642
|
-
onChangeSearchItem:
|
|
636
|
+
deleteBtnDict: re,
|
|
637
|
+
handleMouseEnter: w,
|
|
638
|
+
handleMouseLeave: ie,
|
|
639
|
+
handleDeleteFormItem: ae,
|
|
640
|
+
handleDelSearch: T,
|
|
641
|
+
searchItemOptionsDict: se,
|
|
642
|
+
onChangeSearchItem: oe,
|
|
643
643
|
transferValueFunc: D,
|
|
644
|
-
isShowSearchTag:
|
|
644
|
+
isShowSearchTag: E,
|
|
645
645
|
handleShowSearchRender: O,
|
|
646
646
|
options_eq: a,
|
|
647
647
|
get_operator_list_selected: k,
|
|
648
648
|
is_or_not_blank_or_null_options: l
|
|
649
649
|
};
|
|
650
650
|
}
|
|
651
|
-
}),
|
|
651
|
+
}), ct = { class: "expand-btn" }, lt = {
|
|
652
652
|
key: 1,
|
|
653
653
|
class: "card"
|
|
654
|
-
},
|
|
654
|
+
}, ut = {
|
|
655
655
|
key: 0,
|
|
656
656
|
class: "condition-group"
|
|
657
|
-
},
|
|
657
|
+
}, dt = {
|
|
658
658
|
key: 0,
|
|
659
659
|
style: {
|
|
660
660
|
width: "315px",
|
|
661
661
|
height: "40px"
|
|
662
662
|
}
|
|
663
|
-
},
|
|
663
|
+
}, ft = {
|
|
664
664
|
key: 1,
|
|
665
665
|
class: "close-icon"
|
|
666
|
-
},
|
|
666
|
+
}, pt = {
|
|
667
667
|
key: 2,
|
|
668
668
|
class: "search-bar"
|
|
669
669
|
};
|
|
670
|
-
function
|
|
671
|
-
let o =
|
|
672
|
-
return
|
|
673
|
-
e.is_massage_default ?
|
|
674
|
-
default:
|
|
670
|
+
function mt(e, t, n, r, i, a) {
|
|
671
|
+
let o = q("a-button"), s = q("a-space"), c = q("a-tag"), l = q("close-outlined"), u = q("a-cascader"), d = q("a-tooltip"), f = q("a-select-option"), p = q("a-select"), m = q("field-render-2"), h = q("a-flex"), g = q("close-circle-outlined"), _ = q("a-input-group"), v = q("a-space-compact"), y = q("a-divider"), b = q("add-condition-modal"), x = q("add-condition-group-modal");
|
|
672
|
+
return U(), F(k, null, [
|
|
673
|
+
e.is_massage_default ? P("", !0) : (U(), N(s, { key: 0 }, {
|
|
674
|
+
default: Z(() => [e.is_show_normal_search ? (U(), N(o, {
|
|
675
675
|
key: 0,
|
|
676
676
|
type: "link",
|
|
677
677
|
onClick: e.handleShowSearchRender
|
|
678
678
|
}, {
|
|
679
|
-
default:
|
|
679
|
+
default: Z(() => [L(J(e.$t("普通")), 1)]),
|
|
680
680
|
_: 1
|
|
681
|
-
}, 8, ["onClick"])) :
|
|
681
|
+
}, 8, ["onClick"])) : P("", !0), e.isShowForm ? (U(), N(o, {
|
|
682
682
|
key: 2,
|
|
683
683
|
type: "link",
|
|
684
684
|
onClick: t[1] ||= () => {
|
|
685
685
|
e.isShowForm = !1, e.$emit("resize");
|
|
686
686
|
}
|
|
687
687
|
}, {
|
|
688
|
-
default:
|
|
688
|
+
default: Z(() => [L(J(e.$t("隐藏")), 1)]),
|
|
689
689
|
_: 1
|
|
690
|
-
})) : (
|
|
690
|
+
})) : (U(), N(o, {
|
|
691
691
|
key: 1,
|
|
692
692
|
type: "link",
|
|
693
693
|
onClick: t[0] ||= () => {
|
|
694
694
|
e.isShowForm = !0, e.$emit("resize");
|
|
695
695
|
}
|
|
696
696
|
}, {
|
|
697
|
-
default:
|
|
697
|
+
default: Z(() => [I("span", ct, J(e.$t("展开")), 1)]),
|
|
698
698
|
_: 1
|
|
699
699
|
}))]),
|
|
700
700
|
_: 1
|
|
701
701
|
})),
|
|
702
|
-
Te(
|
|
703
|
-
default:
|
|
702
|
+
Te(I("span", null, [(U(!0), F(k, null, K(e.default_search_condition_config_list, (t, n) => (U(), F("span", { key: n }, [R(c, null, {
|
|
703
|
+
default: Z(() => [L(J(e.$t("条件组")) + J(n + 1) + ":", 1)]),
|
|
704
704
|
_: 2
|
|
705
|
-
}, 1024), (
|
|
706
|
-
default:
|
|
705
|
+
}, 1024), (U(!0), F(k, null, K(t, (t) => (U(), F("span", { key: t.field_name }, [Te(R(c, { color: "green" }, {
|
|
706
|
+
default: Z(() => [L(J(t.label) + ": " + J(e.transferValueFunc(n, t)) + " ", 1), R(l, {
|
|
707
707
|
style: {
|
|
708
708
|
cursor: "pointer",
|
|
709
709
|
"margin-left": "5px"
|
|
@@ -712,24 +712,24 @@ function pt(e, t, n, r, i, a) {
|
|
|
712
712
|
}, null, 8, ["onClick"])]),
|
|
713
713
|
_: 2
|
|
714
714
|
}, 1536), [[we, e.isShowSearchTag(n, t)]])]))), 128))]))), 128))], 512), [[we, !e.isShowForm]]),
|
|
715
|
-
e.delayShow || e.isShowForm ? Te((
|
|
716
|
-
e.default_search_condition_config_list.length > 1 ? (
|
|
717
|
-
|
|
715
|
+
e.delayShow || e.isShowForm ? Te((U(), F("div", lt, [(U(!0), F(k, null, K(e.default_search_condition_config_list, (n, r) => (U(), F("div", { key: r }, [
|
|
716
|
+
e.default_search_condition_config_list.length > 1 ? (U(), F("div", ut, J(e.$t("条件组")) + " " + J(r + 1), 1)) : P("", !0),
|
|
717
|
+
R(s, {
|
|
718
718
|
wrap: !0,
|
|
719
719
|
align: "center",
|
|
720
720
|
size: 0
|
|
721
721
|
}, {
|
|
722
|
-
default:
|
|
722
|
+
default: Z(() => [(U(!0), F(k, null, K(n, (n, i) => (U(), N(v, {
|
|
723
723
|
block: "",
|
|
724
724
|
key: n.field_name,
|
|
725
725
|
size: "middle",
|
|
726
726
|
onMouseenter: (t) => e.handleMouseEnter(r, n),
|
|
727
727
|
onMouseleave: (t) => e.handleMouseLeave(r, n)
|
|
728
728
|
}, {
|
|
729
|
-
default:
|
|
730
|
-
default:
|
|
731
|
-
|
|
732
|
-
default:
|
|
729
|
+
default: Z(() => [R(_, { compact: "" }, {
|
|
730
|
+
default: Z(() => [
|
|
731
|
+
R(d, { title: n.label }, {
|
|
732
|
+
default: Z(() => [R(u, {
|
|
733
733
|
value: n.label,
|
|
734
734
|
style: { width: "125px" },
|
|
735
735
|
options: e.searchItemOptionsDict[r],
|
|
@@ -745,8 +745,8 @@ function pt(e, t, n, r, i, a) {
|
|
|
745
745
|
])]),
|
|
746
746
|
_: 2
|
|
747
747
|
}, 1032, ["title"]),
|
|
748
|
-
|
|
749
|
-
default:
|
|
748
|
+
R(d, { title: e.get_operator_type_map(n.format, n.operator) }, {
|
|
749
|
+
default: Z(() => [e.get_operator_list_selected(n).length > 0 ? (U(), N(p, {
|
|
750
750
|
key: 0,
|
|
751
751
|
dropdownMatchSelectWidth: !1,
|
|
752
752
|
value: n.operator,
|
|
@@ -754,11 +754,11 @@ function pt(e, t, n, r, i, a) {
|
|
|
754
754
|
onChange: (t) => e.onChangeOperator(t, r, n),
|
|
755
755
|
style: { width: "100px" }
|
|
756
756
|
}, {
|
|
757
|
-
default:
|
|
757
|
+
default: Z(() => [(U(!0), F(k, null, K(e.get_operator_list_selected(n), (t) => (U(), N(f, {
|
|
758
758
|
value: t,
|
|
759
759
|
key: t
|
|
760
760
|
}, {
|
|
761
|
-
default:
|
|
761
|
+
default: Z(() => [L(J(e.get_operator_type_map(n.format, t)), 1)]),
|
|
762
762
|
_: 2
|
|
763
763
|
}, 1032, ["value"]))), 128))]),
|
|
764
764
|
_: 2
|
|
@@ -766,10 +766,10 @@ function pt(e, t, n, r, i, a) {
|
|
|
766
766
|
"value",
|
|
767
767
|
"onUpdate:value",
|
|
768
768
|
"onChange"
|
|
769
|
-
])) :
|
|
769
|
+
])) : P("", !0)]),
|
|
770
770
|
_: 2
|
|
771
771
|
}, 1032, ["title"]),
|
|
772
|
-
e.condition_model_dict && e.condition_model_dict[r] ? (
|
|
772
|
+
e.condition_model_dict && e.condition_model_dict[r] ? (U(), F("span", dt, [["is_or_not_blank_or_null", "is_or_not_null"].includes(n.operator) ? (U(), N(m, {
|
|
773
773
|
key: 0,
|
|
774
774
|
is_show_label: !1,
|
|
775
775
|
label: e.labelModel[n.field_name],
|
|
@@ -796,7 +796,7 @@ function pt(e, t, n, r, i, a) {
|
|
|
796
796
|
"formModel",
|
|
797
797
|
"options",
|
|
798
798
|
"validateInfos"
|
|
799
|
-
])) : ["input"].includes(n.format) ? (
|
|
799
|
+
])) : ["input"].includes(n.format) ? (U(), F(k, { key: 1 }, [n.operator === "between" || n.operator === "notbetween" ? (U(), F(k, { key: 0 }, [n.type === "datepicker" ? (U(), N(m, {
|
|
800
800
|
key: 0,
|
|
801
801
|
is_show_label: !1,
|
|
802
802
|
label: e.labelModel[n.field_name],
|
|
@@ -820,7 +820,7 @@ function pt(e, t, n, r, i, a) {
|
|
|
820
820
|
"formModel",
|
|
821
821
|
"options",
|
|
822
822
|
"validateInfos"
|
|
823
|
-
])) : n.type === "monthpicker" ? (
|
|
823
|
+
])) : n.type === "monthpicker" ? (U(), N(m, {
|
|
824
824
|
key: 1,
|
|
825
825
|
is_show_label: !1,
|
|
826
826
|
label: e.labelModel[n.field_name],
|
|
@@ -844,7 +844,7 @@ function pt(e, t, n, r, i, a) {
|
|
|
844
844
|
"formModel",
|
|
845
845
|
"options",
|
|
846
846
|
"validateInfos"
|
|
847
|
-
])) : n.type === "timepicker" ? (
|
|
847
|
+
])) : n.type === "timepicker" ? (U(), N(m, {
|
|
848
848
|
key: 2,
|
|
849
849
|
is_show_label: !1,
|
|
850
850
|
label: e.labelModel[n.field_name],
|
|
@@ -868,9 +868,9 @@ function pt(e, t, n, r, i, a) {
|
|
|
868
868
|
"formModel",
|
|
869
869
|
"options",
|
|
870
870
|
"validateInfos"
|
|
871
|
-
])) : (
|
|
872
|
-
default:
|
|
873
|
-
|
|
871
|
+
])) : (U(), N(h, { key: 3 }, {
|
|
872
|
+
default: Z(() => [
|
|
873
|
+
R(m, {
|
|
874
874
|
is_show_label: !1,
|
|
875
875
|
label: e.labelModel[n.field_name],
|
|
876
876
|
"onUpdate:label": (t) => e.labelModel[n.field_name] = t,
|
|
@@ -890,8 +890,8 @@ function pt(e, t, n, r, i, a) {
|
|
|
890
890
|
"options",
|
|
891
891
|
"validateInfos"
|
|
892
892
|
]),
|
|
893
|
-
t[2] ||=
|
|
894
|
-
|
|
893
|
+
t[2] ||= I("div", { class: "range" }, "~", -1),
|
|
894
|
+
R(m, {
|
|
895
895
|
is_show_label: !1,
|
|
896
896
|
label: e.labelModel[n.field_name],
|
|
897
897
|
"onUpdate:label": (t) => e.labelModel[n.field_name] = t,
|
|
@@ -913,7 +913,7 @@ function pt(e, t, n, r, i, a) {
|
|
|
913
913
|
])
|
|
914
914
|
]),
|
|
915
915
|
_: 2
|
|
916
|
-
}, 1024))], 64)) : n.operator === "_eq" ? (
|
|
916
|
+
}, 1024))], 64)) : n.operator === "_eq" ? (U(), N(m, {
|
|
917
917
|
key: 1,
|
|
918
918
|
is_show_label: !1,
|
|
919
919
|
label: e.labelModel[n.field_name],
|
|
@@ -940,7 +940,7 @@ function pt(e, t, n, r, i, a) {
|
|
|
940
940
|
"formModel",
|
|
941
941
|
"options",
|
|
942
942
|
"validateInfos"
|
|
943
|
-
])) : n.type === "datepicker" || n.type === "monthpicker" || n.type === "timepicker" ? (
|
|
943
|
+
])) : n.type === "datepicker" || n.type === "monthpicker" || n.type === "timepicker" ? (U(), N(m, {
|
|
944
944
|
key: 2,
|
|
945
945
|
is_show_label: !1,
|
|
946
946
|
label: e.labelModel[n.field_name],
|
|
@@ -963,7 +963,7 @@ function pt(e, t, n, r, i, a) {
|
|
|
963
963
|
"formModel",
|
|
964
964
|
"options",
|
|
965
965
|
"validateInfos"
|
|
966
|
-
])) : (
|
|
966
|
+
])) : (U(), N(m, {
|
|
967
967
|
key: 3,
|
|
968
968
|
is_show_label: !1,
|
|
969
969
|
label: e.labelModel[n.field_name],
|
|
@@ -983,7 +983,7 @@ function pt(e, t, n, r, i, a) {
|
|
|
983
983
|
"formModel",
|
|
984
984
|
"options",
|
|
985
985
|
"validateInfos"
|
|
986
|
-
]))], 64)) : ["choices", "remote"].includes(n.format) ? (
|
|
986
|
+
]))], 64)) : ["choices", "remote"].includes(n.format) ? (U(), F(k, { key: 2 }, [n.format === "choices" ? (U(), N(m, {
|
|
987
987
|
key: 0,
|
|
988
988
|
is_show_label: !1,
|
|
989
989
|
label: e.labelModel[n.field_name],
|
|
@@ -1003,7 +1003,7 @@ function pt(e, t, n, r, i, a) {
|
|
|
1003
1003
|
"formModel",
|
|
1004
1004
|
"options",
|
|
1005
1005
|
"validateInfos"
|
|
1006
|
-
])) : n.format === "remote" ? (
|
|
1006
|
+
])) : n.format === "remote" ? (U(), N(m, {
|
|
1007
1007
|
key: 1,
|
|
1008
1008
|
is_show_label: !1,
|
|
1009
1009
|
label: e.labelModel[n.field_name],
|
|
@@ -1026,14 +1026,14 @@ function pt(e, t, n, r, i, a) {
|
|
|
1026
1026
|
"formModel",
|
|
1027
1027
|
"options",
|
|
1028
1028
|
"validateInfos"
|
|
1029
|
-
])) :
|
|
1030
|
-
e.deleteBtnDict && e.deleteBtnDict[r] ? (
|
|
1029
|
+
])) : P("", !0)], 64)) : P("", !0)])) : P("", !0),
|
|
1030
|
+
e.deleteBtnDict && e.deleteBtnDict[r] ? (U(), F("span", ft, [e.deleteBtnDict[r][n.field_name] && (e.default_search_condition_config_list[0].length > 1 || e.default_search_condition_config_list.length > 1) && !e.is_massage_default ? (U(), N(d, {
|
|
1031
1031
|
key: 0,
|
|
1032
1032
|
title: "删除此条件"
|
|
1033
1033
|
}, {
|
|
1034
|
-
default:
|
|
1034
|
+
default: Z(() => [R(g, { onClick: (t) => e.handleDeleteFormItem(r, n) }, null, 8, ["onClick"])]),
|
|
1035
1035
|
_: 2
|
|
1036
|
-
}, 1024)) :
|
|
1036
|
+
}, 1024)) : P("", !0)])) : P("", !0)
|
|
1037
1037
|
]),
|
|
1038
1038
|
_: 2
|
|
1039
1039
|
}, 1024)]),
|
|
@@ -1041,45 +1041,45 @@ function pt(e, t, n, r, i, a) {
|
|
|
1041
1041
|
}, 1032, ["onMouseenter", "onMouseleave"]))), 128))]),
|
|
1042
1042
|
_: 2
|
|
1043
1043
|
}, 1024),
|
|
1044
|
-
e.default_search_condition_config_list.length > 1 && r != e.default_search_condition_config_list.length - 1 ? (
|
|
1044
|
+
e.default_search_condition_config_list.length > 1 && r != e.default_search_condition_config_list.length - 1 ? (U(), N(y, {
|
|
1045
1045
|
key: 1,
|
|
1046
1046
|
class: "divider",
|
|
1047
1047
|
style: { margin: "0" }
|
|
1048
1048
|
}, {
|
|
1049
|
-
default:
|
|
1049
|
+
default: Z(() => t[3] ||= [L(" 或 ")]),
|
|
1050
1050
|
_: 1
|
|
1051
|
-
})) :
|
|
1052
|
-
]))), 128))], 512)), [[we, e.isShowForm]]) :
|
|
1053
|
-
e.isShowForm && !e.is_massage_default ? (
|
|
1054
|
-
default:
|
|
1055
|
-
|
|
1051
|
+
})) : P("", !0)
|
|
1052
|
+
]))), 128))], 512)), [[we, e.isShowForm]]) : P("", !0),
|
|
1053
|
+
e.isShowForm && !e.is_massage_default ? (U(), F("div", pt, [R(s, null, {
|
|
1054
|
+
default: Z(() => [
|
|
1055
|
+
R(o, {
|
|
1056
1056
|
size: "small",
|
|
1057
1057
|
type: "primary",
|
|
1058
1058
|
onClick: e.handleAddConditions
|
|
1059
1059
|
}, {
|
|
1060
|
-
default:
|
|
1060
|
+
default: Z(() => [L(J(e.$t("添加条件")), 1)]),
|
|
1061
1061
|
_: 1
|
|
1062
1062
|
}, 8, ["onClick"]),
|
|
1063
|
-
|
|
1063
|
+
R(o, {
|
|
1064
1064
|
size: "small",
|
|
1065
1065
|
type: "primary",
|
|
1066
1066
|
onClick: e.handleAddGroupCondition
|
|
1067
1067
|
}, {
|
|
1068
|
-
default:
|
|
1068
|
+
default: Z(() => [L(J(e.$t("添加条件组")), 1)]),
|
|
1069
1069
|
_: 1
|
|
1070
1070
|
}, 8, ["onClick"]),
|
|
1071
|
-
|
|
1071
|
+
R(o, {
|
|
1072
1072
|
size: "small",
|
|
1073
1073
|
type: "primary",
|
|
1074
1074
|
onClick: e.handleSearch
|
|
1075
1075
|
}, {
|
|
1076
|
-
default:
|
|
1076
|
+
default: Z(() => [L(J(e.$t("查询")), 1)]),
|
|
1077
1077
|
_: 1
|
|
1078
1078
|
}, 8, ["onClick"])
|
|
1079
1079
|
]),
|
|
1080
1080
|
_: 1
|
|
1081
|
-
})])) :
|
|
1082
|
-
e.addConditionModal.open ? (
|
|
1081
|
+
})])) : P("", !0),
|
|
1082
|
+
e.addConditionModal.open ? (U(), N(b, {
|
|
1083
1083
|
key: 3,
|
|
1084
1084
|
open: e.addConditionModal.open,
|
|
1085
1085
|
default_search_condition_config_list: e.default_search_condition_config_list,
|
|
@@ -1092,8 +1092,8 @@ function pt(e, t, n, r, i, a) {
|
|
|
1092
1092
|
"base_search_condition_config_list",
|
|
1093
1093
|
"onOk",
|
|
1094
1094
|
"onCancel"
|
|
1095
|
-
])) :
|
|
1096
|
-
e.addConditionGroupModal.open ? (
|
|
1095
|
+
])) : P("", !0),
|
|
1096
|
+
e.addConditionGroupModal.open ? (U(), N(x, {
|
|
1097
1097
|
key: 4,
|
|
1098
1098
|
open: e.addConditionGroupModal.open,
|
|
1099
1099
|
default_search_condition_config_list: e.default_search_condition_config_list,
|
|
@@ -1106,10 +1106,10 @@ function pt(e, t, n, r, i, a) {
|
|
|
1106
1106
|
"base_search_condition_config_list",
|
|
1107
1107
|
"onOk",
|
|
1108
1108
|
"onCancel"
|
|
1109
|
-
])) :
|
|
1109
|
+
])) : P("", !0)
|
|
1110
1110
|
], 64);
|
|
1111
1111
|
}
|
|
1112
|
-
var
|
|
1112
|
+
var ht = /*#__PURE__*/ f(st, [["render", mt], ["__scopeId", "data-v-d12629e4"]]), gt = z({
|
|
1113
1113
|
name: "FormRender",
|
|
1114
1114
|
components: {},
|
|
1115
1115
|
props: {
|
|
@@ -1131,7 +1131,7 @@ var mt = /*#__PURE__*/ f(ot, [["render", pt], ["__scopeId", "data-v-d12629e4"]])
|
|
|
1131
1131
|
}
|
|
1132
1132
|
},
|
|
1133
1133
|
setup(e) {
|
|
1134
|
-
if (e.form.watch) for (let t in e.form.watch)
|
|
1134
|
+
if (e.form.watch) for (let t in e.form.watch) X(() => e.model[t], () => {
|
|
1135
1135
|
e.form.watch[t](e.model, e.form);
|
|
1136
1136
|
});
|
|
1137
1137
|
},
|
|
@@ -1163,9 +1163,9 @@ var mt = /*#__PURE__*/ f(ot, [["render", pt], ["__scopeId", "data-v-d12629e4"]])
|
|
|
1163
1163
|
});
|
|
1164
1164
|
//#endregion
|
|
1165
1165
|
//#region src/components/FormRender/FormRender.vue
|
|
1166
|
-
function
|
|
1167
|
-
let o =
|
|
1168
|
-
return
|
|
1166
|
+
function _t(e, t, n, r, i, a) {
|
|
1167
|
+
let o = q("field-render"), s = q("a-col"), c = q("a-row"), l = q("a-form");
|
|
1168
|
+
return U(), N(l, {
|
|
1169
1169
|
ref: "form",
|
|
1170
1170
|
autocomplete: "off",
|
|
1171
1171
|
model: e.model,
|
|
@@ -1177,18 +1177,18 @@ function gt(e, t, n, r, i, a) {
|
|
|
1177
1177
|
labelAlign: e.form.settings.labelAlign,
|
|
1178
1178
|
scrollToFirstError: ""
|
|
1179
1179
|
}, {
|
|
1180
|
-
default:
|
|
1180
|
+
default: Z(() => [R(c, {
|
|
1181
1181
|
gutter: 20,
|
|
1182
1182
|
style: { margin: "0" }
|
|
1183
1183
|
}, {
|
|
1184
|
-
default:
|
|
1184
|
+
default: Z(() => [e.form.settings.col && e.form.settings.col.length > 0 ? (U(!0), F(k, { key: 0 }, K(e.fieldList, (t) => (U(), N(s, {
|
|
1185
1185
|
xl: 24 / e.fieldList.length,
|
|
1186
1186
|
lg: 24,
|
|
1187
1187
|
md: 24,
|
|
1188
1188
|
sm: 24,
|
|
1189
1189
|
xs: 24
|
|
1190
1190
|
}, {
|
|
1191
|
-
default:
|
|
1191
|
+
default: Z(() => [(U(!0), F(k, null, K(e.form.fields.slice(t[0], t[1]), (t) => (U(), N(o, {
|
|
1192
1192
|
value: e.model[t.name],
|
|
1193
1193
|
"onUpdate:value": (n) => e.model[t.name] = n,
|
|
1194
1194
|
field: t,
|
|
@@ -1205,7 +1205,7 @@ function gt(e, t, n, r, i, a) {
|
|
|
1205
1205
|
"options"
|
|
1206
1206
|
]))), 128))]),
|
|
1207
1207
|
_: 2
|
|
1208
|
-
}, 1032, ["xl"]))), 256)) :
|
|
1208
|
+
}, 1032, ["xl"]))), 256)) : P("", !0), !e.form.settings.col || e.form.settings.col.length === 0 ? (U(), N(s, {
|
|
1209
1209
|
key: 1,
|
|
1210
1210
|
xl: 24,
|
|
1211
1211
|
lg: 24,
|
|
@@ -1213,7 +1213,7 @@ function gt(e, t, n, r, i, a) {
|
|
|
1213
1213
|
sm: 24,
|
|
1214
1214
|
xs: 24
|
|
1215
1215
|
}, {
|
|
1216
|
-
default:
|
|
1216
|
+
default: Z(() => [(U(!0), F(k, null, K(e.form.fields, (t) => (U(), F(k, null, [t.name2 ? (U(), N(o, {
|
|
1217
1217
|
value: e.model[t.name],
|
|
1218
1218
|
"onUpdate:value": (n) => e.model[t.name] = n,
|
|
1219
1219
|
label: e.model[t.name2],
|
|
@@ -1232,7 +1232,7 @@ function gt(e, t, n, r, i, a) {
|
|
|
1232
1232
|
"formModel",
|
|
1233
1233
|
"validateInfos",
|
|
1234
1234
|
"options"
|
|
1235
|
-
])) : (
|
|
1235
|
+
])) : (U(), N(o, {
|
|
1236
1236
|
value: e.model[t.name],
|
|
1237
1237
|
"onUpdate:value": (n) => e.model[t.name] = n,
|
|
1238
1238
|
field: t,
|
|
@@ -1249,7 +1249,7 @@ function gt(e, t, n, r, i, a) {
|
|
|
1249
1249
|
"options"
|
|
1250
1250
|
]))], 64))), 256))]),
|
|
1251
1251
|
_: 1
|
|
1252
|
-
})) :
|
|
1252
|
+
})) : P("", !0)]),
|
|
1253
1253
|
_: 1
|
|
1254
1254
|
})]),
|
|
1255
1255
|
_: 1
|
|
@@ -1262,7 +1262,7 @@ function gt(e, t, n, r, i, a) {
|
|
|
1262
1262
|
"labelAlign"
|
|
1263
1263
|
]);
|
|
1264
1264
|
}
|
|
1265
|
-
var
|
|
1265
|
+
var vt = /*#__PURE__*/ f(gt, [["render", _t]]), yt = z({
|
|
1266
1266
|
name: "FormRender2",
|
|
1267
1267
|
components: {},
|
|
1268
1268
|
props: {
|
|
@@ -1284,7 +1284,7 @@ var _t = /*#__PURE__*/ f(ht, [["render", gt]]), vt = R({
|
|
|
1284
1284
|
}
|
|
1285
1285
|
},
|
|
1286
1286
|
setup(e) {
|
|
1287
|
-
if (e.form.watch) for (let t in e.form.watch)
|
|
1287
|
+
if (e.form.watch) for (let t in e.form.watch) X(() => e.model[t], () => {
|
|
1288
1288
|
e.form.watch[t](e.model, e.form);
|
|
1289
1289
|
});
|
|
1290
1290
|
},
|
|
@@ -1311,21 +1311,21 @@ var _t = /*#__PURE__*/ f(ht, [["render", gt]]), vt = R({
|
|
|
1311
1311
|
});
|
|
1312
1312
|
//#endregion
|
|
1313
1313
|
//#region src/components/FormRender/FormRender2.vue
|
|
1314
|
-
function
|
|
1315
|
-
let o =
|
|
1316
|
-
return
|
|
1314
|
+
function bt(e, t, n, r, i, a) {
|
|
1315
|
+
let o = q("field-render"), s = q("a-col"), c = q("a-row"), l = q("a-form");
|
|
1316
|
+
return U(), N(l, {
|
|
1317
1317
|
ref: "form",
|
|
1318
1318
|
autocomplete: "off",
|
|
1319
1319
|
model: e.model,
|
|
1320
1320
|
rules: e.form.rules,
|
|
1321
1321
|
scrollToFirstError: ""
|
|
1322
1322
|
}, {
|
|
1323
|
-
default:
|
|
1323
|
+
default: Z(() => [(U(!0), F(k, null, K(e.form.fieldList, (t) => (U(), N(c, {
|
|
1324
1324
|
gutter: "5",
|
|
1325
1325
|
type: "flex"
|
|
1326
1326
|
}, {
|
|
1327
|
-
default:
|
|
1328
|
-
default:
|
|
1327
|
+
default: Z(() => [(U(!0), F(k, null, K(t, (t) => (U(), N(s, { span: t.span }, {
|
|
1328
|
+
default: Z(() => [(U(!0), F(k, null, K(e.form.fields, (t) => (U(), F(k, null, [t.name2 ? (U(), N(o, {
|
|
1329
1329
|
value: e.model[t.name],
|
|
1330
1330
|
"onUpdate:value": (n) => e.model[t.name] = n,
|
|
1331
1331
|
label: e.model[t.name2],
|
|
@@ -1344,7 +1344,7 @@ function yt(e, t, n, r, i, a) {
|
|
|
1344
1344
|
"formModel",
|
|
1345
1345
|
"validateInfos",
|
|
1346
1346
|
"options"
|
|
1347
|
-
])) : (
|
|
1347
|
+
])) : (U(), N(o, {
|
|
1348
1348
|
value: e.model[t.name],
|
|
1349
1349
|
"onUpdate:value": (n) => e.model[t.name] = n,
|
|
1350
1350
|
field: t,
|
|
@@ -1367,16 +1367,16 @@ function yt(e, t, n, r, i, a) {
|
|
|
1367
1367
|
_: 1
|
|
1368
1368
|
}, 8, ["model", "rules"]);
|
|
1369
1369
|
}
|
|
1370
|
-
var
|
|
1370
|
+
var xt = /*#__PURE__*/ f(yt, [["render", bt]]), St = "customviewdatauser", Ct = "view_system_edit", wt = [{
|
|
1371
1371
|
title: "",
|
|
1372
1372
|
dataIndex: "name",
|
|
1373
1373
|
key: "name"
|
|
1374
|
-
}],
|
|
1374
|
+
}], Tt = z({
|
|
1375
1375
|
name: "ViewManage",
|
|
1376
1376
|
components: {
|
|
1377
|
-
CaretRightOutlined:
|
|
1378
|
-
PlusOutlined:
|
|
1379
|
-
SettingOutlined:
|
|
1377
|
+
CaretRightOutlined: ke,
|
|
1378
|
+
PlusOutlined: Re,
|
|
1379
|
+
SettingOutlined: Be
|
|
1380
1380
|
},
|
|
1381
1381
|
props: {
|
|
1382
1382
|
currentViewObj: {
|
|
@@ -1424,13 +1424,13 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1424
1424
|
},
|
|
1425
1425
|
emits: ["change"],
|
|
1426
1426
|
setup(e, { emit: n }) {
|
|
1427
|
-
let r = t(), a = i(), o = d(), l = s(), f = o.currentOrg, p = o.userid, h =
|
|
1427
|
+
let r = t(), a = i(), o = d(), l = s(), f = o.currentOrg, p = o.userid, h = G(o.CHECK_AUTH(Ct)), g = G([]), { t: _ } = We(), b, x = M(() => {
|
|
1428
1428
|
let e = g.value.filter((e) => !!e.user_id && e.is_system).map((e) => e).sort((e, t) => e.sort == t.sort ? e.id - t.id : e.sort - t.sort), t = g.value.filter((e) => !!e.user_id && !e.is_system).map((e) => e).sort((e, t) => e.sort == t.sort ? e.id - t.id : e.sort - t.sort);
|
|
1429
1429
|
return e.concat(t);
|
|
1430
|
-
}),
|
|
1430
|
+
}), ne = M(() => {
|
|
1431
1431
|
let e = g.value.filter((e) => !e.user_id && e.is_system).map((e) => e).sort((e, t) => e.sort == t.sort ? e.id - t.id : e.sort - t.sort), t = g.value.filter((e) => !e.user_id && !e.is_system).map((e) => e).sort((e, t) => e.sort == t.sort ? e.id - t.id : e.sort - t.sort);
|
|
1432
1432
|
return e.concat(t);
|
|
1433
|
-
}),
|
|
1433
|
+
}), ae = M(() => g.value.map((e) => e.name)), oe = (t) => {
|
|
1434
1434
|
let n = [];
|
|
1435
1435
|
for (let r of t) {
|
|
1436
1436
|
let t = [];
|
|
@@ -1438,22 +1438,22 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1438
1438
|
t.length > 0 && n.push(t);
|
|
1439
1439
|
}
|
|
1440
1440
|
return n;
|
|
1441
|
-
},
|
|
1441
|
+
}, se = (t) => {
|
|
1442
1442
|
let n = {}, r = {};
|
|
1443
1443
|
if (!t) return n;
|
|
1444
1444
|
if (e.searchConfigFields?.length) for (let t of e.searchConfigFields) r[t.name] = t;
|
|
1445
1445
|
for (let e of Object.keys(t)) r[e] && (n[e] = t[e]);
|
|
1446
1446
|
return n;
|
|
1447
|
-
},
|
|
1447
|
+
}, E = async ({ id: t, search_model: n, filter_map: r, sort_fields: i, group_condition: a, conditions: o, isShowGeneralFilter: s }) => new Promise((c) => {
|
|
1448
1448
|
!e.countData && !b?.countData && (console.error("无count接口"), c(null));
|
|
1449
1449
|
let l = {
|
|
1450
1450
|
org_id: f.id,
|
|
1451
|
-
...
|
|
1451
|
+
...se(n || {}),
|
|
1452
1452
|
...r,
|
|
1453
1453
|
sort_fields: i
|
|
1454
1454
|
};
|
|
1455
|
-
s && (l.group_condition = a, l.conditions =
|
|
1456
|
-
let u = null, d =
|
|
1455
|
+
s && (l.group_condition = a, l.conditions = oe(o)), l.required_condition = ue();
|
|
1456
|
+
let u = null, d = T(e.app_flag, e.modalType, null, _, {
|
|
1457
1457
|
use_store: !0,
|
|
1458
1458
|
to_i18n: !0,
|
|
1459
1459
|
enable_btn: !1
|
|
@@ -1467,7 +1467,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1467
1467
|
});
|
|
1468
1468
|
}), D = async (e) => {
|
|
1469
1469
|
for (let t of e) try {
|
|
1470
|
-
await
|
|
1470
|
+
await E(t);
|
|
1471
1471
|
} catch (e) {
|
|
1472
1472
|
console.log("error", e), Q.error(_("获取数据失败, 请刷新页面"));
|
|
1473
1473
|
}
|
|
@@ -1481,7 +1481,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1481
1481
|
sort_fields: ["sort", "create_time"],
|
|
1482
1482
|
is_cache: !1
|
|
1483
1483
|
}, "/view/get_view_settings_for_user");
|
|
1484
|
-
if (b =
|
|
1484
|
+
if (b = T(e.app_flag, e.modalType, null, _, {
|
|
1485
1485
|
use_store: !0,
|
|
1486
1486
|
to_i18n: !0,
|
|
1487
1487
|
enable_btn: !1
|
|
@@ -1517,7 +1517,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1517
1517
|
t && t.length > 0 ? n("change", null, {
|
|
1518
1518
|
...t[0],
|
|
1519
1519
|
...t[0].data
|
|
1520
|
-
}, !0, !0) :
|
|
1520
|
+
}, !0, !0) : te({
|
|
1521
1521
|
org_id: f.id,
|
|
1522
1522
|
conditions: [[
|
|
1523
1523
|
{
|
|
@@ -1577,7 +1577,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1577
1577
|
});
|
|
1578
1578
|
} else {
|
|
1579
1579
|
let t = "";
|
|
1580
|
-
if (c().get("customviewdatauser") && (t = c().get(
|
|
1580
|
+
if (c().get("customviewdatauser") && (t = c().get(St)?.[e.menu_flag]), t) window.location.hash = t, k(t);
|
|
1581
1581
|
else {
|
|
1582
1582
|
let t = g.value.filter((e) => !e.user_id && e.is_default && !e.is_system);
|
|
1583
1583
|
if (t && t.length > 0) {
|
|
@@ -1614,8 +1614,8 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1614
1614
|
}, !0, !1)));
|
|
1615
1615
|
}
|
|
1616
1616
|
}
|
|
1617
|
-
}, A =
|
|
1618
|
-
window.location.hash = e.uid, k(e.uid),
|
|
1617
|
+
}, A = G(["1", "2"]), j = (t) => e.currentViewObj && t && t.id === e.currentViewObj.id ? { style: { backgroundColor: "#ddf1ff" } } : { style: {} }, N = (e) => {
|
|
1618
|
+
window.location.hash = e.uid, k(e.uid), B([e]);
|
|
1619
1619
|
}, P = (e) => {
|
|
1620
1620
|
let t = [];
|
|
1621
1621
|
for (let n of e) {
|
|
@@ -1631,7 +1631,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1631
1631
|
}
|
|
1632
1632
|
return t;
|
|
1633
1633
|
}, F = ({ updateView: t, record: i }) => {
|
|
1634
|
-
if (i.name != t.name &&
|
|
1634
|
+
if (i.name != t.name && ae.value.includes(t.name)) {
|
|
1635
1635
|
Q.error(_("视图名称已存在"));
|
|
1636
1636
|
return;
|
|
1637
1637
|
}
|
|
@@ -1666,7 +1666,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1666
1666
|
org_id: f.id,
|
|
1667
1667
|
view_settings_id: i?.id
|
|
1668
1668
|
}).then(() => {
|
|
1669
|
-
|
|
1669
|
+
w({
|
|
1670
1670
|
org_id: f.id,
|
|
1671
1671
|
view_settings_id: i?.id
|
|
1672
1672
|
}).then(() => {
|
|
@@ -1680,7 +1680,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1680
1680
|
});
|
|
1681
1681
|
}), O();
|
|
1682
1682
|
});
|
|
1683
|
-
}) :
|
|
1683
|
+
}) : w({
|
|
1684
1684
|
org_id: f.id,
|
|
1685
1685
|
view_settings_id: i?.id
|
|
1686
1686
|
}).then(() => {
|
|
@@ -1705,7 +1705,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1705
1705
|
org_id: f.id,
|
|
1706
1706
|
view_settings_id: i?.id
|
|
1707
1707
|
}).then(() => {
|
|
1708
|
-
|
|
1708
|
+
w({
|
|
1709
1709
|
org_id: f.id,
|
|
1710
1710
|
view_settings_id: i?.id
|
|
1711
1711
|
}).then(() => {
|
|
@@ -1719,7 +1719,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1719
1719
|
});
|
|
1720
1720
|
}), O();
|
|
1721
1721
|
});
|
|
1722
|
-
}) :
|
|
1722
|
+
}) : w({
|
|
1723
1723
|
org_id: f.id,
|
|
1724
1724
|
view_settings_id: i?.id
|
|
1725
1725
|
}).then(() => {
|
|
@@ -1762,7 +1762,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1762
1762
|
conditions: [],
|
|
1763
1763
|
group_condition: {},
|
|
1764
1764
|
group_record: {}
|
|
1765
|
-
},
|
|
1765
|
+
}, re({
|
|
1766
1766
|
org_id: f.id,
|
|
1767
1767
|
user_id: t.view_type == "personal" ? p : null,
|
|
1768
1768
|
name: t.name,
|
|
@@ -1789,7 +1789,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1789
1789
|
}, I = (t, n) => {
|
|
1790
1790
|
let r = [!1];
|
|
1791
1791
|
e.currentViewObj.id == t.id && (r = [!0]);
|
|
1792
|
-
let i =
|
|
1792
|
+
let i = W({
|
|
1793
1793
|
open: !0,
|
|
1794
1794
|
loading: !1,
|
|
1795
1795
|
title: _("编辑视图"),
|
|
@@ -1819,11 +1819,11 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1819
1819
|
defaultValue: [!1],
|
|
1820
1820
|
placeholder: ""
|
|
1821
1821
|
}],
|
|
1822
|
-
rules:
|
|
1822
|
+
rules: W({ name: [{
|
|
1823
1823
|
required: !0,
|
|
1824
1824
|
message: _("请输入视图名称")
|
|
1825
1825
|
}] }),
|
|
1826
|
-
model:
|
|
1826
|
+
model: W({
|
|
1827
1827
|
name: t.name,
|
|
1828
1828
|
is_submit: r,
|
|
1829
1829
|
is_default: [t?.is_default ? t?.is_default : !1],
|
|
@@ -1872,8 +1872,8 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1872
1872
|
defaultValue: [!1],
|
|
1873
1873
|
placeholder: ""
|
|
1874
1874
|
})), y(i);
|
|
1875
|
-
},
|
|
1876
|
-
y(
|
|
1875
|
+
}, L = (e) => {
|
|
1876
|
+
y(W({
|
|
1877
1877
|
open: !0,
|
|
1878
1878
|
loading: !1,
|
|
1879
1879
|
title: _("新建视图"),
|
|
@@ -1917,11 +1917,11 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1917
1917
|
placeholder: ""
|
|
1918
1918
|
}
|
|
1919
1919
|
],
|
|
1920
|
-
rules:
|
|
1920
|
+
rules: W({ name: [{
|
|
1921
1921
|
required: !0,
|
|
1922
1922
|
message: _("请输入视图名称")
|
|
1923
1923
|
}] }),
|
|
1924
|
-
model:
|
|
1924
|
+
model: W({
|
|
1925
1925
|
name: null,
|
|
1926
1926
|
view_type: e,
|
|
1927
1927
|
is_submit: [!0]
|
|
@@ -1941,7 +1941,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1941
1941
|
}]
|
|
1942
1942
|
},
|
|
1943
1943
|
ok: (e) => new Promise(function(t) {
|
|
1944
|
-
if (
|
|
1944
|
+
if (ae.value.includes(e.name)) {
|
|
1945
1945
|
Q.error(_("视图名称已存在"));
|
|
1946
1946
|
return;
|
|
1947
1947
|
}
|
|
@@ -1951,16 +1951,16 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1951
1951
|
}), t(null);
|
|
1952
1952
|
})
|
|
1953
1953
|
}));
|
|
1954
|
-
},
|
|
1955
|
-
y(
|
|
1954
|
+
}, z = (e) => {
|
|
1955
|
+
y(W({
|
|
1956
1956
|
open: !0,
|
|
1957
1957
|
component: "ViewEditModal",
|
|
1958
1958
|
compObj: {
|
|
1959
1959
|
title: _(e == "personal" ? "个人视图管理" : "公共视图管理"),
|
|
1960
|
-
data: e == "personal" ? x.value :
|
|
1960
|
+
data: e == "personal" ? x.value : ne.value
|
|
1961
1961
|
},
|
|
1962
1962
|
ok: (e) => {
|
|
1963
|
-
e && e.length > 0 ?
|
|
1963
|
+
e && e.length > 0 ? C({
|
|
1964
1964
|
org_id: f.id,
|
|
1965
1965
|
view_settings_ids: e
|
|
1966
1966
|
}).then(() => {
|
|
@@ -1971,21 +1971,21 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1971
1971
|
e && O();
|
|
1972
1972
|
}
|
|
1973
1973
|
}));
|
|
1974
|
-
},
|
|
1974
|
+
}, ce = (e) => {
|
|
1975
1975
|
let t = "", n = window.location.href.indexOf("#");
|
|
1976
1976
|
t = n === -1 ? window.location.href + "#" + e.uid : window.location.href.substring(0, n) + "#" + e.uid, v({
|
|
1977
1977
|
val: t,
|
|
1978
1978
|
message: _("复制成功")
|
|
1979
1979
|
});
|
|
1980
|
-
},
|
|
1981
|
-
|
|
1980
|
+
}, le = (e) => {
|
|
1981
|
+
De.confirm({
|
|
1982
1982
|
title: () => `${_("确认删除此")}【${e.name}】${e?.user_id ? _("个人视图") : _("公共视图")}?`,
|
|
1983
1983
|
content: _("视图删除后不可恢复,视图下工作项不受影响,是否确认删除?"),
|
|
1984
|
-
icon: () =>
|
|
1984
|
+
icon: () => R(Pe),
|
|
1985
1985
|
okText: _("确定"),
|
|
1986
1986
|
onOk() {
|
|
1987
1987
|
return new Promise((t) => {
|
|
1988
|
-
|
|
1988
|
+
ie({
|
|
1989
1989
|
org_id: f.id,
|
|
1990
1990
|
view_settings_id: e?.id
|
|
1991
1991
|
}).then(() => {
|
|
@@ -1997,8 +1997,8 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
1997
1997
|
},
|
|
1998
1998
|
onCancel() {}
|
|
1999
1999
|
});
|
|
2000
|
-
},
|
|
2001
|
-
let t =
|
|
2000
|
+
}, ue = () => {
|
|
2001
|
+
let t = T(e.app_flag, e.modalType, null, _, {
|
|
2002
2002
|
use_store: !0,
|
|
2003
2003
|
to_i18n: !0,
|
|
2004
2004
|
enable_btn: !1
|
|
@@ -2007,7 +2007,7 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
2007
2007
|
let t = a.value_map[e.key];
|
|
2008
2008
|
t != null && (n[e.field_name] = t);
|
|
2009
2009
|
}), n;
|
|
2010
|
-
},
|
|
2010
|
+
}, B = (e) => {
|
|
2011
2011
|
let t = [];
|
|
2012
2012
|
e.forEach((e) => {
|
|
2013
2013
|
let n = null, r = null, i = null, a = null;
|
|
@@ -2022,11 +2022,11 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
2022
2022
|
});
|
|
2023
2023
|
}), D(t);
|
|
2024
2024
|
};
|
|
2025
|
-
|
|
2026
|
-
|
|
2025
|
+
X(() => e.current_num, () => {
|
|
2026
|
+
De.confirm({
|
|
2027
2027
|
title: () => _("确定覆盖视图吗?"),
|
|
2028
2028
|
content: _("当前视图原有的数据会被覆盖"),
|
|
2029
|
-
icon: () =>
|
|
2029
|
+
icon: () => R(Pe),
|
|
2030
2030
|
okText: _("确定"),
|
|
2031
2031
|
onOk() {
|
|
2032
2032
|
return new Promise((t) => {
|
|
@@ -2042,8 +2042,8 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
2042
2042
|
},
|
|
2043
2043
|
onCancel() {}
|
|
2044
2044
|
});
|
|
2045
|
-
}),
|
|
2046
|
-
y(
|
|
2045
|
+
}), X(() => e.create_num, () => {
|
|
2046
|
+
y(W({
|
|
2047
2047
|
open: !0,
|
|
2048
2048
|
loading: !1,
|
|
2049
2049
|
title: _("新建视图"),
|
|
@@ -2073,11 +2073,11 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
2073
2073
|
defaultValue: "",
|
|
2074
2074
|
placeholder: ""
|
|
2075
2075
|
}],
|
|
2076
|
-
rules:
|
|
2076
|
+
rules: W({ name: [{
|
|
2077
2077
|
required: !0,
|
|
2078
2078
|
message: _("请输入视图名称")
|
|
2079
2079
|
}] }),
|
|
2080
|
-
model:
|
|
2080
|
+
model: W({
|
|
2081
2081
|
name: null,
|
|
2082
2082
|
view_type: "personal",
|
|
2083
2083
|
is_submit: [!0]
|
|
@@ -2107,11 +2107,11 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
2107
2107
|
}), t(null);
|
|
2108
2108
|
})
|
|
2109
2109
|
}));
|
|
2110
|
-
}),
|
|
2111
|
-
|
|
2110
|
+
}), X(() => e.count_num, () => {
|
|
2111
|
+
B(g.value);
|
|
2112
2112
|
});
|
|
2113
|
-
let
|
|
2114
|
-
let n =
|
|
2113
|
+
let de = (t) => {
|
|
2114
|
+
let n = T(e.currentViewObj.app_flag, e.modalType, null, _, {
|
|
2115
2115
|
use_store: !0,
|
|
2116
2116
|
to_i18n: !0,
|
|
2117
2117
|
enable_btn: !1
|
|
@@ -2119,73 +2119,73 @@ var bt = /*#__PURE__*/ f(vt, [["render", yt]]), xt = "customviewdatauser", St =
|
|
|
2119
2119
|
n.required_condition && n.required_condition.find((e) => e.key === t) && O();
|
|
2120
2120
|
};
|
|
2121
2121
|
return ve(() => {
|
|
2122
|
-
O(), u().on("change",
|
|
2123
|
-
}),
|
|
2124
|
-
u().off("change",
|
|
2122
|
+
O(), u().on("change", de);
|
|
2123
|
+
}), H(() => {
|
|
2124
|
+
u().off("change", de);
|
|
2125
2125
|
}), me(() => {
|
|
2126
|
-
|
|
2126
|
+
B(g.value);
|
|
2127
2127
|
}), {
|
|
2128
2128
|
props: e,
|
|
2129
2129
|
viewKey: A,
|
|
2130
2130
|
customStyle: "background: #ffffff;border-radius: 4px;margin-bottom: 2px;border: 0;overflow: hidden;",
|
|
2131
|
-
columns:
|
|
2131
|
+
columns: wt,
|
|
2132
2132
|
personData: x,
|
|
2133
|
-
publicData:
|
|
2133
|
+
publicData: ne,
|
|
2134
2134
|
is_auth: h,
|
|
2135
|
-
addView:
|
|
2136
|
-
editView:
|
|
2137
|
-
customRow:
|
|
2135
|
+
addView: L,
|
|
2136
|
+
editView: z,
|
|
2137
|
+
customRow: j,
|
|
2138
2138
|
changeView: N,
|
|
2139
2139
|
handleSubmit: I,
|
|
2140
|
-
handleShare:
|
|
2141
|
-
handleDelet:
|
|
2140
|
+
handleShare: ce,
|
|
2141
|
+
handleDelet: le,
|
|
2142
2142
|
appStore: l
|
|
2143
2143
|
};
|
|
2144
2144
|
}
|
|
2145
|
-
}),
|
|
2145
|
+
}), Et = { style: { "font-weight": "700" } }, Dt = ["onClick"], Ot = { style: {
|
|
2146
2146
|
"max-width": "130px",
|
|
2147
2147
|
float: "left",
|
|
2148
2148
|
"white-space": "nowrap",
|
|
2149
2149
|
overflow: "hidden"
|
|
2150
|
-
} },
|
|
2150
|
+
} }, kt = ["onClick"], At = ["onClick"], jt = ["onClick"], Mt = { style: { "font-weight": "700" } }, Nt = ["onClick"], Pt = { style: {
|
|
2151
2151
|
"max-width": "130px",
|
|
2152
2152
|
float: "left",
|
|
2153
2153
|
"white-space": "nowrap",
|
|
2154
2154
|
overflow: "hidden"
|
|
2155
|
-
} },
|
|
2156
|
-
function
|
|
2157
|
-
let o =
|
|
2158
|
-
return
|
|
2155
|
+
} }, Ft = ["onClick"], It = ["onClick"], Lt = ["onClick"];
|
|
2156
|
+
function Rt(e, t, n, r, i, a) {
|
|
2157
|
+
let o = q("caret-right-outlined"), s = q("setting-outlined"), c = q("a-tooltip"), l = q("plus-outlined"), u = q("a-menu-item"), d = q("a-menu"), f = q("a-dropdown"), p = q("a-table"), m = q("a-collapse-panel"), h = q("a-collapse"), g = q("a-card");
|
|
2158
|
+
return U(), N(g, { "body-style": {
|
|
2159
2159
|
padding: 0,
|
|
2160
2160
|
height: e.height + 87 + "px",
|
|
2161
2161
|
overflowY: "auto"
|
|
2162
2162
|
} }, {
|
|
2163
|
-
default:
|
|
2163
|
+
default: Z(() => [R(h, {
|
|
2164
2164
|
activeKey: e.viewKey,
|
|
2165
2165
|
"onUpdate:activeKey": t[6] ||= (t) => e.viewKey = t,
|
|
2166
2166
|
bordered: !1,
|
|
2167
2167
|
class: "collapses",
|
|
2168
2168
|
style: { background: "rgb(255, 255, 255)" }
|
|
2169
2169
|
}, {
|
|
2170
|
-
expandIcon:
|
|
2171
|
-
default:
|
|
2170
|
+
expandIcon: Z(({ isActive: e }) => [R(o, { rotate: e ? 90 : 0 }, null, 8, ["rotate"])]),
|
|
2171
|
+
default: Z(() => [(U(), N(m, {
|
|
2172
2172
|
key: "1",
|
|
2173
2173
|
style: pe(e.customStyle)
|
|
2174
2174
|
}, {
|
|
2175
|
-
header:
|
|
2176
|
-
extra:
|
|
2177
|
-
title:
|
|
2178
|
-
default:
|
|
2175
|
+
header: Z(() => [I("span", Et, J(e.$t("个人视图")), 1)]),
|
|
2176
|
+
extra: Z(() => [R(c, null, {
|
|
2177
|
+
title: Z(() => [L(J(e.$t("个人视图管理")), 1)]),
|
|
2178
|
+
default: Z(() => [R(s, {
|
|
2179
2179
|
style: { "margin-right": "10px" },
|
|
2180
|
-
onClick: t[0] ||=
|
|
2180
|
+
onClick: t[0] ||= Ee((t) => e.editView("personal"), ["stop"])
|
|
2181
2181
|
})]),
|
|
2182
2182
|
_: 1
|
|
2183
|
-
}),
|
|
2184
|
-
title:
|
|
2185
|
-
default:
|
|
2183
|
+
}), R(c, null, {
|
|
2184
|
+
title: Z(() => [L(J(e.$t("新建个人视图")), 1)]),
|
|
2185
|
+
default: Z(() => [R(l, { onClick: t[1] ||= Ee((t) => e.addView("personal"), ["stop"]) })]),
|
|
2186
2186
|
_: 1
|
|
2187
2187
|
})]),
|
|
2188
|
-
default:
|
|
2188
|
+
default: Z(() => [e.personData.length > 0 ? (U(), N(p, {
|
|
2189
2189
|
key: 0,
|
|
2190
2190
|
columns: e.columns,
|
|
2191
2191
|
customRow: e.customRow,
|
|
@@ -2194,7 +2194,7 @@ function Lt(e, t, n, r, i, a) {
|
|
|
2194
2194
|
showHeader: !1,
|
|
2195
2195
|
size: "small"
|
|
2196
2196
|
}, {
|
|
2197
|
-
bodyCell:
|
|
2197
|
+
bodyCell: Z(({ column: n, record: r }) => [n.dataIndex === "name" ? (U(), F("div", {
|
|
2198
2198
|
key: 0,
|
|
2199
2199
|
class: "table",
|
|
2200
2200
|
style: {
|
|
@@ -2203,85 +2203,85 @@ function Lt(e, t, n, r, i, a) {
|
|
|
2203
2203
|
},
|
|
2204
2204
|
onClick: (t) => e.changeView(r)
|
|
2205
2205
|
}, [
|
|
2206
|
-
|
|
2206
|
+
R(c, {
|
|
2207
2207
|
title: r.name,
|
|
2208
2208
|
color: e.appStore.primaryColor,
|
|
2209
2209
|
placement: "left",
|
|
2210
2210
|
destroyTooltipOnHide: !0,
|
|
2211
2211
|
overlayStyle: { maxWidth: "200px" }
|
|
2212
2212
|
}, {
|
|
2213
|
-
default:
|
|
2213
|
+
default: Z(() => [I("div", Ot, J(r.name), 1)]),
|
|
2214
2214
|
_: 2
|
|
2215
2215
|
}, 1032, ["title", "color"]),
|
|
2216
|
-
|
|
2216
|
+
I("span", {
|
|
2217
2217
|
class: "num",
|
|
2218
2218
|
style: pe([{ float: "right" }, e.currentViewObj.id === r.id ? {
|
|
2219
2219
|
color: "#1890ff",
|
|
2220
2220
|
fontWeight: "bold"
|
|
2221
2221
|
} : {}])
|
|
2222
|
-
},
|
|
2223
|
-
|
|
2224
|
-
overlay:
|
|
2225
|
-
default:
|
|
2226
|
-
!r.is_system || e.is_auth ? (
|
|
2227
|
-
default:
|
|
2222
|
+
}, J(r.num), 5),
|
|
2223
|
+
R(f, { class: "dropdown" }, {
|
|
2224
|
+
overlay: Z(() => [R(d, null, {
|
|
2225
|
+
default: Z(() => [
|
|
2226
|
+
!r.is_system || e.is_auth ? (U(), N(u, { key: 0 }, {
|
|
2227
|
+
default: Z(() => [I("a", {
|
|
2228
2228
|
href: "javascript:;",
|
|
2229
2229
|
onClick: (t) => e.handleSubmit(r, "personal")
|
|
2230
|
-
},
|
|
2230
|
+
}, J(e.$t("编辑")), 9, kt)]),
|
|
2231
2231
|
_: 2
|
|
2232
|
-
}, 1024)) :
|
|
2233
|
-
|
|
2234
|
-
default:
|
|
2232
|
+
}, 1024)) : P("", !0),
|
|
2233
|
+
R(u, null, {
|
|
2234
|
+
default: Z(() => [I("a", {
|
|
2235
2235
|
href: "javascript:;",
|
|
2236
2236
|
onClick: (t) => e.handleShare(r)
|
|
2237
|
-
},
|
|
2237
|
+
}, J(e.$t("分享视图")), 9, At)]),
|
|
2238
2238
|
_: 2
|
|
2239
2239
|
}, 1024),
|
|
2240
|
-
!r.is_system || e.is_auth ? (
|
|
2241
|
-
default:
|
|
2240
|
+
!r.is_system || e.is_auth ? (U(), N(u, { key: 1 }, {
|
|
2241
|
+
default: Z(() => [I("a", {
|
|
2242
2242
|
href: "javascript:;",
|
|
2243
2243
|
onClick: (t) => e.handleDelet(r)
|
|
2244
|
-
},
|
|
2244
|
+
}, J(e.$t("删除")), 9, jt)]),
|
|
2245
2245
|
_: 2
|
|
2246
|
-
}, 1024)) :
|
|
2246
|
+
}, 1024)) : P("", !0)
|
|
2247
2247
|
]),
|
|
2248
2248
|
_: 2
|
|
2249
2249
|
}, 1024)]),
|
|
2250
|
-
default:
|
|
2250
|
+
default: Z(() => [I("span", {
|
|
2251
2251
|
style: {
|
|
2252
2252
|
float: "right",
|
|
2253
2253
|
"font-weight": "800"
|
|
2254
2254
|
},
|
|
2255
|
-
onClick: t[2] ||=
|
|
2255
|
+
onClick: t[2] ||= Ee(() => {}, ["stop"])
|
|
2256
2256
|
}, " · · · ")]),
|
|
2257
2257
|
_: 2
|
|
2258
2258
|
}, 1024)
|
|
2259
|
-
], 8,
|
|
2259
|
+
], 8, Dt)) : P("", !0)]),
|
|
2260
2260
|
_: 1
|
|
2261
2261
|
}, 8, [
|
|
2262
2262
|
"columns",
|
|
2263
2263
|
"customRow",
|
|
2264
2264
|
"dataSource"
|
|
2265
|
-
])) :
|
|
2265
|
+
])) : P("", !0)]),
|
|
2266
2266
|
_: 1
|
|
2267
|
-
}, 8, ["style"])), (
|
|
2267
|
+
}, 8, ["style"])), (U(), N(m, {
|
|
2268
2268
|
key: "2",
|
|
2269
2269
|
style: pe(e.customStyle)
|
|
2270
2270
|
}, {
|
|
2271
|
-
header:
|
|
2272
|
-
extra:
|
|
2273
|
-
title:
|
|
2274
|
-
default:
|
|
2271
|
+
header: Z(() => [I("span", Mt, J(e.$t("公共视图")), 1)]),
|
|
2272
|
+
extra: Z(() => [R(c, null, {
|
|
2273
|
+
title: Z(() => [L(J(e.$t("公共视图管理")), 1)]),
|
|
2274
|
+
default: Z(() => [R(s, {
|
|
2275
2275
|
style: { "margin-right": "10px" },
|
|
2276
|
-
onClick: t[3] ||=
|
|
2276
|
+
onClick: t[3] ||= Ee((t) => e.editView("public"), ["stop"])
|
|
2277
2277
|
})]),
|
|
2278
2278
|
_: 1
|
|
2279
|
-
}),
|
|
2280
|
-
title:
|
|
2281
|
-
default:
|
|
2279
|
+
}), R(c, null, {
|
|
2280
|
+
title: Z(() => [L(J(e.$t("新建公共视图")), 1)]),
|
|
2281
|
+
default: Z(() => [R(l, { onClick: t[4] ||= Ee((t) => e.addView("public"), ["stop"]) })]),
|
|
2282
2282
|
_: 1
|
|
2283
2283
|
})]),
|
|
2284
|
-
default:
|
|
2284
|
+
default: Z(() => [e.publicData.length > 0 ? (U(), N(p, {
|
|
2285
2285
|
key: 0,
|
|
2286
2286
|
columns: e.columns,
|
|
2287
2287
|
customRow: e.customRow,
|
|
@@ -2290,7 +2290,7 @@ function Lt(e, t, n, r, i, a) {
|
|
|
2290
2290
|
showHeader: !1,
|
|
2291
2291
|
size: "small"
|
|
2292
2292
|
}, {
|
|
2293
|
-
bodyCell:
|
|
2293
|
+
bodyCell: Z(({ column: n, record: r }) => [n.dataIndex === "name" ? (U(), F("div", {
|
|
2294
2294
|
key: 0,
|
|
2295
2295
|
class: "table",
|
|
2296
2296
|
style: {
|
|
@@ -2299,66 +2299,66 @@ function Lt(e, t, n, r, i, a) {
|
|
|
2299
2299
|
},
|
|
2300
2300
|
onClick: (t) => e.changeView(r)
|
|
2301
2301
|
}, [
|
|
2302
|
-
|
|
2302
|
+
R(c, {
|
|
2303
2303
|
title: r.name,
|
|
2304
2304
|
color: e.appStore.primaryColor,
|
|
2305
2305
|
placement: "left",
|
|
2306
2306
|
destroyTooltipOnHide: !0,
|
|
2307
2307
|
overlayStyle: { maxWidth: "200px" }
|
|
2308
2308
|
}, {
|
|
2309
|
-
default:
|
|
2309
|
+
default: Z(() => [I("div", Pt, J(r.name), 1)]),
|
|
2310
2310
|
_: 2
|
|
2311
2311
|
}, 1032, ["title", "color"]),
|
|
2312
|
-
|
|
2312
|
+
I("span", {
|
|
2313
2313
|
class: "num",
|
|
2314
2314
|
style: pe([{ float: "right" }, e.currentViewObj.id === r.id ? {
|
|
2315
2315
|
color: "#1890ff",
|
|
2316
2316
|
fontWeight: "bold"
|
|
2317
2317
|
} : {}])
|
|
2318
|
-
},
|
|
2319
|
-
|
|
2320
|
-
overlay:
|
|
2321
|
-
default:
|
|
2322
|
-
!r.is_system || e.is_auth ? (
|
|
2323
|
-
default:
|
|
2318
|
+
}, J(r.num), 5),
|
|
2319
|
+
R(f, { class: "dropdown" }, {
|
|
2320
|
+
overlay: Z(() => [R(d, null, {
|
|
2321
|
+
default: Z(() => [
|
|
2322
|
+
!r.is_system || e.is_auth ? (U(), N(u, { key: 0 }, {
|
|
2323
|
+
default: Z(() => [I("a", {
|
|
2324
2324
|
href: "javascript:;",
|
|
2325
2325
|
onClick: (t) => e.handleSubmit(r, "public")
|
|
2326
|
-
},
|
|
2326
|
+
}, J(e.$t("编辑")), 9, Ft)]),
|
|
2327
2327
|
_: 2
|
|
2328
|
-
}, 1024)) :
|
|
2329
|
-
|
|
2330
|
-
default:
|
|
2328
|
+
}, 1024)) : P("", !0),
|
|
2329
|
+
R(u, null, {
|
|
2330
|
+
default: Z(() => [I("a", {
|
|
2331
2331
|
href: "javascript:;",
|
|
2332
2332
|
onClick: (t) => e.handleShare(r)
|
|
2333
|
-
},
|
|
2333
|
+
}, J(e.$t("分享视图")), 9, It)]),
|
|
2334
2334
|
_: 2
|
|
2335
2335
|
}, 1024),
|
|
2336
|
-
!r.is_system || e.is_auth ? (
|
|
2337
|
-
default:
|
|
2336
|
+
!r.is_system || e.is_auth ? (U(), N(u, { key: 1 }, {
|
|
2337
|
+
default: Z(() => [I("a", {
|
|
2338
2338
|
href: "javascript:;",
|
|
2339
2339
|
onClick: (t) => e.handleDelet(r)
|
|
2340
|
-
},
|
|
2340
|
+
}, J(e.$t("删除")), 9, Lt)]),
|
|
2341
2341
|
_: 2
|
|
2342
|
-
}, 1024)) :
|
|
2342
|
+
}, 1024)) : P("", !0)
|
|
2343
2343
|
]),
|
|
2344
2344
|
_: 2
|
|
2345
2345
|
}, 1024)]),
|
|
2346
|
-
default:
|
|
2346
|
+
default: Z(() => [I("span", {
|
|
2347
2347
|
style: {
|
|
2348
2348
|
float: "right",
|
|
2349
2349
|
"font-weight": "800"
|
|
2350
2350
|
},
|
|
2351
|
-
onClick: t[5] ||=
|
|
2351
|
+
onClick: t[5] ||= Ee(() => {}, ["stop"])
|
|
2352
2352
|
}, " · · · ")]),
|
|
2353
2353
|
_: 2
|
|
2354
2354
|
}, 1024)
|
|
2355
|
-
], 8,
|
|
2355
|
+
], 8, Nt)) : P("", !0)]),
|
|
2356
2356
|
_: 1
|
|
2357
2357
|
}, 8, [
|
|
2358
2358
|
"columns",
|
|
2359
2359
|
"customRow",
|
|
2360
2360
|
"dataSource"
|
|
2361
|
-
])) :
|
|
2361
|
+
])) : P("", !0)]),
|
|
2362
2362
|
_: 1
|
|
2363
2363
|
}, 8, ["style"]))]),
|
|
2364
2364
|
_: 1
|
|
@@ -2366,9 +2366,9 @@ function Lt(e, t, n, r, i, a) {
|
|
|
2366
2366
|
_: 1
|
|
2367
2367
|
}, 8, ["body-style"]);
|
|
2368
2368
|
}
|
|
2369
|
-
var
|
|
2369
|
+
var zt = /*#__PURE__*/ f(Tt, [["render", Rt]]), Bt = z({
|
|
2370
2370
|
name: "SideSearchRender",
|
|
2371
|
-
components: { ViewManage:
|
|
2371
|
+
components: { ViewManage: zt },
|
|
2372
2372
|
props: { selectObj: {
|
|
2373
2373
|
type: Object,
|
|
2374
2374
|
required: !0
|
|
@@ -2385,54 +2385,54 @@ var Rt = /*#__PURE__*/ f(wt, [["render", Lt]]), zt = R({
|
|
|
2385
2385
|
});
|
|
2386
2386
|
//#endregion
|
|
2387
2387
|
//#region src/components/SideSearchRender/SideSearchRender.vue
|
|
2388
|
-
function
|
|
2389
|
-
let o =
|
|
2390
|
-
return
|
|
2388
|
+
function Vt(e, t, n, r, i, a) {
|
|
2389
|
+
let o = q("view-manage"), s = q("a-card");
|
|
2390
|
+
return U(), N(s, { "body-style": {
|
|
2391
2391
|
padding: 0,
|
|
2392
2392
|
height: e.selectObj.height + 96 + "px",
|
|
2393
2393
|
overflowY: "auto"
|
|
2394
2394
|
} }, {
|
|
2395
|
-
default:
|
|
2395
|
+
default: Z(() => [R(o, {
|
|
2396
2396
|
"select-obj": e.selectObj,
|
|
2397
2397
|
onChange: e.change
|
|
2398
2398
|
}, null, 8, ["select-obj", "onChange"])]),
|
|
2399
2399
|
_: 1
|
|
2400
2400
|
}, 8, ["body-style"]);
|
|
2401
2401
|
}
|
|
2402
|
-
var
|
|
2402
|
+
var Ht = /*#__PURE__*/ f(Bt, [["render", Vt]]), Ut = Symbol("fullLayoutState"), Wt = /*#__PURE__*/ f(/* @__PURE__ */ z({
|
|
2403
2403
|
__name: "fullLayout",
|
|
2404
2404
|
setup(e) {
|
|
2405
2405
|
let t = Se(null);
|
|
2406
|
-
return
|
|
2406
|
+
return ye(Ut, { fullLayoutRef: t }), (e, n) => (U(), F("div", {
|
|
2407
2407
|
ref_key: "fullLayoutRef",
|
|
2408
2408
|
ref: t,
|
|
2409
2409
|
class: "full-layout"
|
|
2410
2410
|
}, [be(e.$slots, "default", {}, void 0, !0)], 512));
|
|
2411
2411
|
}
|
|
2412
|
-
}), [["__scopeId", "data-v-97777e2d"]]),
|
|
2413
|
-
function
|
|
2412
|
+
}), [["__scopeId", "data-v-97777e2d"]]), Gt = "auto";
|
|
2413
|
+
function Kt() {
|
|
2414
2414
|
return typeof document < "u";
|
|
2415
2415
|
}
|
|
2416
|
-
function
|
|
2416
|
+
function qt() {
|
|
2417
2417
|
return typeof window < "u";
|
|
2418
2418
|
}
|
|
2419
|
-
function
|
|
2420
|
-
return
|
|
2419
|
+
function Jt() {
|
|
2420
|
+
return Kt() ? document.dir === void 0 ? document.getElementsByTagName("html")[0].getAttribute("dir") : document.dir : Gt;
|
|
2421
2421
|
}
|
|
2422
|
-
function
|
|
2423
|
-
if (!
|
|
2422
|
+
function Yt(e, t) {
|
|
2423
|
+
if (!qt) {
|
|
2424
2424
|
t();
|
|
2425
2425
|
return;
|
|
2426
2426
|
}
|
|
2427
2427
|
window.addEventListener(e, t);
|
|
2428
2428
|
}
|
|
2429
|
-
function
|
|
2430
|
-
|
|
2429
|
+
function Xt(e, t) {
|
|
2430
|
+
qt && window.removeEventListener(e, t);
|
|
2431
2431
|
}
|
|
2432
2432
|
//#endregion
|
|
2433
2433
|
//#region src/components/grid-layout/helpers/utils.ts
|
|
2434
|
-
var $ = (e) => typeof e == "number" ? e : parseFloat(e) || 0,
|
|
2435
|
-
function
|
|
2434
|
+
var $ = (e) => typeof e == "number" ? e : parseFloat(e) || 0, Zt = (e) => typeof e == "string" && (e.includes("px") || e.includes("calc") || e.includes("grow") || e.includes("%"));
|
|
2435
|
+
function Qt(e) {
|
|
2436
2436
|
let t = 0;
|
|
2437
2437
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
2438
2438
|
let r = e[n], i = r.y ?? 0, a = r.h ?? 0, o = $(i) + $(a);
|
|
@@ -2440,69 +2440,69 @@ function Zt(e) {
|
|
|
2440
2440
|
}
|
|
2441
2441
|
return t;
|
|
2442
2442
|
}
|
|
2443
|
-
function
|
|
2443
|
+
function $t(e) {
|
|
2444
2444
|
return JSON.parse(JSON.stringify(e));
|
|
2445
2445
|
}
|
|
2446
|
-
function
|
|
2446
|
+
function en(e) {
|
|
2447
2447
|
let t = Array(e.length);
|
|
2448
|
-
for (let n = 0, r = e.length; n < r; n++) t[n] =
|
|
2448
|
+
for (let n = 0, r = e.length; n < r; n++) t[n] = $t(e[n]);
|
|
2449
2449
|
return t;
|
|
2450
2450
|
}
|
|
2451
|
-
function
|
|
2451
|
+
function tn(e, t) {
|
|
2452
2452
|
if (e === t) return !1;
|
|
2453
2453
|
let n = $(e.x), r = $(e.y), i = $(e.w), a = $(e.h), o = $(t.x), s = $(t.y), c = $(t.w), l = $(t.h);
|
|
2454
2454
|
return !(n + i <= o || n >= o + c || r + a <= s || r >= s + l);
|
|
2455
2455
|
}
|
|
2456
|
-
function
|
|
2457
|
-
let n =
|
|
2456
|
+
function nn(e, t) {
|
|
2457
|
+
let n = ln(e), r = gn(e), i = Array(e.length);
|
|
2458
2458
|
for (let a = 0, o = r.length; a < o; a++) {
|
|
2459
2459
|
let o = r[a];
|
|
2460
|
-
o.static || (o =
|
|
2460
|
+
o.static || (o = rn(n, o, t), n.push(o)), i[e.indexOf(o)] = o, o.moved = !1;
|
|
2461
2461
|
}
|
|
2462
2462
|
return i;
|
|
2463
2463
|
}
|
|
2464
|
-
function
|
|
2465
|
-
if (n && !
|
|
2464
|
+
function rn(e, t, n) {
|
|
2465
|
+
if (n && !Zt(t.y) && t.top_i === void 0 && t.left_i === void 0) for (; $(t.y) > 0 && !sn(e, t);) t.y = $(t.y) - 1;
|
|
2466
2466
|
let r = {};
|
|
2467
|
-
for (; (r =
|
|
2467
|
+
for (; (r = sn(e, t)) && !(Zt(t.y) || t.top_i !== void 0 || t.left_i !== void 0);) t.y = $(r.y) + $(r.h);
|
|
2468
2468
|
return t;
|
|
2469
2469
|
}
|
|
2470
|
-
function
|
|
2471
|
-
let n =
|
|
2470
|
+
function an(e, t) {
|
|
2471
|
+
let n = ln(e);
|
|
2472
2472
|
for (let r = 0, i = e.length; r < i; r++) {
|
|
2473
2473
|
let i = e[r], a = $(i.x), o = $(i.w);
|
|
2474
|
-
if (a + o > t.cols && !
|
|
2475
|
-
else for (;
|
|
2474
|
+
if (a + o > t.cols && !Zt(i.x) && !Zt(i.w) && i.left_i === void 0 && (i.x = t.cols - o), a < 0 && !Zt(i.x) && i.left_i === void 0 && (i.x = 0, i.w = t.cols), !i.static) n.push(i);
|
|
2475
|
+
else for (; sn(n, i) && !(Zt(i.y) || i.top_i !== void 0 || i.left_i !== void 0);) i.y = $(i.y) + 1;
|
|
2476
2476
|
}
|
|
2477
2477
|
return e;
|
|
2478
2478
|
}
|
|
2479
|
-
function an(e, t) {
|
|
2480
|
-
for (let n = 0, r = e.length; n < r; n++) if (e[n].i === t) return e[n];
|
|
2481
|
-
}
|
|
2482
2479
|
function on(e, t) {
|
|
2483
|
-
for (let n = 0, r = e.length; n < r; n++) if (
|
|
2480
|
+
for (let n = 0, r = e.length; n < r; n++) if (e[n].i === t) return e[n];
|
|
2484
2481
|
}
|
|
2485
2482
|
function sn(e, t) {
|
|
2486
|
-
|
|
2483
|
+
for (let n = 0, r = e.length; n < r; n++) if (tn(e[n], t)) return e[n];
|
|
2484
|
+
}
|
|
2485
|
+
function cn(e, t) {
|
|
2486
|
+
return e.filter((e) => tn(e, t));
|
|
2487
2487
|
}
|
|
2488
|
-
function
|
|
2488
|
+
function ln(e) {
|
|
2489
2489
|
return e.filter((e) => e.static);
|
|
2490
2490
|
}
|
|
2491
|
-
function
|
|
2491
|
+
function un(e, t, n, r, i, a = !1) {
|
|
2492
2492
|
if (t.static) return e;
|
|
2493
2493
|
let o = t.x, s = t.y, c = r && $(t.y) > r;
|
|
2494
2494
|
typeof n == "number" && (t.x = n), typeof r == "number" && (t.y = r), t.moved = !0;
|
|
2495
|
-
let l =
|
|
2495
|
+
let l = gn(e);
|
|
2496
2496
|
c && (l = l.reverse());
|
|
2497
|
-
let u =
|
|
2497
|
+
let u = cn(l, t);
|
|
2498
2498
|
if (a && u.length) return t.x = o, t.y = s, t.moved = !1, e;
|
|
2499
2499
|
for (let n = 0, r = u.length; n < r; n++) {
|
|
2500
2500
|
let r = u[n];
|
|
2501
|
-
r.moved || $(t.y) > $(r.y) && $(t.y) - $(r.y) > $(r.h) / 4 || (e = r.static ?
|
|
2501
|
+
r.moved || $(t.y) > $(r.y) && $(t.y) - $(r.y) > $(r.h) / 4 || (e = r.static ? dn(e, r, t, i) : dn(e, t, r, i));
|
|
2502
2502
|
}
|
|
2503
2503
|
return e;
|
|
2504
2504
|
}
|
|
2505
|
-
function
|
|
2505
|
+
function dn(e, t, n, r) {
|
|
2506
2506
|
if (r) {
|
|
2507
2507
|
let r = {
|
|
2508
2508
|
x: n.x,
|
|
@@ -2511,11 +2511,11 @@ function un(e, t, n, r) {
|
|
|
2511
2511
|
h: n.h,
|
|
2512
2512
|
i: "-1"
|
|
2513
2513
|
};
|
|
2514
|
-
if (r.y = Math.max($(t.y) - $(n.h), 0), !
|
|
2514
|
+
if (r.y = Math.max($(t.y) - $(n.h), 0), !sn(e, r)) return un(e, n, void 0, r.y, !1);
|
|
2515
2515
|
}
|
|
2516
|
-
return
|
|
2516
|
+
return un(e, n, void 0, $(n.y) + 1, !1);
|
|
2517
2517
|
}
|
|
2518
|
-
function
|
|
2518
|
+
function fn(e, t, n, r) {
|
|
2519
2519
|
let i = typeof t == "number" ? t + "px" : t, a = typeof e == "number" ? (e < 0 ? 0 : e) + "px" : e, o = "translate3d(" + i + "," + a + ", 0)";
|
|
2520
2520
|
return {
|
|
2521
2521
|
transform: o,
|
|
@@ -2528,7 +2528,7 @@ function dn(e, t, n, r) {
|
|
|
2528
2528
|
position: "absolute"
|
|
2529
2529
|
};
|
|
2530
2530
|
}
|
|
2531
|
-
function
|
|
2531
|
+
function pn(e, t, n, r) {
|
|
2532
2532
|
let i = typeof t == "number" ? t * -1 + "px" : "calc(" + t + " * -1)", a = typeof e == "number" ? (e < 0 ? 0 : e) + "px" : e, o = "translate3d(" + i + "," + a + ", 0)";
|
|
2533
2533
|
return {
|
|
2534
2534
|
transform: o,
|
|
@@ -2541,7 +2541,7 @@ function fn(e, t, n, r) {
|
|
|
2541
2541
|
position: "absolute"
|
|
2542
2542
|
};
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2544
|
+
function mn(e, t, n, r) {
|
|
2545
2545
|
return {
|
|
2546
2546
|
top: typeof e == "number" ? e + "px" : e,
|
|
2547
2547
|
left: typeof t == "number" ? t + "px" : t,
|
|
@@ -2550,7 +2550,7 @@ function pn(e, t, n, r) {
|
|
|
2550
2550
|
position: "absolute"
|
|
2551
2551
|
};
|
|
2552
2552
|
}
|
|
2553
|
-
function
|
|
2553
|
+
function hn(e, t, n, r) {
|
|
2554
2554
|
return {
|
|
2555
2555
|
top: typeof e == "number" ? e + "px" : e,
|
|
2556
2556
|
right: typeof t == "number" ? t + "px" : t,
|
|
@@ -2559,13 +2559,13 @@ function mn(e, t, n, r) {
|
|
|
2559
2559
|
position: "absolute"
|
|
2560
2560
|
};
|
|
2561
2561
|
}
|
|
2562
|
-
function
|
|
2562
|
+
function gn(e) {
|
|
2563
2563
|
return [...e].sort((e, t) => {
|
|
2564
2564
|
let n = $(e.x), r = $(e.y), i = $(t.x), a = $(t.y);
|
|
2565
2565
|
return r === a && n === i ? 0 : r > a || r === a && n > i ? 1 : -1;
|
|
2566
2566
|
});
|
|
2567
2567
|
}
|
|
2568
|
-
function
|
|
2568
|
+
function _n(e, t = "Layout") {
|
|
2569
2569
|
let n = [
|
|
2570
2570
|
"x",
|
|
2571
2571
|
"y",
|
|
@@ -2586,24 +2586,24 @@ function gn(e, t = "Layout") {
|
|
|
2586
2586
|
}
|
|
2587
2587
|
//#endregion
|
|
2588
2588
|
//#region src/components/grid-layout/helpers/responsive-utils.ts
|
|
2589
|
-
function
|
|
2589
|
+
function vn(e) {
|
|
2590
2590
|
return Object.keys(e).sort((t, n) => e[t] - e[n]);
|
|
2591
2591
|
}
|
|
2592
|
-
function
|
|
2593
|
-
let n =
|
|
2592
|
+
function yn(e, t) {
|
|
2593
|
+
let n = vn(e), r = n[0];
|
|
2594
2594
|
for (let i = 1, a = n.length; i < a; i++) {
|
|
2595
2595
|
let a = n[i];
|
|
2596
2596
|
t > e[a] && (r = a);
|
|
2597
2597
|
}
|
|
2598
2598
|
return r;
|
|
2599
2599
|
}
|
|
2600
|
-
function
|
|
2600
|
+
function bn(e, t) {
|
|
2601
2601
|
if (!t[e]) throw Error("ResponsiveGridLayout: `cols` entry for breakpoint " + e + " is missing!");
|
|
2602
2602
|
return t[e];
|
|
2603
2603
|
}
|
|
2604
|
-
function
|
|
2605
|
-
if (t[r]) return
|
|
2606
|
-
let s = e, c =
|
|
2604
|
+
function xn(e, t, n, r, i, a, o) {
|
|
2605
|
+
if (t[r]) return en(t[r]);
|
|
2606
|
+
let s = e, c = vn(n), l = c.slice(c.indexOf(r));
|
|
2607
2607
|
for (let e = 0, n = l.length; e < n; e++) {
|
|
2608
2608
|
let n = l[e];
|
|
2609
2609
|
if (t[n]) {
|
|
@@ -2611,11 +2611,11 @@ function bn(e, t, n, r, i, a, o) {
|
|
|
2611
2611
|
break;
|
|
2612
2612
|
}
|
|
2613
2613
|
}
|
|
2614
|
-
return s =
|
|
2614
|
+
return s = en(s || []), nn(an(s, { cols: a }), o);
|
|
2615
2615
|
}
|
|
2616
2616
|
//#endregion
|
|
2617
2617
|
//#region src/components/grid-layout/helpers/draggable-utils.ts
|
|
2618
|
-
function
|
|
2618
|
+
function Sn(e) {
|
|
2619
2619
|
let t = e.target.offsetParent || document.body, n = t === document.body ? {
|
|
2620
2620
|
left: 0,
|
|
2621
2621
|
top: 0
|
|
@@ -2625,14 +2625,14 @@ function xn(e) {
|
|
|
2625
2625
|
y: e.clientY + t.scrollTop - n.top
|
|
2626
2626
|
};
|
|
2627
2627
|
}
|
|
2628
|
-
function Sn(e) {
|
|
2629
|
-
return xn(e);
|
|
2630
|
-
}
|
|
2631
2628
|
function Cn(e) {
|
|
2629
|
+
return Sn(e);
|
|
2630
|
+
}
|
|
2631
|
+
function wn(e) {
|
|
2632
2632
|
return typeof e == "number" && !isNaN(e);
|
|
2633
2633
|
}
|
|
2634
|
-
function
|
|
2635
|
-
return
|
|
2634
|
+
function Tn(e, t, n, r) {
|
|
2635
|
+
return wn(e) ? {
|
|
2636
2636
|
deltaX: n - e,
|
|
2637
2637
|
deltaY: r - t,
|
|
2638
2638
|
lastX: e,
|
|
@@ -2650,7 +2650,7 @@ function wn(e, t, n, r) {
|
|
|
2650
2650
|
}
|
|
2651
2651
|
//#endregion
|
|
2652
2652
|
//#region src/components/grid-layout/components/grid-item.vue
|
|
2653
|
-
var
|
|
2653
|
+
var En = /* @__PURE__ */ z({
|
|
2654
2654
|
name: "GridItem",
|
|
2655
2655
|
__name: "grid-item",
|
|
2656
2656
|
props: {
|
|
@@ -2691,26 +2691,26 @@ var Tn = /* @__PURE__ */ R({
|
|
|
2691
2691
|
"moved"
|
|
2692
2692
|
],
|
|
2693
2693
|
setup(e, { expose: t, emit: n }) {
|
|
2694
|
-
let r = e, i = n, a = le("eventBus"), o = le("usePercentages", !1), s = le("layout"), c =
|
|
2694
|
+
let r = e, i = n, a = le("eventBus"), o = le("usePercentages", !1), s = le("layout"), c = G(null), l = G(null), u = G(1), d = G(100), f = G(100), p = G(10), m = G([10, 10]), h = G(Infinity), g = G(null), _ = G(null), v = G(!0), y = G(!1), b = G(null), x = G(!1), S = G(null), ee = G(NaN), C = G(NaN), te = G(NaN), ne = G(NaN), re = G({}), w = G(!1), ie = G(!1), ae = G(!1), T = G(null), oe = G(null), se = G(null), E = G(null), D = G(r.x), O = G(r.y), k = G(r.w), A = G(r.h), j = G(null), N = (e) => typeof e == "number" ? e : parseFloat(e) || 0, I = (e, t) => e == null ? "0%" : typeof e == "number" ? e + "%" : e.endsWith("%") || e.endsWith("px") || e.includes("calc") ? e : e === "grow" ? t === void 0 ? "100%" : `calc(100% - ${typeof t == "number" ? t + "%" : t})` : e.includes("%") || e.includes("px") || e.includes("calc") ? e : e + "%", L = M(() => r.usePercentages === null ? o : r.usePercentages), R = M(() => _.value && !r.static), z = M(() => (g.value || _.value) && !r.static), ue = M(() => navigator.userAgent.toLowerCase().indexOf("android") !== -1), B = M(() => ce()?.parent?.proxy?.isMirrored ? !w.value : w.value), de = M(() => ({
|
|
2695
2695
|
"vue-resizable": R.value,
|
|
2696
2696
|
static: r.static,
|
|
2697
2697
|
resizing: x.value,
|
|
2698
2698
|
"vue-draggable-dragging": y.value,
|
|
2699
2699
|
cssTransforms: v.value,
|
|
2700
|
-
"render-rtl":
|
|
2700
|
+
"render-rtl": B.value,
|
|
2701
2701
|
"disable-userselect": y.value,
|
|
2702
|
-
"no-touch":
|
|
2703
|
-
})),
|
|
2702
|
+
"no-touch": ue.value && z.value
|
|
2703
|
+
})), V = M(() => B.value ? "vue-resizable-handle vue-rtl-resizable-handle" : "vue-resizable-handle"), me = () => (d.value - (m.value[0] || 10) * (u.value + 1)) / u.value, he = (e, t, n, r) => {
|
|
2704
2704
|
if (L.value) {
|
|
2705
2705
|
let i = {
|
|
2706
2706
|
width: I(n, e),
|
|
2707
2707
|
height: I(r, t),
|
|
2708
2708
|
top: I(t)
|
|
2709
2709
|
};
|
|
2710
|
-
return
|
|
2710
|
+
return B.value ? i.right = I(e) : i.left = I(e), i;
|
|
2711
2711
|
}
|
|
2712
|
-
let i =
|
|
2713
|
-
return a =
|
|
2712
|
+
let i = me(), a = null, o = N(e), s = N(t), c = N(n), l = N(r);
|
|
2713
|
+
return a = B.value ? {
|
|
2714
2714
|
right: typeof e == "string" && (e.includes("calc") || e.includes("px")) ? e : Math.round(i * o + (o + 1) * m.value[0]),
|
|
2715
2715
|
top: typeof t == "string" && (t.includes("calc") || t.includes("px")) ? t : Math.round(p.value * s + (s + 1) * m.value[1]),
|
|
2716
2716
|
width: typeof n == "string" && (n.includes("calc") || n.includes("px")) ? n : c === Infinity ? c : Math.round(i * c + Math.max(0, c - 1) * m.value[0]),
|
|
@@ -2721,31 +2721,31 @@ var Tn = /* @__PURE__ */ R({
|
|
|
2721
2721
|
width: typeof n == "string" && (n.includes("calc") || n.includes("px")) ? n : c === Infinity ? c : Math.round(i * c + Math.max(0, c - 1) * m.value[0]),
|
|
2722
2722
|
height: typeof r == "string" && (r.includes("calc") || r.includes("px")) ? r : l === Infinity ? l : Math.round(p.value * l + Math.max(0, l - 1) * m.value[1])
|
|
2723
2723
|
}, a;
|
|
2724
|
-
},
|
|
2724
|
+
}, _e = (e, t) => {
|
|
2725
2725
|
if (!s) return 0;
|
|
2726
2726
|
let n = s.find((t) => t.i === e);
|
|
2727
2727
|
if (!n) return 0;
|
|
2728
2728
|
if (t === "y") {
|
|
2729
2729
|
if (n.top_i !== void 0 && n.top_i !== null) {
|
|
2730
2730
|
let e = s.find((e) => e.i === n.top_i);
|
|
2731
|
-
return `calc(${I(
|
|
2731
|
+
return `calc(${I(_e(n.top_i, "y"))} + ${I(e?.h ?? 0)})`;
|
|
2732
2732
|
}
|
|
2733
2733
|
return n.y ?? 0;
|
|
2734
2734
|
} else {
|
|
2735
2735
|
if (n.left_i !== void 0 && n.left_i !== null) {
|
|
2736
2736
|
let e = s.find((e) => e.i === n.left_i);
|
|
2737
|
-
return `calc(${I(
|
|
2737
|
+
return `calc(${I(_e(n.left_i, "x"))} + ${I(e?.w ?? 0)})`;
|
|
2738
2738
|
}
|
|
2739
2739
|
return n.x ?? 0;
|
|
2740
2740
|
}
|
|
2741
2741
|
}, H = () => {
|
|
2742
2742
|
if (L.value) D.value = r.x, k.value = r.w;
|
|
2743
2743
|
else {
|
|
2744
|
-
let e =
|
|
2744
|
+
let e = N(r.x), t = N(r.w);
|
|
2745
2745
|
e + t > u.value ? (D.value = 0, k.value = t > u.value ? u.value : t) : (D.value = r.x, k.value = r.w);
|
|
2746
2746
|
}
|
|
2747
|
-
let e = _e(
|
|
2748
|
-
y.value && (e.top = b.value.top, typeof e.top == "number" && (e.top += "px"),
|
|
2747
|
+
let e = he(_e(String(r.i), "x"), _e(String(r.i), "y"), k.value, A.value);
|
|
2748
|
+
y.value && (e.top = b.value.top, typeof e.top == "number" && (e.top += "px"), B.value ? (e.right = b.value.left, typeof e.right == "number" && (e.right += "px")) : (e.left = b.value.left, typeof e.left == "number" && (e.left += "px"))), x.value && (e.width = S.value.width, typeof e.width == "number" && (e.width += "px"), e.height = S.value.height, typeof e.height == "number" && (e.height += "px"));
|
|
2749
2749
|
let t = null;
|
|
2750
2750
|
if (v.value && (y.value || x.value)) {
|
|
2751
2751
|
let n = (e, t) => {
|
|
@@ -2759,8 +2759,8 @@ var Tn = /* @__PURE__ */ R({
|
|
|
2759
2759
|
}
|
|
2760
2760
|
return parseFloat(e) || 0;
|
|
2761
2761
|
}, r = n(e.top, f.value), i = n(e.width, d.value), a = n(e.height, f.value);
|
|
2762
|
-
t =
|
|
2763
|
-
} else t = v.value && !L.value ?
|
|
2762
|
+
t = B.value ? pn(r, n(e.right, d.value), i, a) : fn(r, n(e.left, d.value), i, a);
|
|
2763
|
+
} else t = v.value && !L.value ? B.value ? pn(e.top, e.right, e.width, e.height) : fn(e.top, e.left, e.width, e.height) : B.value ? hn(e.top, e.right, e.width, e.height) : mn(e.top, e.left, e.width, e.height);
|
|
2764
2764
|
for (let e of [
|
|
2765
2765
|
"top",
|
|
2766
2766
|
"left",
|
|
@@ -2768,11 +2768,11 @@ var Tn = /* @__PURE__ */ R({
|
|
|
2768
2768
|
"width",
|
|
2769
2769
|
"height"
|
|
2770
2770
|
]) t[e] !== void 0 && typeof t[e] == "number" && (t[e] += "px");
|
|
2771
|
-
|
|
2772
|
-
},
|
|
2771
|
+
re.value = t;
|
|
2772
|
+
}, ye = () => {
|
|
2773
2773
|
let e = {};
|
|
2774
2774
|
for (let t of ["width", "height"]) {
|
|
2775
|
-
let n =
|
|
2775
|
+
let n = re.value[t];
|
|
2776
2776
|
if (typeof n == "string" && (n.includes("calc") || n.includes("%"))) if (c.value) n = t === "width" ? c.value.offsetWidth + "px" : c.value.offsetHeight + "px";
|
|
2777
2777
|
else return;
|
|
2778
2778
|
let r = String(n).match(/^(\d+(\.\d+)?)px$/);
|
|
@@ -2780,35 +2780,35 @@ var Tn = /* @__PURE__ */ R({
|
|
|
2780
2780
|
e[t] = r[1];
|
|
2781
2781
|
}
|
|
2782
2782
|
i("container-resized", r.i, r.h, r.w, e.height, e.width);
|
|
2783
|
-
},
|
|
2783
|
+
}, W = (e, t) => {
|
|
2784
2784
|
if (L.value) {
|
|
2785
2785
|
let n = t / d.value * 100, r = e / f.value * 100;
|
|
2786
|
-
return n = Math.max(Math.min(n, 100 -
|
|
2786
|
+
return n = Math.max(Math.min(n, 100 - N(k.value)), 0), r = Math.max(Math.min(r, 100 - N(A.value)), 0), {
|
|
2787
2787
|
x: n,
|
|
2788
2788
|
y: r
|
|
2789
2789
|
};
|
|
2790
2790
|
}
|
|
2791
|
-
let n =
|
|
2792
|
-
return r = Math.max(Math.min(r, u.value -
|
|
2791
|
+
let n = me(), r = Math.round((t - m.value[0]) / (n + m.value[0])), i = Math.round((e - m.value[1]) / (p.value + m.value[1]));
|
|
2792
|
+
return r = Math.max(Math.min(r, u.value - N(k.value)), 0), i = Math.max(Math.min(i, h.value - N(A.value)), 0), {
|
|
2793
2793
|
x: r,
|
|
2794
2794
|
y: i
|
|
2795
2795
|
};
|
|
2796
2796
|
}, K = (e, t, n = !1) => {
|
|
2797
2797
|
if (L.value) {
|
|
2798
2798
|
let n = t / d.value * 100, r = e / f.value * 100;
|
|
2799
|
-
return n = Math.max(Math.min(n, 100 -
|
|
2799
|
+
return n = Math.max(Math.min(n, 100 - N(D.value)), 0), r = Math.max(Math.min(r, 100 - N(O.value)), 0), {
|
|
2800
2800
|
w: n,
|
|
2801
2801
|
h: r
|
|
2802
2802
|
};
|
|
2803
2803
|
}
|
|
2804
|
-
let r =
|
|
2805
|
-
return a = n ? Math.ceil((e + m.value[1]) / (p.value + m.value[1])) : Math.round((e + m.value[1]) / (p.value + m.value[1])), i = Math.max(Math.min(i, u.value -
|
|
2804
|
+
let r = me(), i = Math.round((t + m.value[0]) / (r + m.value[0])), a = 0;
|
|
2805
|
+
return a = n ? Math.ceil((e + m.value[1]) / (p.value + m.value[1])) : Math.round((e + m.value[1]) / (p.value + m.value[1])), i = Math.max(Math.min(i, u.value - N(D.value)), 0), a = Math.max(Math.min(a, h.value - N(O.value)), 0), {
|
|
2806
2806
|
w: i,
|
|
2807
2807
|
h: a
|
|
2808
2808
|
};
|
|
2809
|
-
},
|
|
2809
|
+
}, q = (e) => {
|
|
2810
2810
|
if (r.static || x.value) return;
|
|
2811
|
-
let t =
|
|
2811
|
+
let t = Cn(e);
|
|
2812
2812
|
if (t === null) return;
|
|
2813
2813
|
let { x: n, y: o } = t, s = {
|
|
2814
2814
|
top: 0,
|
|
@@ -2816,25 +2816,25 @@ var Tn = /* @__PURE__ */ R({
|
|
|
2816
2816
|
};
|
|
2817
2817
|
switch (e.type) {
|
|
2818
2818
|
case "dragstart": {
|
|
2819
|
-
|
|
2819
|
+
se.value = D.value, E.value = O.value;
|
|
2820
2820
|
let t = e.target.offsetParent.getBoundingClientRect(), n = e.target.getBoundingClientRect();
|
|
2821
|
-
|
|
2821
|
+
B.value ? s.left = (n.right - t.right) * -1 : s.left = n.left - t.left, s.top = n.top - t.top, b.value = s, y.value = !0;
|
|
2822
2822
|
break;
|
|
2823
2823
|
}
|
|
2824
2824
|
case "dragend": {
|
|
2825
2825
|
if (!y.value) return;
|
|
2826
2826
|
let t = e.target.offsetParent.getBoundingClientRect(), n = e.target.getBoundingClientRect();
|
|
2827
|
-
|
|
2827
|
+
B.value ? s.left = (n.right - t.right) * -1 : s.left = n.left - t.left, s.top = n.top - t.top, b.value = null, y.value = !1;
|
|
2828
2828
|
break;
|
|
2829
2829
|
}
|
|
2830
2830
|
case "dragmove": {
|
|
2831
|
-
let e =
|
|
2832
|
-
|
|
2831
|
+
let e = Tn(ee.value, C.value, n, o);
|
|
2832
|
+
B.value ? s.left = b.value.left - e.deltaX : s.left = b.value.left + e.deltaX, s.top = b.value.top + e.deltaY, b.value = s;
|
|
2833
2833
|
break;
|
|
2834
2834
|
}
|
|
2835
2835
|
}
|
|
2836
|
-
let c =
|
|
2837
|
-
ee.value = n,
|
|
2836
|
+
let c = W(s.top, s.left);
|
|
2837
|
+
ee.value = n, C.value = o, (N(D.value) !== c.x || N(O.value) !== c.y) && i("move", r.i, c.x, c.y), e.type === "dragend" && (N(se.value) !== c.x || N(E.value) !== c.y) && i("moved", r.i, c.x, c.y), L.value ? a.emit("dragEvent", {
|
|
2838
2838
|
eventType: e.type,
|
|
2839
2839
|
i: r.i,
|
|
2840
2840
|
x: c.x,
|
|
@@ -2846,12 +2846,12 @@ var Tn = /* @__PURE__ */ R({
|
|
|
2846
2846
|
i: r.i,
|
|
2847
2847
|
x: c.x,
|
|
2848
2848
|
y: c.y,
|
|
2849
|
-
h:
|
|
2850
|
-
w:
|
|
2849
|
+
h: N(A.value),
|
|
2850
|
+
w: N(k.value)
|
|
2851
2851
|
});
|
|
2852
|
-
},
|
|
2852
|
+
}, xe = (e) => {
|
|
2853
2853
|
if (r.static) return;
|
|
2854
|
-
let t =
|
|
2854
|
+
let t = Cn(e);
|
|
2855
2855
|
if (t == null) return;
|
|
2856
2856
|
let { x: n, y: o } = t, s = {
|
|
2857
2857
|
width: 0,
|
|
@@ -2859,44 +2859,44 @@ var Tn = /* @__PURE__ */ R({
|
|
|
2859
2859
|
}, c = null;
|
|
2860
2860
|
switch (e.type) {
|
|
2861
2861
|
case "resizestart": {
|
|
2862
|
-
|
|
2862
|
+
T.value = k.value, oe.value = A.value, c = he(D.value, O.value, k.value, A.value);
|
|
2863
2863
|
let e = (e, t) => typeof e == "number" ? e : typeof e == "string" ? e.endsWith("%") ? parseFloat(e) / 100 * t : e.endsWith("px") ? parseFloat(e) : parseFloat(e) || 0 : 0;
|
|
2864
2864
|
s.width = e(c.width, d.value), s.height = e(c.height, f.value), S.value = s, x.value = !0;
|
|
2865
2865
|
break;
|
|
2866
2866
|
}
|
|
2867
2867
|
case "resizemove": {
|
|
2868
|
-
let e =
|
|
2869
|
-
|
|
2868
|
+
let e = Tn(te.value, ne.value, n, o);
|
|
2869
|
+
B.value ? s.width = S.value.width - e.deltaX : s.width = S.value.width + e.deltaX, s.height = S.value.height + e.deltaY, S.value = s;
|
|
2870
2870
|
break;
|
|
2871
2871
|
}
|
|
2872
2872
|
case "resizeend": {
|
|
2873
|
-
c =
|
|
2873
|
+
c = he(D.value, O.value, k.value, A.value);
|
|
2874
2874
|
let e = (e, t) => typeof e == "number" ? e : typeof e == "string" ? e.endsWith("%") ? parseFloat(e) / 100 * t : e.endsWith("px") ? parseFloat(e) : parseFloat(e) || 0 : 0;
|
|
2875
2875
|
s.width = e(c.width, d.value), s.height = e(c.height, f.value), S.value = null, x.value = !1;
|
|
2876
2876
|
break;
|
|
2877
2877
|
}
|
|
2878
2878
|
}
|
|
2879
2879
|
let l = K(s.height, s.width);
|
|
2880
|
-
L.value || (l.w < r.minW && (l.w = r.minW), l.w > r.maxW && (l.w = r.maxW), l.h < r.minH && (l.h = r.minH), l.h > r.maxH && (l.h = r.maxH), l.h < 1 && (l.h = 1), l.w < 1 && (l.w = 1)),
|
|
2880
|
+
L.value || (l.w < r.minW && (l.w = r.minW), l.w > r.maxW && (l.w = r.maxW), l.h < r.minH && (l.h = r.minH), l.h > r.maxH && (l.h = r.maxH), l.h < 1 && (l.h = 1), l.w < 1 && (l.w = 1)), te.value = n, ne.value = o, (N(k.value) !== l.w || N(A.value) !== l.h) && i("resize", r.i, l.h, l.w, s.height, s.width), e.type === "resizeend" && (N(T.value) !== l.w || N(oe.value) !== l.h) && i("resized", r.i, l.h, l.w, s.height, s.width), a.emit("resizeEvent", {
|
|
2881
2881
|
eventType: e.type,
|
|
2882
2882
|
i: r.i,
|
|
2883
|
-
x:
|
|
2884
|
-
y:
|
|
2883
|
+
x: N(D.value),
|
|
2884
|
+
y: N(O.value),
|
|
2885
2885
|
h: l.h,
|
|
2886
2886
|
w: l.w
|
|
2887
2887
|
});
|
|
2888
|
-
},
|
|
2889
|
-
if ((
|
|
2888
|
+
}, Se = () => {
|
|
2889
|
+
if ((j.value === null || j.value === void 0) && (j.value = qe(c.value)), g.value && !r.static) {
|
|
2890
2890
|
let e = {
|
|
2891
2891
|
ignoreFrom: r.dragIgnoreFrom,
|
|
2892
2892
|
allowFrom: r.dragAllowFrom
|
|
2893
2893
|
};
|
|
2894
|
-
|
|
2895
|
-
|
|
2894
|
+
j.value.draggable(e), ie.value || (ie.value = !0, j.value.on("dragstart dragmove dragend", (e) => {
|
|
2895
|
+
q(e);
|
|
2896
2896
|
}));
|
|
2897
|
-
} else
|
|
2897
|
+
} else j.value.draggable({ enabled: !1 });
|
|
2898
2898
|
}, J = () => {
|
|
2899
|
-
if ((
|
|
2899
|
+
if ((j.value === null || j.value === void 0) && (j.value = qe(c.value)), _.value && !r.static) {
|
|
2900
2900
|
let e, t;
|
|
2901
2901
|
if (L.value) e = {
|
|
2902
2902
|
width: r.maxW / 100 * d.value,
|
|
@@ -2906,7 +2906,7 @@ var Tn = /* @__PURE__ */ R({
|
|
|
2906
2906
|
height: r.minH / 100 * f.value
|
|
2907
2907
|
};
|
|
2908
2908
|
else {
|
|
2909
|
-
let n =
|
|
2909
|
+
let n = he(0, 0, r.maxW, r.maxH), i = he(0, 0, r.minW, r.minH);
|
|
2910
2910
|
e = {
|
|
2911
2911
|
width: parseFloat(n.width),
|
|
2912
2912
|
height: parseFloat(n.height)
|
|
@@ -2919,8 +2919,8 @@ var Tn = /* @__PURE__ */ R({
|
|
|
2919
2919
|
preserveAspectRatio: !0,
|
|
2920
2920
|
edges: {
|
|
2921
2921
|
left: !1,
|
|
2922
|
-
right: "." +
|
|
2923
|
-
bottom: "." +
|
|
2922
|
+
right: "." + V.value,
|
|
2923
|
+
bottom: "." + V.value,
|
|
2924
2924
|
top: !1
|
|
2925
2925
|
},
|
|
2926
2926
|
ignoreFrom: r.resizeIgnoreFrom,
|
|
@@ -2929,103 +2929,103 @@ var Tn = /* @__PURE__ */ R({
|
|
|
2929
2929
|
max: e
|
|
2930
2930
|
}
|
|
2931
2931
|
};
|
|
2932
|
-
|
|
2933
|
-
|
|
2932
|
+
j.value.resizable(n), ae.value || (ae.value = !0, j.value.on("resizestart resizemove resizeend", (e) => {
|
|
2933
|
+
xe(e);
|
|
2934
2934
|
}));
|
|
2935
|
-
} else
|
|
2936
|
-
},
|
|
2935
|
+
} else j.value.resizable({ enabled: !1 });
|
|
2936
|
+
}, Y = (e, t) => {
|
|
2937
2937
|
d.value = e || 100, t != null && (u.value = t), c.value && c.value.parentElement && (f.value = c.value.parentElement.offsetHeight || 100);
|
|
2938
|
-
},
|
|
2938
|
+
}, Ce = () => {
|
|
2939
2939
|
H();
|
|
2940
|
-
},
|
|
2941
|
-
if (
|
|
2940
|
+
}, we = () => {
|
|
2941
|
+
if (T.value = k.value, oe.value = A.value, c.value && c.value.firstElementChild) {
|
|
2942
2942
|
let e = c.value.firstElementChild.getBoundingClientRect(), t = K(e.height, e.width, !0);
|
|
2943
|
-
L.value || (t.w < r.minW && (t.w = r.minW), t.w > r.maxW && (t.w = r.maxW), t.h < r.minH && (t.h = r.minH), t.h > r.maxH && (t.h = r.maxH), t.h < 1 && (t.h = 1), t.w < 1 && (t.w = 1)), (
|
|
2943
|
+
L.value || (t.w < r.minW && (t.w = r.minW), t.w > r.maxW && (t.w = r.maxW), t.h < r.minH && (t.h = r.minH), t.h > r.maxH && (t.h = r.maxH), t.h < 1 && (t.h = 1), t.w < 1 && (t.w = 1)), (N(k.value) !== t.w || N(A.value) !== t.h) && i("resize", r.i, t.h, t.w, e.height, e.width), (N(T.value) !== t.w || N(oe.value) !== t.h) && (i("resized", r.i, t.h, t.w, e.height, e.width), a.emit("resizeEvent", {
|
|
2944
2944
|
eventType: "resizeend",
|
|
2945
2945
|
i: r.i,
|
|
2946
|
-
x:
|
|
2947
|
-
y:
|
|
2946
|
+
x: N(D.value),
|
|
2947
|
+
y: N(O.value),
|
|
2948
2948
|
h: t.h,
|
|
2949
2949
|
w: t.w
|
|
2950
2950
|
}));
|
|
2951
2951
|
}
|
|
2952
|
-
},
|
|
2953
|
-
|
|
2954
|
-
},
|
|
2955
|
-
|
|
2952
|
+
}, Z = (e) => {
|
|
2953
|
+
Y(e);
|
|
2954
|
+
}, Te = () => {
|
|
2955
|
+
Ce();
|
|
2956
2956
|
}, Ee = (e) => {
|
|
2957
2957
|
r.isDraggable === null && (g.value = e);
|
|
2958
|
-
}, Q = (e) => {
|
|
2959
|
-
r.isResizable === null && (_.value = e);
|
|
2960
2958
|
}, De = (e) => {
|
|
2959
|
+
r.isResizable === null && (_.value = e);
|
|
2960
|
+
}, Q = (e) => {
|
|
2961
2961
|
p.value = e;
|
|
2962
2962
|
}, Oe = (e) => {
|
|
2963
2963
|
h.value = e;
|
|
2964
2964
|
}, ke = () => {
|
|
2965
|
-
|
|
2965
|
+
w.value = Jt() === "rtl", Ce();
|
|
2966
2966
|
}, Ae = (e) => {
|
|
2967
2967
|
u.value = parseInt(e, 10);
|
|
2968
2968
|
};
|
|
2969
2969
|
return ve(() => {
|
|
2970
2970
|
let e = ce()?.parent?.proxy;
|
|
2971
|
-
u.value = e.colNum, p.value = e.rowHeight, d.value = e.width !== null && e.width !== 0 ? e.width : 100, m.value = e.margin === void 0 ? [10, 10] : e.margin, h.value = e.maxRows, c.value && c.value.parentElement && (f.value = c.value.parentElement.offsetHeight || 100, d.value === 100 && (d.value = c.value.parentElement.offsetWidth || 100)), r.isDraggable === null ? g.value = e.isDraggable : g.value = r.isDraggable, r.isResizable === null ? _.value = e.isResizable : _.value = r.isResizable, v.value = e.useCssTransforms, a.on("updateWidth",
|
|
2971
|
+
u.value = e.colNum, p.value = e.rowHeight, d.value = e.width !== null && e.width !== 0 ? e.width : 100, m.value = e.margin === void 0 ? [10, 10] : e.margin, h.value = e.maxRows, c.value && c.value.parentElement && (f.value = c.value.parentElement.offsetHeight || 100, d.value === 100 && (d.value = c.value.parentElement.offsetWidth || 100)), r.isDraggable === null ? g.value = e.isDraggable : g.value = r.isDraggable, r.isResizable === null ? _.value = e.isResizable : _.value = r.isResizable, v.value = e.useCssTransforms, a.on("updateWidth", Z), a.on("compact", Te), a.on("setDraggable", Ee), a.on("setResizable", De), a.on("setRowHeight", Q), a.on("setMaxRows", Oe), a.on("directionchange", ke), a.on("setColNum", Ae), w.value = Jt() === "rtl", H();
|
|
2972
2972
|
}), ge(() => {
|
|
2973
|
-
a.off("updateWidth",
|
|
2974
|
-
}),
|
|
2973
|
+
a.off("updateWidth", Z), a.off("compact", Te), a.off("setDraggable", Ee), a.off("setResizable", De), a.off("setRowHeight", Q), a.off("setMaxRows", Oe), a.off("directionchange", ke), a.off("setColNum", Ae), j.value && j.value.unset();
|
|
2974
|
+
}), X(() => r.isDraggable, () => {
|
|
2975
2975
|
g.value = r.isDraggable;
|
|
2976
|
-
}),
|
|
2977
|
-
|
|
2978
|
-
}),
|
|
2979
|
-
|
|
2980
|
-
}),
|
|
2976
|
+
}), X(() => r.static, () => {
|
|
2977
|
+
Se(), J();
|
|
2978
|
+
}), X(g, () => {
|
|
2979
|
+
Se();
|
|
2980
|
+
}), X(() => r.isResizable, () => {
|
|
2981
2981
|
_.value = r.isResizable;
|
|
2982
|
-
}),
|
|
2982
|
+
}), X(_, () => {
|
|
2983
2983
|
J();
|
|
2984
|
-
}),
|
|
2985
|
-
H(),
|
|
2986
|
-
}),
|
|
2987
|
-
J(), H(),
|
|
2988
|
-
}),
|
|
2989
|
-
J(), H(),
|
|
2990
|
-
}),
|
|
2991
|
-
J(), H(),
|
|
2992
|
-
}),
|
|
2984
|
+
}), X(p, () => {
|
|
2985
|
+
H(), ye();
|
|
2986
|
+
}), X(u, () => {
|
|
2987
|
+
J(), H(), ye();
|
|
2988
|
+
}), X(d, () => {
|
|
2989
|
+
J(), H(), ye();
|
|
2990
|
+
}), X(f, () => {
|
|
2991
|
+
J(), H(), ye();
|
|
2992
|
+
}), X(() => r.x, (e) => {
|
|
2993
2993
|
D.value = e, H();
|
|
2994
|
-
}),
|
|
2994
|
+
}), X(() => r.y, (e) => {
|
|
2995
2995
|
O.value = e, H();
|
|
2996
|
-
}),
|
|
2996
|
+
}), X(() => r.h, (e) => {
|
|
2997
2997
|
A.value = e, H();
|
|
2998
|
-
}),
|
|
2998
|
+
}), X(() => r.w, (e) => {
|
|
2999
2999
|
k.value = e, H();
|
|
3000
|
-
}),
|
|
3000
|
+
}), X(B, () => {
|
|
3001
3001
|
J(), H();
|
|
3002
|
-
}),
|
|
3002
|
+
}), X(() => r.minH, () => {
|
|
3003
3003
|
J();
|
|
3004
|
-
}),
|
|
3004
|
+
}), X(() => r.maxH, () => {
|
|
3005
3005
|
J();
|
|
3006
|
-
}),
|
|
3006
|
+
}), X(() => r.minW, () => {
|
|
3007
3007
|
J();
|
|
3008
|
-
}),
|
|
3008
|
+
}), X(() => r.maxW, () => {
|
|
3009
3009
|
J();
|
|
3010
|
-
}),
|
|
3011
|
-
!e || e[0] === m.value[0] && e[1] === m.value[1] || (m.value = e.map((e) => Number(e)), H(),
|
|
3010
|
+
}), X(() => ce()?.parent?.proxy?.margin, (e) => {
|
|
3011
|
+
!e || e[0] === m.value[0] && e[1] === m.value[1] || (m.value = e.map((e) => Number(e)), H(), ye());
|
|
3012
3012
|
}), t({
|
|
3013
|
-
autoSize:
|
|
3014
|
-
compact:
|
|
3015
|
-
updateWidth:
|
|
3016
|
-
}), (e, t) => (
|
|
3013
|
+
autoSize: we,
|
|
3014
|
+
compact: Ce,
|
|
3015
|
+
updateWidth: Y
|
|
3016
|
+
}), (e, t) => (U(), F("div", {
|
|
3017
3017
|
ref_key: "item",
|
|
3018
3018
|
ref: c,
|
|
3019
|
-
class: fe(["vue-grid-item",
|
|
3020
|
-
style: pe(
|
|
3021
|
-
}, [be(e.$slots, "default"), R.value ? (
|
|
3019
|
+
class: fe(["vue-grid-item", de.value]),
|
|
3020
|
+
style: pe(re.value)
|
|
3021
|
+
}, [be(e.$slots, "default"), R.value ? (U(), F("span", {
|
|
3022
3022
|
key: 0,
|
|
3023
3023
|
ref_key: "handle",
|
|
3024
3024
|
ref: l,
|
|
3025
|
-
class: fe(
|
|
3026
|
-
}, null, 2)) :
|
|
3025
|
+
class: fe(V.value)
|
|
3026
|
+
}, null, 2)) : P("", !0)], 6));
|
|
3027
3027
|
}
|
|
3028
|
-
}),
|
|
3028
|
+
}), Dn = /* @__PURE__ */ z({
|
|
3029
3029
|
name: "GridLayout",
|
|
3030
3030
|
__name: "grid-layout",
|
|
3031
3031
|
props: {
|
|
@@ -3096,42 +3096,42 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3096
3096
|
"breakpoint-changed"
|
|
3097
3097
|
],
|
|
3098
3098
|
setup(e, { expose: t, emit: n }) {
|
|
3099
|
-
let r = e, i = n, a =
|
|
3100
|
-
|
|
3101
|
-
let o =
|
|
3099
|
+
let r = e, i = n, a = Ge();
|
|
3100
|
+
ye("eventBus", a), ye("usePercentages", r.usePercentages), ye("layout", r.layout);
|
|
3101
|
+
let o = G(null), s = G(null), c = G(null), l = G({}), u = G(0), d = G(!1), f = W({
|
|
3102
3102
|
x: 0,
|
|
3103
3103
|
y: 0,
|
|
3104
3104
|
w: 0,
|
|
3105
3105
|
h: 0,
|
|
3106
3106
|
i: -1
|
|
3107
|
-
}), p =
|
|
3107
|
+
}), p = G({}), m = G(null), h = G(null), g = G(null), _ = () => o.value, v = () => {
|
|
3108
3108
|
l.value = { height: b() }, r.usePercentages && (l.value.width = "100%");
|
|
3109
3109
|
}, y = () => {
|
|
3110
3110
|
o.value !== null && o.value !== void 0 && (c.value = o.value.offsetWidth), a.emit("resizeEvent", {});
|
|
3111
3111
|
}, b = () => {
|
|
3112
3112
|
if (r.usePercentages) return "100%";
|
|
3113
|
-
if (r.autoSize) return
|
|
3113
|
+
if (r.autoSize) return Qt(r.layout) * (r.rowHeight + r.margin[1]) + r.margin[1] + "px";
|
|
3114
3114
|
}, x = (e, t, n, o, s, l) => {
|
|
3115
|
-
let u =
|
|
3115
|
+
let u = on(r.layout, String(t));
|
|
3116
3116
|
u ??= {
|
|
3117
3117
|
x: 0,
|
|
3118
3118
|
y: 0,
|
|
3119
3119
|
w: 0,
|
|
3120
3120
|
h: 0,
|
|
3121
3121
|
i: String(t)
|
|
3122
|
-
}, e === "dragmove" || e === "dragstart" ? (f.i = t, f.x = u.x, f.y = u.y, f.w = l, f.h = s,
|
|
3122
|
+
}, e === "dragmove" || e === "dragstart" ? (f.i = t, f.x = u.x, f.y = u.y, f.w = l, f.h = s, V(() => {
|
|
3123
3123
|
d.value = !0;
|
|
3124
|
-
}), a.emit("updateWidth", c.value)) :
|
|
3124
|
+
}), a.emit("updateWidth", c.value)) : V(() => {
|
|
3125
3125
|
d.value = !1;
|
|
3126
|
-
}),
|
|
3126
|
+
}), un(r.layout, u, n, o, !0, r.preventCollision), nn(r.layout, r.verticalCompact), a.emit("compact"), v(), e === "dragend" && i("layout-updated", r.layout);
|
|
3127
3127
|
}, S = () => {
|
|
3128
3128
|
if (!c.value) return;
|
|
3129
|
-
let e =
|
|
3130
|
-
m.value != null && !p.value[m.value] && (p.value[m.value] =
|
|
3131
|
-
let n =
|
|
3132
|
-
p.value[e] = n, m.value !== e && i("breakpoint-changed", e, n), i("update:layout", n), m.value = e, a.emit("setColNum",
|
|
3129
|
+
let e = yn(r.breakpoints, c.value), t = bn(e, r.cols);
|
|
3130
|
+
m.value != null && !p.value[m.value] && (p.value[m.value] = en(r.layout));
|
|
3131
|
+
let n = xn(h.value, p.value, r.breakpoints, e, m.value, t, r.verticalCompact);
|
|
3132
|
+
p.value[e] = n, m.value !== e && i("breakpoint-changed", e, n), i("update:layout", n), m.value = e, a.emit("setColNum", bn(e, r.cols));
|
|
3133
3133
|
}, ee = (e, t, n, o, s, l) => {
|
|
3134
|
-
let u =
|
|
3134
|
+
let u = on(r.layout, String(t));
|
|
3135
3135
|
u ??= {
|
|
3136
3136
|
h: 0,
|
|
3137
3137
|
w: 0,
|
|
@@ -3141,7 +3141,7 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3141
3141
|
};
|
|
3142
3142
|
let p = !1;
|
|
3143
3143
|
if (r.preventCollision) {
|
|
3144
|
-
let e =
|
|
3144
|
+
let e = cn(r.layout, {
|
|
3145
3145
|
...u,
|
|
3146
3146
|
w: l,
|
|
3147
3147
|
h: s
|
|
@@ -3153,36 +3153,36 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3153
3153
|
}), Number.isFinite(t) && (u.w = t - u.x), Number.isFinite(n) && (u.h = n - u.y);
|
|
3154
3154
|
}
|
|
3155
3155
|
}
|
|
3156
|
-
p || (u.w = l, u.h = s), e === "resizestart" || e === "resizemove" ? (f.i = t, f.x = n, f.y = o, f.w = u.w, f.h = u.h,
|
|
3156
|
+
p || (u.w = l, u.h = s), e === "resizestart" || e === "resizemove" ? (f.i = t, f.x = n, f.y = o, f.w = u.w, f.h = u.h, V(() => {
|
|
3157
3157
|
d.value = !0;
|
|
3158
|
-
}), a.emit("updateWidth", c.value)) :
|
|
3158
|
+
}), a.emit("updateWidth", c.value)) : V(() => {
|
|
3159
3159
|
d.value = !1;
|
|
3160
|
-
}), r.responsive && S(),
|
|
3161
|
-
},
|
|
3160
|
+
}), r.responsive && S(), nn(r.layout, r.verticalCompact), a.emit("compact"), v(), e === "resizeend" && i("layout-updated", r.layout);
|
|
3161
|
+
}, C = () => {
|
|
3162
3162
|
p.value = Object.assign({}, r.responsiveLayouts);
|
|
3163
|
-
},
|
|
3163
|
+
}, te = (e, t) => {
|
|
3164
3164
|
let n = e.filter((e) => !t.some((t) => e.i === t.i)), r = t.filter((t) => !e.some((e) => t.i === e.i));
|
|
3165
3165
|
return n.concat(r);
|
|
3166
|
-
},
|
|
3166
|
+
}, ne = () => {
|
|
3167
3167
|
if (r.layout !== void 0 && h.value !== null) {
|
|
3168
3168
|
if (r.layout.length !== h.value.length) {
|
|
3169
|
-
let e =
|
|
3170
|
-
e.length > 0 && (r.layout.length > h.value.length ? h.value = h.value.concat(e) : h.value = h.value.filter((t) => !e.some((e) => t.i === e.i))), u.value = r.layout.length,
|
|
3169
|
+
let e = te(r.layout, h.value);
|
|
3170
|
+
e.length > 0 && (r.layout.length > h.value.length ? h.value = h.value.concat(e) : h.value = h.value.filter((t) => !e.some((e) => t.i === e.i))), u.value = r.layout.length, C();
|
|
3171
3171
|
}
|
|
3172
|
-
r.usePercentages,
|
|
3172
|
+
r.usePercentages, nn(r.layout, r.verticalCompact), a.emit("updateWidth", c.value), v(), i("layout-updated", r.layout);
|
|
3173
3173
|
}
|
|
3174
|
-
},
|
|
3174
|
+
}, re = ({ eventType: e, i: t, x: n, y: r, h: i, w: a }) => {
|
|
3175
3175
|
ee(e, t, n, r, i, a);
|
|
3176
|
-
},
|
|
3176
|
+
}, w = ({ eventType: e, i: t, x: n, y: r, h: i, w: a }) => {
|
|
3177
3177
|
x(e, t, n, r, i, a);
|
|
3178
3178
|
};
|
|
3179
3179
|
return he(() => {
|
|
3180
3180
|
i("layout-before-mount", r.layout);
|
|
3181
3181
|
}), ve(() => {
|
|
3182
|
-
a.on("resizeEvent",
|
|
3183
|
-
|
|
3184
|
-
y(),
|
|
3185
|
-
g.value =
|
|
3182
|
+
a.on("resizeEvent", re), a.on("dragEvent", w), i("layout-created", r.layout), i("layout-mounted", r.layout), V(() => {
|
|
3183
|
+
_n(r.layout), h.value = r.layout, r.usePercentages, V(() => {
|
|
3184
|
+
y(), C(), Yt("resize", y), nn(r.layout, r.verticalCompact), i("layout-updated", r.layout), v(), V(() => {
|
|
3185
|
+
g.value = Ke({
|
|
3186
3186
|
strategy: "scroll",
|
|
3187
3187
|
callOnAdd: !1
|
|
3188
3188
|
}), g.value.listenTo(o.value, () => {
|
|
@@ -3192,37 +3192,37 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3192
3192
|
});
|
|
3193
3193
|
});
|
|
3194
3194
|
}), ge(() => {
|
|
3195
|
-
a.off("resizeEvent",
|
|
3196
|
-
}),
|
|
3197
|
-
|
|
3198
|
-
a.emit("updateWidth", c.value), t === null &&
|
|
3195
|
+
a.off("resizeEvent", re), a.off("dragEvent", w), Xt("resize", y), g.value && o.value && g.value.uninstall(o.value);
|
|
3196
|
+
}), X(c, (e, t) => {
|
|
3197
|
+
V(() => {
|
|
3198
|
+
a.emit("updateWidth", c.value), t === null && V(() => {
|
|
3199
3199
|
i("layout-ready", r.layout);
|
|
3200
3200
|
}), v();
|
|
3201
3201
|
});
|
|
3202
|
-
}),
|
|
3203
|
-
|
|
3204
|
-
}),
|
|
3205
|
-
|
|
3206
|
-
}),
|
|
3202
|
+
}), X(() => r.layout.length, () => {
|
|
3203
|
+
ne();
|
|
3204
|
+
}), X(() => r.layout, () => {
|
|
3205
|
+
ne();
|
|
3206
|
+
}), X(() => r.colNum, (e) => {
|
|
3207
3207
|
a.emit("setColNum", e);
|
|
3208
|
-
}),
|
|
3208
|
+
}), X(() => r.rowHeight, () => {
|
|
3209
3209
|
a.emit("setRowHeight", r.rowHeight);
|
|
3210
|
-
}),
|
|
3210
|
+
}), X(() => r.isDraggable, () => {
|
|
3211
3211
|
a.emit("setDraggable", r.isDraggable);
|
|
3212
|
-
}),
|
|
3212
|
+
}), X(() => r.isResizable, () => {
|
|
3213
3213
|
a.emit("setResizable", r.isResizable);
|
|
3214
|
-
}),
|
|
3214
|
+
}), X(() => r.responsive, () => {
|
|
3215
3215
|
r.responsive || (i("update:layout", h.value), a.emit("setColNum", r.colNum)), y();
|
|
3216
|
-
}),
|
|
3216
|
+
}), X(() => r.maxRows, () => {
|
|
3217
3217
|
a.emit("setMaxRows", r.maxRows);
|
|
3218
|
-
}),
|
|
3218
|
+
}), X(() => r.margin, () => {
|
|
3219
3219
|
v();
|
|
3220
|
-
}), t({ getLayoutEl: _ }), (e, t) => (
|
|
3220
|
+
}), t({ getLayoutEl: _ }), (e, t) => (U(), F("div", {
|
|
3221
3221
|
ref_key: "item",
|
|
3222
3222
|
ref: o,
|
|
3223
3223
|
class: "vue-grid-layout",
|
|
3224
3224
|
style: pe(l.value)
|
|
3225
|
-
}, [be(e.$slots, "default"), Te(
|
|
3225
|
+
}, [be(e.$slots, "default"), Te(R(En, {
|
|
3226
3226
|
ref_key: "gridItem",
|
|
3227
3227
|
ref: s,
|
|
3228
3228
|
class: "vue-grid-placeholder",
|
|
@@ -3239,14 +3239,14 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3239
3239
|
"i"
|
|
3240
3240
|
]), [[we, d.value]])], 4));
|
|
3241
3241
|
}
|
|
3242
|
-
}),
|
|
3242
|
+
}), On = { class: "item-content" }, kn = {
|
|
3243
3243
|
key: 1,
|
|
3244
3244
|
class: "text"
|
|
3245
|
-
},
|
|
3245
|
+
}, An = /*#__PURE__*/ f(/* @__PURE__ */ z({
|
|
3246
3246
|
__name: "gridView",
|
|
3247
3247
|
props: { config: {} },
|
|
3248
3248
|
setup(e) {
|
|
3249
|
-
let t = e, n =
|
|
3249
|
+
let t = e, n = M(() => {
|
|
3250
3250
|
let e = {};
|
|
3251
3251
|
return t.config.items.map((t, n) => {
|
|
3252
3252
|
let r = t.key;
|
|
@@ -3257,8 +3257,8 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3257
3257
|
config: t
|
|
3258
3258
|
};
|
|
3259
3259
|
});
|
|
3260
|
-
}), r =
|
|
3261
|
-
return ve(() => {}), (e, t) => (
|
|
3260
|
+
}), r = M(() => !!t.config.isBorder);
|
|
3261
|
+
return ve(() => {}), (e, t) => (U(), N(Y(Dn), {
|
|
3262
3262
|
layout: n.value,
|
|
3263
3263
|
"onUpdate:layout": t[0] ||= (e) => n.value = e,
|
|
3264
3264
|
"is-draggable": e.config.isDraggable,
|
|
@@ -3268,7 +3268,7 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3268
3268
|
"use-css-transforms": "",
|
|
3269
3269
|
"use-percentages": !0
|
|
3270
3270
|
}, {
|
|
3271
|
-
default:
|
|
3271
|
+
default: Z(() => [(U(!0), F(k, null, K(n.value, (t) => (U(), N(Y(En), {
|
|
3272
3272
|
x: t.x,
|
|
3273
3273
|
y: t.y,
|
|
3274
3274
|
w: t.w,
|
|
@@ -3282,11 +3282,11 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3282
3282
|
}),
|
|
3283
3283
|
style: pe({ padding: e.config.itemPadding || "0" })
|
|
3284
3284
|
}, {
|
|
3285
|
-
default:
|
|
3285
|
+
default: Z(() => [I("div", On, [t.config.component ? (U(), N(xe(t.config.component), de({
|
|
3286
3286
|
key: 0,
|
|
3287
3287
|
itemKey: t.config.key,
|
|
3288
3288
|
ref_for: !0
|
|
3289
|
-
}, t.config.props || {}), null, 16, ["itemKey"])) : (
|
|
3289
|
+
}, t.config.props || {}), null, 16, ["itemKey"])) : (U(), F("span", kn, "Layout: " + J(t.i), 1))])]),
|
|
3290
3290
|
_: 2
|
|
3291
3291
|
}, 1032, [
|
|
3292
3292
|
"x",
|
|
@@ -3304,69 +3304,69 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3304
3304
|
"is-resizable"
|
|
3305
3305
|
]));
|
|
3306
3306
|
}
|
|
3307
|
-
}), [["__scopeId", "data-v-668f099b"]]),
|
|
3308
|
-
if (Object.keys(
|
|
3307
|
+
}), [["__scopeId", "data-v-668f099b"]]), jn = {}, Mn = async (e) => {
|
|
3308
|
+
if (Object.keys(jn).length > 0) return jn[e] ? (await jn[e]()).default : (await jn.default()).default;
|
|
3309
3309
|
let t = /* #__PURE__ */ Object.assign({ "/src/components/gridPage/config/default/default.ts": () => import("./default-DmCqrYQi.js") }), n = a("gridPage");
|
|
3310
3310
|
Object.assign(t, n);
|
|
3311
3311
|
for (let e in t) {
|
|
3312
3312
|
let n = e.split("/"), r = n[n.length - 1].replace(".ts", "");
|
|
3313
|
-
|
|
3313
|
+
jn[r] = t[e];
|
|
3314
3314
|
}
|
|
3315
|
-
return
|
|
3316
|
-
},
|
|
3315
|
+
return jn[e] ? (await jn[e]()).default : (await jn.default()).default;
|
|
3316
|
+
}, Nn = (e) => {
|
|
3317
3317
|
if (e.items) for (let t of e.items) t.component &&= ue(t.component);
|
|
3318
|
-
},
|
|
3319
|
-
let r = (await
|
|
3318
|
+
}, Pn = async (e, { context: t, eventBus: n }) => {
|
|
3319
|
+
let r = (await Mn(e))({
|
|
3320
3320
|
menu_flag: e,
|
|
3321
3321
|
context: t,
|
|
3322
3322
|
eventBus: n
|
|
3323
3323
|
});
|
|
3324
|
-
return
|
|
3325
|
-
},
|
|
3324
|
+
return Nn(r), { config: r };
|
|
3325
|
+
}, Fn = { class: "grid-page-content" }, In = /* @__PURE__ */ z({
|
|
3326
3326
|
__name: "gridPage",
|
|
3327
3327
|
setup(e) {
|
|
3328
|
-
let t =
|
|
3329
|
-
a.value = o[o.length - 1],
|
|
3328
|
+
let t = Ue(), n = G(null), r = G({}), i = Ge(), a = G(""), o = t.path.split("/");
|
|
3329
|
+
a.value = o[o.length - 1], ye(O, {
|
|
3330
3330
|
context: r,
|
|
3331
3331
|
eventBus: i
|
|
3332
3332
|
}), ve(async () => {
|
|
3333
|
-
n.value = (await
|
|
3333
|
+
n.value = (await Pn(a.value, {
|
|
3334
3334
|
context: r.value,
|
|
3335
3335
|
eventBus: i
|
|
3336
3336
|
})).config, n.value.onMounted && await n.value.onMounted(r.value, i);
|
|
3337
|
-
}),
|
|
3337
|
+
}), H(() => {
|
|
3338
3338
|
n.value.onUnmounted && n.value.onUnmounted(r.value, i);
|
|
3339
3339
|
});
|
|
3340
|
-
let s =
|
|
3340
|
+
let s = M(() => {
|
|
3341
3341
|
if (n.value?.minWidth != null) return n.value.minWidth;
|
|
3342
|
-
}), c =
|
|
3342
|
+
}), c = M(() => {
|
|
3343
3343
|
if (n.value?.minHeight != null) return n.value.minHeight;
|
|
3344
3344
|
});
|
|
3345
|
-
return (e, t) => (
|
|
3346
|
-
default:
|
|
3345
|
+
return (e, t) => (U(), N(Wt, null, {
|
|
3346
|
+
default: Z(() => [I("div", {
|
|
3347
3347
|
class: "grid-page-wraper",
|
|
3348
3348
|
style: pe({
|
|
3349
3349
|
minWidth: s.value,
|
|
3350
3350
|
minHeight: c.value
|
|
3351
3351
|
})
|
|
3352
|
-
}, [
|
|
3352
|
+
}, [I("div", Fn, [n.value ? (U(), N(An, {
|
|
3353
3353
|
key: 0,
|
|
3354
3354
|
config: n.value
|
|
3355
|
-
}, null, 8, ["config"])) :
|
|
3355
|
+
}, null, 8, ["config"])) : P("", !0)])], 4)]),
|
|
3356
3356
|
_: 1
|
|
3357
3357
|
}));
|
|
3358
3358
|
}
|
|
3359
|
-
}),
|
|
3359
|
+
}), Ln = { class: "remote-page-shell" }, Rn = /*#__PURE__*/ f(/* @__PURE__ */ z({
|
|
3360
3360
|
__name: "index",
|
|
3361
3361
|
setup(e) {
|
|
3362
|
-
let t =
|
|
3362
|
+
let t = Ue(), n = i(), r = t.path.split("/"), a = {
|
|
3363
3363
|
app_flag: r[r.length - 2],
|
|
3364
3364
|
modalType: r[r.length - 1]
|
|
3365
|
-
}, o =
|
|
3365
|
+
}, o = G(null), s = M(() => o.value?.pageConfig ?? null), c = () => {
|
|
3366
3366
|
s.value?.required_condition && n.set_required_condition(a.modalType, s.value.required_condition);
|
|
3367
3367
|
};
|
|
3368
|
-
return
|
|
3369
|
-
default:
|
|
3368
|
+
return X(s, c), me(c), (e, t) => (U(), N(Wt, null, {
|
|
3369
|
+
default: Z(() => [I("div", Ln, [R(D, {
|
|
3370
3370
|
ref_key: "hostRef",
|
|
3371
3371
|
ref: o,
|
|
3372
3372
|
app_flag: a.app_flag,
|
|
@@ -3375,7 +3375,7 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3375
3375
|
_: 1
|
|
3376
3376
|
}));
|
|
3377
3377
|
}
|
|
3378
|
-
}), [["__scopeId", "data-v-1a19f1c4"]]),
|
|
3378
|
+
}), [["__scopeId", "data-v-1a19f1c4"]]), zn = { class: "view-item-container" }, Bn = { class: "view-name-container" }, Vn = { class: "view-name" }, Hn = /*#__PURE__*/ f(/* @__PURE__ */ z({
|
|
3379
3379
|
__name: "viewConfigCell",
|
|
3380
3380
|
props: {
|
|
3381
3381
|
fetchViews: { type: Function },
|
|
@@ -3385,14 +3385,14 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3385
3385
|
setViewData: { type: Function }
|
|
3386
3386
|
},
|
|
3387
3387
|
setup(e) {
|
|
3388
|
-
let { t } =
|
|
3388
|
+
let { t } = We(), n = e, r = d().currentOrg, i = (e) => {
|
|
3389
3389
|
n.currentView?.id === e.id ? (n.setCurrentView({ id: "no-view" }), n.setViewData(null)) : (n.setCurrentView(e), n.setViewData(e.data));
|
|
3390
3390
|
}, a = async (e) => {
|
|
3391
3391
|
try {
|
|
3392
3392
|
await ee({
|
|
3393
3393
|
org_id: r.id,
|
|
3394
3394
|
view_settings_id: e.id
|
|
3395
|
-
}), await
|
|
3395
|
+
}), await w({
|
|
3396
3396
|
org_id: r.id,
|
|
3397
3397
|
view_settings_id: e.id
|
|
3398
3398
|
}), Q.success(t("设置默认成功")), n.fetchViews();
|
|
@@ -3400,7 +3400,7 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3400
3400
|
Q.error(t("设置默认失败"));
|
|
3401
3401
|
}
|
|
3402
3402
|
}, o = (e) => {
|
|
3403
|
-
let i =
|
|
3403
|
+
let i = W({
|
|
3404
3404
|
open: !0,
|
|
3405
3405
|
loading: !1,
|
|
3406
3406
|
title: t("编辑视图"),
|
|
@@ -3420,11 +3420,11 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3420
3420
|
defaultValue: e.name,
|
|
3421
3421
|
placeholder: t("请输入视图名称")
|
|
3422
3422
|
}],
|
|
3423
|
-
rules:
|
|
3423
|
+
rules: W({ name: [{
|
|
3424
3424
|
required: !0,
|
|
3425
3425
|
message: t("请输入视图名称")
|
|
3426
3426
|
}] }),
|
|
3427
|
-
model:
|
|
3427
|
+
model: W({
|
|
3428
3428
|
name: e.name,
|
|
3429
3429
|
is_system: [e.is_system || !1]
|
|
3430
3430
|
})
|
|
@@ -3453,12 +3453,12 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3453
3453
|
defaultValue: [!1]
|
|
3454
3454
|
}), y(i);
|
|
3455
3455
|
}, s = (e) => {
|
|
3456
|
-
|
|
3456
|
+
De.confirm({
|
|
3457
3457
|
title: t("确认删除视图?"),
|
|
3458
3458
|
content: t("视图删除后不可恢复,是否确认删除?"),
|
|
3459
|
-
icon:
|
|
3459
|
+
icon: R(Pe),
|
|
3460
3460
|
onOk: async () => {
|
|
3461
|
-
await
|
|
3461
|
+
await ie({
|
|
3462
3462
|
org_id: r.id,
|
|
3463
3463
|
view_settings_id: e.id
|
|
3464
3464
|
}), Q.success(t("删除成功")), n.fetchViews();
|
|
@@ -3466,70 +3466,70 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3466
3466
|
});
|
|
3467
3467
|
};
|
|
3468
3468
|
return (e, t) => {
|
|
3469
|
-
let n =
|
|
3470
|
-
return
|
|
3469
|
+
let n = q("a-tag"), r = q("a-tooltip"), c = q("a-button");
|
|
3470
|
+
return U(), F("div", zn, [I("div", {
|
|
3471
3471
|
class: "view-item-row",
|
|
3472
3472
|
onClick: t[0] ||= (t) => i(e.record)
|
|
3473
|
-
}, [
|
|
3474
|
-
default:
|
|
3473
|
+
}, [R(r, { title: e.record.name }, {
|
|
3474
|
+
default: Z(() => [I("div", Bn, [I("span", Vn, J(e.record.name), 1), e.record.is_default ? (U(), N(n, {
|
|
3475
3475
|
key: 0,
|
|
3476
3476
|
color: "blue",
|
|
3477
3477
|
size: "small",
|
|
3478
3478
|
class: "view-default-tag"
|
|
3479
3479
|
}, {
|
|
3480
|
-
default:
|
|
3480
|
+
default: Z(() => [L(J(e.$t("默认")), 1)]),
|
|
3481
3481
|
_: 1
|
|
3482
|
-
})) :
|
|
3482
|
+
})) : P("", !0)])]),
|
|
3483
3483
|
_: 1
|
|
3484
|
-
}, 8, ["title"]), e.record.num ? (
|
|
3484
|
+
}, 8, ["title"]), e.record.num ? (U(), F("span", {
|
|
3485
3485
|
key: 0,
|
|
3486
3486
|
class: "view-num",
|
|
3487
3487
|
style: pe([{ float: "right" }, e.currentView?.id === e.record.id ? {
|
|
3488
3488
|
color: "#1890ff",
|
|
3489
3489
|
fontWeight: "bold"
|
|
3490
3490
|
} : {}])
|
|
3491
|
-
}, [
|
|
3492
|
-
default:
|
|
3491
|
+
}, [R(r, { title: e.record.num }, {
|
|
3492
|
+
default: Z(() => [L(J(e.record.num), 1)]),
|
|
3493
3493
|
_: 1
|
|
3494
|
-
}, 8, ["title"])], 4)) :
|
|
3494
|
+
}, 8, ["title"])], 4)) : P("", !0)]), I("div", { class: fe({
|
|
3495
3495
|
"view-actions": !0,
|
|
3496
3496
|
current: e.currentView?.id === e.record.id
|
|
3497
3497
|
}) }, [
|
|
3498
|
-
|
|
3499
|
-
default:
|
|
3498
|
+
R(r, { title: e.$t("设为默认") }, {
|
|
3499
|
+
default: Z(() => [R(c, {
|
|
3500
3500
|
type: "text",
|
|
3501
3501
|
size: "small",
|
|
3502
3502
|
onClick: t[1] ||= (t) => a(e.record)
|
|
3503
3503
|
}, {
|
|
3504
|
-
icon:
|
|
3504
|
+
icon: Z(() => [e.record.is_default ? (U(), N(Y(Ve), {
|
|
3505
3505
|
key: 0,
|
|
3506
3506
|
style: { color: "#fadb14" }
|
|
3507
|
-
})) : (
|
|
3507
|
+
})) : (U(), N(Y(He), { key: 1 }))]),
|
|
3508
3508
|
_: 1
|
|
3509
3509
|
})]),
|
|
3510
3510
|
_: 1
|
|
3511
3511
|
}, 8, ["title"]),
|
|
3512
|
-
|
|
3512
|
+
R(c, {
|
|
3513
3513
|
type: "text",
|
|
3514
3514
|
size: "small",
|
|
3515
3515
|
onClick: t[2] ||= (t) => o(e.record)
|
|
3516
3516
|
}, {
|
|
3517
|
-
icon:
|
|
3517
|
+
icon: Z(() => [R(Y(Ne))]),
|
|
3518
3518
|
_: 1
|
|
3519
3519
|
}),
|
|
3520
|
-
|
|
3520
|
+
R(c, {
|
|
3521
3521
|
type: "text",
|
|
3522
3522
|
size: "small",
|
|
3523
3523
|
danger: "",
|
|
3524
3524
|
onClick: t[3] ||= (t) => s(e.record)
|
|
3525
3525
|
}, {
|
|
3526
|
-
icon:
|
|
3526
|
+
icon: Z(() => [R(Y(Me))]),
|
|
3527
3527
|
_: 1
|
|
3528
3528
|
})
|
|
3529
3529
|
], 2)]);
|
|
3530
3530
|
};
|
|
3531
3531
|
}
|
|
3532
|
-
}), [["__scopeId", "data-v-62191347"]]),
|
|
3532
|
+
}), [["__scopeId", "data-v-62191347"]]), Un = { style: { "font-weight": "700" } }, Wn = { style: { "font-weight": "700" } }, Gn = "background: #ffffff;border-radius: 4px;margin-bottom: 2px;border: 0;overflow: hidden;", Kn = /* @__PURE__ */ z({
|
|
3533
3533
|
__name: "viewsConfig",
|
|
3534
3534
|
props: {
|
|
3535
3535
|
view_key: {
|
|
@@ -3554,7 +3554,7 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3554
3554
|
}
|
|
3555
3555
|
},
|
|
3556
3556
|
setup(e) {
|
|
3557
|
-
let t = e, n =
|
|
3557
|
+
let t = e, n = G(["personal", "public"]), { t: r } = We(), i = d(), a = i.currentOrg, o = i.userid, s = (e) => t.tableProState?.setViewData(e), c = () => t.tableProState?.getViewData(), l = M(() => t.tableProState?.viewDataList || []), u = () => t.tableProState?.fetchViews(), f = M({
|
|
3558
3558
|
get: () => t.tableProState?.currentView,
|
|
3559
3559
|
set: (e) => {
|
|
3560
3560
|
t.tableProState.currentView = e;
|
|
@@ -3564,8 +3564,8 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3564
3564
|
}, m = [{
|
|
3565
3565
|
dataIndex: "name",
|
|
3566
3566
|
key: "name"
|
|
3567
|
-
}], h =
|
|
3568
|
-
let n =
|
|
3567
|
+
}], h = M(() => [f.value?.id]), g = M(() => (l.value || []).filter((e) => !!e.user_id).sort((e, t) => e.sort == t.sort ? e.id - t.id : e.sort - t.sort)), _ = M(() => (l.value || []).filter((e) => !e.user_id).sort((e, t) => e.sort == t.sort ? e.id - t.id : e.sort - t.sort)), v = (e) => {
|
|
3568
|
+
let n = W({
|
|
3569
3569
|
open: !0,
|
|
3570
3570
|
loading: !1,
|
|
3571
3571
|
title: r("新建视图"),
|
|
@@ -3585,11 +3585,11 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3585
3585
|
defaultValue: "",
|
|
3586
3586
|
placeholder: r("请输入视图名称")
|
|
3587
3587
|
}],
|
|
3588
|
-
rules:
|
|
3588
|
+
rules: W({ name: [{
|
|
3589
3589
|
required: !0,
|
|
3590
3590
|
message: r("请输入视图名称")
|
|
3591
3591
|
}] }),
|
|
3592
|
-
model:
|
|
3592
|
+
model: W({
|
|
3593
3593
|
name: "",
|
|
3594
3594
|
is_system: [!1]
|
|
3595
3595
|
})
|
|
@@ -3608,7 +3608,7 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3608
3608
|
}]
|
|
3609
3609
|
},
|
|
3610
3610
|
ok: async (n) => {
|
|
3611
|
-
let i = e || n.view_type || "personal", s = await
|
|
3611
|
+
let i = e || n.view_type || "personal", s = await re({
|
|
3612
3612
|
org_id: a.id,
|
|
3613
3613
|
user_id: i === "personal" ? o : null,
|
|
3614
3614
|
name: n.name,
|
|
@@ -3642,7 +3642,7 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3642
3642
|
defaultValue: [!1]
|
|
3643
3643
|
}), y(n);
|
|
3644
3644
|
}, b = (e) => {
|
|
3645
|
-
y(
|
|
3645
|
+
y(W({
|
|
3646
3646
|
open: !0,
|
|
3647
3647
|
component: "ViewEditModal",
|
|
3648
3648
|
compObj: {
|
|
@@ -3650,7 +3650,7 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3650
3650
|
data: e == "personal" ? g.value : _.value
|
|
3651
3651
|
},
|
|
3652
3652
|
ok: (e) => {
|
|
3653
|
-
e && e.length > 0 ?
|
|
3653
|
+
e && e.length > 0 ? C({
|
|
3654
3654
|
org_id: a.id,
|
|
3655
3655
|
view_settings_ids: e
|
|
3656
3656
|
}).then(() => {
|
|
@@ -3662,38 +3662,38 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3662
3662
|
}
|
|
3663
3663
|
}));
|
|
3664
3664
|
};
|
|
3665
|
-
return
|
|
3665
|
+
return X(() => t.tableProState?.currentView, (e) => {
|
|
3666
3666
|
e && (window.location.hash = `${t.hashPrefix}${e.uid}`);
|
|
3667
3667
|
}), ve(() => {
|
|
3668
3668
|
u();
|
|
3669
3669
|
}), (e, t) => {
|
|
3670
|
-
let r =
|
|
3671
|
-
return
|
|
3670
|
+
let r = q("a-tooltip"), i = q("s-table"), a = q("a-collapse-panel"), o = q("a-collapse");
|
|
3671
|
+
return U(), N(o, {
|
|
3672
3672
|
activeKey: n.value,
|
|
3673
3673
|
"onUpdate:activeKey": t[4] ||= (e) => n.value = e,
|
|
3674
3674
|
bordered: !1,
|
|
3675
3675
|
class: "collapses",
|
|
3676
3676
|
style: { background: "rgb(255, 255, 255)" }
|
|
3677
3677
|
}, {
|
|
3678
|
-
expandIcon:
|
|
3679
|
-
default:
|
|
3678
|
+
expandIcon: Z(({ isActive: e }) => [R(Y(ke), { rotate: e ? 90 : 0 }, null, 8, ["rotate"])]),
|
|
3679
|
+
default: Z(() => [R(a, {
|
|
3680
3680
|
key: "personal",
|
|
3681
|
-
style:
|
|
3681
|
+
style: Gn
|
|
3682
3682
|
}, {
|
|
3683
|
-
header:
|
|
3684
|
-
extra:
|
|
3685
|
-
title:
|
|
3686
|
-
default:
|
|
3683
|
+
header: Z(() => [I("span", Un, J(e.$t("个人视图")), 1)]),
|
|
3684
|
+
extra: Z(() => [R(r, null, {
|
|
3685
|
+
title: Z(() => [L(J(e.$t("个人视图管理")), 1)]),
|
|
3686
|
+
default: Z(() => [R(Y(Be), {
|
|
3687
3687
|
style: { "margin-right": "10px" },
|
|
3688
|
-
onClick: t[0] ||=
|
|
3688
|
+
onClick: t[0] ||= Ee((e) => b("personal"), ["stop"])
|
|
3689
3689
|
})]),
|
|
3690
3690
|
_: 1
|
|
3691
|
-
}),
|
|
3692
|
-
title:
|
|
3693
|
-
default:
|
|
3691
|
+
}), R(r, null, {
|
|
3692
|
+
title: Z(() => [L(J(e.$t("新建个人视图")), 1)]),
|
|
3693
|
+
default: Z(() => [R(Y(Re), { onClick: t[1] ||= Ee((e) => v("personal"), ["stop"]) })]),
|
|
3694
3694
|
_: 1
|
|
3695
3695
|
})]),
|
|
3696
|
-
default:
|
|
3696
|
+
default: Z(() => [g.value?.length > 0 ? (U(), N(i, {
|
|
3697
3697
|
key: 0,
|
|
3698
3698
|
selectedRowKeys: h.value,
|
|
3699
3699
|
columns: m,
|
|
@@ -3704,35 +3704,35 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3704
3704
|
"row-key": "id",
|
|
3705
3705
|
"range-selection": !1
|
|
3706
3706
|
}, {
|
|
3707
|
-
bodyCell:
|
|
3707
|
+
bodyCell: Z(({ column: e, record: t }) => [e.dataIndex === "name" ? (U(), N(Hn, {
|
|
3708
3708
|
key: 0,
|
|
3709
3709
|
fetchViews: u,
|
|
3710
3710
|
record: t,
|
|
3711
3711
|
currentView: f.value,
|
|
3712
3712
|
setViewData: s,
|
|
3713
3713
|
setCurrentView: p
|
|
3714
|
-
}, null, 8, ["record", "currentView"])) :
|
|
3714
|
+
}, null, 8, ["record", "currentView"])) : P("", !0)]),
|
|
3715
3715
|
_: 1
|
|
3716
|
-
}, 8, ["selectedRowKeys", "dataSource"])) :
|
|
3716
|
+
}, 8, ["selectedRowKeys", "dataSource"])) : P("", !0)]),
|
|
3717
3717
|
_: 1
|
|
3718
|
-
}),
|
|
3718
|
+
}), R(a, {
|
|
3719
3719
|
key: "public",
|
|
3720
|
-
style:
|
|
3720
|
+
style: Gn
|
|
3721
3721
|
}, {
|
|
3722
|
-
header:
|
|
3723
|
-
extra:
|
|
3724
|
-
title:
|
|
3725
|
-
default:
|
|
3722
|
+
header: Z(() => [I("span", Wn, J(e.$t("公共视图")), 1)]),
|
|
3723
|
+
extra: Z(() => [R(r, null, {
|
|
3724
|
+
title: Z(() => [L(J(e.$t("公共视图管理")), 1)]),
|
|
3725
|
+
default: Z(() => [R(Y(Be), {
|
|
3726
3726
|
style: { "margin-right": "10px" },
|
|
3727
|
-
onClick: t[2] ||=
|
|
3727
|
+
onClick: t[2] ||= Ee((e) => b("public"), ["stop"])
|
|
3728
3728
|
})]),
|
|
3729
3729
|
_: 1
|
|
3730
|
-
}),
|
|
3731
|
-
title:
|
|
3732
|
-
default:
|
|
3730
|
+
}), R(r, null, {
|
|
3731
|
+
title: Z(() => [L(J(e.$t("新建公共视图")), 1)]),
|
|
3732
|
+
default: Z(() => [R(Y(Re), { onClick: t[3] ||= Ee((e) => v("public"), ["stop"]) })]),
|
|
3733
3733
|
_: 1
|
|
3734
3734
|
})]),
|
|
3735
|
-
default:
|
|
3735
|
+
default: Z(() => [_.value?.length > 0 ? (U(), N(i, {
|
|
3736
3736
|
key: 0,
|
|
3737
3737
|
selectedRowKeys: h.value,
|
|
3738
3738
|
columns: m,
|
|
@@ -3743,28 +3743,28 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3743
3743
|
"row-key": "id",
|
|
3744
3744
|
"range-selection": !1
|
|
3745
3745
|
}, {
|
|
3746
|
-
bodyCell:
|
|
3746
|
+
bodyCell: Z(({ column: e, record: t }) => [e.dataIndex === "name" ? (U(), N(Hn, {
|
|
3747
3747
|
key: 0,
|
|
3748
3748
|
fetchViews: u,
|
|
3749
3749
|
record: t,
|
|
3750
3750
|
currentView: f.value,
|
|
3751
3751
|
setViewData: s,
|
|
3752
3752
|
setCurrentView: p
|
|
3753
|
-
}, null, 8, ["record", "currentView"])) :
|
|
3753
|
+
}, null, 8, ["record", "currentView"])) : P("", !0)]),
|
|
3754
3754
|
_: 1
|
|
3755
|
-
}, 8, ["selectedRowKeys", "dataSource"])) :
|
|
3755
|
+
}, 8, ["selectedRowKeys", "dataSource"])) : P("", !0)]),
|
|
3756
3756
|
_: 1
|
|
3757
3757
|
})]),
|
|
3758
3758
|
_: 1
|
|
3759
3759
|
}, 8, ["activeKey"]);
|
|
3760
3760
|
};
|
|
3761
3761
|
}
|
|
3762
|
-
}),
|
|
3762
|
+
}), qn = {
|
|
3763
3763
|
key: 0,
|
|
3764
3764
|
class: "config-container"
|
|
3765
|
-
},
|
|
3765
|
+
}, Jn = /*#__PURE__*/ f(/* @__PURE__ */ z({
|
|
3766
3766
|
__name: "leftLayout",
|
|
3767
|
-
props: /*@__PURE__*/
|
|
3767
|
+
props: /*@__PURE__*/ B({
|
|
3768
3768
|
open: {
|
|
3769
3769
|
type: Boolean,
|
|
3770
3770
|
default: !0
|
|
@@ -3785,13 +3785,13 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3785
3785
|
tableMode: {},
|
|
3786
3786
|
tableModeModifiers: {}
|
|
3787
3787
|
}),
|
|
3788
|
-
emits: /*@__PURE__*/
|
|
3788
|
+
emits: /*@__PURE__*/ B([
|
|
3789
3789
|
"update:open",
|
|
3790
3790
|
"columnsChange",
|
|
3791
3791
|
"update:tableMode"
|
|
3792
3792
|
], ["update:tableMode"]),
|
|
3793
3793
|
setup(e, { emit: t }) {
|
|
3794
|
-
let n = e, r = t, i =
|
|
3794
|
+
let n = e, r = t, i = M(() => n.pageConfig?.enable_view_types || []), a = Ce(e, "tableMode"), o = M({
|
|
3795
3795
|
get: () => {
|
|
3796
3796
|
if (!n.pageConfig?.enable_view_types?.length) return;
|
|
3797
3797
|
let e = n.tableMode || n.pageConfig?.default_view_type || "normal";
|
|
@@ -3801,26 +3801,26 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3801
3801
|
r("update:tableMode", e);
|
|
3802
3802
|
}
|
|
3803
3803
|
});
|
|
3804
|
-
|
|
3804
|
+
X(() => n.tableMode, (e) => {
|
|
3805
3805
|
e === "pivot" ? o.value = "pivot" : e === "pivot_charts" ? o.value = "pivot_charts" : o.value = "normal";
|
|
3806
3806
|
}, { immediate: !0 });
|
|
3807
|
-
let s = le("tableProStateProxy"), c =
|
|
3807
|
+
let s = le("tableProStateProxy"), c = M(() => `table_pro_${s.value?.config?.key}`);
|
|
3808
3808
|
return (t, n) => {
|
|
3809
|
-
let r =
|
|
3810
|
-
return e.open ? (
|
|
3809
|
+
let r = q("a-tab-pane"), l = q("a-tabs");
|
|
3810
|
+
return e.open ? (U(), F("div", qn, [R(l, {
|
|
3811
3811
|
activeKey: o.value,
|
|
3812
3812
|
"onUpdate:activeKey": n[0] ||= (e) => o.value = e
|
|
3813
3813
|
}, {
|
|
3814
|
-
default:
|
|
3815
|
-
i.value.includes("normal") ? (
|
|
3814
|
+
default: Z(() => [
|
|
3815
|
+
i.value.includes("normal") ? (U(), N(r, {
|
|
3816
3816
|
key: "normal",
|
|
3817
3817
|
tab: "标准"
|
|
3818
3818
|
}, {
|
|
3819
|
-
default:
|
|
3819
|
+
default: Z(() => [Y(s)?.config && a.value === "normal" ? (U(), N(Kn, {
|
|
3820
3820
|
key: 0,
|
|
3821
3821
|
view_key: c.value,
|
|
3822
|
-
view_flag_name:
|
|
3823
|
-
tableProState:
|
|
3822
|
+
view_flag_name: Y(s).config.title,
|
|
3823
|
+
tableProState: Y(s),
|
|
3824
3824
|
eventBus: e.eventBus,
|
|
3825
3825
|
hashPrefix: ""
|
|
3826
3826
|
}, null, 8, [
|
|
@@ -3828,18 +3828,18 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3828
3828
|
"view_flag_name",
|
|
3829
3829
|
"tableProState",
|
|
3830
3830
|
"eventBus"
|
|
3831
|
-
])) :
|
|
3831
|
+
])) : P("", !0)]),
|
|
3832
3832
|
_: 1
|
|
3833
|
-
})) :
|
|
3834
|
-
i.value.includes("pivot") ? (
|
|
3833
|
+
})) : P("", !0),
|
|
3834
|
+
i.value.includes("pivot") ? (U(), N(r, {
|
|
3835
3835
|
key: "pivot",
|
|
3836
3836
|
tab: "透视表"
|
|
3837
3837
|
}, {
|
|
3838
|
-
default:
|
|
3838
|
+
default: Z(() => [Y(s)?.config && a.value === "pivot" ? (U(), N(Kn, {
|
|
3839
3839
|
key: 0,
|
|
3840
3840
|
view_key: c.value,
|
|
3841
|
-
view_flag_name:
|
|
3842
|
-
tableProState:
|
|
3841
|
+
view_flag_name: Y(s).config.title,
|
|
3842
|
+
tableProState: Y(s),
|
|
3843
3843
|
eventBus: e.eventBus,
|
|
3844
3844
|
hashPrefix: "pivot:"
|
|
3845
3845
|
}, null, 8, [
|
|
@@ -3847,18 +3847,18 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3847
3847
|
"view_flag_name",
|
|
3848
3848
|
"tableProState",
|
|
3849
3849
|
"eventBus"
|
|
3850
|
-
])) :
|
|
3850
|
+
])) : P("", !0)]),
|
|
3851
3851
|
_: 1
|
|
3852
|
-
})) :
|
|
3853
|
-
i.value.includes("pivot_charts") ? (
|
|
3852
|
+
})) : P("", !0),
|
|
3853
|
+
i.value.includes("pivot_charts") ? (U(), N(r, {
|
|
3854
3854
|
key: "pivot_charts",
|
|
3855
3855
|
tab: "透视图"
|
|
3856
3856
|
}, {
|
|
3857
|
-
default:
|
|
3857
|
+
default: Z(() => [Y(s)?.config && a.value === "pivot_charts" ? (U(), N(Kn, {
|
|
3858
3858
|
key: 0,
|
|
3859
3859
|
view_key: c.value,
|
|
3860
|
-
view_flag_name:
|
|
3861
|
-
tableProState:
|
|
3860
|
+
view_flag_name: Y(s).config.title,
|
|
3861
|
+
tableProState: Y(s),
|
|
3862
3862
|
eventBus: e.eventBus,
|
|
3863
3863
|
hashPrefix: "pivotcharts:"
|
|
3864
3864
|
}, null, 8, [
|
|
@@ -3866,61 +3866,61 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3866
3866
|
"view_flag_name",
|
|
3867
3867
|
"tableProState",
|
|
3868
3868
|
"eventBus"
|
|
3869
|
-
])) :
|
|
3869
|
+
])) : P("", !0)]),
|
|
3870
3870
|
_: 1
|
|
3871
|
-
})) :
|
|
3871
|
+
})) : P("", !0)
|
|
3872
3872
|
]),
|
|
3873
3873
|
_: 1
|
|
3874
|
-
}, 8, ["activeKey"])])) :
|
|
3874
|
+
}, 8, ["activeKey"])])) : P("", !0);
|
|
3875
3875
|
};
|
|
3876
3876
|
}
|
|
3877
|
-
}), [["__scopeId", "data-v-0e9c2a9c"]]),
|
|
3877
|
+
}), [["__scopeId", "data-v-0e9c2a9c"]]), Yn = {
|
|
3878
3878
|
key: 0,
|
|
3879
3879
|
class: "global-filter-loading"
|
|
3880
|
-
},
|
|
3880
|
+
}, Xn = 1e3, Zn = /*#__PURE__*/ f(/* @__PURE__ */ z({
|
|
3881
3881
|
__name: "FilterLoading",
|
|
3882
3882
|
props: { visible: {
|
|
3883
3883
|
type: Boolean,
|
|
3884
3884
|
default: !1
|
|
3885
3885
|
} },
|
|
3886
3886
|
setup(e) {
|
|
3887
|
-
let t = e, n =
|
|
3888
|
-
return
|
|
3887
|
+
let t = e, n = G(!1), r = G(0), i = null;
|
|
3888
|
+
return X(() => t.visible, (e) => {
|
|
3889
3889
|
if (e) i = setTimeout(() => {
|
|
3890
3890
|
i = null, r.value = Date.now(), n.value = !0;
|
|
3891
3891
|
}, 500);
|
|
3892
3892
|
else {
|
|
3893
3893
|
if (i && clearTimeout(i), !n.value) return;
|
|
3894
|
-
let e =
|
|
3894
|
+
let e = Xn - (Date.now() - r.value);
|
|
3895
3895
|
e > 0 ? setTimeout(() => {
|
|
3896
3896
|
n.value = !1;
|
|
3897
3897
|
}, e) : n.value = !1;
|
|
3898
3898
|
}
|
|
3899
3899
|
}), (e, t) => {
|
|
3900
|
-
let r =
|
|
3901
|
-
return n.value ? (
|
|
3900
|
+
let r = q("a-spin");
|
|
3901
|
+
return n.value ? (U(), F("div", Yn, [R(r, { size: "large" }), t[0] ||= I("div", { class: "global-filter-loading__text" }, "数据定位中,请稍候……", -1)])) : P("", !0);
|
|
3902
3902
|
};
|
|
3903
3903
|
}
|
|
3904
|
-
}), [["__scopeId", "data-v-94fc86dc"]]),
|
|
3904
|
+
}), [["__scopeId", "data-v-94fc86dc"]]), Qn = /* @__PURE__ */ e({ default: () => $n }), $n = (e, { model_app: t }) => ({
|
|
3905
3905
|
head_btn_list: [],
|
|
3906
3906
|
default_search_condition_config_list: [],
|
|
3907
3907
|
condition_group_config_list: [],
|
|
3908
3908
|
advanced_base_conditions: []
|
|
3909
|
-
}),
|
|
3909
|
+
}), er = p(), tr = "db_view", nr = /* @__PURE__ */ "btn_list.head_btn_list.is_selection.rowSelection.is_pagination.pageSize.page_size_options.customCell.customRow.customHeaderCell.isView.default_hide_view.enable_view_types.default_view_type.view_display_type.pivot_table_max_records.advanced_base_conditions.default_search_condition_config_list.condition_group_config_list.base_search_condition_config_list.baseColumns.rowKey.default_column_field.required_condition.refresh_type.i18n.detailConfigs".split("."), rr = (e) => {
|
|
3910
3910
|
let t = {};
|
|
3911
3911
|
if (!e) return t;
|
|
3912
|
-
for (let n of
|
|
3912
|
+
for (let n of nr) e[n] !== void 0 && (t[n] = e[n]);
|
|
3913
3913
|
return t;
|
|
3914
|
-
},
|
|
3915
|
-
if (Object.keys(
|
|
3916
|
-
let e = /* #__PURE__ */ Object.assign({ "/src/components/sql_db_view/configs/demo/example.ts":
|
|
3914
|
+
}, ir = {}, ar = () => {
|
|
3915
|
+
if (Object.keys(ir).length > 0) return;
|
|
3916
|
+
let e = /* #__PURE__ */ Object.assign({ "/src/components/sql_db_view/configs/demo/example.ts": Qn }), t = a("sql_db_view");
|
|
3917
3917
|
Object.assign(e, t), Object.keys(e).forEach((t) => {
|
|
3918
3918
|
let n = t.split("/"), r = n[n.length - 1].replace(".ts", "");
|
|
3919
|
-
r.endsWith("-config") || (
|
|
3919
|
+
r.endsWith("-config") || (ir[r] = e[t].default);
|
|
3920
3920
|
});
|
|
3921
|
-
},
|
|
3921
|
+
}, or = (e, t) => {
|
|
3922
3922
|
if (!t) return e;
|
|
3923
|
-
let n = (0,
|
|
3923
|
+
let n = (0, er.cloneDeep)(e || []), r = /* @__PURE__ */ new Map();
|
|
3924
3924
|
n.forEach((e, t) => {
|
|
3925
3925
|
delete e._key, r.set(e.name, t);
|
|
3926
3926
|
});
|
|
@@ -3930,23 +3930,23 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3930
3930
|
let t = r.get(e.name);
|
|
3931
3931
|
if (t !== void 0) {
|
|
3932
3932
|
let r = n[t];
|
|
3933
|
-
e.children && r.children && (r.children =
|
|
3934
|
-
let i = (0,
|
|
3933
|
+
e.children && r.children && (r.children = or(r.children, e.children));
|
|
3934
|
+
let i = (0, er.cloneDeep)(e);
|
|
3935
3935
|
delete i.children, Object.assign(r, i);
|
|
3936
3936
|
} else {
|
|
3937
|
-
let t = (0,
|
|
3938
|
-
n.push(t), t.children &&=
|
|
3937
|
+
let t = (0, er.cloneDeep)(e);
|
|
3938
|
+
n.push(t), t.children &&= or([], t.children);
|
|
3939
3939
|
}
|
|
3940
3940
|
}), n;
|
|
3941
|
-
},
|
|
3942
|
-
btn_list:
|
|
3943
|
-
head_btn_list:
|
|
3944
|
-
},
|
|
3945
|
-
let n = (0,
|
|
3941
|
+
}, sr = {
|
|
3942
|
+
btn_list: or,
|
|
3943
|
+
head_btn_list: or
|
|
3944
|
+
}, cr = (e, t) => {
|
|
3945
|
+
let n = (0, er.cloneDeep)(e);
|
|
3946
3946
|
Object.keys(t).forEach((r) => {
|
|
3947
|
-
|
|
3947
|
+
sr[r] ? n[r] = sr[r](e[r], t[r]) : n[r] = t[r];
|
|
3948
3948
|
}), Object.assign(e, n);
|
|
3949
|
-
},
|
|
3949
|
+
}, lr = { baseColumns: (e) => {
|
|
3950
3950
|
if (!e || !Array.isArray(e)) return e;
|
|
3951
3951
|
let t = r(), i = n();
|
|
3952
3952
|
for (let n of e) if (n.cellComponent && !n.formatExcelValue) {
|
|
@@ -3957,28 +3957,28 @@ var Tn = /* @__PURE__ */ R({
|
|
|
3957
3957
|
}
|
|
3958
3958
|
}
|
|
3959
3959
|
return e;
|
|
3960
|
-
} },
|
|
3960
|
+
} }, ur = (e) => {
|
|
3961
3961
|
Object.keys(e).forEach((t) => {
|
|
3962
|
-
|
|
3962
|
+
lr[t] && (e[t] = lr[t](e[t]));
|
|
3963
3963
|
});
|
|
3964
|
-
},
|
|
3965
|
-
queryData: `/${
|
|
3966
|
-
countData: `/${
|
|
3967
|
-
queryConditionGroupData: `/${
|
|
3968
|
-
getData: `/${
|
|
3969
|
-
fieldSearchConfigUrl: `/${
|
|
3970
|
-
obtainColumnDataUrl: `/${
|
|
3971
|
-
pivotTableUrl: `/${
|
|
3972
|
-
pivotChartsUrl: `/${
|
|
3973
|
-
}),
|
|
3964
|
+
}, dr = (e) => ({
|
|
3965
|
+
queryData: `/${tr}/sqlview_query_${e}_list`,
|
|
3966
|
+
countData: `/${tr}/sqlview_query_${e}_count`,
|
|
3967
|
+
queryConditionGroupData: `/${tr}/sqlview_query_${e}_group`,
|
|
3968
|
+
getData: `/${tr}/sqlview_get_${e}`,
|
|
3969
|
+
fieldSearchConfigUrl: `/${tr}/sqlview_obtain_${e}_field_search_config`,
|
|
3970
|
+
obtainColumnDataUrl: `/${tr}/sqlview_obtain_${e}_column_data`,
|
|
3971
|
+
pivotTableUrl: `/${tr}/sqlview_query_${e}_pivot_table_rust`,
|
|
3972
|
+
pivotChartsUrl: `/${tr}/sqlview_query_${e}_pivot_charts_rust`
|
|
3973
|
+
}), fr = async (e, n, r, i) => {
|
|
3974
3974
|
let { to_i18n: a = !0 } = i || {};
|
|
3975
|
-
|
|
3975
|
+
ar();
|
|
3976
3976
|
let o = e.split("-")[1], s = t(), [c, l] = await Promise.all([m({
|
|
3977
3977
|
org_id: n,
|
|
3978
3978
|
flag: o
|
|
3979
|
-
}, `/${
|
|
3979
|
+
}, `/${tr}/get_page_config`, !1, { skip_error: !0 }), m({
|
|
3980
3980
|
org_id: n,
|
|
3981
|
-
flag: `${
|
|
3981
|
+
flag: `${tr}-${o}_config`
|
|
3982
3982
|
}, "/sys/get_global_custom_data_by_flag_without_org_id")]), u = {
|
|
3983
3983
|
is_selection: !1,
|
|
3984
3984
|
rowSelection: {
|
|
@@ -4009,6 +4009,7 @@ var Tn = /* @__PURE__ */ R({
|
|
|
4009
4009
|
"pivot_charts"
|
|
4010
4010
|
],
|
|
4011
4011
|
default_view_type: "normal",
|
|
4012
|
+
view_display_type: "left_grid",
|
|
4012
4013
|
pivot_table_max_records: 1e4,
|
|
4013
4014
|
advanced_base_conditions: [],
|
|
4014
4015
|
default_search_condition_config_list: null,
|
|
@@ -4024,47 +4025,95 @@ var Tn = /* @__PURE__ */ R({
|
|
|
4024
4025
|
btn_list: null,
|
|
4025
4026
|
head_btn_list: null
|
|
4026
4027
|
};
|
|
4027
|
-
Object.assign(u,
|
|
4028
|
-
let d = (0,
|
|
4029
|
-
f &&
|
|
4028
|
+
Object.assign(u, rr(c || {})), Object.assign(u, rr(l || {}));
|
|
4029
|
+
let d = (0, er.cloneDeep)(u), f = ir[o] || ir[e];
|
|
4030
|
+
f && cr(d, rr((0, er.cloneDeep)(f(r, { model_app: tr })))), ur(d);
|
|
4030
4031
|
let p = d;
|
|
4031
|
-
return a && s.VITE_APP_ENABLE_ZH_EN && (p =
|
|
4032
|
-
},
|
|
4032
|
+
return a && s.VITE_APP_ENABLE_ZH_EN && (p = ae(d, r, e)), p;
|
|
4033
|
+
}, pr = { class: "table-wrapper" }, mr = { class: "filter-message" }, hr = { key: 0 }, gr = { key: 0 }, _r = { key: 0 }, vr = /*#__PURE__*/ f(/* @__PURE__ */ z({
|
|
4033
4034
|
__name: "rightTable",
|
|
4034
|
-
props: /*@__PURE__*/
|
|
4035
|
+
props: /*@__PURE__*/ B({
|
|
4035
4036
|
eventBus: { default: null },
|
|
4036
4037
|
pageConfig: { default: null },
|
|
4037
4038
|
modalType: {},
|
|
4038
4039
|
tableMode: { default: "normal" },
|
|
4039
|
-
setting_drawer_width: {}
|
|
4040
|
+
setting_drawer_width: {},
|
|
4041
|
+
view_display_type: { default: "left_grid" }
|
|
4040
4042
|
}, {
|
|
4041
4043
|
leftOpen: { default: !0 },
|
|
4042
4044
|
leftOpenModifiers: {}
|
|
4043
4045
|
}),
|
|
4044
|
-
emits: /*@__PURE__*/
|
|
4045
|
-
setup(e, { expose:
|
|
4046
|
-
let
|
|
4046
|
+
emits: /*@__PURE__*/ B(["changeMode"], ["update:leftOpen"]),
|
|
4047
|
+
setup(e, { expose: n, emit: r }) {
|
|
4048
|
+
let i = G(null), a = G(null), o = G(null), s = e, c = r, l = d(), { t: u } = We(), f = Ue(), p = G(null), h = G(null), g = G(null), v = G(""), y = G([]), b = G(""), x = G(!1), S = M(() => s.tableMode === "pivot" ? h.value : s.tableMode === "pivot_charts" ? g.value : p.value), ee = Ce(e, "leftOpen");
|
|
4047
4049
|
ve(() => {
|
|
4048
|
-
|
|
4049
|
-
}),
|
|
4050
|
-
await
|
|
4051
|
-
let t = e === "pivot" ? "pivot:" : e === "pivot_charts" ? "pivotcharts:" : "", n =
|
|
4050
|
+
i.value = O("normal"), a.value = O("pivot"), o.value = O("pivot_charts");
|
|
4051
|
+
}), X(() => s.tableMode, async (e) => {
|
|
4052
|
+
await V();
|
|
4053
|
+
let t = e === "pivot" ? "pivot:" : e === "pivot_charts" ? "pivotcharts:" : "", n = S.value?.currentView?.uid || "";
|
|
4052
4054
|
window.location.hash = `${t}${n}`;
|
|
4053
4055
|
});
|
|
4054
|
-
let
|
|
4055
|
-
|
|
4056
|
-
},
|
|
4056
|
+
let C = () => {
|
|
4057
|
+
ee.value = !ee.value;
|
|
4058
|
+
}, te = M(() => s.pageConfig?.isView && !["top_tag", "top_tag_flat"].includes(s.view_display_type)), re = (e) => e === "pivot" ? h : e === "pivot_charts" ? g : p, w = (e) => `table_pro_${e === "pivot" ? "pivot-" : e === "pivot_charts" ? "pivotcharts-" : ""}sql_db_view-${s.modalType}`, ie = async (e) => {
|
|
4059
|
+
try {
|
|
4060
|
+
let n = t(), r = await m({
|
|
4061
|
+
user_id: l.userid,
|
|
4062
|
+
org_id: l.currentOrg?.id,
|
|
4063
|
+
view_project__flag: n.VITE_APP_VIEW_PROJECT_FLAG,
|
|
4064
|
+
view_menu__flag: w(e),
|
|
4065
|
+
sort_fields: ["sort", "create_time"],
|
|
4066
|
+
is_cache: !1
|
|
4067
|
+
}, "/view/get_view_settings_for_user", !1, { skip_error: !0 });
|
|
4068
|
+
return [
|
|
4069
|
+
...r?.public_datas || [],
|
|
4070
|
+
...r?.user_datas || [],
|
|
4071
|
+
...r?.system_public_datas || [],
|
|
4072
|
+
...r?.system_user_datas || []
|
|
4073
|
+
].map((e) => {
|
|
4074
|
+
let t = e.data;
|
|
4075
|
+
if (typeof t == "string") try {
|
|
4076
|
+
t = JSON.parse(t);
|
|
4077
|
+
} catch {}
|
|
4078
|
+
return {
|
|
4079
|
+
...e,
|
|
4080
|
+
data: t
|
|
4081
|
+
};
|
|
4082
|
+
});
|
|
4083
|
+
} catch (e) {
|
|
4084
|
+
return console.error("按 view_key 拉取视图列表失败", e), [];
|
|
4085
|
+
}
|
|
4086
|
+
}, ae = async (e) => {
|
|
4087
|
+
let t = e?.length ? e : [
|
|
4088
|
+
"normal",
|
|
4089
|
+
"pivot",
|
|
4090
|
+
"pivot_charts"
|
|
4091
|
+
], n = await Promise.all(t.map((e) => ie(e))), r = {};
|
|
4092
|
+
return t.forEach((e, t) => {
|
|
4093
|
+
r[e] = n[t];
|
|
4094
|
+
}), r;
|
|
4095
|
+
}, T = async (e, t) => {
|
|
4096
|
+
if (!e || !e.uid) return;
|
|
4097
|
+
let n = re(t).value;
|
|
4098
|
+
if (t !== s.tableMode) {
|
|
4099
|
+
c("changeMode", t);
|
|
4100
|
+
for (let e = 0; e < 30 && (await V(), n = re(t).value, !n); e++);
|
|
4101
|
+
}
|
|
4102
|
+
n && (n.currentView = e, await n.setViewData(e.data));
|
|
4103
|
+
let r = t === "pivot" ? "pivot:" : t === "pivot_charts" ? "pivotcharts:" : "";
|
|
4104
|
+
window.location.hash = `${r}${e.uid}`;
|
|
4105
|
+
}, se = () => {
|
|
4057
4106
|
let e = [];
|
|
4058
|
-
for (let t of
|
|
4107
|
+
for (let t of s.pageConfig.base_search_condition_config_list || []) for (let n of t.group || []) e.push({
|
|
4059
4108
|
...n,
|
|
4060
4109
|
group_name: t.name
|
|
4061
4110
|
});
|
|
4062
4111
|
return e;
|
|
4063
|
-
},
|
|
4112
|
+
}, D = () => {
|
|
4064
4113
|
let e = {};
|
|
4065
|
-
|
|
4114
|
+
f.query?.query_json && (e = JSON.parse(f.query?.query_json));
|
|
4066
4115
|
let t = JSON.parse(JSON.stringify({
|
|
4067
|
-
...
|
|
4116
|
+
...f.query,
|
|
4068
4117
|
...e
|
|
4069
4118
|
}));
|
|
4070
4119
|
for (let e of [
|
|
@@ -4083,17 +4132,17 @@ var Tn = /* @__PURE__ */ R({
|
|
|
4083
4132
|
n[e] = t[e];
|
|
4084
4133
|
}), n;
|
|
4085
4134
|
} else return t;
|
|
4086
|
-
},
|
|
4135
|
+
}, O = (e) => {
|
|
4087
4136
|
let t = e === "normal", n = e === "pivot", r = e === "pivot_charts", i = "", a = "";
|
|
4088
4137
|
n ? (i = "pivot-", a = "pivot:") : r && (i = "pivotcharts-", a = "pivotcharts:");
|
|
4089
|
-
let
|
|
4090
|
-
for (let e of
|
|
4138
|
+
let o = se(), c = [];
|
|
4139
|
+
for (let e of s.pageConfig.default_search_condition_config_list || []) {
|
|
4091
4140
|
let t = {
|
|
4092
4141
|
id: _(),
|
|
4093
4142
|
conditions: [],
|
|
4094
4143
|
viewSearchConfig: {}
|
|
4095
4144
|
};
|
|
4096
|
-
for (let e of
|
|
4145
|
+
for (let e of o) t.viewSearchConfig[e.field_name] = {
|
|
4097
4146
|
checked: !1,
|
|
4098
4147
|
order: 9999
|
|
4099
4148
|
};
|
|
@@ -4102,175 +4151,180 @@ var Tn = /* @__PURE__ */ R({
|
|
|
4102
4151
|
checked: !0,
|
|
4103
4152
|
order: n
|
|
4104
4153
|
}, n++;
|
|
4105
|
-
|
|
4154
|
+
c.push(t);
|
|
4106
4155
|
}
|
|
4107
|
-
let
|
|
4108
|
-
window.location.hash && (
|
|
4109
|
-
let p = null, m = {},
|
|
4110
|
-
Object.entries(
|
|
4111
|
-
Array.isArray(t) || (t = [t]),
|
|
4156
|
+
let d = "";
|
|
4157
|
+
window.location.hash && (d = window.location.hash.substring(1), a ? d = d.startsWith(a) ? d.substring(a.length) : "" : (d.startsWith("pivot:") || d.startsWith("pivotcharts:")) && (d = ""));
|
|
4158
|
+
let p = null, m = {}, h = [];
|
|
4159
|
+
Object.entries(D()).forEach(([e, t]) => {
|
|
4160
|
+
Array.isArray(t) || (t = [t]), h.push({
|
|
4112
4161
|
field_name: e,
|
|
4113
4162
|
operator: "in",
|
|
4114
4163
|
value: t,
|
|
4115
4164
|
format: "input",
|
|
4116
4165
|
class_name: "str"
|
|
4117
4166
|
});
|
|
4118
|
-
}), Array.isArray(
|
|
4167
|
+
}), Array.isArray(s.pageConfig.advanced_base_conditions) && s.pageConfig.advanced_base_conditions.length > 0 && h.length > 0 ? p = [{
|
|
4119
4168
|
op: "and",
|
|
4120
|
-
children:
|
|
4169
|
+
children: s.pageConfig.advanced_base_conditions
|
|
4121
4170
|
}, {
|
|
4122
4171
|
op: "and",
|
|
4123
|
-
children:
|
|
4124
|
-
}] :
|
|
4125
|
-
let
|
|
4172
|
+
children: h
|
|
4173
|
+
}] : s.pageConfig.advanced_base_conditions?.length > 0 ? p = s.pageConfig.advanced_base_conditions : h.length > 0 && (p = h), v.value && (m.filter_id_key = v.value);
|
|
4174
|
+
let g = (s.pageConfig.baseColumns || []).filter((e) => e.dataIndex !== "action").map((e) => {
|
|
4126
4175
|
if (e.width == null) {
|
|
4127
4176
|
let { width: t, ...n } = e;
|
|
4128
4177
|
return n;
|
|
4129
4178
|
}
|
|
4130
4179
|
return e;
|
|
4131
4180
|
});
|
|
4132
|
-
|
|
4133
|
-
title:
|
|
4181
|
+
l.HAS_ACTION_BTN(s.pageConfig) && g.push({
|
|
4182
|
+
title: u("操作"),
|
|
4134
4183
|
width: 50,
|
|
4135
4184
|
dataIndex: "action",
|
|
4136
4185
|
checked: !0,
|
|
4137
4186
|
fixed: "right",
|
|
4138
4187
|
cellComponent: "action"
|
|
4139
4188
|
});
|
|
4140
|
-
let y =
|
|
4189
|
+
let y = dr(s.modalType.split("-")[1]);
|
|
4141
4190
|
return {
|
|
4142
|
-
key: `${i}sql_db_view-${
|
|
4143
|
-
title:
|
|
4191
|
+
key: `${i}sql_db_view-${s.modalType}`,
|
|
4192
|
+
title: f.query?.customTitle || f.meta.title || "",
|
|
4144
4193
|
tableSize: "small",
|
|
4145
4194
|
search_display_type: "show",
|
|
4146
4195
|
search_type: "advanced",
|
|
4147
|
-
is_selection:
|
|
4148
|
-
is_pagination:
|
|
4196
|
+
is_selection: s.pageConfig.is_selection,
|
|
4197
|
+
is_pagination: s.pageConfig.is_pagination,
|
|
4149
4198
|
list_url: y.queryData,
|
|
4150
4199
|
setting_mode: "drawer",
|
|
4151
|
-
setting_drawer_width:
|
|
4200
|
+
setting_drawer_width: s.setting_drawer_width,
|
|
4152
4201
|
pivot_charts_url: y.pivotChartsUrl,
|
|
4153
4202
|
pivot_table_url: y.pivotTableUrl,
|
|
4154
|
-
pivot_table_max_records:
|
|
4155
|
-
search_config:
|
|
4156
|
-
columns:
|
|
4157
|
-
rowKey:
|
|
4203
|
+
pivot_table_max_records: s.pageConfig.pivot_table_max_records,
|
|
4204
|
+
search_config: o,
|
|
4205
|
+
columns: g,
|
|
4206
|
+
rowKey: s.pageConfig.rowKey || "id",
|
|
4158
4207
|
show_current_view: !0,
|
|
4159
4208
|
enable_custom_filter: !0,
|
|
4160
4209
|
query_field_search_config_url: y.fieldSearchConfigUrl,
|
|
4161
4210
|
enable_advanced_search_multigroups: !0,
|
|
4162
|
-
default_advanced_search_multigroups:
|
|
4163
|
-
condition_group_config_list:
|
|
4211
|
+
default_advanced_search_multigroups: c,
|
|
4212
|
+
condition_group_config_list: s.pageConfig.condition_group_config_list || [],
|
|
4164
4213
|
query_group_url: y.queryConditionGroupData,
|
|
4165
|
-
refreshType:
|
|
4166
|
-
pageSize:
|
|
4167
|
-
pageSizeOptions:
|
|
4168
|
-
view_uid:
|
|
4214
|
+
refreshType: s.pageConfig.refresh_type,
|
|
4215
|
+
pageSize: s.pageConfig.pageSize,
|
|
4216
|
+
pageSizeOptions: s.pageConfig.page_size_options,
|
|
4217
|
+
view_uid: d,
|
|
4169
4218
|
base_conditions: p,
|
|
4170
4219
|
query_params: m,
|
|
4171
|
-
btn_list:
|
|
4172
|
-
head_btn_list:
|
|
4220
|
+
btn_list: s.pageConfig.btn_list || [],
|
|
4221
|
+
head_btn_list: s.pageConfig.head_btn_list || [],
|
|
4173
4222
|
batch_update_list: [],
|
|
4174
|
-
required_condition:
|
|
4223
|
+
required_condition: s.pageConfig.required_condition,
|
|
4175
4224
|
count_url: t ? y.countData : void 0,
|
|
4176
|
-
customRow:
|
|
4177
|
-
customHeaderCell:
|
|
4178
|
-
customCell:
|
|
4179
|
-
rowSelectionType:
|
|
4180
|
-
rowSelectionCheckStrictly:
|
|
4225
|
+
customRow: s.pageConfig.customRow || void 0,
|
|
4226
|
+
customHeaderCell: s.pageConfig.customHeaderCell || void 0,
|
|
4227
|
+
customCell: s.pageConfig.customCell || void 0,
|
|
4228
|
+
rowSelectionType: s.pageConfig.rowSelection?.type || "checkbox",
|
|
4229
|
+
rowSelectionCheckStrictly: s.pageConfig.rowSelection?.checkStrictly || !1,
|
|
4181
4230
|
hide_index_column: !1,
|
|
4182
4231
|
indexTitle: "序号",
|
|
4183
4232
|
disabledShowSearchGroupName: !0,
|
|
4184
4233
|
cellComponentExt: {
|
|
4185
4234
|
titleList: null,
|
|
4186
4235
|
api_fields: null,
|
|
4187
|
-
modalType:
|
|
4236
|
+
modalType: s.modalType,
|
|
4188
4237
|
app_flag: "db_view",
|
|
4189
4238
|
getData: y.getData,
|
|
4190
|
-
pageConfig:
|
|
4239
|
+
pageConfig: s.pageConfig
|
|
4191
4240
|
}
|
|
4192
4241
|
};
|
|
4193
|
-
},
|
|
4194
|
-
|
|
4195
|
-
},
|
|
4196
|
-
|
|
4197
|
-
|
|
4242
|
+
}, j = () => {
|
|
4243
|
+
x.value = !0;
|
|
4244
|
+
}, z = (e) => {
|
|
4245
|
+
x.value = !1, e ? (v.value = e.filter_id_key, y.value = e.filterList, b.value = e.matchValueLabel, i.value = O("normal"), c("changeMode", "normal"), V(() => {
|
|
4246
|
+
p.value.currentView = { id: "no-view" }, p.value.setViewData(null);
|
|
4198
4247
|
})) : Q.error("数据定位失败,请重试");
|
|
4199
|
-
},
|
|
4200
|
-
|
|
4248
|
+
}, ce = () => {
|
|
4249
|
+
v.value = "", i.value = O("normal");
|
|
4201
4250
|
};
|
|
4202
|
-
return
|
|
4203
|
-
tableProRef:
|
|
4204
|
-
pivotTableRef:
|
|
4205
|
-
pivotChartsRef:
|
|
4206
|
-
activeTableRef:
|
|
4251
|
+
return n({
|
|
4252
|
+
tableProRef: p,
|
|
4253
|
+
pivotTableRef: h,
|
|
4254
|
+
pivotChartsRef: g,
|
|
4255
|
+
activeTableRef: S,
|
|
4256
|
+
fetchAllModeViews: ae,
|
|
4257
|
+
activateView: T
|
|
4207
4258
|
}), (e, t) => {
|
|
4208
|
-
let n =
|
|
4209
|
-
return
|
|
4259
|
+
let n = q("a-tag"), r = q("a-alert");
|
|
4260
|
+
return U(), F("div", pr, [(U(), N(A, null, [i.value && e.tableMode === "normal" ? (U(), F(k, { key: 0 }, [v.value ? (U(), N(r, {
|
|
4210
4261
|
key: 0,
|
|
4211
4262
|
type: "warning",
|
|
4212
4263
|
closable: "",
|
|
4213
4264
|
"show-icon": "",
|
|
4214
|
-
onClose:
|
|
4265
|
+
onClose: ce
|
|
4215
4266
|
}, {
|
|
4216
|
-
message:
|
|
4217
|
-
default:
|
|
4267
|
+
message: Z(() => [I("div", mr, [(U(!0), F(k, null, K(y.value, (e) => (U(), F("span", { key: e.label }, [L(J(e.label) + ": ", 1), R(n, null, {
|
|
4268
|
+
default: Z(() => [L(J(e.value), 1)]),
|
|
4218
4269
|
_: 2
|
|
4219
|
-
}, 1024)]))), 128)),
|
|
4220
|
-
default:
|
|
4270
|
+
}, 1024)]))), 128)), I("span", null, [t[0] ||= L(" 值字段: "), R(n, null, {
|
|
4271
|
+
default: Z(() => [L(J(b.value), 1)]),
|
|
4221
4272
|
_: 1
|
|
4222
|
-
})])]), t[1] ||=
|
|
4273
|
+
})])]), t[1] ||= I("div", null, " 当前数据已通过透视表定位,此功能为临时过滤,不会被视图记录。关闭可恢复原始数据。 ", -1)]),
|
|
4223
4274
|
_: 1
|
|
4224
|
-
})) :
|
|
4225
|
-
config:
|
|
4275
|
+
})) : P("", !0), R(ne, {
|
|
4276
|
+
config: i.value,
|
|
4226
4277
|
ref_key: "tableProRef",
|
|
4227
|
-
ref:
|
|
4278
|
+
ref: p,
|
|
4228
4279
|
eventBus: e.eventBus
|
|
4229
4280
|
}, {
|
|
4230
|
-
header_bar_before_title:
|
|
4281
|
+
header_bar_before_title: Z(() => [te.value ? (U(), F("div", hr, [I("div", {
|
|
4231
4282
|
class: "toggle-button",
|
|
4232
|
-
onClick:
|
|
4233
|
-
}, [
|
|
4283
|
+
onClick: C
|
|
4284
|
+
}, [ee.value ? (U(), N(Y(Ie), { key: 0 })) : (U(), N(Y(Le), { key: 1 }))])])) : P("", !0)]),
|
|
4234
4285
|
_: 1
|
|
4235
|
-
}, 8, ["config", "eventBus"])], 64)) :
|
|
4286
|
+
}, 8, ["config", "eventBus"])], 64)) : a.value && e.tableMode === "pivot" ? (U(), N(oe, {
|
|
4236
4287
|
key: 1,
|
|
4237
|
-
config:
|
|
4288
|
+
config: a.value,
|
|
4238
4289
|
ref_key: "pivotTableRef",
|
|
4239
|
-
ref:
|
|
4290
|
+
ref: h,
|
|
4240
4291
|
eventBus: e.eventBus,
|
|
4241
|
-
onFilterForIdKeyStart:
|
|
4242
|
-
onFilterForIdKey:
|
|
4292
|
+
onFilterForIdKeyStart: j,
|
|
4293
|
+
onFilterForIdKey: z
|
|
4243
4294
|
}, {
|
|
4244
|
-
header_bar_before_title:
|
|
4295
|
+
header_bar_before_title: Z(() => [te.value ? (U(), F("div", gr, [I("div", {
|
|
4245
4296
|
class: "toggle-button",
|
|
4246
|
-
onClick:
|
|
4247
|
-
}, [
|
|
4297
|
+
onClick: C
|
|
4298
|
+
}, [ee.value ? (U(), N(Y(Ie), { key: 0 })) : (U(), N(Y(Le), { key: 1 }))])])) : P("", !0)]),
|
|
4248
4299
|
_: 1
|
|
4249
|
-
}, 8, ["config", "eventBus"])) :
|
|
4300
|
+
}, 8, ["config", "eventBus"])) : o.value && e.tableMode === "pivot_charts" ? (U(), N(E, {
|
|
4250
4301
|
key: 2,
|
|
4251
|
-
config:
|
|
4302
|
+
config: o.value,
|
|
4252
4303
|
ref_key: "pivotChartsRef",
|
|
4253
|
-
ref:
|
|
4304
|
+
ref: g,
|
|
4254
4305
|
eventBus: e.eventBus
|
|
4255
4306
|
}, {
|
|
4256
|
-
header_bar_before_title:
|
|
4307
|
+
header_bar_before_title: Z(() => [te.value ? (U(), F("div", _r, [I("div", {
|
|
4257
4308
|
class: "toggle-button",
|
|
4258
|
-
onClick:
|
|
4259
|
-
}, [
|
|
4309
|
+
onClick: C
|
|
4310
|
+
}, [ee.value ? (U(), N(Y(Ie), { key: 0 })) : (U(), N(Y(Le), { key: 1 }))])])) : P("", !0)]),
|
|
4260
4311
|
_: 1
|
|
4261
|
-
}, 8, ["config", "eventBus"])) :
|
|
4312
|
+
}, 8, ["config", "eventBus"])) : P("", !0)], 1024)), R(Zn, { visible: x.value }, null, 8, ["visible"])]);
|
|
4262
4313
|
};
|
|
4263
4314
|
}
|
|
4264
|
-
}), [["__scopeId", "data-v-
|
|
4315
|
+
}), [["__scopeId", "data-v-d4a48910"]]), yr = {
|
|
4265
4316
|
key: 0,
|
|
4266
4317
|
class: "pri-page"
|
|
4267
|
-
},
|
|
4318
|
+
}, br = {
|
|
4319
|
+
key: 0,
|
|
4320
|
+
class: "top-view-bar"
|
|
4321
|
+
}, xr = { class: "pri-wrapper" }, Sr = {
|
|
4268
4322
|
key: 0,
|
|
4269
4323
|
class: "left-slide-outer"
|
|
4270
|
-
},
|
|
4324
|
+
}, Cr = { class: "left-wrapper" }, wr = /*#__PURE__*/ f(/* @__PURE__ */ z({
|
|
4271
4325
|
__name: "index",
|
|
4272
4326
|
setup(e) {
|
|
4273
|
-
let t =
|
|
4327
|
+
let t = G(!0), n = G(!1), r = G(null), a = Ge(), s = G("normal"), c = d(), u = G(null), { t: f } = We(), p = G(1e3), m = G(null), h = G(0), { collapsed: g } = o()(), _ = W({
|
|
4274
4328
|
open: !1,
|
|
4275
4329
|
component: null,
|
|
4276
4330
|
width: 0,
|
|
@@ -4281,103 +4335,161 @@ var Tn = /* @__PURE__ */ R({
|
|
|
4281
4335
|
lastMenuCollapsed: !0
|
|
4282
4336
|
}), v = () => {
|
|
4283
4337
|
m.value && (h.value = m.value.getBoundingClientRect().left);
|
|
4284
|
-
}, y =
|
|
4338
|
+
}, y = Ue(), b = i(), x = {
|
|
4285
4339
|
modalType: y.path.split("/").pop() || "",
|
|
4286
4340
|
modalName: ""
|
|
4287
|
-
}, S =
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4341
|
+
}, S = M(() => r.value?.activeTableRef), ee = G(null);
|
|
4342
|
+
X(S, (e) => {
|
|
4343
|
+
e && (ee.value = e);
|
|
4344
|
+
});
|
|
4345
|
+
let C = M(() => S.value || ee.value), te = M(() => C.value?.settingOpen), ne = M(() => !!u.value?.isView && ["top_tag", "top_tag_flat"].includes(u.value?.view_display_type)), re = [
|
|
4346
|
+
{
|
|
4347
|
+
value: "normal",
|
|
4348
|
+
label: "标准"
|
|
4349
|
+
},
|
|
4350
|
+
{
|
|
4351
|
+
value: "pivot",
|
|
4352
|
+
label: "透视表"
|
|
4353
|
+
},
|
|
4354
|
+
{
|
|
4355
|
+
value: "pivot_charts",
|
|
4356
|
+
label: "透视图"
|
|
4357
|
+
}
|
|
4358
|
+
], w = M(() => {
|
|
4359
|
+
let e = u.value?.enable_view_types || [];
|
|
4360
|
+
return re.filter((t) => e.includes(t.value));
|
|
4361
|
+
}), ie = M(() => s.value === "pivot" ? "pivot:" : s.value === "pivot_charts" ? "pivotcharts:" : "");
|
|
4362
|
+
ye("tableProStateProxy", C);
|
|
4363
|
+
let ae = async () => {
|
|
4364
|
+
u.value = await fr(x.modalType, c.currentOrg.id, f, { to_i18n: !0 }), u.value?.isView ? u.value?.default_hide_view ? t.value = !1 : t.value = !0 : t.value = !1, u.value?.required_condition && b.set_required_condition(x.modalType, u.value.required_condition);
|
|
4291
4365
|
let e = window.location.hash.substring(1), n;
|
|
4292
4366
|
e && (n = e.startsWith("pivotcharts:") ? "pivot_charts" : e.startsWith("pivot:") ? "pivot" : "normal"), u.value?.enable_view_types?.length ? (n = n || u.value?.default_view_type || "normal", u.value?.enable_view_types?.includes(n) || (n = u.value?.enable_view_types[0])) : n = void 0, s.value = n;
|
|
4293
|
-
},
|
|
4294
|
-
|
|
4295
|
-
},
|
|
4296
|
-
|
|
4297
|
-
},
|
|
4367
|
+
}, T = () => {
|
|
4368
|
+
ae(), C.value?.init();
|
|
4369
|
+
}, oe = () => {
|
|
4370
|
+
C.value?.refresh();
|
|
4371
|
+
}, E = ({ key: e, cmpObj: n }) => {
|
|
4298
4372
|
let r = u?.value?.detailConfigs?.[e];
|
|
4299
4373
|
r ? (_.component = r.component, _.width = r.width || 500, _.title = r.title || "详情", _.cmpObj = n, _.extra = r.extra ?? null, _.open || (_.open = !0, _.lastLeftOpen = t.value, _.lastMenuCollapsed = g.value, t.value = !1, g.value = !0)) : console.warn(`detailConfigItem not found, key: ${e}`);
|
|
4300
|
-
},
|
|
4374
|
+
}, D = () => {
|
|
4301
4375
|
a.emit("local_refresh");
|
|
4302
4376
|
};
|
|
4303
4377
|
return ve(async () => {
|
|
4304
|
-
l()?.on("refresh",
|
|
4378
|
+
l()?.on("refresh", oe), l()?.on("reset_and_reload", T), l()?.on("local_refresh", D), a.on("show_detail", E), l()?.on("show_detail", E), await ae(), n.value = !0, V(() => {
|
|
4305
4379
|
v();
|
|
4306
4380
|
});
|
|
4307
|
-
}),
|
|
4308
|
-
l()?.off("refresh",
|
|
4381
|
+
}), H(() => {
|
|
4382
|
+
l()?.off("refresh", oe), l()?.off("reset_and_reload", T), l()?.off("local_refresh", D), a.off("show_detail", E), l()?.off("show_detail", E);
|
|
4309
4383
|
}), me(() => {
|
|
4310
|
-
u.value?.required_condition && b.set_required_condition(x.modalType, u.value.required_condition), l()?.off("refresh",
|
|
4384
|
+
u.value?.required_condition && b.set_required_condition(x.modalType, u.value.required_condition), l()?.off("refresh", oe), l()?.off("reset_and_reload", T), l()?.off("local_refresh", D), a.off("show_detail", E), l()?.off("show_detail", E), l()?.on("refresh", oe), l()?.on("reset_and_reload", T), l()?.on("local_refresh", D), a.on("show_detail", E), l()?.on("show_detail", E);
|
|
4311
4385
|
}), _e(() => {
|
|
4312
|
-
l()?.off("refresh",
|
|
4313
|
-
}),
|
|
4386
|
+
l()?.off("refresh", oe), l()?.off("reset_and_reload", T), l()?.off("local_refresh", D), a.off("show_detail", E), l()?.off("show_detail", E);
|
|
4387
|
+
}), X(() => _.open, (e, n) => {
|
|
4314
4388
|
e != n && !e && (t.value = _.lastLeftOpen, g.value = _.lastMenuCollapsed);
|
|
4315
4389
|
}), (e, i) => {
|
|
4316
|
-
let o =
|
|
4317
|
-
return
|
|
4318
|
-
default:
|
|
4319
|
-
|
|
4390
|
+
let o = q("a-radio-button"), c = q("a-radio-group"), l = q("a-drawer");
|
|
4391
|
+
return U(), F(k, null, [R(Wt, null, {
|
|
4392
|
+
default: Z(() => [n.value ? (U(), F("div", yr, [ne.value && w.value.length ? (U(), F("div", br, [u.value?.view_display_type === "top_tag" && w.value.length > 1 ? (U(), N(c, {
|
|
4393
|
+
key: 0,
|
|
4394
|
+
value: s.value,
|
|
4395
|
+
"onUpdate:value": i[0] ||= (e) => s.value = e,
|
|
4396
|
+
size: "small",
|
|
4397
|
+
"button-style": "solid",
|
|
4398
|
+
class: "view-type-group"
|
|
4399
|
+
}, {
|
|
4400
|
+
default: Z(() => [(U(!0), F(k, null, K(w.value, (t) => (U(), N(o, {
|
|
4401
|
+
key: t.value,
|
|
4402
|
+
value: t.value
|
|
4403
|
+
}, {
|
|
4404
|
+
default: Z(() => [L(J(e.$t(t.label)), 1)]),
|
|
4405
|
+
_: 2
|
|
4406
|
+
}, 1032, ["value"]))), 128))]),
|
|
4407
|
+
_: 1
|
|
4408
|
+
}, 8, ["value"])) : P("", !0), C.value ? (U(), N(se, {
|
|
4409
|
+
key: 1,
|
|
4410
|
+
tableProState: C.value,
|
|
4411
|
+
view_type: s.value,
|
|
4412
|
+
display_type: u.value?.view_display_type,
|
|
4413
|
+
enable_view_types: u.value?.enable_view_types,
|
|
4414
|
+
right_table_ref: r.value,
|
|
4415
|
+
view_key: `table_pro_${C.value?.config?.key}`,
|
|
4416
|
+
view_flag_name: C.value?.config?.title,
|
|
4417
|
+
hashPrefix: ie.value,
|
|
4418
|
+
onSwitch_mode: i[1] ||= (e) => s.value = e
|
|
4419
|
+
}, null, 8, [
|
|
4420
|
+
"tableProState",
|
|
4421
|
+
"view_type",
|
|
4422
|
+
"display_type",
|
|
4423
|
+
"enable_view_types",
|
|
4424
|
+
"right_table_ref",
|
|
4425
|
+
"view_key",
|
|
4426
|
+
"view_flag_name",
|
|
4427
|
+
"hashPrefix"
|
|
4428
|
+
])) : P("", !0)])) : P("", !0), I("div", xr, [R(j, { name: "left-slide" }, {
|
|
4429
|
+
default: Z(() => [t.value && !ne.value ? (U(), F("div", Sr, [I("div", Cr, [R(Jn, {
|
|
4320
4430
|
pageConfig: u.value,
|
|
4321
4431
|
open: t.value,
|
|
4322
|
-
"onUpdate:open": i[
|
|
4323
|
-
eventBus:
|
|
4432
|
+
"onUpdate:open": i[2] ||= (e) => t.value = e,
|
|
4433
|
+
eventBus: Y(a),
|
|
4324
4434
|
tableMode: s.value,
|
|
4325
|
-
"onUpdate:tableMode": i[
|
|
4435
|
+
"onUpdate:tableMode": i[3] ||= (e) => s.value = e
|
|
4326
4436
|
}, null, 8, [
|
|
4327
4437
|
"pageConfig",
|
|
4328
4438
|
"open",
|
|
4329
4439
|
"eventBus",
|
|
4330
4440
|
"tableMode"
|
|
4331
|
-
])])])) :
|
|
4441
|
+
])])])) : P("", !0)]),
|
|
4332
4442
|
_: 1
|
|
4333
|
-
}),
|
|
4443
|
+
}), I("div", {
|
|
4334
4444
|
class: "right-wrapper",
|
|
4335
4445
|
ref_key: "rightWrapperRef",
|
|
4336
4446
|
ref: m
|
|
4337
4447
|
}, [
|
|
4338
|
-
|
|
4339
|
-
class: fe(["left-space", { "setting-open":
|
|
4448
|
+
I("div", {
|
|
4449
|
+
class: fe(["left-space", { "setting-open": te.value }]),
|
|
4340
4450
|
style: pe({
|
|
4341
4451
|
"--x": `${h.value}px`,
|
|
4342
4452
|
"--drawer_width": `${p.value}px`
|
|
4343
4453
|
})
|
|
4344
4454
|
}, null, 6),
|
|
4345
|
-
|
|
4455
|
+
R(vr, {
|
|
4346
4456
|
pageConfig: u.value,
|
|
4347
4457
|
modalType: x.modalType,
|
|
4348
4458
|
ref_key: "rightTableRef",
|
|
4349
4459
|
ref: r,
|
|
4350
|
-
eventBus:
|
|
4460
|
+
eventBus: Y(a),
|
|
4351
4461
|
leftOpen: t.value,
|
|
4352
|
-
"onUpdate:leftOpen": i[
|
|
4462
|
+
"onUpdate:leftOpen": i[4] ||= (e) => t.value = e,
|
|
4353
4463
|
setting_drawer_width: p.value,
|
|
4354
4464
|
tableMode: s.value,
|
|
4355
|
-
|
|
4465
|
+
view_display_type: u.value?.view_display_type,
|
|
4466
|
+
onChangeMode: i[5] ||= (e) => s.value = e
|
|
4356
4467
|
}, null, 8, [
|
|
4357
4468
|
"pageConfig",
|
|
4358
4469
|
"modalType",
|
|
4359
4470
|
"eventBus",
|
|
4360
4471
|
"leftOpen",
|
|
4361
4472
|
"setting_drawer_width",
|
|
4362
|
-
"tableMode"
|
|
4473
|
+
"tableMode",
|
|
4474
|
+
"view_display_type"
|
|
4363
4475
|
]),
|
|
4364
|
-
|
|
4476
|
+
I("div", {
|
|
4365
4477
|
class: fe(["right-space", { "detail-open": _.open }]),
|
|
4366
4478
|
style: pe({ "--detail_width": `${_.width}px` })
|
|
4367
4479
|
}, null, 6)
|
|
4368
|
-
], 512)])])) :
|
|
4480
|
+
], 512)])])) : P("", !0)]),
|
|
4369
4481
|
_: 1
|
|
4370
|
-
}), _.open ? (
|
|
4482
|
+
}), _.open ? (U(), N(l, {
|
|
4371
4483
|
key: 0,
|
|
4372
4484
|
title: _.title,
|
|
4373
4485
|
width: _.width,
|
|
4374
4486
|
placement: "right",
|
|
4375
4487
|
open: _.open,
|
|
4376
|
-
"onUpdate:open": i[
|
|
4488
|
+
"onUpdate:open": i[6] ||= (e) => _.open = e,
|
|
4377
4489
|
mask: !1,
|
|
4378
4490
|
push: !1
|
|
4379
4491
|
}, {
|
|
4380
|
-
default:
|
|
4492
|
+
default: Z(() => [(U(), N(xe(_.component), {
|
|
4381
4493
|
cmpObj: _.cmpObj,
|
|
4382
4494
|
extra: _.extra
|
|
4383
4495
|
}, null, 8, ["cmpObj", "extra"]))]),
|
|
@@ -4386,9 +4498,9 @@ var Tn = /* @__PURE__ */ R({
|
|
|
4386
4498
|
"title",
|
|
4387
4499
|
"width",
|
|
4388
4500
|
"open"
|
|
4389
|
-
])) :
|
|
4501
|
+
])) : P("", !0)], 64);
|
|
4390
4502
|
};
|
|
4391
4503
|
}
|
|
4392
|
-
}), [["__scopeId", "data-v-
|
|
4504
|
+
}), [["__scopeId", "data-v-896f8d6e"]]);
|
|
4393
4505
|
//#endregion
|
|
4394
|
-
export {
|
|
4506
|
+
export { Ht as a, vt as c, Wt as i, ht as l, Rn as n, zt as o, In as r, xt as s, wr as t, at as u };
|