liyu-pc-base 1.0.1006 → 1.0.1020
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/{FieldRender-DSmjznCJ.js → FieldRender-zMOfoQsb.js} +1 -1
- package/dist/{FieldRender2-BfK8s0_7.js → FieldRender2-Bu6b89w3.js} +6 -5
- package/dist/{FormRender3-eIlECKAx.js → FormRender3-CGcAUFq-.js} +2 -2
- package/dist/ImportExcelModal-UpwXuAxH.js +356 -0
- package/dist/{RemoteSelectPro-CtOkFjzA.js → RemoteSelectPro-CA8W2i72.js} +26 -24
- package/dist/{SearchRender-slravb0G.js → SearchRender-Crh3frRE.js} +1 -1
- package/dist/{TinymceEditor-B6KX-4ep.js → TinymceEditor-B06AdyGb.js} +1 -1
- package/dist/ViewAuthConfigModal-x1tbZ1sZ.js +192 -0
- package/dist/ViewCreateModal-BozzbNKn.js +161 -0
- package/dist/components/index.js +10 -10
- package/dist/components/remotePages/index.js +1 -1
- package/dist/{components-MVgkszD6.js → components-C-5ejChn.js} +786 -815
- package/dist/{dbViewConfig-uxlv3YjE.js → dbViewConfig-BycXbYHD.js} +4 -4
- package/dist/{detailTablePro-CWei2BHz.js → detailTablePro-ElY-Zo85.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/liyu-pc-base.css +1 -1
- package/dist/{remotePages-Cumyio2A.js → remotePages-CdGZp4Iu.js} +2 -3
- package/dist/{tableModal-DuMlfbtr.js → tableModal-CE-ikX0N.js} +1 -1
- package/dist/{tablePageHost-SnFoTEuS.js → tablePageHost-idhBZCbA.js} +8591 -8700
- package/dist/{tablePro-sD7FsU6a.js → tablePro-DAhRrsef.js} +2828 -3026
- package/dist/utils-yMCm9loE.js +264 -0
- package/dist/view-model-DKGqNoLB.js +28 -0
- package/package.json +1 -1
- package/dist/ImportExcelModal-Dds857L2.js +0 -303
|
@@ -3,7 +3,7 @@ import { t } from "./RemoteSelect-bjsCKGfS.js";
|
|
|
3
3
|
import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
4
4
|
import { t as r } from "./RemoteCascader-BsOeNVvB.js";
|
|
5
5
|
import { t as i } from "./RemoteModal-DZkqi64T.js";
|
|
6
|
-
import { n as a, r as o, t as s } from "./RemoteSelectPro-
|
|
6
|
+
import { n as a, r as o, t as s } from "./RemoteSelectPro-CA8W2i72.js";
|
|
7
7
|
import { t as c } from "./RemoteFilterSelect-DF906O8X.js";
|
|
8
8
|
import { t as l } from "./AttributeNomTable-DHED22ju.js";
|
|
9
9
|
import { t as u } from "./AttributeTable-muxdKpWW.js";
|
|
@@ -6,7 +6,7 @@ import { t as i } from "./lodash-CMVwnWxD.js";
|
|
|
6
6
|
import { getApiData as a } from "./api/api-model.js";
|
|
7
7
|
import { N as o, P as s, k as c, n as l, s as u } from "./function-CstOzCwb.js";
|
|
8
8
|
import { i as d, t as f } from "./RemoteModal-DZkqi64T.js";
|
|
9
|
-
import { n as p, r as m, t as h } from "./RemoteSelectPro-
|
|
9
|
+
import { n as p, r as m, t as h } from "./RemoteSelectPro-CA8W2i72.js";
|
|
10
10
|
import { t as g } from "./RemoteFilterSelect-DF906O8X.js";
|
|
11
11
|
import { t as ee } from "./AttributeNomTable-DHED22ju.js";
|
|
12
12
|
import { t as _ } from "./AttributeTable-muxdKpWW.js";
|
|
@@ -16,7 +16,7 @@ import { t as ne } from "./RemoteText-C_zxmxfK.js";
|
|
|
16
16
|
import { t as re } from "./modal-tools-CZkYEwEr.js";
|
|
17
17
|
import { resolveContextValue as y } from "./components/FormRender/utils.js";
|
|
18
18
|
import { exportJsonToExcelByTokenHeader as ie } from "./utils/excel.js";
|
|
19
|
-
import { a as b, c as ae, d as x, f as oe, i as se, l as ce, n as S, o as le, r as C, s as w, t as T, u as E } from "./TinymceEditor-
|
|
19
|
+
import { a as b, c as ae, d as x, f as oe, i as se, l as ce, n as S, o as le, r as C, s as w, t as T, u as E } from "./TinymceEditor-B06AdyGb.js";
|
|
20
20
|
import { Fragment as D, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createSlots as N, createTextVNode as P, createVNode as F, defineAsyncComponent as ue, defineComponent as I, h as de, inject as fe, mergeModels as pe, mergeProps as L, normalizeClass as R, normalizeStyle as me, onMounted as z, onUnmounted as he, openBlock as B, reactive as V, ref as H, renderList as U, renderSlot as ge, resolveComponent as W, resolveDynamicComponent as G, toDisplayString as K, unref as _e, useModel as ve, vShow as ye, watch as q, withCtx as J, withDirectives as be } from "vue";
|
|
21
21
|
import { Modal as xe, message as Se } from "ant-design-vue";
|
|
22
22
|
import { cloneDeep as Ce, debounce as we, isArray as Te } from "lodash-es";
|
|
@@ -91,7 +91,7 @@ var Ae = I({
|
|
|
91
91
|
"copy"
|
|
92
92
|
],
|
|
93
93
|
setup(e, { emit: t }) {
|
|
94
|
-
let n = V({ ...e.field.form.rules }), r = H({}), i = ue(() => import("./FormRender3-
|
|
94
|
+
let n = V({ ...e.field.form.rules }), r = H({}), i = ue(() => import("./FormRender3-CGcAUFq-.js").then((e) => e.n)), a, o = () => {
|
|
95
95
|
let e = /* @__PURE__ */ new Uint8Array(16);
|
|
96
96
|
return window.crypto.getRandomValues(e), Array.from(e, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
97
97
|
}, s = H([]), c = o(), l = ([t, i]) => {
|
|
@@ -1011,7 +1011,7 @@ var dt = (e, t) => t && e.startsWith(t) ? e.slice(t.length) : e, ft = (e, t) =>
|
|
|
1011
1011
|
}, {
|
|
1012
1012
|
label: "整体更新(update)",
|
|
1013
1013
|
value: "update"
|
|
1014
|
-
}], l = ue(() => import("./ImportExcelModal-
|
|
1014
|
+
}], l = ue(() => import("./ImportExcelModal-UpwXuAxH.js")), d = O(() => !!(n.field.sys_btn_list == null || n.field.sys_btn_list.includes("download"))), f = O(() => !!(n.field.sys_btn_list == null || n.field.sys_btn_list.includes("import"))), p = () => {
|
|
1015
1015
|
xe.confirm({
|
|
1016
1016
|
title: "确认清空吗?",
|
|
1017
1017
|
icon: F(Ee),
|
|
@@ -1043,6 +1043,7 @@ var dt = (e, t) => t && e.startsWith(t) ? e.slice(t.length) : e, ft = (e, t) =>
|
|
|
1043
1043
|
component: l,
|
|
1044
1044
|
title: "导入Excel数据",
|
|
1045
1045
|
configList: e,
|
|
1046
|
+
context: n.context,
|
|
1046
1047
|
ok: (e) => {
|
|
1047
1048
|
let i = [], o = [];
|
|
1048
1049
|
e.forEach((e) => {
|
|
@@ -1488,7 +1489,7 @@ var dt = (e, t) => t && e.startsWith(t) ? e.slice(t.length) : e, ft = (e, t) =>
|
|
|
1488
1489
|
]))), 256))], 64);
|
|
1489
1490
|
};
|
|
1490
1491
|
}
|
|
1491
|
-
}), [["__scopeId", "data-v-
|
|
1492
|
+
}), [["__scopeId", "data-v-7016bc77"]]), vt = {
|
|
1492
1493
|
key: 0,
|
|
1493
1494
|
class: "error-msg"
|
|
1494
1495
|
}, yt = /*#__PURE__*/ n(/* @__PURE__ */ I({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as e } from "./rolldown-runtime-DY7j01NX.js";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { s as n } from "./function-CstOzCwb.js";
|
|
4
|
-
import { d as r } from "./TinymceEditor-
|
|
5
|
-
import { t as i } from "./FieldRender2-
|
|
4
|
+
import { d as r } from "./TinymceEditor-B06AdyGb.js";
|
|
5
|
+
import { t as i } from "./FieldRender2-Bu6b89w3.js";
|
|
6
6
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createSlots as u, createTextVNode as d, createVNode as f, defineComponent as p, openBlock as m, provide as h, reactive as g, ref as _, renderList as v, resolveComponent as y, toDisplayString as b, watch as x, withCtx as S } from "vue";
|
|
7
7
|
import { message as C } from "ant-design-vue";
|
|
8
8
|
//#region src/components/FormRender/FieldCol.vue?vue&type=script&lang.ts
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
+
import { getApiData as t } from "./api/api-model.js";
|
|
3
|
+
import { P as n, n as r } from "./function-CstOzCwb.js";
|
|
4
|
+
import { resolveContextValue as i } from "./components/FormRender/utils.js";
|
|
5
|
+
import { createBlock as a, createCommentVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, openBlock as u, ref as d, resolveComponent as f, withCtx as p } from "vue";
|
|
6
|
+
import { message as m } from "ant-design-vue";
|
|
7
|
+
import h from "dayjs";
|
|
8
|
+
import { PlusOutlined as g } from "@ant-design/icons-vue";
|
|
9
|
+
import { read as _, utils as v } from "xlsx";
|
|
10
|
+
//#region src/utils/dateUtil.ts
|
|
11
|
+
function y(e, t = "datepicker", n) {
|
|
12
|
+
if (e == null || e === "") return {
|
|
13
|
+
value: "",
|
|
14
|
+
isValid: !0
|
|
15
|
+
};
|
|
16
|
+
let r = n || (t === "datepicker" ? "YYYY-MM-DD" : "HH:mm:ss");
|
|
17
|
+
try {
|
|
18
|
+
let n = null;
|
|
19
|
+
if (typeof e == "number") {
|
|
20
|
+
if (e > 0 && e < 1) {
|
|
21
|
+
let t = Math.round(e * 24 * 60 * 60), r = Math.floor(t / 3600), i = Math.floor(t % 3600 / 60), a = t % 60;
|
|
22
|
+
n = h().hour(r).minute(i).second(a);
|
|
23
|
+
} else if (e >= 1) {
|
|
24
|
+
let t = e - Math.floor(e);
|
|
25
|
+
if (t > 0) {
|
|
26
|
+
let r = h("1900-01-01"), i = Math.floor(e), a;
|
|
27
|
+
a = i <= 60 ? r.add(i - 1, "day") : r.add(i - 2, "day");
|
|
28
|
+
let o = Math.round(t * 24 * 60 * 60), s = Math.floor(o / 3600), c = Math.floor(o % 3600 / 60), l = o % 60;
|
|
29
|
+
n = a.hour(s).minute(c).second(l);
|
|
30
|
+
} else {
|
|
31
|
+
let t = h("1900-01-01"), r = Math.floor(e);
|
|
32
|
+
n = r >= 1 && r <= 6e4 ? r <= 60 ? t.add(r - 1, "day") : t.add(r - 2, "day") : null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (!n && typeof e == "string") {
|
|
37
|
+
let t = e.trim();
|
|
38
|
+
if (/^\d+\.\d+$/.test(t)) {
|
|
39
|
+
let e = parseFloat(t);
|
|
40
|
+
if (e >= 0 && e < 1) {
|
|
41
|
+
let t = Math.round(e * 24 * 60 * 60), r = Math.floor(t / 3600), i = Math.floor(t % 3600 / 60), a = t % 60;
|
|
42
|
+
n = h().hour(r).minute(i).second(a);
|
|
43
|
+
} else if (e >= 1) {
|
|
44
|
+
let t = h("1900-01-01"), r = Math.floor(e), i = e - r, a;
|
|
45
|
+
a = r <= 60 ? t.add(r - 1, "day") : t.add(r - 2, "day");
|
|
46
|
+
let o = Math.round(i * 24 * 60 * 60), s = Math.floor(o / 3600), c = Math.floor(o % 3600 / 60), l = o % 60;
|
|
47
|
+
n = a.hour(s).minute(c).second(l);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (!n && /^\d+$/.test(t)) {
|
|
51
|
+
let e = h("1900-01-01"), r = parseInt(t, 10);
|
|
52
|
+
r >= 1 && r <= 6e4 && (n = r <= 60 ? e.add(r - 1, "day") : e.add(r - 2, "day"));
|
|
53
|
+
}
|
|
54
|
+
if (!n) {
|
|
55
|
+
let e = [
|
|
56
|
+
"YYYY-MM-DD HH:mm:ss",
|
|
57
|
+
"YYYY-MM-DD HH:mm",
|
|
58
|
+
"YYYY-MM-DD",
|
|
59
|
+
"YYYY/MM/DD HH:mm:ss",
|
|
60
|
+
"YYYY/MM/DD HH:mm",
|
|
61
|
+
"YYYY/MM/DD",
|
|
62
|
+
"HH:mm:ss",
|
|
63
|
+
"HH:mm"
|
|
64
|
+
], r = t, i = t.match(/^(\d{4})[-/](\d{1,2})[-/](\d{1,2})(.*)$/);
|
|
65
|
+
if (i) {
|
|
66
|
+
let [, e, t, n, a] = i;
|
|
67
|
+
r = `${e}-${t.padStart(2, "0")}-${n.padStart(2, "0")}${a}`;
|
|
68
|
+
}
|
|
69
|
+
for (let t of e) {
|
|
70
|
+
let e = h(r, t, !0);
|
|
71
|
+
if (e.isValid()) {
|
|
72
|
+
n = e;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (!n) {
|
|
77
|
+
let e = h(t);
|
|
78
|
+
e.isValid() && (n = e);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (!n && h.isDayjs(e) && (n = e), !n || !n.isValid()) return {
|
|
83
|
+
value: String(e),
|
|
84
|
+
isValid: !1,
|
|
85
|
+
error: `值 "${e}" 无法解析为${t === "datepicker" ? "日期" : "时间"}`
|
|
86
|
+
};
|
|
87
|
+
let i;
|
|
88
|
+
return i = n.format(r), {
|
|
89
|
+
value: i,
|
|
90
|
+
isValid: !0
|
|
91
|
+
};
|
|
92
|
+
} catch {
|
|
93
|
+
return {
|
|
94
|
+
value: String(e),
|
|
95
|
+
isValid: !1,
|
|
96
|
+
error: `值 "${e}" 解析失败`
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/components/form-modal/ImportExcelModal/ImportExcelModal.vue?vue&type=script&lang.ts
|
|
102
|
+
var b = l({
|
|
103
|
+
name: "ImportExcelModal",
|
|
104
|
+
components: { PlusOutlined: g },
|
|
105
|
+
props: {
|
|
106
|
+
title: {
|
|
107
|
+
type: String,
|
|
108
|
+
required: !0
|
|
109
|
+
},
|
|
110
|
+
configList: {
|
|
111
|
+
type: Array,
|
|
112
|
+
required: !0,
|
|
113
|
+
default: () => []
|
|
114
|
+
},
|
|
115
|
+
context: {
|
|
116
|
+
type: Object,
|
|
117
|
+
default: null
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
emits: ["ok", "cancel"],
|
|
121
|
+
setup(e, { emit: a }) {
|
|
122
|
+
let o = d([]), s = d(!1), c = (e) => e ? String(e).trim().replace(/\s*\[必填\]\s*$/, "") : "", l = async (o) => {
|
|
123
|
+
let { file: l, onSuccess: u, onError: d } = o;
|
|
124
|
+
s.value = !0;
|
|
125
|
+
let f = new FileReader();
|
|
126
|
+
f.onload = async (o) => {
|
|
127
|
+
try {
|
|
128
|
+
let l = _(new Uint8Array(o.target.result), { type: "array" }), f = l.SheetNames[0], p = l.Sheets[f], h = (v.sheet_to_json(p, { header: 1 })[0] || []).map((e) => c(e)), g = v.sheet_to_json(p).map((e) => {
|
|
129
|
+
let t = {};
|
|
130
|
+
return Object.keys(e).forEach((n) => {
|
|
131
|
+
t[c(n)] = e[n];
|
|
132
|
+
}), t;
|
|
133
|
+
});
|
|
134
|
+
console.log("Excel Headers:", h), console.log("Excel JSON Data:", g);
|
|
135
|
+
let b = {}, x = (e, t, i) => {
|
|
136
|
+
if (t.operator === "not_blank_not_null") {
|
|
137
|
+
e.push({
|
|
138
|
+
field_name: t.field_name,
|
|
139
|
+
operator: t.operator,
|
|
140
|
+
value: [],
|
|
141
|
+
format: t.format,
|
|
142
|
+
class_name: t.class_name
|
|
143
|
+
});
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
let a = i;
|
|
147
|
+
if (a instanceof Array) {
|
|
148
|
+
let [e] = a;
|
|
149
|
+
if (!n(e)) return;
|
|
150
|
+
} else if (n(a)) (t.operator === "in" || t.operator === "notin") && (a.includes("[") ? a = JSON.parse(a) : a.includes(",") && (a = a.split(",")), t.class_name === "int" && (a = a.map(Number))), a = a instanceof Array ? a : [a];
|
|
151
|
+
else return;
|
|
152
|
+
e.push({
|
|
153
|
+
field_name: t.field_name,
|
|
154
|
+
operator: t.operator,
|
|
155
|
+
value: r(a, t.class_name),
|
|
156
|
+
format: t.format,
|
|
157
|
+
class_name: t.class_name
|
|
158
|
+
});
|
|
159
|
+
}, S = e.configList.filter((e) => e.type === "remoteselectpro" && e.postUrl);
|
|
160
|
+
if (S.length > 0) for (let n of S) {
|
|
161
|
+
let r = n.label ? String(n.label).trim() : "", a = g.map((e) => e[r] == null ? null : String(e[r]).trim()).filter((e) => e !== null && e !== ""), o = [...new Set(a)];
|
|
162
|
+
if (o.length > 0) {
|
|
163
|
+
b[n.name] = {};
|
|
164
|
+
let r = n.labelKey || "name";
|
|
165
|
+
n.valueKey;
|
|
166
|
+
let a = (e) => n.labelKeyList && n.labelKeyList.length > 0 && n.labelKeyType !== 1 ? n.labelKeyList.map((t) => e[t] !== void 0 && e[t] !== null ? String(e[t]) : "").join(n.labelSpace || "-") : e[r] !== void 0 && e[r] !== null ? String(e[r]) : "", s = o.filter((e) => !(n.options && n.options.find((t) => a(t) === e))), c = n.queryType === "simple", l = {}, u = [];
|
|
167
|
+
if (c ? (n.simpleSearchConditions || []).forEach((t) => {
|
|
168
|
+
t.searchType === 3 ? l[t.field_name] = t.value : t.searchType === 4 && e.context && (l[t.field_name] = i(t.select_name, e.context, []));
|
|
169
|
+
}) : (n.searchConditions || []).forEach((t) => {
|
|
170
|
+
let n = [];
|
|
171
|
+
t.forEach((t) => {
|
|
172
|
+
t.searchType === 3 ? x(n, t, t.value) : t.searchType === 4 && e.context && x(n, t, i(t.select_name, e.context, []));
|
|
173
|
+
}), n.length > 0 && u.push(n);
|
|
174
|
+
}), s.length > 0) {
|
|
175
|
+
let e = [];
|
|
176
|
+
for (let t = 0; t < s.length; t += 500) e.push(s.slice(t, t + 500));
|
|
177
|
+
for (let i of e) {
|
|
178
|
+
let e;
|
|
179
|
+
if (n.labelKeyList && n.labelKeyList.length > 0 && n.labelSpace) {
|
|
180
|
+
let t = [];
|
|
181
|
+
if (i.forEach((e) => {
|
|
182
|
+
let r = e.split(n.labelSpace);
|
|
183
|
+
r.length === n.labelKeyList.length && n.labelKeyList.forEach((e, n) => {
|
|
184
|
+
t.push({
|
|
185
|
+
field_name: e,
|
|
186
|
+
operator: "eq",
|
|
187
|
+
value: [r[n]],
|
|
188
|
+
format: "choices",
|
|
189
|
+
class_name: "str"
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
}), t.length === 0) continue;
|
|
193
|
+
e = {
|
|
194
|
+
op: "or",
|
|
195
|
+
children: t
|
|
196
|
+
};
|
|
197
|
+
} else e = {
|
|
198
|
+
field_name: r,
|
|
199
|
+
operator: "in",
|
|
200
|
+
value: i,
|
|
201
|
+
format: "choices",
|
|
202
|
+
class_name: "str"
|
|
203
|
+
};
|
|
204
|
+
let o;
|
|
205
|
+
o = !c && u.length > 0 ? [{
|
|
206
|
+
op: "and",
|
|
207
|
+
children: u
|
|
208
|
+
}, {
|
|
209
|
+
op: "and",
|
|
210
|
+
children: [e]
|
|
211
|
+
}] : [e];
|
|
212
|
+
try {
|
|
213
|
+
((await t({
|
|
214
|
+
current: 1,
|
|
215
|
+
pageSize: i.length,
|
|
216
|
+
is_pagination: !0,
|
|
217
|
+
...l,
|
|
218
|
+
conditions: o
|
|
219
|
+
}, n.postUrl, !1, { skip_error: !0 }))?.data || []).forEach((e) => {
|
|
220
|
+
b[n.name][a(e)] = e;
|
|
221
|
+
});
|
|
222
|
+
} catch (e) {
|
|
223
|
+
console.error("Fetch remote select error", e);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (g.length === 0) {
|
|
230
|
+
m.info("Excel文件中未检测到数据行(除表头外),请检查文件"), s.value = !1, u && u();
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
let C = 0, w = g.map((t, n) => {
|
|
234
|
+
let r = {};
|
|
235
|
+
return e.configList.forEach((e) => {
|
|
236
|
+
let i = e.label ? String(e.label).trim() : "", a = t[i];
|
|
237
|
+
a != null && (a = String(a).trim());
|
|
238
|
+
let o = e.name;
|
|
239
|
+
a != null && a !== "" && C++;
|
|
240
|
+
let s = h.indexOf(i), c = s === -1 ? "" : `${v.encode_col(s)}${n + 2}`, l = a, u = a, d = null;
|
|
241
|
+
if ([
|
|
242
|
+
"select",
|
|
243
|
+
"radio",
|
|
244
|
+
"checkbox",
|
|
245
|
+
"treeselect",
|
|
246
|
+
"cascader",
|
|
247
|
+
"remoteselectpro"
|
|
248
|
+
].includes(e.type)) {
|
|
249
|
+
let t = e.valueKey || (e.type === "remoteselectpro" ? "id" : "value"), n = e.labelKey || (e.type === "remoteselectpro" ? "name" : "label"), r = (t) => e.labelKeyList && e.labelKeyList.length > 0 && e.labelKeyType !== 1 ? e.labelKeyList.map((e) => t[e] !== void 0 && t[e] !== null ? String(t[e]) : "").join(e.labelSpace || "-") : t[n] !== void 0 && t[n] !== null ? String(t[n]) : "", i = null;
|
|
250
|
+
if (e.options && e.options.length > 0 && (i = e.options.find((e) => r(e) === a)), !i && e.type === "remoteselectpro" && b[e.name] && (i = b[e.name][a]), i) l = i[t], u = r(i);
|
|
251
|
+
else if (a != null && a !== "") {
|
|
252
|
+
let n = null;
|
|
253
|
+
e.options && e.options.length > 0 && (n = e.options.find((e) => String(e[t]) === a)), n ? (l = n[t], u = r(n)) : d = `选项 "${a}" 不存在`;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
if ([
|
|
257
|
+
"number",
|
|
258
|
+
"money",
|
|
259
|
+
"volume",
|
|
260
|
+
"weight"
|
|
261
|
+
].includes(e.type)) try {
|
|
262
|
+
l = Number(l), (!Number.isFinite(l) || Number.isNaN(l)) && (d = `值 "${a}" 不是数字`);
|
|
263
|
+
} catch {
|
|
264
|
+
d = `值 "${a}" 不是数字`;
|
|
265
|
+
}
|
|
266
|
+
if (["timepicker"].includes(e.type)) {
|
|
267
|
+
let t = y(a, "timepicker", e.format);
|
|
268
|
+
t.isValid ? l = t.value : d = t.error || `值 "${a}" 不是时间`;
|
|
269
|
+
}
|
|
270
|
+
if (["datepicker"].includes(e.type)) {
|
|
271
|
+
let t = y(a, "datepicker", e.format);
|
|
272
|
+
t.isValid ? l = t.value : d = t.error || `值 "${a}" 不是日期`;
|
|
273
|
+
}
|
|
274
|
+
r[o] = {
|
|
275
|
+
value: l === void 0 ? null : l,
|
|
276
|
+
raw_value: u === void 0 ? null : u,
|
|
277
|
+
excel_position: c,
|
|
278
|
+
error: d
|
|
279
|
+
};
|
|
280
|
+
}), r;
|
|
281
|
+
});
|
|
282
|
+
if (C === 0) {
|
|
283
|
+
m.warning("Excel表头与配置不匹配,请检查表头名称是否正确"), d && d();
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
w.length > 0 ? (a("ok", w), u && u()) : (m.info("未识别到Excel文件中数据,请确认文件是否正确"), d && d());
|
|
287
|
+
} catch (e) {
|
|
288
|
+
console.error(e), m.error("解析Excel失败");
|
|
289
|
+
try {
|
|
290
|
+
d && d();
|
|
291
|
+
} catch {}
|
|
292
|
+
} finally {
|
|
293
|
+
s.value = !1;
|
|
294
|
+
}
|
|
295
|
+
}, f.onerror = () => {
|
|
296
|
+
s.value = !1, m.error("文件读取失败");
|
|
297
|
+
try {
|
|
298
|
+
d && d();
|
|
299
|
+
} catch {}
|
|
300
|
+
}, f.readAsArrayBuffer(l);
|
|
301
|
+
};
|
|
302
|
+
return {
|
|
303
|
+
props: e,
|
|
304
|
+
loading: s,
|
|
305
|
+
handleRemove: (e) => {
|
|
306
|
+
let t = o.value.indexOf(e);
|
|
307
|
+
o.value.splice(t, 1);
|
|
308
|
+
},
|
|
309
|
+
customRequest: l,
|
|
310
|
+
customRequestFun: (e) => (l(e), !1),
|
|
311
|
+
fileList: o
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region src/components/form-modal/ImportExcelModal/ImportExcelModal.vue
|
|
317
|
+
function x(e, t, n, r, i, l) {
|
|
318
|
+
let d = f("plus-outlined"), m = f("a-button"), h = f("a-upload"), g = f("a-modal");
|
|
319
|
+
return u(), a(g, {
|
|
320
|
+
title: e.title,
|
|
321
|
+
width: "800px",
|
|
322
|
+
open: !0,
|
|
323
|
+
maskClosable: !1,
|
|
324
|
+
confirmLoading: e.loading,
|
|
325
|
+
centered: "",
|
|
326
|
+
footer: null,
|
|
327
|
+
onCancel: t[1] ||= () => {
|
|
328
|
+
e.$emit("cancel");
|
|
329
|
+
}
|
|
330
|
+
}, {
|
|
331
|
+
default: p(() => [c(h, {
|
|
332
|
+
multiple: !1,
|
|
333
|
+
"file-list": e.fileList,
|
|
334
|
+
"onUpdate:fileList": t[0] ||= (t) => e.fileList = t,
|
|
335
|
+
onRemove: e.handleRemove,
|
|
336
|
+
customRequest: e.customRequestFun
|
|
337
|
+
}, {
|
|
338
|
+
default: p(() => [e.fileList.length == 0 ? (u(), a(m, {
|
|
339
|
+
key: 0,
|
|
340
|
+
type: "primary"
|
|
341
|
+
}, {
|
|
342
|
+
default: p(() => [c(d), t[2] ||= s(" 选择文件 ")]),
|
|
343
|
+
_: 1
|
|
344
|
+
})) : o("", !0)]),
|
|
345
|
+
_: 1
|
|
346
|
+
}, 8, [
|
|
347
|
+
"file-list",
|
|
348
|
+
"onRemove",
|
|
349
|
+
"customRequest"
|
|
350
|
+
])]),
|
|
351
|
+
_: 1
|
|
352
|
+
}, 8, ["title", "confirmLoading"]);
|
|
353
|
+
}
|
|
354
|
+
var S = /*#__PURE__*/ e(b, [["render", x]]);
|
|
355
|
+
//#endregion
|
|
356
|
+
export { S as default };
|
|
@@ -469,30 +469,32 @@ var Z = /*#__PURE__*/ a(ie, [["render", X]]), se = /* @__PURE__ */ e(v(), 1), ce
|
|
|
469
469
|
e.select_name == t && g(a.formModel[t], n, e);
|
|
470
470
|
}) : e.searchType === 3 ? g(e.value, n, e) : e.searchType === 4 ? g(v(e.select_name), n, e) : g(e.value, n, e);
|
|
471
471
|
}), t.push(n);
|
|
472
|
-
}), m.value && e)
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
472
|
+
}), m.value && e) {
|
|
473
|
+
F.pageSize = 50;
|
|
474
|
+
let e = [];
|
|
475
|
+
a?.labelKeyList && a?.labelKeyList?.length > 0 ? a.labelKeyList.forEach((t) => {
|
|
476
|
+
e.push({
|
|
477
|
+
op: "or",
|
|
478
|
+
field_name: t,
|
|
479
|
+
operator: "icontains",
|
|
480
|
+
format: "input",
|
|
481
|
+
value: [m.value],
|
|
482
|
+
class_name: "str"
|
|
483
|
+
});
|
|
484
|
+
}) : e.push([{
|
|
485
|
+
field_name: B(),
|
|
476
486
|
operator: "icontains",
|
|
477
487
|
format: "input",
|
|
478
488
|
value: [m.value],
|
|
479
489
|
class_name: "str"
|
|
480
|
-
})
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}]);
|
|
489
|
-
else for (let e of t) e.push({
|
|
490
|
-
field_name: B(),
|
|
491
|
-
operator: "icontains",
|
|
492
|
-
format: "input",
|
|
493
|
-
value: [m.value],
|
|
494
|
-
class_name: "str"
|
|
495
|
-
});
|
|
490
|
+
}]), t = [{
|
|
491
|
+
op: "and",
|
|
492
|
+
children: t
|
|
493
|
+
}, {
|
|
494
|
+
op: "and",
|
|
495
|
+
children: e
|
|
496
|
+
}];
|
|
497
|
+
}
|
|
496
498
|
return t;
|
|
497
499
|
}, O = (e = !0) => {
|
|
498
500
|
let t = {};
|
|
@@ -685,7 +687,7 @@ var Z = /*#__PURE__*/ a(ie, [["render", X]]), se = /* @__PURE__ */ e(v(), 1), ce
|
|
|
685
687
|
}, { deep: !0 });
|
|
686
688
|
let ue = (e) => {
|
|
687
689
|
m.value = e, $();
|
|
688
|
-
}, de = D(() => import("./tableModal-
|
|
690
|
+
}, de = D(() => import("./tableModal-CE-ikX0N.js")), fe = () => {
|
|
689
691
|
let e = [];
|
|
690
692
|
m.value = "";
|
|
691
693
|
let t = "checkbox";
|
|
@@ -706,8 +708,8 @@ var Z = /*#__PURE__*/ a(ie, [["render", X]]), se = /* @__PURE__ */ e(v(), 1), ce
|
|
|
706
708
|
...O()
|
|
707
709
|
};
|
|
708
710
|
else {
|
|
709
|
-
let e = T();
|
|
710
|
-
p.value.query_params = n,
|
|
711
|
+
let e = T(!1);
|
|
712
|
+
p.value.query_params = n, p.value.base_conditions = e;
|
|
711
713
|
}
|
|
712
714
|
let r = Y();
|
|
713
715
|
r && (p.value.query_params = {
|
|
@@ -786,6 +788,6 @@ var Z = /*#__PURE__*/ a(ie, [["render", X]]), se = /* @__PURE__ */ e(v(), 1), ce
|
|
|
786
788
|
]), e.field.table?.enable ? (A(), C("div", le, [E(a, { onClick: fe })])) : S("", !0)]);
|
|
787
789
|
};
|
|
788
790
|
}
|
|
789
|
-
}), [["__scopeId", "data-v-
|
|
791
|
+
}), [["__scopeId", "data-v-0025007e"]]);
|
|
790
792
|
//#endregion
|
|
791
793
|
export { Z as n, G as r, Q as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as e } from "./rolldown-runtime-DY7j01NX.js";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { t as n } from "./lodash-CMVwnWxD.js";
|
|
4
|
-
import { t as r } from "./FieldRender2-
|
|
4
|
+
import { t as r } from "./FieldRender2-Bu6b89w3.js";
|
|
5
5
|
import { Fragment as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, openBlock as d, renderList as f, renderSlot as p, resolveComponent as m, toDisplayString as h, vShow as g, watch as _, withCtx as v, withDirectives as y } from "vue";
|
|
6
6
|
import b from "moment";
|
|
7
7
|
import { CloseOutlined as x, LeftOutlined as S, RightOutlined as C } from "@ant-design/icons-vue";
|
|
@@ -359,7 +359,7 @@ var Re = /*#__PURE__*/ c(Ie, [["render", Le]]), ze = E({
|
|
|
359
359
|
}, {
|
|
360
360
|
label: "整体更新(update)",
|
|
361
361
|
value: "update"
|
|
362
|
-
}], r = A([]), i = ee(() => import("./ImportExcelModal-
|
|
362
|
+
}], r = A([]), i = ee(() => import("./ImportExcelModal-UpwXuAxH.js")), a = v(() => e.innerModel ? (e.innerModel[e.field.name] || (e.innerModel[e.field.name] = {}), e.innerModel[e.field.name]) : {}), o = v(() => !!(e.field.sys_btn_list == null || e.field.sys_btn_list.includes("clear"))), s = v(() => !!(e.field.sys_btn_list == null || e.field.sys_btn_list.includes("download"))), c = v(() => !!(e.field.sys_btn_list == null || e.field.sys_btn_list.includes("import"))), l = v(() => !!(e.field.sys_btn_list == null || e.field.sys_btn_list.includes("add"))), u = v(() => {
|
|
363
363
|
let t = [], n = [];
|
|
364
364
|
return e.field?.children?.forEach((e) => {
|
|
365
365
|
e.children instanceof Array && e.children.forEach((e) => {
|