cd-vue-filter 2.4.5 → 2.4.6
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/cd-vue-filter.js +87 -92
- package/dist/cd-vue-filter.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/cd-vue-filter.js
CHANGED
|
@@ -5547,8 +5547,8 @@ const Se = [
|
|
|
5547
5547
|
}
|
|
5548
5548
|
function K(a, p) {
|
|
5549
5549
|
if (a.length > 0) {
|
|
5550
|
-
const
|
|
5551
|
-
P.value = [
|
|
5550
|
+
const b = a[a.length - 1];
|
|
5551
|
+
P.value = [b], q.value = I.value.find((l) => l.id === b) || null;
|
|
5552
5552
|
} else
|
|
5553
5553
|
P.value = [], q.value = null;
|
|
5554
5554
|
}
|
|
@@ -5556,8 +5556,8 @@ const Se = [
|
|
|
5556
5556
|
if (!q.value) return;
|
|
5557
5557
|
const a = q.value;
|
|
5558
5558
|
let p = "";
|
|
5559
|
-
const
|
|
5560
|
-
if (
|
|
5559
|
+
const b = d.formType || (d.fieldType === "billdata" ? "form" : "basic");
|
|
5560
|
+
if (b === "basic" || b === "tree" ? p = a.fname || "" : p = a.fbillno || "", !p && R.value.length > 0) {
|
|
5561
5561
|
const l = R.value[0];
|
|
5562
5562
|
p = a[l.__vModel__] || "";
|
|
5563
5563
|
}
|
|
@@ -5565,10 +5565,10 @@ const Se = [
|
|
|
5565
5565
|
}
|
|
5566
5566
|
function c(a) {
|
|
5567
5567
|
const p = [];
|
|
5568
|
-
for (const
|
|
5569
|
-
if (!
|
|
5570
|
-
const l =
|
|
5571
|
-
l.noShow || l.jnpfKey === "divider" || l.jnpfKey === "table" || l.jnpfKey === "vxeSubGrid" || (l.children && Array.isArray(l.children) ? p.push(...c(l.children)) : p.push(
|
|
5568
|
+
for (const b of a) {
|
|
5569
|
+
if (!b) continue;
|
|
5570
|
+
const l = b.__config__ || {};
|
|
5571
|
+
l.noShow || l.jnpfKey === "divider" || l.jnpfKey === "table" || l.jnpfKey === "vxeSubGrid" || (l.children && Array.isArray(l.children) ? p.push(...c(l.children)) : p.push(b));
|
|
5572
5572
|
}
|
|
5573
5573
|
return p;
|
|
5574
5574
|
}
|
|
@@ -5581,9 +5581,9 @@ const Se = [
|
|
|
5581
5581
|
return;
|
|
5582
5582
|
}
|
|
5583
5583
|
try {
|
|
5584
|
-
const
|
|
5584
|
+
const b = await (await fetch(`/api/visualdev/OnlineDev/${d.releaseId}/Config`, {
|
|
5585
5585
|
credentials: "include"
|
|
5586
|
-
})).json(), l = (a =
|
|
5586
|
+
})).json(), l = (a = b.data) != null && a.formData ? JSON.parse(b.data.formData) : null;
|
|
5587
5587
|
if (!(l != null && l.fields)) return;
|
|
5588
5588
|
const t = c(l.fields);
|
|
5589
5589
|
R.value = t;
|
|
@@ -5606,7 +5606,7 @@ const Se = [
|
|
|
5606
5606
|
}
|
|
5607
5607
|
}
|
|
5608
5608
|
async function n() {
|
|
5609
|
-
var a, p,
|
|
5609
|
+
var a, p, b;
|
|
5610
5610
|
if (d.releaseId) {
|
|
5611
5611
|
x.value = !0;
|
|
5612
5612
|
try {
|
|
@@ -5627,7 +5627,7 @@ const Se = [
|
|
|
5627
5627
|
} catch {
|
|
5628
5628
|
}
|
|
5629
5629
|
return Object.assign(L, h), L;
|
|
5630
|
-
}), $.value = ((
|
|
5630
|
+
}), $.value = ((b = (p = y.data) == null ? void 0 : p.pagination) == null ? void 0 : b.total) || 0;
|
|
5631
5631
|
} catch (l) {
|
|
5632
5632
|
console.error("[RelationSelectDialog] fetchData error:", l);
|
|
5633
5633
|
} finally {
|
|
@@ -5644,7 +5644,7 @@ const Se = [
|
|
|
5644
5644
|
return G(() => d.visible, (a) => {
|
|
5645
5645
|
a && d.releaseId && f().then(() => n());
|
|
5646
5646
|
}), (a, p) => {
|
|
5647
|
-
const
|
|
5647
|
+
const b = F("t-input"), l = F("t-button"), t = F("t-table"), y = F("t-pagination"), z = F("t-dialog");
|
|
5648
5648
|
return g(), J(z, {
|
|
5649
5649
|
visible: i.visible,
|
|
5650
5650
|
header: i.dialogTitle || "选择关联数据",
|
|
@@ -5658,7 +5658,7 @@ const Se = [
|
|
|
5658
5658
|
default: r(() => [
|
|
5659
5659
|
s("div", xe, [
|
|
5660
5660
|
s("div", De, [
|
|
5661
|
-
o(
|
|
5661
|
+
o(b, {
|
|
5662
5662
|
modelValue: m.value,
|
|
5663
5663
|
"onUpdate:modelValue": p[0] || (p[0] = (h) => m.value = h),
|
|
5664
5664
|
placeholder: "请输入关键字搜索",
|
|
@@ -5722,7 +5722,7 @@ const Se = [
|
|
|
5722
5722
|
},
|
|
5723
5723
|
emits: ["search"],
|
|
5724
5724
|
setup(i, { emit: Y }) {
|
|
5725
|
-
var a, p,
|
|
5725
|
+
var a, p, b;
|
|
5726
5726
|
const d = ["北京市", "上海市", "天津市", "重庆市", "香港特别行政区", "澳门特别行政区"], k = ee(() => Se.map((l) => d.includes(l.name) ? {
|
|
5727
5727
|
label: l.name,
|
|
5728
5728
|
value: l.name,
|
|
@@ -5777,7 +5777,7 @@ const Se = [
|
|
|
5777
5777
|
const e = i, $ = Y, j = _({
|
|
5778
5778
|
field: ((a = e.filterCondition) == null ? void 0 : a.field) || "",
|
|
5779
5779
|
operator: ((p = e.filterCondition) == null ? void 0 : p.operator) || "eq",
|
|
5780
|
-
value: ((
|
|
5780
|
+
value: ((b = e.filterCondition) == null ? void 0 : b.value) || null
|
|
5781
5781
|
});
|
|
5782
5782
|
G(() => e.filterCondition, (l) => {
|
|
5783
5783
|
l && (j.value = { ...l });
|
|
@@ -6432,11 +6432,11 @@ const Se = [
|
|
|
6432
6432
|
p.conditions.length > 1 && a >= 0 && a < p.conditions.length ? p.conditions.splice(a, 1) : p.conditions.length <= 1 && re.warning("每个卡片至少需要一个筛选条件");
|
|
6433
6433
|
}
|
|
6434
6434
|
}, R = (v) => v.map((a) => {
|
|
6435
|
-
const p = a.conditions.filter((
|
|
6435
|
+
const p = a.conditions.filter((b) => b.field && b.field.trim() !== "").map((b) => {
|
|
6436
6436
|
let l = "";
|
|
6437
|
-
return
|
|
6438
|
-
field:
|
|
6439
|
-
operator:
|
|
6437
|
+
return b.value !== null && b.value !== void 0 && (Array.isArray(b.value) ? l = b.value.join("/") : l = String(b.value)), {
|
|
6438
|
+
field: b.field.trim(),
|
|
6439
|
+
operator: b.operator || "eq",
|
|
6440
6440
|
value: l
|
|
6441
6441
|
};
|
|
6442
6442
|
});
|
|
@@ -6473,16 +6473,16 @@ const Se = [
|
|
|
6473
6473
|
});
|
|
6474
6474
|
const a = v.map((l) => l.value), p = a.map(
|
|
6475
6475
|
(l) => d.fieldOptions.find((t) => t.value === l)
|
|
6476
|
-
).filter(Boolean),
|
|
6476
|
+
).filter(Boolean), b = d.fieldOptions.filter(
|
|
6477
6477
|
(l) => !a.includes(l.value)
|
|
6478
6478
|
);
|
|
6479
|
-
n.value = [...p, ...
|
|
6479
|
+
n.value = [...p, ...b];
|
|
6480
6480
|
} else {
|
|
6481
6481
|
K.value = [...v];
|
|
6482
6482
|
const a = v.map(
|
|
6483
|
-
(
|
|
6483
|
+
(b) => d.fieldOptions.find((l) => l.value === b)
|
|
6484
6484
|
).filter(Boolean), p = d.fieldOptions.filter(
|
|
6485
|
-
(
|
|
6485
|
+
(b) => !v.includes(b.value)
|
|
6486
6486
|
);
|
|
6487
6487
|
n.value = [...a, ...p];
|
|
6488
6488
|
}
|
|
@@ -6496,21 +6496,21 @@ const Se = [
|
|
|
6496
6496
|
}, { immediate: !0 });
|
|
6497
6497
|
const U = () => {
|
|
6498
6498
|
const v = n.value.filter((a) => K.value.includes(a.value)).map((a) => {
|
|
6499
|
-
const p = c.value[a.value],
|
|
6499
|
+
const p = c.value[a.value], b = f.value[a.value] || "none";
|
|
6500
6500
|
return {
|
|
6501
6501
|
value: a.value,
|
|
6502
6502
|
show: !0,
|
|
6503
6503
|
// 已通过filter筛选,都是显示的
|
|
6504
6504
|
width: p ? `${p}px` : "120px",
|
|
6505
6505
|
// 没有设置宽度时使用默认值120px
|
|
6506
|
-
fixed:
|
|
6506
|
+
fixed: b
|
|
6507
6507
|
// 冻结状态
|
|
6508
6508
|
};
|
|
6509
6509
|
});
|
|
6510
6510
|
k("column-change", v);
|
|
6511
6511
|
};
|
|
6512
6512
|
return (v, a) => {
|
|
6513
|
-
const p = F("t-radio-button"),
|
|
6513
|
+
const p = F("t-radio-button"), b = F("t-radio-group"), l = F("t-icon"), t = F("t-button"), y = F("t-dialog");
|
|
6514
6514
|
return g(), J(y, {
|
|
6515
6515
|
header: "高级筛选",
|
|
6516
6516
|
placement: "center",
|
|
@@ -6531,7 +6531,7 @@ const Se = [
|
|
|
6531
6531
|
s("div", la, [
|
|
6532
6532
|
m.value.length > 1 ? (g(), B("div", ta, [
|
|
6533
6533
|
s("div", na, [
|
|
6534
|
-
o(
|
|
6534
|
+
o(b, {
|
|
6535
6535
|
size: i.size,
|
|
6536
6536
|
class: "connector-selector",
|
|
6537
6537
|
modelValue: x.value,
|
|
@@ -6563,7 +6563,7 @@ const Se = [
|
|
|
6563
6563
|
s("div", ia, [
|
|
6564
6564
|
s("div", ra, [
|
|
6565
6565
|
s("span", sa, "筛选卡片 " + se(h + 1), 1),
|
|
6566
|
-
o(
|
|
6566
|
+
o(b, {
|
|
6567
6567
|
size: i.size,
|
|
6568
6568
|
modelValue: z.connector,
|
|
6569
6569
|
"onUpdate:modelValue": (L) => z.connector = L,
|
|
@@ -6808,7 +6808,7 @@ const Se = [
|
|
|
6808
6808
|
}), k("smart-colors-change", N.value);
|
|
6809
6809
|
};
|
|
6810
6810
|
return (D, c) => {
|
|
6811
|
-
const f = F("t-button"), n = F("t-checkbox"), U = F("t-popup"), v = F("t-radio-button"), a = F("t-radio-group"), p = F("t-select"),
|
|
6811
|
+
const f = F("t-button"), n = F("t-checkbox"), U = F("t-popup"), v = F("t-radio-button"), a = F("t-radio-group"), p = F("t-select"), b = F("t-input"), l = F("t-icon"), t = F("t-dialog");
|
|
6812
6812
|
return g(), J(t, {
|
|
6813
6813
|
visible: m.value,
|
|
6814
6814
|
"onUpdate:visible": c[0] || (c[0] = (y) => m.value = y),
|
|
@@ -6936,7 +6936,7 @@ const Se = [
|
|
|
6936
6936
|
style: { width: "120px" },
|
|
6937
6937
|
"popup-props": e
|
|
6938
6938
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "size"]),
|
|
6939
|
-
o(
|
|
6939
|
+
o(b, {
|
|
6940
6940
|
modelValue: y.value,
|
|
6941
6941
|
"onUpdate:modelValue": (h) => y.value = h,
|
|
6942
6942
|
placeholder: "输入值",
|
|
@@ -7077,7 +7077,7 @@ const Se = [
|
|
|
7077
7077
|
k("column-change", f), k("update:visible", !1);
|
|
7078
7078
|
};
|
|
7079
7079
|
return (f, n) => {
|
|
7080
|
-
const U = F("t-icon"), v = F("t-option"), a = F("t-select"), p = F("t-input-number"),
|
|
7080
|
+
const U = F("t-icon"), v = F("t-option"), a = F("t-select"), p = F("t-input-number"), b = F("t-button"), l = F("t-dialog");
|
|
7081
7081
|
return g(), J(l, {
|
|
7082
7082
|
header: "列配置",
|
|
7083
7083
|
placement: "center",
|
|
@@ -7159,7 +7159,7 @@ const Se = [
|
|
|
7159
7159
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
7160
7160
|
]),
|
|
7161
7161
|
s("div", Pa, [
|
|
7162
|
-
o(
|
|
7162
|
+
o(b, {
|
|
7163
7163
|
theme: "default",
|
|
7164
7164
|
variant: "text",
|
|
7165
7165
|
size: "small",
|
|
@@ -7174,7 +7174,7 @@ const Se = [
|
|
|
7174
7174
|
]),
|
|
7175
7175
|
_: 1
|
|
7176
7176
|
}, 8, ["onClick", "disabled"]),
|
|
7177
|
-
o(
|
|
7177
|
+
o(b, {
|
|
7178
7178
|
theme: "default",
|
|
7179
7179
|
variant: "text",
|
|
7180
7180
|
size: "small",
|
|
@@ -7195,7 +7195,7 @@ const Se = [
|
|
|
7195
7195
|
])
|
|
7196
7196
|
]),
|
|
7197
7197
|
footer: r(() => [
|
|
7198
|
-
o(
|
|
7198
|
+
o(b, {
|
|
7199
7199
|
theme: "default",
|
|
7200
7200
|
onClick: n[0] || (n[0] = (t) => f.$emit("update:visible", !1))
|
|
7201
7201
|
}, {
|
|
@@ -7204,7 +7204,7 @@ const Se = [
|
|
|
7204
7204
|
])]),
|
|
7205
7205
|
_: 1
|
|
7206
7206
|
}),
|
|
7207
|
-
o(
|
|
7207
|
+
o(b, {
|
|
7208
7208
|
theme: "primary",
|
|
7209
7209
|
onClick: c
|
|
7210
7210
|
}, {
|
|
@@ -7218,13 +7218,10 @@ const Se = [
|
|
|
7218
7218
|
}, 8, ["visible"]);
|
|
7219
7219
|
};
|
|
7220
7220
|
}
|
|
7221
|
-
}, Ja = /* @__PURE__ */ ae(Ra, [["__scopeId", "data-v-0a02ab86"]]), ja = { class: "cd-filter-bar" }, Ma = {
|
|
7222
|
-
key:
|
|
7223
|
-
class: "plan-radio-group"
|
|
7224
|
-
}, Ia = { class: "filter-toolbar-row" }, Ka = {
|
|
7225
|
-
key: 0,
|
|
7221
|
+
}, Ja = /* @__PURE__ */ ae(Ra, [["__scopeId", "data-v-0a02ab86"]]), ja = { class: "cd-filter-bar" }, Ma = { class: "filter-toolbar-row" }, Ia = {
|
|
7222
|
+
key: 1,
|
|
7226
7223
|
class: "inline-filter-toolbar"
|
|
7227
|
-
},
|
|
7224
|
+
}, Ka = { class: "filter-action-buttons" }, Ha = { class: "save-plan-content" }, La = {
|
|
7228
7225
|
__name: "cd-filter-bar",
|
|
7229
7226
|
props: {
|
|
7230
7227
|
fieldOptions: { type: Array, required: !0 },
|
|
@@ -7280,8 +7277,8 @@ const Se = [
|
|
|
7280
7277
|
m.value = [];
|
|
7281
7278
|
return;
|
|
7282
7279
|
}
|
|
7283
|
-
const
|
|
7284
|
-
m.value = Array.from({ length: d.filterCount }, (E, M) =>
|
|
7280
|
+
const C = ((A = (u = d.filterCards) == null ? void 0 : u[0]) == null ? void 0 : A.conditions) || [];
|
|
7281
|
+
m.value = Array.from({ length: d.filterCount }, (E, M) => C[M] ? JSON.parse(JSON.stringify(C[M])) : x());
|
|
7285
7282
|
})();
|
|
7286
7283
|
const e = () => {
|
|
7287
7284
|
if (d.filterCount === 0) {
|
|
@@ -7290,21 +7287,21 @@ const Se = [
|
|
|
7290
7287
|
}
|
|
7291
7288
|
m.value = Array.from({ length: d.filterCount }, () => x());
|
|
7292
7289
|
}, $ = _("保存筛选方案"), j = _(!1), P = _(!1), q = _(d.topOp), R = _(JSON.parse(JSON.stringify(d.filterCards)));
|
|
7293
|
-
G(() => d.topOp, (
|
|
7290
|
+
G(() => d.topOp, (C) => q.value = C), G(() => d.filterCards, (C) => R.value = JSON.parse(JSON.stringify(C)));
|
|
7294
7291
|
const w = _(null), O = _("");
|
|
7295
7292
|
ee(() => d.planFilterOptions && d.planFilterOptions.length > 0 ? d.planFilterOptions : [{ content: "暂无方案", value: "empty", disabled: !0 }]);
|
|
7296
|
-
const N = (
|
|
7297
|
-
const u = d.planFilterOptions.find((A) => A.value ===
|
|
7293
|
+
const N = (C) => {
|
|
7294
|
+
const u = d.planFilterOptions.find((A) => A.value === C);
|
|
7298
7295
|
u && K(u);
|
|
7299
|
-
}, K = (
|
|
7300
|
-
if (!
|
|
7301
|
-
if (w.value =
|
|
7302
|
-
const E =
|
|
7296
|
+
}, K = (C) => {
|
|
7297
|
+
if (!C.precepts || C.precepts.length === 0) return;
|
|
7298
|
+
if (w.value = C, O.value = C.value, R.value = JSON.parse(JSON.stringify(C.precepts)), q.value = C.sqlConnectType, d.filterCount > 0) {
|
|
7299
|
+
const E = C.precepts[0];
|
|
7303
7300
|
E && E.conditions && (m.value = Array.from({ length: d.filterCount }, (M, H) => E.conditions[H] ? JSON.parse(JSON.stringify(E.conditions[H])) : x()));
|
|
7304
7301
|
}
|
|
7305
|
-
const u = v(
|
|
7306
|
-
if (k("confirm", A),
|
|
7307
|
-
const E =
|
|
7302
|
+
const u = v(C.precepts), A = a(u, C.sqlConnectType);
|
|
7303
|
+
if (k("confirm", A), C.columns && C.columns.length > 0) {
|
|
7304
|
+
const E = C.columns.filter((M) => M.show !== !1);
|
|
7308
7305
|
k("column-change", E);
|
|
7309
7306
|
}
|
|
7310
7307
|
}, D = () => {
|
|
@@ -7314,9 +7311,9 @@ const Se = [
|
|
|
7314
7311
|
k("search", { conditions: { and: [] } });
|
|
7315
7312
|
return;
|
|
7316
7313
|
}
|
|
7317
|
-
const
|
|
7314
|
+
const C = v([
|
|
7318
7315
|
{ id: 1, connector: q.value, conditions: m.value }
|
|
7319
|
-
]), u = a(
|
|
7316
|
+
]), u = a(C, "and");
|
|
7320
7317
|
k("search", u);
|
|
7321
7318
|
}, f = () => {
|
|
7322
7319
|
j.value = !0;
|
|
@@ -7324,7 +7321,7 @@ const Se = [
|
|
|
7324
7321
|
k("refresh");
|
|
7325
7322
|
}, U = () => {
|
|
7326
7323
|
j.value = !1;
|
|
7327
|
-
}, v = (
|
|
7324
|
+
}, v = (C) => C.map((u) => {
|
|
7328
7325
|
const A = u.conditions.filter((E) => !(!E.field || E.field.trim() === "" || E.value === null || E.value === void 0 || E.value === "" || Array.isArray(E.value) && E.value.length === 0)).map((E) => {
|
|
7329
7326
|
let M = "";
|
|
7330
7327
|
return E.value !== null && E.value !== void 0 && (Array.isArray(E.value) ? M = E.value.join("/") : M = String(E.value).trim()), {
|
|
@@ -7339,7 +7336,7 @@ const Se = [
|
|
|
7339
7336
|
conditions: A.length > 0 ? A : [{ field: "", operator: "eq", value: "" }]
|
|
7340
7337
|
};
|
|
7341
7338
|
}).filter((u) => u.conditions.length > 0 && u.conditions[0].field !== "");
|
|
7342
|
-
function a(
|
|
7339
|
+
function a(C, u) {
|
|
7343
7340
|
if (u !== "and" && u !== "or")
|
|
7344
7341
|
throw new Error('type参数必须是"and"或"or"');
|
|
7345
7342
|
function A(H) {
|
|
@@ -7356,13 +7353,13 @@ const Se = [
|
|
|
7356
7353
|
}
|
|
7357
7354
|
return {
|
|
7358
7355
|
conditions: {
|
|
7359
|
-
[u]:
|
|
7356
|
+
[u]: C.map(E)
|
|
7360
7357
|
}
|
|
7361
7358
|
};
|
|
7362
7359
|
}
|
|
7363
|
-
const p = (
|
|
7360
|
+
const p = (C) => {
|
|
7364
7361
|
w.value ? ($.value = "更新筛选方案", h.value.name = w.value.content || "") : ($.value = "保存筛选方案", h.value.name = "", w.value = null), z.value = !0;
|
|
7365
|
-
},
|
|
7362
|
+
}, b = () => {
|
|
7366
7363
|
z.value = !1;
|
|
7367
7364
|
}, l = () => {
|
|
7368
7365
|
e(), w.value = null, O.value = "", R.value = [
|
|
@@ -7376,11 +7373,11 @@ const Se = [
|
|
|
7376
7373
|
}
|
|
7377
7374
|
], q.value = "and", k("reset"), c();
|
|
7378
7375
|
}, t = () => {
|
|
7379
|
-
const
|
|
7376
|
+
const C = h.value.name.trim();
|
|
7380
7377
|
if (w.value) {
|
|
7381
7378
|
const u = v(R.value);
|
|
7382
7379
|
k("update-plan", {
|
|
7383
|
-
name:
|
|
7380
|
+
name: C,
|
|
7384
7381
|
precepts: u,
|
|
7385
7382
|
topOp: q.value,
|
|
7386
7383
|
plan: w.value,
|
|
@@ -7390,7 +7387,7 @@ const Se = [
|
|
|
7390
7387
|
} else {
|
|
7391
7388
|
const u = v(R.value);
|
|
7392
7389
|
k("save-plan", {
|
|
7393
|
-
name:
|
|
7390
|
+
name: C,
|
|
7394
7391
|
precepts: u,
|
|
7395
7392
|
topOp: q.value,
|
|
7396
7393
|
plan: w.value,
|
|
@@ -7398,35 +7395,35 @@ const Se = [
|
|
|
7398
7395
|
// 包含当前列配置
|
|
7399
7396
|
});
|
|
7400
7397
|
}
|
|
7401
|
-
|
|
7402
|
-
}, y = (
|
|
7403
|
-
const u = a(
|
|
7398
|
+
b();
|
|
7399
|
+
}, y = (C) => {
|
|
7400
|
+
const u = a(C.filterCards, C.type1);
|
|
7404
7401
|
if (k("confirm", u), d.filterCount > 0) {
|
|
7405
|
-
const A =
|
|
7402
|
+
const A = C.filterCards[0];
|
|
7406
7403
|
A && A.conditions && (m.value = Array.from({ length: d.filterCount }, (E, M) => A.conditions[M] ? JSON.parse(JSON.stringify(A.conditions[M])) : x()));
|
|
7407
7404
|
}
|
|
7408
7405
|
U();
|
|
7409
7406
|
}, z = _(!1), h = _({ name: "" }), L = _(!1), Q = _([]), le = () => {
|
|
7410
7407
|
L.value = !0;
|
|
7411
|
-
}, te = (
|
|
7412
|
-
Q.value =
|
|
7408
|
+
}, te = (C) => {
|
|
7409
|
+
Q.value = C, k("color-filter-change", C);
|
|
7413
7410
|
}, ne = () => {
|
|
7414
7411
|
Q.value = [], k("color-filter-clear");
|
|
7415
7412
|
};
|
|
7416
7413
|
_("");
|
|
7417
|
-
const oe = (
|
|
7418
|
-
k("smart-colors-change",
|
|
7419
|
-
}, V = ee(() => Q.value.filter((
|
|
7414
|
+
const oe = (C) => {
|
|
7415
|
+
k("smart-colors-change", C);
|
|
7416
|
+
}, V = ee(() => Q.value.filter((C) => C.field && C.operator && C.value).length), Ce = ee(() => m.value.some((u) => u.field && u.field.trim() !== "") ? !0 : R.value.some(
|
|
7420
7417
|
(u) => u.conditions.some((A) => A.field && A.field.trim() !== "")
|
|
7421
7418
|
)), ge = ee(() => {
|
|
7422
|
-
const
|
|
7423
|
-
return
|
|
7424
|
-
${
|
|
7419
|
+
const C = Q.value.filter((A) => A.field && A.operator && A.value);
|
|
7420
|
+
return C.length === 0 ? "颜色筛选" : `
|
|
7421
|
+
${C.map((A) => {
|
|
7425
7422
|
const E = d.fieldOptions.find((H) => H.value === A.field);
|
|
7426
7423
|
return `${E ? E.label : A.field} ${he(A.operator)} ${A.value}`;
|
|
7427
7424
|
}).join(`
|
|
7428
7425
|
`)}`;
|
|
7429
|
-
}), he = (
|
|
7426
|
+
}), he = (C) => ({
|
|
7430
7427
|
eq: "等于",
|
|
7431
7428
|
ne: "不等于",
|
|
7432
7429
|
gt: "大于",
|
|
@@ -7435,11 +7432,11 @@ ${b.map((A) => {
|
|
|
7435
7432
|
lte: "小于等于",
|
|
7436
7433
|
contains: "包含",
|
|
7437
7434
|
notContains: "不包含"
|
|
7438
|
-
})[
|
|
7439
|
-
return (
|
|
7435
|
+
})[C] || C;
|
|
7436
|
+
return (C, u) => {
|
|
7440
7437
|
const A = F("t-radio-button"), E = F("t-radio-group"), M = F("t-button"), H = F("t-icon"), _e = F("t-badge"), ce = F("t-tooltip"), ke = F("t-input"), ze = F("t-form-item"), Fe = F("t-form"), Oe = F("t-dialog");
|
|
7441
7438
|
return g(), B("div", ja, [
|
|
7442
|
-
|
|
7439
|
+
s("div", Ma, [
|
|
7443
7440
|
i.planFilterOptions.length > 0 ? (g(), J(E, {
|
|
7444
7441
|
key: 0,
|
|
7445
7442
|
modelValue: O.value,
|
|
@@ -7461,9 +7458,7 @@ ${b.map((A) => {
|
|
|
7461
7458
|
]),
|
|
7462
7459
|
_: 1
|
|
7463
7460
|
}, 8, ["modelValue", "size"])) : X("", !0),
|
|
7464
|
-
we(
|
|
7465
|
-
])) : X("", !0),
|
|
7466
|
-
s("div", Ia, [
|
|
7461
|
+
we(C.$slots, "plan-row-right", {}, void 0, !0),
|
|
7467
7462
|
o(M, {
|
|
7468
7463
|
theme: "default",
|
|
7469
7464
|
variant: "outline",
|
|
@@ -7476,7 +7471,7 @@ ${b.map((A) => {
|
|
|
7476
7471
|
])]),
|
|
7477
7472
|
_: 1
|
|
7478
7473
|
}, 8, ["size"]),
|
|
7479
|
-
i.filterCount > 0 ? (g(), B("div",
|
|
7474
|
+
i.filterCount > 0 ? (g(), B("div", Ia, [
|
|
7480
7475
|
(g(!0), B(W, null, Z(m.value, (S, ve) => (g(), J(me, {
|
|
7481
7476
|
key: ve,
|
|
7482
7477
|
"field-options": i.fieldOptions,
|
|
@@ -7486,7 +7481,7 @@ ${b.map((A) => {
|
|
|
7486
7481
|
onSearch: D
|
|
7487
7482
|
}, null, 8, ["field-options", "size", "filter-condition", "select-options"]))), 128))
|
|
7488
7483
|
])) : X("", !0),
|
|
7489
|
-
s("div",
|
|
7484
|
+
s("div", Ka, [
|
|
7490
7485
|
i.filterCount > 0 ? (g(), J(M, {
|
|
7491
7486
|
key: 0,
|
|
7492
7487
|
theme: "primary",
|
|
@@ -7589,10 +7584,10 @@ ${b.map((A) => {
|
|
|
7589
7584
|
header: $.value,
|
|
7590
7585
|
visible: z.value,
|
|
7591
7586
|
width: "600px",
|
|
7592
|
-
onClose:
|
|
7587
|
+
onClose: b
|
|
7593
7588
|
}, {
|
|
7594
7589
|
body: r(() => [
|
|
7595
|
-
s("div",
|
|
7590
|
+
s("div", Ha, [
|
|
7596
7591
|
o(Fe, {
|
|
7597
7592
|
data: h.value,
|
|
7598
7593
|
"label-width": "100px"
|
|
@@ -7619,7 +7614,7 @@ ${b.map((A) => {
|
|
|
7619
7614
|
footer: r(() => [
|
|
7620
7615
|
o(M, {
|
|
7621
7616
|
theme: "default",
|
|
7622
|
-
onClick:
|
|
7617
|
+
onClick: b
|
|
7623
7618
|
}, {
|
|
7624
7619
|
default: r(() => [...u[17] || (u[17] = [
|
|
7625
7620
|
T("取消", -1)
|
|
@@ -7658,15 +7653,15 @@ ${b.map((A) => {
|
|
|
7658
7653
|
]);
|
|
7659
7654
|
};
|
|
7660
7655
|
}
|
|
7661
|
-
},
|
|
7662
|
-
i.component("FilterDialog", pe), i.component("FilterComponent", pe), i.component("CdFilterBar",
|
|
7656
|
+
}, Ya = /* @__PURE__ */ ae(La, [["__scopeId", "data-v-e9ae1c6e"]]), Qa = (i) => {
|
|
7657
|
+
i.component("FilterDialog", pe), i.component("FilterComponent", pe), i.component("CdFilterBar", Ya), i.component("ColorFilterDialog", be);
|
|
7663
7658
|
};
|
|
7664
7659
|
export {
|
|
7665
|
-
|
|
7660
|
+
Ya as CdFilterBar,
|
|
7666
7661
|
be as ColorFilterDialog,
|
|
7667
7662
|
Ja as ColumnSettingsDialog,
|
|
7668
7663
|
pe as FilterComponent,
|
|
7669
7664
|
pe as FilterDialog,
|
|
7670
7665
|
pe as default,
|
|
7671
|
-
|
|
7666
|
+
Qa as install
|
|
7672
7667
|
};
|