cd-vue-filter 2.4.8 → 2.4.10
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 +326 -316
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as be, ref as _, watch as G, resolveComponent as
|
|
1
|
+
import { defineComponent as be, ref as _, watch as G, resolveComponent as O, openBlock as C, createBlock as J, withCtx as s, createElementVNode as i, createVNode as o, createTextVNode as T, createCommentVNode as X, computed as ee, createElementBlock as B, Fragment as W, renderList as Z, nextTick as ie, toDisplayString as se, normalizeStyle as de, normalizeClass as ue, renderSlot as fe, withDirectives as $e, vShow as Se } from "vue";
|
|
2
2
|
import { MessagePlugin as re } from "tdesign-vue-next";
|
|
3
|
-
const
|
|
3
|
+
const Ve = [
|
|
4
4
|
{
|
|
5
5
|
name: "北京市",
|
|
6
6
|
city: [{
|
|
@@ -5538,8 +5538,8 @@ const Se = [
|
|
|
5538
5538
|
},
|
|
5539
5539
|
emits: ["update:visible", "select"],
|
|
5540
5540
|
setup(r, { emit: Y }) {
|
|
5541
|
-
const d = r, k = Y, m = _(""),
|
|
5542
|
-
function
|
|
5541
|
+
const d = r, k = Y, m = _(""), A = _(!1), I = _([]), e = _([]), S = _(0), j = _(1), P = _([]), q = _(null), M = _([]), w = /* @__PURE__ */ new Map();
|
|
5542
|
+
function F() {
|
|
5543
5543
|
k("update:visible", !1), N();
|
|
5544
5544
|
}
|
|
5545
5545
|
function N() {
|
|
@@ -5547,28 +5547,28 @@ const Se = [
|
|
|
5547
5547
|
}
|
|
5548
5548
|
function K(a, p) {
|
|
5549
5549
|
if (a.length > 0) {
|
|
5550
|
-
const
|
|
5551
|
-
P.value = [
|
|
5550
|
+
const g = a[a.length - 1];
|
|
5551
|
+
P.value = [g], q.value = I.value.find((l) => l.id === g) || null;
|
|
5552
5552
|
} else
|
|
5553
5553
|
P.value = [], q.value = null;
|
|
5554
5554
|
}
|
|
5555
|
-
function
|
|
5555
|
+
function E() {
|
|
5556
5556
|
if (!q.value) return;
|
|
5557
5557
|
const a = q.value;
|
|
5558
5558
|
let p = "";
|
|
5559
|
-
const
|
|
5560
|
-
if (
|
|
5561
|
-
const l =
|
|
5559
|
+
const g = d.formType || (d.fieldType === "billdata" ? "form" : "basic");
|
|
5560
|
+
if (g === "basic" || g === "tree" ? p = a.fname || "" : p = a.fbillno || "", !p && M.value.length > 0) {
|
|
5561
|
+
const l = M.value[0];
|
|
5562
5562
|
p = a[l.__vModel__] || "";
|
|
5563
5563
|
}
|
|
5564
5564
|
k("select", { id: a.id, displayName: p }), k("update:visible", !1), N();
|
|
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 g of a) {
|
|
5569
|
+
if (!g) continue;
|
|
5570
|
+
const l = g.__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(g));
|
|
5572
5572
|
}
|
|
5573
5573
|
return p;
|
|
5574
5574
|
}
|
|
@@ -5577,16 +5577,16 @@ const Se = [
|
|
|
5577
5577
|
if (d.releaseId) {
|
|
5578
5578
|
if (w.has(d.releaseId)) {
|
|
5579
5579
|
const p = w.get(d.releaseId);
|
|
5580
|
-
|
|
5580
|
+
M.value = p.fields, e.value = p.columns;
|
|
5581
5581
|
return;
|
|
5582
5582
|
}
|
|
5583
5583
|
try {
|
|
5584
|
-
const
|
|
5584
|
+
const g = await (await fetch(`/api/visualdev/OnlineDev/${d.releaseId}/Config`, {
|
|
5585
5585
|
credentials: "include"
|
|
5586
|
-
})).json(), l = (a =
|
|
5586
|
+
})).json(), l = (a = g.data) != null && a.formData ? JSON.parse(g.data.formData) : null;
|
|
5587
5587
|
if (!(l != null && l.fields)) return;
|
|
5588
5588
|
const t = c(l.fields);
|
|
5589
|
-
|
|
5589
|
+
M.value = t;
|
|
5590
5590
|
const y = t.slice(0, 6).map((z) => {
|
|
5591
5591
|
var h;
|
|
5592
5592
|
return {
|
|
@@ -5606,9 +5606,9 @@ const Se = [
|
|
|
5606
5606
|
}
|
|
5607
5607
|
}
|
|
5608
5608
|
async function n() {
|
|
5609
|
-
var a, p,
|
|
5609
|
+
var a, p, g;
|
|
5610
5610
|
if (d.releaseId) {
|
|
5611
|
-
|
|
5611
|
+
A.value = !0;
|
|
5612
5612
|
try {
|
|
5613
5613
|
const l = { currentPage: j.value, pageSize: pe };
|
|
5614
5614
|
m.value.trim() && (l.keyword = m.value.trim());
|
|
@@ -5627,11 +5627,11 @@ const Se = [
|
|
|
5627
5627
|
} catch {
|
|
5628
5628
|
}
|
|
5629
5629
|
return Object.assign(L, h), L;
|
|
5630
|
-
}),
|
|
5630
|
+
}), S.value = ((g = (p = y.data) == null ? void 0 : p.pagination) == null ? void 0 : g.total) || 0;
|
|
5631
5631
|
} catch (l) {
|
|
5632
5632
|
console.error("[RelationSelectDialog] fetchData error:", l);
|
|
5633
5633
|
} finally {
|
|
5634
|
-
|
|
5634
|
+
A.value = !1;
|
|
5635
5635
|
}
|
|
5636
5636
|
}
|
|
5637
5637
|
}
|
|
@@ -5644,21 +5644,21 @@ const Se = [
|
|
|
5644
5644
|
return G(() => d.visible, (a) => {
|
|
5645
5645
|
a && d.releaseId && f().then(() => n());
|
|
5646
5646
|
}), (a, p) => {
|
|
5647
|
-
const
|
|
5648
|
-
return
|
|
5647
|
+
const g = O("t-input"), l = O("t-button"), t = O("t-table"), y = O("t-pagination"), z = O("t-dialog");
|
|
5648
|
+
return C(), J(z, {
|
|
5649
5649
|
visible: r.visible,
|
|
5650
5650
|
header: r.dialogTitle || "选择关联数据",
|
|
5651
5651
|
width: 900,
|
|
5652
5652
|
footer: !0,
|
|
5653
|
-
onClose:
|
|
5654
|
-
onConfirm:
|
|
5653
|
+
onClose: F,
|
|
5654
|
+
onConfirm: E,
|
|
5655
5655
|
attach: ".cd-form-select-modal",
|
|
5656
5656
|
"close-on-overlay-click": !1
|
|
5657
5657
|
}, {
|
|
5658
5658
|
default: s(() => [
|
|
5659
5659
|
i("div", xe, [
|
|
5660
5660
|
i("div", De, [
|
|
5661
|
-
o(
|
|
5661
|
+
o(g, {
|
|
5662
5662
|
modelValue: m.value,
|
|
5663
5663
|
"onUpdate:modelValue": p[0] || (p[0] = (h) => m.value = h),
|
|
5664
5664
|
placeholder: "请输入关键字搜索",
|
|
@@ -5682,7 +5682,7 @@ const Se = [
|
|
|
5682
5682
|
o(t, {
|
|
5683
5683
|
data: I.value,
|
|
5684
5684
|
columns: e.value,
|
|
5685
|
-
loading:
|
|
5685
|
+
loading: A.value,
|
|
5686
5686
|
"row-key": "id",
|
|
5687
5687
|
"selected-row-keys": P.value,
|
|
5688
5688
|
onSelectChange: K,
|
|
@@ -5690,11 +5690,11 @@ const Se = [
|
|
|
5690
5690
|
size: "small",
|
|
5691
5691
|
style: { "margin-top": "12px" }
|
|
5692
5692
|
}, null, 8, ["data", "columns", "loading", "selected-row-keys"]),
|
|
5693
|
-
|
|
5693
|
+
S.value > 0 ? (C(), J(y, {
|
|
5694
5694
|
key: 0,
|
|
5695
5695
|
current: j.value,
|
|
5696
5696
|
"onUpdate:current": p[1] || (p[1] = (h) => j.value = h),
|
|
5697
|
-
total:
|
|
5697
|
+
total: S.value,
|
|
5698
5698
|
"page-size": pe,
|
|
5699
5699
|
"show-jumper": !0,
|
|
5700
5700
|
size: "small",
|
|
@@ -5722,8 +5722,8 @@ const Se = [
|
|
|
5722
5722
|
},
|
|
5723
5723
|
emits: ["search"],
|
|
5724
5724
|
setup(r, { emit: Y }) {
|
|
5725
|
-
var a, p,
|
|
5726
|
-
const d = ["北京市", "上海市", "天津市", "重庆市", "香港特别行政区", "澳门特别行政区"], k = ee(() =>
|
|
5725
|
+
var a, p, g;
|
|
5726
|
+
const d = ["北京市", "上海市", "天津市", "重庆市", "香港特别行政区", "澳门特别行政区"], k = ee(() => Ve.map((l) => d.includes(l.name) ? {
|
|
5727
5727
|
label: l.name,
|
|
5728
5728
|
value: l.name,
|
|
5729
5729
|
children: l.city[0].area.map((t) => ({
|
|
@@ -5756,7 +5756,7 @@ const Se = [
|
|
|
5756
5756
|
"this_year",
|
|
5757
5757
|
"last_year",
|
|
5758
5758
|
"next_year"
|
|
5759
|
-
].includes(l),
|
|
5759
|
+
].includes(l), A = (l) => {
|
|
5760
5760
|
if (e.selectOptions && e.selectOptions[l])
|
|
5761
5761
|
return e.selectOptions[l];
|
|
5762
5762
|
if (e.selectOptions && Array.isArray(e.selectOptions)) {
|
|
@@ -5774,10 +5774,10 @@ const Se = [
|
|
|
5774
5774
|
function I(l) {
|
|
5775
5775
|
return [...l].sort((t, y) => t.value.localeCompare(y.value, "zh-CN"));
|
|
5776
5776
|
}
|
|
5777
|
-
const e = r,
|
|
5777
|
+
const e = r, S = 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: ((g = e.filterCondition) == null ? void 0 : g.value) || null
|
|
5781
5781
|
});
|
|
5782
5782
|
G(() => e.filterCondition, (l) => {
|
|
5783
5783
|
l && (j.value = { ...l });
|
|
@@ -5787,23 +5787,23 @@ const Se = [
|
|
|
5787
5787
|
return t ? t.type : "text";
|
|
5788
5788
|
}, q = () => {
|
|
5789
5789
|
typeof e.filterCondition.value == "string" && (e.filterCondition.value = e.filterCondition.value.trim()), ie(() => {
|
|
5790
|
-
|
|
5790
|
+
S("search", { ...e.filterCondition });
|
|
5791
5791
|
});
|
|
5792
|
-
},
|
|
5792
|
+
}, M = () => {
|
|
5793
5793
|
(e.filterCondition.operator === "is_empty" || e.filterCondition.operator === "is_not_empty") && (e.filterCondition.value = null), ie(() => {
|
|
5794
|
-
|
|
5794
|
+
S("search", { ...e.filterCondition });
|
|
5795
5795
|
});
|
|
5796
5796
|
}, w = (l) => {
|
|
5797
|
-
e.filterCondition.value = l,
|
|
5798
|
-
},
|
|
5797
|
+
e.filterCondition.value = l, S("search", { ...e.filterCondition });
|
|
5798
|
+
}, F = _(!1), N = _(null), K = _("basedata"), E = (l) => {
|
|
5799
5799
|
const t = e.fieldOptions.find((y) => y.value === l);
|
|
5800
5800
|
return !!t && (t.type === "basedata" || t.type === "billdata") && !!t.relationConfig;
|
|
5801
5801
|
}, c = (l) => l === "is_empty" || l === "is_not_empty", f = (l) => {
|
|
5802
5802
|
const t = e.fieldOptions.find((y) => y.value === l);
|
|
5803
|
-
t != null && t.relationConfig && (N.value = t.relationConfig, K.value = t.type === "billdata" ? "billdata" : "basedata",
|
|
5803
|
+
t != null && t.relationConfig && (N.value = t.relationConfig, K.value = t.type === "billdata" ? "billdata" : "basedata", F.value = !0);
|
|
5804
5804
|
}, n = (l) => {
|
|
5805
5805
|
e.filterCondition.value = l.displayName, ie(() => {
|
|
5806
|
-
|
|
5806
|
+
S("search", { ...e.filterCondition });
|
|
5807
5807
|
});
|
|
5808
5808
|
}, U = ee(() => {
|
|
5809
5809
|
var y;
|
|
@@ -5896,18 +5896,18 @@ const Se = [
|
|
|
5896
5896
|
}
|
|
5897
5897
|
}), v = () => {
|
|
5898
5898
|
ie(() => {
|
|
5899
|
-
|
|
5899
|
+
S("search", { ...e.filterCondition });
|
|
5900
5900
|
});
|
|
5901
5901
|
};
|
|
5902
5902
|
return G(() => e.filterCondition.field, (l, t) => {
|
|
5903
5903
|
l && t && (e.filterCondition.operator = "eq", e.filterCondition.value = null);
|
|
5904
5904
|
}), (l, t) => {
|
|
5905
5905
|
var le, te, ne, oe;
|
|
5906
|
-
const y =
|
|
5907
|
-
return
|
|
5906
|
+
const y = O("t-option"), z = O("t-select"), h = O("t-input"), L = O("t-date-picker"), Q = O("t-cascader");
|
|
5907
|
+
return C(), B("div", Ue, [
|
|
5908
5908
|
o(z, {
|
|
5909
5909
|
modelValue: e.filterCondition.field,
|
|
5910
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
5910
|
+
"onUpdate:modelValue": t[0] || (t[0] = (x) => e.filterCondition.field = x),
|
|
5911
5911
|
placeholder: "请选择字段",
|
|
5912
5912
|
size: e.size,
|
|
5913
5913
|
style: { "min-width": "80px", "max-width": "110px" },
|
|
@@ -5916,64 +5916,64 @@ const Se = [
|
|
|
5916
5916
|
"popup-props": { attach: ".cd-form-select-modal" }
|
|
5917
5917
|
}, {
|
|
5918
5918
|
default: s(() => [
|
|
5919
|
-
(
|
|
5920
|
-
key:
|
|
5921
|
-
label:
|
|
5922
|
-
value:
|
|
5919
|
+
(C(!0), B(W, null, Z(e.fieldOptions, (x) => (C(), J(y, {
|
|
5920
|
+
key: x.key,
|
|
5921
|
+
label: x.key,
|
|
5922
|
+
value: x.value
|
|
5923
5923
|
}, null, 8, ["label", "value"]))), 128))
|
|
5924
5924
|
]),
|
|
5925
5925
|
_: 1
|
|
5926
5926
|
}, 8, ["modelValue", "size"]),
|
|
5927
5927
|
o(z, {
|
|
5928
5928
|
modelValue: e.filterCondition.operator,
|
|
5929
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
5929
|
+
"onUpdate:modelValue": t[1] || (t[1] = (x) => e.filterCondition.operator = x),
|
|
5930
5930
|
placeholder: "请选择条件",
|
|
5931
5931
|
size: e.size,
|
|
5932
5932
|
style: { width: "80px" },
|
|
5933
5933
|
clearable: "",
|
|
5934
|
-
onChange:
|
|
5934
|
+
onChange: M,
|
|
5935
5935
|
"popup-props": { attach: ".cd-form-select-modal" }
|
|
5936
5936
|
}, {
|
|
5937
5937
|
default: s(() => [
|
|
5938
|
-
(
|
|
5939
|
-
key:
|
|
5940
|
-
label:
|
|
5941
|
-
value:
|
|
5938
|
+
(C(!0), B(W, null, Z(U.value, (x) => (C(), J(y, {
|
|
5939
|
+
key: x.key,
|
|
5940
|
+
label: x.label,
|
|
5941
|
+
value: x.value
|
|
5942
5942
|
}, null, 8, ["label", "value"]))), 128))
|
|
5943
5943
|
]),
|
|
5944
5944
|
_: 1
|
|
5945
5945
|
}, 8, ["modelValue", "size"]),
|
|
5946
|
-
P(e.filterCondition.field) === "number" ? (
|
|
5946
|
+
P(e.filterCondition.field) === "number" ? (C(), J(h, {
|
|
5947
5947
|
key: 0,
|
|
5948
5948
|
type: "number",
|
|
5949
5949
|
modelValue: e.filterCondition.value,
|
|
5950
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
5950
|
+
"onUpdate:modelValue": t[2] || (t[2] = (x) => e.filterCondition.value = x),
|
|
5951
5951
|
placeholder: "请输入数字",
|
|
5952
5952
|
size: e.size,
|
|
5953
5953
|
style: { width: "80px" },
|
|
5954
5954
|
onChange: q,
|
|
5955
5955
|
clearable: ""
|
|
5956
|
-
}, null, 8, ["modelValue", "size"])) : P(e.filterCondition.field) === "money" ? (
|
|
5956
|
+
}, null, 8, ["modelValue", "size"])) : P(e.filterCondition.field) === "money" ? (C(), J(h, {
|
|
5957
5957
|
key: 1,
|
|
5958
5958
|
type: "number",
|
|
5959
5959
|
modelValue: e.filterCondition.value,
|
|
5960
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
5960
|
+
"onUpdate:modelValue": t[3] || (t[3] = (x) => e.filterCondition.value = x),
|
|
5961
5961
|
placeholder: "请输入金额",
|
|
5962
5962
|
size: e.size,
|
|
5963
5963
|
style: { width: "80px" },
|
|
5964
5964
|
onChange: q,
|
|
5965
5965
|
clearable: ""
|
|
5966
|
-
}, null, 8, ["modelValue", "size"])) : P(e.filterCondition.field) === "date" ? (
|
|
5967
|
-
m(e.filterCondition.operator) ? (
|
|
5966
|
+
}, null, 8, ["modelValue", "size"])) : P(e.filterCondition.field) === "date" ? (C(), B(W, { key: 2 }, [
|
|
5967
|
+
m(e.filterCondition.operator) ? (C(), J(h, {
|
|
5968
5968
|
key: 1,
|
|
5969
|
-
value: (le = U.value.find((
|
|
5969
|
+
value: (le = U.value.find((x) => x.value === e.filterCondition.operator)) == null ? void 0 : le.label,
|
|
5970
5970
|
disabled: "",
|
|
5971
5971
|
size: e.size,
|
|
5972
5972
|
style: { "min-width": "80px", "max-width": "120px" }
|
|
5973
|
-
}, null, 8, ["value", "size"])) : (
|
|
5973
|
+
}, null, 8, ["value", "size"])) : (C(), J(L, {
|
|
5974
5974
|
key: 0,
|
|
5975
5975
|
modelValue: e.filterCondition.value,
|
|
5976
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
5976
|
+
"onUpdate:modelValue": t[4] || (t[4] = (x) => e.filterCondition.value = x),
|
|
5977
5977
|
placeholder: "请选择日期",
|
|
5978
5978
|
size: e.size,
|
|
5979
5979
|
style: { "min-width": "80px", "max-width": "120px" },
|
|
@@ -5981,10 +5981,10 @@ const Se = [
|
|
|
5981
5981
|
clearable: "",
|
|
5982
5982
|
"popup-props": { attach: ".cd-form-select-modal" }
|
|
5983
5983
|
}, null, 8, ["modelValue", "size"]))
|
|
5984
|
-
], 64)) : P(e.filterCondition.field) === "time" ? (
|
|
5984
|
+
], 64)) : P(e.filterCondition.field) === "time" ? (C(), J(L, {
|
|
5985
5985
|
key: 3,
|
|
5986
5986
|
modelValue: e.filterCondition.value,
|
|
5987
|
-
"onUpdate:modelValue": t[5] || (t[5] = (
|
|
5987
|
+
"onUpdate:modelValue": t[5] || (t[5] = (x) => e.filterCondition.value = x),
|
|
5988
5988
|
placeholder: "请选择日期时间",
|
|
5989
5989
|
size: e.size,
|
|
5990
5990
|
style: { "min-width": "80px", "max-width": "120px" },
|
|
@@ -5993,21 +5993,21 @@ const Se = [
|
|
|
5993
5993
|
onChange: q,
|
|
5994
5994
|
clearable: "",
|
|
5995
5995
|
"popup-props": { attach: ".cd-form-select-modal" }
|
|
5996
|
-
}, null, 8, ["modelValue", "size"])) : P(e.filterCondition.field) === "select" ? (
|
|
5996
|
+
}, null, 8, ["modelValue", "size"])) : P(e.filterCondition.field) === "select" ? (C(), J(z, {
|
|
5997
5997
|
key: 4,
|
|
5998
5998
|
modelValue: e.filterCondition.value,
|
|
5999
|
-
"onUpdate:modelValue": t[6] || (t[6] = (
|
|
6000
|
-
options:
|
|
5999
|
+
"onUpdate:modelValue": t[6] || (t[6] = (x) => e.filterCondition.value = x),
|
|
6000
|
+
options: A(e.filterCondition.field),
|
|
6001
6001
|
placeholder: "请选择",
|
|
6002
6002
|
size: e.size,
|
|
6003
6003
|
style: { "min-width": "80px", "max-width": "120px" },
|
|
6004
6004
|
onChange: q,
|
|
6005
6005
|
clearable: "",
|
|
6006
6006
|
"popup-props": { attach: ".cd-form-select-modal" }
|
|
6007
|
-
}, null, 8, ["modelValue", "options", "size"])) : P(e.filterCondition.field) === "selectProvince" ? (
|
|
6007
|
+
}, null, 8, ["modelValue", "options", "size"])) : P(e.filterCondition.field) === "selectProvince" ? (C(), J(Q, {
|
|
6008
6008
|
key: 5,
|
|
6009
6009
|
modelValue: e.filterCondition.value,
|
|
6010
|
-
"onUpdate:modelValue": t[7] || (t[7] = (
|
|
6010
|
+
"onUpdate:modelValue": t[7] || (t[7] = (x) => e.filterCondition.value = x),
|
|
6011
6011
|
options: k.value,
|
|
6012
6012
|
placeholder: "请选择地区",
|
|
6013
6013
|
size: e.size,
|
|
@@ -6016,11 +6016,11 @@ const Se = [
|
|
|
6016
6016
|
loading: !1,
|
|
6017
6017
|
onChange: w,
|
|
6018
6018
|
"popup-props": { attach: ".cd-form-select-modal" }
|
|
6019
|
-
}, null, 8, ["modelValue", "options", "size"])) :
|
|
6020
|
-
c(e.filterCondition.operator) ? X("", !0) : (
|
|
6019
|
+
}, null, 8, ["modelValue", "options", "size"])) : E(e.filterCondition.field) ? (C(), B(W, { key: 6 }, [
|
|
6020
|
+
c(e.filterCondition.operator) ? X("", !0) : (C(), J(h, {
|
|
6021
6021
|
key: 0,
|
|
6022
6022
|
modelValue: e.filterCondition.value,
|
|
6023
|
-
"onUpdate:modelValue": t[9] || (t[9] = (
|
|
6023
|
+
"onUpdate:modelValue": t[9] || (t[9] = (x) => e.filterCondition.value = x),
|
|
6024
6024
|
placeholder: "请选择",
|
|
6025
6025
|
readonly: "",
|
|
6026
6026
|
size: e.size,
|
|
@@ -6032,25 +6032,25 @@ const Se = [
|
|
|
6032
6032
|
i("i", {
|
|
6033
6033
|
class: "ri-search-line",
|
|
6034
6034
|
style: { cursor: "pointer" },
|
|
6035
|
-
onClick: t[8] || (t[8] = (
|
|
6035
|
+
onClick: t[8] || (t[8] = (x) => f(e.filterCondition.field))
|
|
6036
6036
|
})
|
|
6037
6037
|
]),
|
|
6038
6038
|
_: 1
|
|
6039
6039
|
}, 8, ["modelValue", "size"])),
|
|
6040
6040
|
o(Ee, {
|
|
6041
|
-
visible:
|
|
6042
|
-
"onUpdate:visible": t[10] || (t[10] = (
|
|
6041
|
+
visible: F.value,
|
|
6042
|
+
"onUpdate:visible": t[10] || (t[10] = (x) => F.value = x),
|
|
6043
6043
|
"release-id": ((te = N.value) == null ? void 0 : te.releaseId) || "",
|
|
6044
6044
|
"field-type": K.value,
|
|
6045
6045
|
"form-type": (ne = N.value) == null ? void 0 : ne.formType,
|
|
6046
6046
|
"dialog-title": (oe = N.value) == null ? void 0 : oe.dialogTitle,
|
|
6047
6047
|
onSelect: n
|
|
6048
6048
|
}, null, 8, ["visible", "release-id", "field-type", "form-type", "dialog-title"])
|
|
6049
|
-
], 64)) : (
|
|
6050
|
-
e.filterCondition.operator !== "is_empty" && e.filterCondition.operator !== "is_not_empty" ? (
|
|
6049
|
+
], 64)) : (C(), B(W, { key: 7 }, [
|
|
6050
|
+
e.filterCondition.operator !== "is_empty" && e.filterCondition.operator !== "is_not_empty" ? (C(), J(h, {
|
|
6051
6051
|
key: 0,
|
|
6052
6052
|
modelValue: e.filterCondition.value,
|
|
6053
|
-
"onUpdate:modelValue": t[11] || (t[11] = (
|
|
6053
|
+
"onUpdate:modelValue": t[11] || (t[11] = (x) => e.filterCondition.value = x),
|
|
6054
6054
|
placeholder: "请输入关键字",
|
|
6055
6055
|
size: e.size,
|
|
6056
6056
|
style: { "min-width": "80px", "max-width": "100px" },
|
|
@@ -6113,12 +6113,12 @@ const Se = [
|
|
|
6113
6113
|
{ field: "", operator: "eq", value: "" }
|
|
6114
6114
|
]
|
|
6115
6115
|
}
|
|
6116
|
-
]),
|
|
6116
|
+
]), A = _("and");
|
|
6117
6117
|
let I = 3;
|
|
6118
6118
|
G(() => d.initialFilterCards, (w) => {
|
|
6119
6119
|
w && w.length > 0 && (m.value = w);
|
|
6120
6120
|
}, { immediate: !0, deep: !0 }), G(() => d.initialType1, (w) => {
|
|
6121
|
-
w && (
|
|
6121
|
+
w && (A.value = w);
|
|
6122
6122
|
}, { immediate: !0 });
|
|
6123
6123
|
const e = () => {
|
|
6124
6124
|
m.value.push({
|
|
@@ -6126,62 +6126,62 @@ const Se = [
|
|
|
6126
6126
|
connector: "and",
|
|
6127
6127
|
conditions: [{ field: "", operator: "eq", value: "" }]
|
|
6128
6128
|
});
|
|
6129
|
-
},
|
|
6129
|
+
}, S = (w) => {
|
|
6130
6130
|
w >= 0 && w < m.value.length && m.value[w].conditions.push({
|
|
6131
6131
|
field: "",
|
|
6132
6132
|
operator: "eq",
|
|
6133
6133
|
value: ""
|
|
6134
6134
|
});
|
|
6135
|
-
}, j = (w,
|
|
6135
|
+
}, j = (w, F) => {
|
|
6136
6136
|
if (w >= 0 && w < m.value.length) {
|
|
6137
6137
|
const N = m.value[w];
|
|
6138
|
-
N.conditions.length > 1 &&
|
|
6138
|
+
N.conditions.length > 1 && F >= 0 && F < N.conditions.length ? N.conditions.splice(F, 1) : N.conditions.length <= 1 && re.warning("每个卡片至少需要一个筛选条件");
|
|
6139
6139
|
}
|
|
6140
6140
|
}, P = (w) => {
|
|
6141
6141
|
m.value.length > 1 ? m.value.splice(w, 1) : re.warning("至少需要保留一个筛选卡片");
|
|
6142
6142
|
}, q = () => {
|
|
6143
6143
|
k("submit", {
|
|
6144
6144
|
filterCards: m.value,
|
|
6145
|
-
type1:
|
|
6145
|
+
type1: A.value
|
|
6146
6146
|
});
|
|
6147
|
-
},
|
|
6147
|
+
}, M = () => {
|
|
6148
6148
|
k("close"), k("update:visible", !1);
|
|
6149
6149
|
};
|
|
6150
|
-
return (w,
|
|
6151
|
-
const N =
|
|
6152
|
-
return
|
|
6150
|
+
return (w, F) => {
|
|
6151
|
+
const N = O("t-radio-button"), K = O("t-radio-group"), E = O("t-icon"), c = O("t-button"), f = O("t-dialog");
|
|
6152
|
+
return C(), J(f, {
|
|
6153
6153
|
header: "筛选条件设置",
|
|
6154
6154
|
placement: "center",
|
|
6155
6155
|
visible: r.visible,
|
|
6156
|
-
"onUpdate:visible":
|
|
6156
|
+
"onUpdate:visible": F[1] || (F[1] = (n) => w.$emit("update:visible", n)),
|
|
6157
6157
|
width: "700px",
|
|
6158
6158
|
"z-index": 999,
|
|
6159
6159
|
footer: !0,
|
|
6160
|
-
onClose:
|
|
6160
|
+
onClose: M,
|
|
6161
6161
|
id: "leader-line-clip-container"
|
|
6162
6162
|
}, {
|
|
6163
6163
|
body: s(() => [
|
|
6164
6164
|
i("div", Te, [
|
|
6165
6165
|
i("div", Ne, [
|
|
6166
6166
|
i("div", Be, [
|
|
6167
|
-
m.value.length > 1 ? (
|
|
6167
|
+
m.value.length > 1 ? (C(), B("div", Pe, [
|
|
6168
6168
|
i("div", Re, [
|
|
6169
6169
|
o(K, {
|
|
6170
6170
|
size: "small",
|
|
6171
6171
|
class: "connector-selector",
|
|
6172
|
-
modelValue:
|
|
6173
|
-
"onUpdate:modelValue":
|
|
6172
|
+
modelValue: A.value,
|
|
6173
|
+
"onUpdate:modelValue": F[0] || (F[0] = (n) => A.value = n),
|
|
6174
6174
|
style: { "margin-right": "20px" }
|
|
6175
6175
|
}, {
|
|
6176
6176
|
default: s(() => [
|
|
6177
6177
|
o(N, { value: "and" }, {
|
|
6178
|
-
default: s(() => [...
|
|
6178
|
+
default: s(() => [...F[2] || (F[2] = [
|
|
6179
6179
|
T("且", -1)
|
|
6180
6180
|
])]),
|
|
6181
6181
|
_: 1
|
|
6182
6182
|
}),
|
|
6183
6183
|
o(N, { value: "or" }, {
|
|
6184
|
-
default: s(() => [...
|
|
6184
|
+
default: s(() => [...F[3] || (F[3] = [
|
|
6185
6185
|
T("或", -1)
|
|
6186
6186
|
])]),
|
|
6187
6187
|
_: 1
|
|
@@ -6193,7 +6193,7 @@ const Se = [
|
|
|
6193
6193
|
])) : X("", !0),
|
|
6194
6194
|
i("div", Je, [
|
|
6195
6195
|
i("div", je, [
|
|
6196
|
-
(
|
|
6196
|
+
(C(!0), B(W, null, Z(m.value, (n, U) => (C(), B("div", {
|
|
6197
6197
|
key: n.id,
|
|
6198
6198
|
class: "filter-card-item"
|
|
6199
6199
|
}, [
|
|
@@ -6208,13 +6208,13 @@ const Se = [
|
|
|
6208
6208
|
}, {
|
|
6209
6209
|
default: s(() => [
|
|
6210
6210
|
o(N, { value: "and" }, {
|
|
6211
|
-
default: s(() => [...
|
|
6211
|
+
default: s(() => [...F[4] || (F[4] = [
|
|
6212
6212
|
T("且", -1)
|
|
6213
6213
|
])]),
|
|
6214
6214
|
_: 1
|
|
6215
6215
|
}),
|
|
6216
6216
|
o(N, { value: "or" }, {
|
|
6217
|
-
default: s(() => [...
|
|
6217
|
+
default: s(() => [...F[5] || (F[5] = [
|
|
6218
6218
|
T("或", -1)
|
|
6219
6219
|
])]),
|
|
6220
6220
|
_: 1
|
|
@@ -6231,13 +6231,13 @@ const Se = [
|
|
|
6231
6231
|
disabled: m.value.length === 1
|
|
6232
6232
|
}, {
|
|
6233
6233
|
icon: s(() => [
|
|
6234
|
-
o(
|
|
6234
|
+
o(E, { name: "close" })
|
|
6235
6235
|
]),
|
|
6236
6236
|
_: 1
|
|
6237
6237
|
}, 8, ["onClick", "disabled"])
|
|
6238
6238
|
]),
|
|
6239
6239
|
i("div", He, [
|
|
6240
|
-
(
|
|
6240
|
+
(C(!0), B(W, null, Z(n.conditions, (v, a) => (C(), B("div", {
|
|
6241
6241
|
key: a,
|
|
6242
6242
|
class: "filter-combination"
|
|
6243
6243
|
}, [
|
|
@@ -6256,7 +6256,7 @@ const Se = [
|
|
|
6256
6256
|
disabled: n.conditions.length === 1
|
|
6257
6257
|
}, {
|
|
6258
6258
|
icon: s(() => [
|
|
6259
|
-
o(
|
|
6259
|
+
o(E, { name: "minus" })
|
|
6260
6260
|
]),
|
|
6261
6261
|
_: 1
|
|
6262
6262
|
}, 8, ["onClick", "disabled"])
|
|
@@ -6265,13 +6265,13 @@ const Se = [
|
|
|
6265
6265
|
o(c, {
|
|
6266
6266
|
theme: "default",
|
|
6267
6267
|
size: "small",
|
|
6268
|
-
onClick: (v) =>
|
|
6268
|
+
onClick: (v) => S(U)
|
|
6269
6269
|
}, {
|
|
6270
6270
|
icon: s(() => [
|
|
6271
|
-
o(
|
|
6271
|
+
o(E, { name: "add" })
|
|
6272
6272
|
]),
|
|
6273
6273
|
default: s(() => [
|
|
6274
|
-
|
|
6274
|
+
F[6] || (F[6] = T(" 添加条件 ", -1))
|
|
6275
6275
|
]),
|
|
6276
6276
|
_: 1
|
|
6277
6277
|
}, 8, ["onClick"])
|
|
@@ -6283,8 +6283,8 @@ const Se = [
|
|
|
6283
6283
|
onClick: e
|
|
6284
6284
|
}, [
|
|
6285
6285
|
i("div", Ye, [
|
|
6286
|
-
o(
|
|
6287
|
-
|
|
6286
|
+
o(E, { name: "add" }),
|
|
6287
|
+
F[7] || (F[7] = i("span", null, "增加筛选卡片", -1))
|
|
6288
6288
|
])
|
|
6289
6289
|
])
|
|
6290
6290
|
])
|
|
@@ -6295,13 +6295,13 @@ const Se = [
|
|
|
6295
6295
|
]),
|
|
6296
6296
|
footer: s(() => [
|
|
6297
6297
|
i("div", Ge, [
|
|
6298
|
-
|
|
6298
|
+
F[10] || (F[10] = i("div", { class: "filter-dialog-footer2" }, null, -1)),
|
|
6299
6299
|
i("div", We, [
|
|
6300
6300
|
o(c, {
|
|
6301
6301
|
theme: "default",
|
|
6302
|
-
onClick:
|
|
6302
|
+
onClick: M
|
|
6303
6303
|
}, {
|
|
6304
|
-
default: s(() => [...
|
|
6304
|
+
default: s(() => [...F[8] || (F[8] = [
|
|
6305
6305
|
T("取消", -1)
|
|
6306
6306
|
])]),
|
|
6307
6307
|
_: 1
|
|
@@ -6310,7 +6310,7 @@ const Se = [
|
|
|
6310
6310
|
theme: "primary",
|
|
6311
6311
|
onClick: q
|
|
6312
6312
|
}, {
|
|
6313
|
-
default: s(() => [...
|
|
6313
|
+
default: s(() => [...F[9] || (F[9] = [
|
|
6314
6314
|
T("确定", -1)
|
|
6315
6315
|
])]),
|
|
6316
6316
|
_: 1
|
|
@@ -6404,15 +6404,15 @@ const Se = [
|
|
|
6404
6404
|
"column-change"
|
|
6405
6405
|
],
|
|
6406
6406
|
setup(r, { emit: Y }) {
|
|
6407
|
-
const d = r, k = Y, m = _(JSON.parse(JSON.stringify(d.filterCards))),
|
|
6407
|
+
const d = r, k = Y, m = _(JSON.parse(JSON.stringify(d.filterCards))), A = _(d.topOp), I = _(null);
|
|
6408
6408
|
_([]);
|
|
6409
6409
|
let e = 100;
|
|
6410
6410
|
G(() => d.filterCards, (v) => {
|
|
6411
6411
|
m.value = JSON.parse(JSON.stringify(v));
|
|
6412
6412
|
}, { deep: !0 }), G(() => d.topOp, (v) => {
|
|
6413
|
-
|
|
6413
|
+
A.value = v;
|
|
6414
6414
|
});
|
|
6415
|
-
const
|
|
6415
|
+
const S = () => {
|
|
6416
6416
|
m.value.push({
|
|
6417
6417
|
id: e++,
|
|
6418
6418
|
connector: "and",
|
|
@@ -6431,12 +6431,12 @@ const Se = [
|
|
|
6431
6431
|
const p = m.value[v];
|
|
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
|
-
},
|
|
6435
|
-
const p = a.conditions.filter((
|
|
6434
|
+
}, M = (v) => v.map((a) => {
|
|
6435
|
+
const p = a.conditions.filter((g) => g.field && g.field.trim() !== "").map((g) => {
|
|
6436
6436
|
let l = "";
|
|
6437
|
-
return
|
|
6438
|
-
field:
|
|
6439
|
-
operator:
|
|
6437
|
+
return g.value !== null && g.value !== void 0 && (Array.isArray(g.value) ? l = g.value.join("/") : l = String(g.value)), {
|
|
6438
|
+
field: g.field.trim(),
|
|
6439
|
+
operator: g.operator || "eq",
|
|
6440
6440
|
value: l
|
|
6441
6441
|
};
|
|
6442
6442
|
});
|
|
@@ -6455,16 +6455,16 @@ const Se = [
|
|
|
6455
6455
|
{ field: "", operator: "eq", value: "" }
|
|
6456
6456
|
]
|
|
6457
6457
|
}
|
|
6458
|
-
],
|
|
6459
|
-
},
|
|
6460
|
-
const v =
|
|
6458
|
+
], A.value = "and", k("reset");
|
|
6459
|
+
}, F = () => {
|
|
6460
|
+
const v = M(m.value);
|
|
6461
6461
|
k("confirm", {
|
|
6462
6462
|
filterCards: v,
|
|
6463
|
-
type1:
|
|
6463
|
+
type1: A.value
|
|
6464
6464
|
}), U(), N();
|
|
6465
6465
|
}, N = () => {
|
|
6466
6466
|
k("update:visible", !1);
|
|
6467
|
-
}, K = _([]),
|
|
6467
|
+
}, K = _([]), E = _(!1), c = _({}), f = _({}), n = _([]);
|
|
6468
6468
|
_(null), _(null), G(() => d.visibleColumns, (v) => {
|
|
6469
6469
|
if (c.value = {}, f.value = {}, v && v.length > 0) {
|
|
6470
6470
|
if (typeof v[0] == "object") {
|
|
@@ -6473,21 +6473,21 @@ 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), g = d.fieldOptions.filter(
|
|
6477
6477
|
(l) => !a.includes(l.value)
|
|
6478
6478
|
);
|
|
6479
|
-
n.value = [...p, ...
|
|
6479
|
+
n.value = [...p, ...g];
|
|
6480
6480
|
} else {
|
|
6481
6481
|
K.value = [...v];
|
|
6482
6482
|
const a = v.map(
|
|
6483
|
-
(
|
|
6483
|
+
(g) => d.fieldOptions.find((l) => l.value === g)
|
|
6484
6484
|
).filter(Boolean), p = d.fieldOptions.filter(
|
|
6485
|
-
(
|
|
6485
|
+
(g) => !v.includes(g.value)
|
|
6486
6486
|
);
|
|
6487
6487
|
n.value = [...a, ...p];
|
|
6488
6488
|
}
|
|
6489
|
-
|
|
6490
|
-
} else d.fieldOptions.length > 0 && (K.value = d.fieldOptions.map((a) => a.value), n.value = [...d.fieldOptions],
|
|
6489
|
+
E.value = K.value.length === d.fieldOptions.length;
|
|
6490
|
+
} else d.fieldOptions.length > 0 && (K.value = d.fieldOptions.map((a) => a.value), n.value = [...d.fieldOptions], E.value = !0);
|
|
6491
6491
|
d.fieldOptions.forEach((a) => {
|
|
6492
6492
|
f.value[a.value] || (f.value[a.value] = "none");
|
|
6493
6493
|
});
|
|
@@ -6496,22 +6496,22 @@ 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], g = 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: g
|
|
6507
6507
|
// 冻结状态
|
|
6508
6508
|
};
|
|
6509
6509
|
});
|
|
6510
6510
|
k("column-change", v);
|
|
6511
6511
|
};
|
|
6512
6512
|
return (v, a) => {
|
|
6513
|
-
const p =
|
|
6514
|
-
return
|
|
6513
|
+
const p = O("t-radio-button"), g = O("t-radio-group"), l = O("t-icon"), t = O("t-button"), y = O("t-dialog");
|
|
6514
|
+
return C(), J(y, {
|
|
6515
6515
|
header: "高级筛选",
|
|
6516
6516
|
placement: "center",
|
|
6517
6517
|
attach: "body",
|
|
@@ -6529,13 +6529,13 @@ const Se = [
|
|
|
6529
6529
|
i("div", ea, [
|
|
6530
6530
|
i("div", aa, [
|
|
6531
6531
|
i("div", la, [
|
|
6532
|
-
m.value.length > 1 ? (
|
|
6532
|
+
m.value.length > 1 ? (C(), B("div", ta, [
|
|
6533
6533
|
i("div", na, [
|
|
6534
|
-
o(
|
|
6534
|
+
o(g, {
|
|
6535
6535
|
size: r.size,
|
|
6536
6536
|
class: "connector-selector",
|
|
6537
|
-
modelValue:
|
|
6538
|
-
"onUpdate:modelValue": a[0] || (a[0] = (z) =>
|
|
6537
|
+
modelValue: A.value,
|
|
6538
|
+
"onUpdate:modelValue": a[0] || (a[0] = (z) => A.value = z)
|
|
6539
6539
|
}, {
|
|
6540
6540
|
default: s(() => [
|
|
6541
6541
|
o(p, { value: "and" }, {
|
|
@@ -6556,14 +6556,14 @@ const Se = [
|
|
|
6556
6556
|
])
|
|
6557
6557
|
])) : X("", !0),
|
|
6558
6558
|
i("div", oa, [
|
|
6559
|
-
(
|
|
6559
|
+
(C(!0), B(W, null, Z(m.value, (z, h) => (C(), B("div", {
|
|
6560
6560
|
key: z.id,
|
|
6561
6561
|
class: "filter-card-item"
|
|
6562
6562
|
}, [
|
|
6563
6563
|
i("div", ia, [
|
|
6564
6564
|
i("div", ra, [
|
|
6565
6565
|
i("span", sa, "筛选卡片 " + se(h + 1), 1),
|
|
6566
|
-
o(
|
|
6566
|
+
o(g, {
|
|
6567
6567
|
size: r.size,
|
|
6568
6568
|
modelValue: z.connector,
|
|
6569
6569
|
"onUpdate:modelValue": (L) => z.connector = L,
|
|
@@ -6600,7 +6600,7 @@ const Se = [
|
|
|
6600
6600
|
}, 8, ["size", "onClick", "disabled"])
|
|
6601
6601
|
]),
|
|
6602
6602
|
i("div", da, [
|
|
6603
|
-
(
|
|
6603
|
+
(C(!0), B(W, null, Z(z.conditions, (L, Q) => (C(), B("div", {
|
|
6604
6604
|
key: Q,
|
|
6605
6605
|
class: "filter-combination"
|
|
6606
6606
|
}, [
|
|
@@ -6642,7 +6642,7 @@ const Se = [
|
|
|
6642
6642
|
]))), 128)),
|
|
6643
6643
|
i("div", {
|
|
6644
6644
|
class: "add-filter-card",
|
|
6645
|
-
onClick:
|
|
6645
|
+
onClick: S
|
|
6646
6646
|
}, [
|
|
6647
6647
|
i("div", ma, [
|
|
6648
6648
|
o(l, { name: "add" }),
|
|
@@ -6672,7 +6672,7 @@ const Se = [
|
|
|
6672
6672
|
o(t, {
|
|
6673
6673
|
theme: "primary",
|
|
6674
6674
|
size: r.size,
|
|
6675
|
-
onClick:
|
|
6675
|
+
onClick: F
|
|
6676
6676
|
}, {
|
|
6677
6677
|
default: s(() => [...a[9] || (a[9] = [
|
|
6678
6678
|
T("确定", -1)
|
|
@@ -6686,10 +6686,10 @@ const Se = [
|
|
|
6686
6686
|
}, 8, ["visible", "width"]);
|
|
6687
6687
|
};
|
|
6688
6688
|
}
|
|
6689
|
-
}, pa = /* @__PURE__ */ ae(fa, [["__scopeId", "data-v-0ee31b05"]]), ya = { class: "dialog-header" }, ba = { class: "color-filter-dialog" },
|
|
6689
|
+
}, pa = /* @__PURE__ */ ae(fa, [["__scopeId", "data-v-0ee31b05"]]), ya = { class: "dialog-header" }, ba = { class: "color-filter-dialog" }, ga = { class: "color-filter-rules" }, Ca = { class: "rule-content" }, ha = { class: "rule-color-section" }, _a = { class: "color-block-wrapper" }, ka = {
|
|
6690
6690
|
key: 0,
|
|
6691
6691
|
class: "bold-indicator"
|
|
6692
|
-
}, za = { class: "color-picker-panel" },
|
|
6692
|
+
}, za = { class: "color-picker-panel" }, Oa = { class: "preset-colors" }, Fa = ["onClick"], wa = { class: "bold-option" }, $a = { class: "apply-to-section" }, Sa = { class: "rule-condition" }, Va = { class: "dialog-footer" }, xa = {
|
|
6693
6693
|
__name: "ColorFilterDialog",
|
|
6694
6694
|
props: {
|
|
6695
6695
|
visible: { type: Boolean, default: !1 },
|
|
@@ -6699,7 +6699,7 @@ const Se = [
|
|
|
6699
6699
|
},
|
|
6700
6700
|
emits: ["update:visible", "confirm", "clear", "smart-colors-change"],
|
|
6701
6701
|
setup(r, { emit: Y }) {
|
|
6702
|
-
const d = r, k = Y, m = _(d.visible),
|
|
6702
|
+
const d = r, k = Y, m = _(d.visible), A = [
|
|
6703
6703
|
// 第一行 - 暖色系
|
|
6704
6704
|
"#FFE7BA",
|
|
6705
6705
|
"#FFD6E7",
|
|
@@ -6746,7 +6746,7 @@ const Se = [
|
|
|
6746
6746
|
overlayInnerStyle: {
|
|
6747
6747
|
width: "180px"
|
|
6748
6748
|
}
|
|
6749
|
-
},
|
|
6749
|
+
}, S = _([
|
|
6750
6750
|
{
|
|
6751
6751
|
field: "",
|
|
6752
6752
|
operator: "eq",
|
|
@@ -6757,18 +6757,18 @@ const Se = [
|
|
|
6757
6757
|
applyTo: "cell"
|
|
6758
6758
|
}
|
|
6759
6759
|
]);
|
|
6760
|
-
G(() => d.visible, (
|
|
6761
|
-
m.value =
|
|
6760
|
+
G(() => d.visible, (E) => {
|
|
6761
|
+
m.value = E, E && d.initialRules.length > 0 && (S.value = JSON.parse(JSON.stringify(d.initialRules)).map((c) => ({
|
|
6762
6762
|
...c,
|
|
6763
6763
|
showColorPicker: !1
|
|
6764
6764
|
})));
|
|
6765
|
-
}), G(m, (
|
|
6766
|
-
k("update:visible",
|
|
6765
|
+
}), G(m, (E) => {
|
|
6766
|
+
k("update:visible", E);
|
|
6767
6767
|
});
|
|
6768
|
-
const j = (
|
|
6769
|
-
|
|
6768
|
+
const j = (E, c) => {
|
|
6769
|
+
S.value[E].backgroundColor = c, S.value[E].showColorPicker = !1;
|
|
6770
6770
|
}, P = () => {
|
|
6771
|
-
|
|
6771
|
+
S.value.push({
|
|
6772
6772
|
field: "",
|
|
6773
6773
|
operator: "eq",
|
|
6774
6774
|
value: "",
|
|
@@ -6777,14 +6777,14 @@ const Se = [
|
|
|
6777
6777
|
showColorPicker: !1,
|
|
6778
6778
|
applyTo: "cell"
|
|
6779
6779
|
});
|
|
6780
|
-
}, q = (
|
|
6781
|
-
|
|
6782
|
-
},
|
|
6780
|
+
}, q = (E) => {
|
|
6781
|
+
S.value.length > 1 && S.value.splice(E, 1);
|
|
6782
|
+
}, M = () => {
|
|
6783
6783
|
m.value = !1;
|
|
6784
6784
|
}, w = () => {
|
|
6785
6785
|
k("clear"), m.value = !1;
|
|
6786
|
-
},
|
|
6787
|
-
const
|
|
6786
|
+
}, F = () => {
|
|
6787
|
+
const E = S.value.filter(
|
|
6788
6788
|
(c) => c.field && c.operator && c.value
|
|
6789
6789
|
).map((c) => ({
|
|
6790
6790
|
field: c.field,
|
|
@@ -6794,28 +6794,28 @@ const Se = [
|
|
|
6794
6794
|
isBold: c.isBold,
|
|
6795
6795
|
applyTo: c.applyTo
|
|
6796
6796
|
}));
|
|
6797
|
-
k("confirm",
|
|
6797
|
+
k("confirm", E), m.value = !1;
|
|
6798
6798
|
}, N = ee(() => {
|
|
6799
|
-
const
|
|
6800
|
-
for (let n = 0; n <
|
|
6801
|
-
const U = n * c %
|
|
6802
|
-
f.push(
|
|
6799
|
+
const E = S.value.length, c = Math.floor(A.length / E), f = [];
|
|
6800
|
+
for (let n = 0; n < E; n++) {
|
|
6801
|
+
const U = n * c % A.length;
|
|
6802
|
+
f.push(A[U]);
|
|
6803
6803
|
}
|
|
6804
6804
|
return f;
|
|
6805
6805
|
}), K = () => {
|
|
6806
|
-
|
|
6807
|
-
c < N.value.length && (
|
|
6806
|
+
S.value.forEach((E, c) => {
|
|
6807
|
+
c < N.value.length && (E.backgroundColor = N.value[c]);
|
|
6808
6808
|
}), k("smart-colors-change", N.value);
|
|
6809
6809
|
};
|
|
6810
|
-
return (
|
|
6811
|
-
const f =
|
|
6812
|
-
return
|
|
6810
|
+
return (E, c) => {
|
|
6811
|
+
const f = O("t-button"), n = O("t-checkbox"), U = O("t-popup"), v = O("t-radio-button"), a = O("t-radio-group"), p = O("t-select"), g = O("t-input"), l = O("t-icon"), t = O("t-dialog");
|
|
6812
|
+
return C(), J(t, {
|
|
6813
6813
|
visible: m.value,
|
|
6814
6814
|
"onUpdate:visible": c[0] || (c[0] = (y) => m.value = y),
|
|
6815
6815
|
width: "800px",
|
|
6816
6816
|
"confirm-btn": null,
|
|
6817
6817
|
"cancel-btn": null,
|
|
6818
|
-
onClose:
|
|
6818
|
+
onClose: M
|
|
6819
6819
|
}, {
|
|
6820
6820
|
header: s(() => [
|
|
6821
6821
|
i("div", ya, [
|
|
@@ -6838,12 +6838,12 @@ const Se = [
|
|
|
6838
6838
|
]),
|
|
6839
6839
|
body: s(() => [
|
|
6840
6840
|
i("div", ba, [
|
|
6841
|
-
i("div",
|
|
6842
|
-
(
|
|
6841
|
+
i("div", ga, [
|
|
6842
|
+
(C(!0), B(W, null, Z(S.value, (y, z) => (C(), B("div", {
|
|
6843
6843
|
key: z,
|
|
6844
6844
|
class: "color-rule-item"
|
|
6845
6845
|
}, [
|
|
6846
|
-
i("div",
|
|
6846
|
+
i("div", Ca, [
|
|
6847
6847
|
i("div", ha, [
|
|
6848
6848
|
o(U, {
|
|
6849
6849
|
visible: y.showColorPicker,
|
|
@@ -6853,13 +6853,13 @@ const Se = [
|
|
|
6853
6853
|
}, {
|
|
6854
6854
|
content: s(() => [
|
|
6855
6855
|
i("div", za, [
|
|
6856
|
-
i("div",
|
|
6857
|
-
(
|
|
6856
|
+
i("div", Oa, [
|
|
6857
|
+
(C(), B(W, null, Z(A, (h) => i("div", {
|
|
6858
6858
|
key: h,
|
|
6859
6859
|
class: ue(["preset-color-item", { active: y.backgroundColor === h }]),
|
|
6860
6860
|
style: de({ backgroundColor: h }),
|
|
6861
6861
|
onClick: (L) => j(z, h)
|
|
6862
|
-
}, null, 14,
|
|
6862
|
+
}, null, 14, Fa)), 64))
|
|
6863
6863
|
]),
|
|
6864
6864
|
i("div", wa, [
|
|
6865
6865
|
o(n, {
|
|
@@ -6880,7 +6880,7 @@ const Se = [
|
|
|
6880
6880
|
class: "color-block",
|
|
6881
6881
|
style: de({ backgroundColor: y.backgroundColor })
|
|
6882
6882
|
}, [
|
|
6883
|
-
y.isBold ? (
|
|
6883
|
+
y.isBold ? (C(), B("span", ka, "B")) : X("", !0)
|
|
6884
6884
|
], 4)
|
|
6885
6885
|
])
|
|
6886
6886
|
]),
|
|
@@ -6917,7 +6917,7 @@ const Se = [
|
|
|
6917
6917
|
_: 1
|
|
6918
6918
|
}, 8, ["modelValue", "onUpdate:modelValue", "size"])
|
|
6919
6919
|
]),
|
|
6920
|
-
i("div",
|
|
6920
|
+
i("div", Sa, [
|
|
6921
6921
|
o(p, {
|
|
6922
6922
|
modelValue: y.field,
|
|
6923
6923
|
"onUpdate:modelValue": (h) => y.field = h,
|
|
@@ -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(g, {
|
|
6940
6940
|
modelValue: y.value,
|
|
6941
6941
|
"onUpdate:modelValue": (h) => y.value = h,
|
|
6942
6942
|
placeholder: "输入值",
|
|
@@ -6950,7 +6950,7 @@ const Se = [
|
|
|
6950
6950
|
variant: "text",
|
|
6951
6951
|
size: r.size,
|
|
6952
6952
|
onClick: (h) => q(z),
|
|
6953
|
-
disabled:
|
|
6953
|
+
disabled: S.value.length === 1
|
|
6954
6954
|
}, {
|
|
6955
6955
|
icon: s(() => [...c[8] || (c[8] = [
|
|
6956
6956
|
i("i", { class: "ri-close-fill" }, null, -1)
|
|
@@ -6977,11 +6977,11 @@ const Se = [
|
|
|
6977
6977
|
])
|
|
6978
6978
|
]),
|
|
6979
6979
|
footer: s(() => [
|
|
6980
|
-
i("div",
|
|
6980
|
+
i("div", Va, [
|
|
6981
6981
|
o(f, {
|
|
6982
6982
|
theme: "default",
|
|
6983
6983
|
size: r.size,
|
|
6984
|
-
onClick:
|
|
6984
|
+
onClick: M
|
|
6985
6985
|
}, {
|
|
6986
6986
|
default: s(() => [...c[10] || (c[10] = [
|
|
6987
6987
|
T("取消", -1)
|
|
@@ -7001,7 +7001,7 @@ const Se = [
|
|
|
7001
7001
|
o(f, {
|
|
7002
7002
|
theme: "primary",
|
|
7003
7003
|
size: r.size,
|
|
7004
|
-
onClick:
|
|
7004
|
+
onClick: F
|
|
7005
7005
|
}, {
|
|
7006
7006
|
default: s(() => [...c[12] || (c[12] = [
|
|
7007
7007
|
T("确定", -1)
|
|
@@ -7014,7 +7014,7 @@ const Se = [
|
|
|
7014
7014
|
}, 8, ["visible"]);
|
|
7015
7015
|
};
|
|
7016
7016
|
}
|
|
7017
|
-
},
|
|
7017
|
+
}, ge = /* @__PURE__ */ ae(xa, [["__scopeId", "data-v-822b291e"]]), Da = { class: "column-settings-panel" }, Aa = { class: "column-list" }, Ea = ["onDragstart", "onDragover", "onDrop"], Ua = { class: "column-name" }, qa = { class: "column-show" }, Ta = ["onClick"], Na = { class: "column-freeze" }, Ba = { class: "column-width" }, Pa = { class: "column-sort-buttons" }, Ra = {
|
|
7018
7018
|
__name: "ColumnSettingsDialog",
|
|
7019
7019
|
props: {
|
|
7020
7020
|
visible: { type: Boolean, default: !1 },
|
|
@@ -7023,11 +7023,11 @@ const Se = [
|
|
|
7023
7023
|
},
|
|
7024
7024
|
emits: ["update:visible", "column-change"],
|
|
7025
7025
|
setup(r, { emit: Y }) {
|
|
7026
|
-
const d = r, k = Y, m = _([]),
|
|
7027
|
-
if (
|
|
7026
|
+
const d = r, k = Y, m = _([]), A = _({}), I = _({}), e = _([]), S = _(null), j = _(null), P = (f) => {
|
|
7027
|
+
if (A.value = {}, I.value = {}, f && f.length > 0)
|
|
7028
7028
|
if (typeof f[0] == "object") {
|
|
7029
7029
|
m.value = f.filter((a) => a.show !== !1).map((a) => a.value), f.forEach((a) => {
|
|
7030
|
-
|
|
7030
|
+
A.value[a.value] = a.width ? parseInt(a.width) : void 0, I.value[a.value] = a.fixed || "none";
|
|
7031
7031
|
});
|
|
7032
7032
|
const n = f.map((a) => a.value), U = n.map((a) => d.fieldOptions.find((p) => p.value === a)).filter(Boolean), v = d.fieldOptions.filter((a) => !n.includes(a.value));
|
|
7033
7033
|
e.value = [...U, ...v];
|
|
@@ -7045,7 +7045,7 @@ const Se = [
|
|
|
7045
7045
|
const q = (f) => {
|
|
7046
7046
|
const n = m.value.indexOf(f);
|
|
7047
7047
|
n === -1 ? m.value.push(f) : m.value.splice(n, 1);
|
|
7048
|
-
},
|
|
7048
|
+
}, M = (f) => {
|
|
7049
7049
|
if (f > 0) {
|
|
7050
7050
|
const n = [...e.value];
|
|
7051
7051
|
[n[f], n[f - 1]] = [n[f - 1], n[f]], e.value = n;
|
|
@@ -7055,30 +7055,30 @@ const Se = [
|
|
|
7055
7055
|
const n = [...e.value];
|
|
7056
7056
|
[n[f], n[f + 1]] = [n[f + 1], n[f]], e.value = n;
|
|
7057
7057
|
}
|
|
7058
|
-
},
|
|
7059
|
-
|
|
7058
|
+
}, F = (f, n) => {
|
|
7059
|
+
S.value = f, n.dataTransfer.effectAllowed = "move";
|
|
7060
7060
|
}, N = (f, n) => {
|
|
7061
7061
|
n.preventDefault(), j.value = f;
|
|
7062
7062
|
}, K = () => {
|
|
7063
|
-
|
|
7064
|
-
},
|
|
7063
|
+
S.value = null, j.value = null;
|
|
7064
|
+
}, E = (f, n) => {
|
|
7065
7065
|
n.preventDefault();
|
|
7066
|
-
const U =
|
|
7066
|
+
const U = S.value;
|
|
7067
7067
|
if (U === null || U === f) return;
|
|
7068
7068
|
const v = [...e.value], a = v.splice(U, 1)[0];
|
|
7069
|
-
v.splice(f, 0, a), e.value = v,
|
|
7069
|
+
v.splice(f, 0, a), e.value = v, S.value = null, j.value = null;
|
|
7070
7070
|
}, c = () => {
|
|
7071
7071
|
const f = e.value.filter((n) => m.value.includes(n.value)).map((n) => ({
|
|
7072
7072
|
value: n.value,
|
|
7073
7073
|
show: !0,
|
|
7074
|
-
width:
|
|
7074
|
+
width: A.value[n.value] ? `${A.value[n.value]}px` : "120px",
|
|
7075
7075
|
fixed: I.value[n.value] || "none"
|
|
7076
7076
|
}));
|
|
7077
7077
|
k("column-change", f), k("update:visible", !1);
|
|
7078
7078
|
};
|
|
7079
7079
|
return (f, n) => {
|
|
7080
|
-
const U =
|
|
7081
|
-
return
|
|
7080
|
+
const U = O("t-icon"), v = O("t-option"), a = O("t-select"), p = O("t-input-number"), g = O("t-button"), l = O("t-dialog");
|
|
7081
|
+
return C(), J(l, {
|
|
7082
7082
|
header: "列配置",
|
|
7083
7083
|
placement: "center",
|
|
7084
7084
|
attach: "body",
|
|
@@ -7099,14 +7099,14 @@ const Se = [
|
|
|
7099
7099
|
i("div", { class: "column-title column-title-sort" }, "排序")
|
|
7100
7100
|
], -1)),
|
|
7101
7101
|
i("div", Aa, [
|
|
7102
|
-
(
|
|
7102
|
+
(C(!0), B(W, null, Z(e.value, (t, y) => (C(), B("div", {
|
|
7103
7103
|
key: t.value,
|
|
7104
|
-
class: ue(["column-item-row", { dragging:
|
|
7104
|
+
class: ue(["column-item-row", { dragging: S.value === y, "col-hidden": !m.value.includes(t.value) }]),
|
|
7105
7105
|
draggable: "true",
|
|
7106
|
-
onDragstart: (z) =>
|
|
7106
|
+
onDragstart: (z) => F(y, z),
|
|
7107
7107
|
onDragover: (z) => N(y, z),
|
|
7108
7108
|
onDragend: K,
|
|
7109
|
-
onDrop: (z) =>
|
|
7109
|
+
onDrop: (z) => E(y, z)
|
|
7110
7110
|
}, [
|
|
7111
7111
|
i("div", Ua, [
|
|
7112
7112
|
o(U, {
|
|
@@ -7148,8 +7148,8 @@ const Se = [
|
|
|
7148
7148
|
]),
|
|
7149
7149
|
i("div", Ba, [
|
|
7150
7150
|
o(p, {
|
|
7151
|
-
modelValue:
|
|
7152
|
-
"onUpdate:modelValue": (z) =>
|
|
7151
|
+
modelValue: A.value[t.value],
|
|
7152
|
+
"onUpdate:modelValue": (z) => A.value[t.value] = z,
|
|
7153
7153
|
min: 50,
|
|
7154
7154
|
max: 500,
|
|
7155
7155
|
step: 10,
|
|
@@ -7159,11 +7159,11 @@ const Se = [
|
|
|
7159
7159
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
7160
7160
|
]),
|
|
7161
7161
|
i("div", Pa, [
|
|
7162
|
-
o(
|
|
7162
|
+
o(g, {
|
|
7163
7163
|
theme: "default",
|
|
7164
7164
|
variant: "text",
|
|
7165
7165
|
size: "small",
|
|
7166
|
-
onClick: (z) =>
|
|
7166
|
+
onClick: (z) => M(y),
|
|
7167
7167
|
disabled: y === 0
|
|
7168
7168
|
}, {
|
|
7169
7169
|
icon: s(() => [
|
|
@@ -7174,7 +7174,7 @@ const Se = [
|
|
|
7174
7174
|
]),
|
|
7175
7175
|
_: 1
|
|
7176
7176
|
}, 8, ["onClick", "disabled"]),
|
|
7177
|
-
o(
|
|
7177
|
+
o(g, {
|
|
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: s(() => [
|
|
7198
|
-
o(
|
|
7198
|
+
o(g, {
|
|
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(g, {
|
|
7208
7208
|
theme: "primary",
|
|
7209
7209
|
onClick: c
|
|
7210
7210
|
}, {
|
|
@@ -7218,10 +7218,13 @@ 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 = {
|
|
7221
|
+
}, Ja = /* @__PURE__ */ ae(Ra, [["__scopeId", "data-v-0a02ab86"]]), ja = { class: "cd-filter-bar" }, Ma = {
|
|
7222
|
+
key: 0,
|
|
7223
|
+
class: "filter-head-row"
|
|
7224
|
+
}, Ia = { class: "filter-toolbar-row" }, Ka = {
|
|
7222
7225
|
key: 1,
|
|
7223
7226
|
class: "inline-filter-toolbar"
|
|
7224
|
-
},
|
|
7227
|
+
}, Ha = { class: "filter-action-buttons" }, La = { style: { "margin-left": "auto", display: "flex", "align-items": "center", gap: "8px" } }, Ya = { class: "save-plan-content" }, Ga = {
|
|
7225
7228
|
__name: "cd-filter-bar",
|
|
7226
7229
|
props: {
|
|
7227
7230
|
fieldOptions: { type: Array, required: !0 },
|
|
@@ -7270,41 +7273,41 @@ const Se = [
|
|
|
7270
7273
|
"refresh"
|
|
7271
7274
|
],
|
|
7272
7275
|
setup(r, { emit: Y }) {
|
|
7273
|
-
const d = r, k = Y, m = _([]),
|
|
7276
|
+
const d = r, k = Y, m = _([]), A = () => ({ field: "", operator: "eq", value: "" });
|
|
7274
7277
|
(() => {
|
|
7275
|
-
var u,
|
|
7278
|
+
var u, $;
|
|
7276
7279
|
if (d.filterCount === 0) {
|
|
7277
7280
|
m.value = [];
|
|
7278
7281
|
return;
|
|
7279
7282
|
}
|
|
7280
|
-
const b = ((
|
|
7281
|
-
m.value = Array.from({ length: d.filterCount }, (
|
|
7283
|
+
const b = (($ = (u = d.filterCards) == null ? void 0 : u[0]) == null ? void 0 : $.conditions) || [];
|
|
7284
|
+
m.value = Array.from({ length: d.filterCount }, (V, R) => b[R] ? JSON.parse(JSON.stringify(b[R])) : A());
|
|
7282
7285
|
})();
|
|
7283
7286
|
const e = () => {
|
|
7284
7287
|
if (d.filterCount === 0) {
|
|
7285
7288
|
m.value = [];
|
|
7286
7289
|
return;
|
|
7287
7290
|
}
|
|
7288
|
-
m.value = Array.from({ length: d.filterCount }, () =>
|
|
7289
|
-
},
|
|
7290
|
-
G(() => d.topOp, (b) => q.value = b), G(() => d.filterCards, (b) =>
|
|
7291
|
-
const w = _(null),
|
|
7291
|
+
m.value = Array.from({ length: d.filterCount }, () => A());
|
|
7292
|
+
}, S = _("保存筛选方案"), j = _(!1), P = _(!1), q = _(d.topOp), M = _(JSON.parse(JSON.stringify(d.filterCards)));
|
|
7293
|
+
G(() => d.topOp, (b) => q.value = b), G(() => d.filterCards, (b) => M.value = JSON.parse(JSON.stringify(b)));
|
|
7294
|
+
const w = _(null), F = _("");
|
|
7292
7295
|
ee(() => d.planFilterOptions && d.planFilterOptions.length > 0 ? d.planFilterOptions : [{ content: "暂无方案", value: "empty", disabled: !0 }]);
|
|
7293
7296
|
const N = (b) => {
|
|
7294
|
-
const u = d.planFilterOptions.find((
|
|
7297
|
+
const u = d.planFilterOptions.find(($) => $.value === b);
|
|
7295
7298
|
u && K(u);
|
|
7296
7299
|
}, K = (b) => {
|
|
7297
7300
|
if (!b.precepts || b.precepts.length === 0) return;
|
|
7298
|
-
if (w.value = b,
|
|
7299
|
-
const
|
|
7300
|
-
|
|
7301
|
+
if (w.value = b, F.value = b.value, M.value = JSON.parse(JSON.stringify(b.precepts)), q.value = b.sqlConnectType, d.filterCount > 0) {
|
|
7302
|
+
const V = b.precepts[0];
|
|
7303
|
+
V && V.conditions && (m.value = Array.from({ length: d.filterCount }, (R, H) => V.conditions[H] ? JSON.parse(JSON.stringify(V.conditions[H])) : A()));
|
|
7301
7304
|
}
|
|
7302
|
-
const u = v(b.precepts),
|
|
7303
|
-
if (k("confirm",
|
|
7304
|
-
const
|
|
7305
|
-
k("column-change",
|
|
7305
|
+
const u = v(b.precepts), $ = a(u, b.sqlConnectType);
|
|
7306
|
+
if (k("confirm", $), b.columns && b.columns.length > 0) {
|
|
7307
|
+
const V = b.columns.filter((R) => R.show !== !1);
|
|
7308
|
+
k("column-change", V);
|
|
7306
7309
|
}
|
|
7307
|
-
},
|
|
7310
|
+
}, E = () => {
|
|
7308
7311
|
c();
|
|
7309
7312
|
}, c = () => {
|
|
7310
7313
|
if (d.filterCount === 0) {
|
|
@@ -7322,47 +7325,47 @@ const Se = [
|
|
|
7322
7325
|
}, U = () => {
|
|
7323
7326
|
j.value = !1;
|
|
7324
7327
|
}, v = (b) => b.map((u) => {
|
|
7325
|
-
const
|
|
7326
|
-
let
|
|
7327
|
-
return
|
|
7328
|
-
field:
|
|
7329
|
-
operator:
|
|
7330
|
-
value:
|
|
7328
|
+
const $ = u.conditions.filter((V) => !(!V.field || V.field.trim() === "" || V.value === null || V.value === void 0 || V.value === "" || Array.isArray(V.value) && V.value.length === 0)).map((V) => {
|
|
7329
|
+
let R = "";
|
|
7330
|
+
return V.value !== null && V.value !== void 0 && (Array.isArray(V.value) ? R = V.value.join("/") : R = String(V.value).trim()), {
|
|
7331
|
+
field: V.field.trim(),
|
|
7332
|
+
operator: V.operator || "eq",
|
|
7333
|
+
value: R
|
|
7331
7334
|
};
|
|
7332
7335
|
});
|
|
7333
7336
|
return {
|
|
7334
7337
|
...u,
|
|
7335
7338
|
connector: u.connector || "and",
|
|
7336
|
-
conditions:
|
|
7339
|
+
conditions: $.length > 0 ? $ : [{ field: "", operator: "eq", value: "" }]
|
|
7337
7340
|
};
|
|
7338
7341
|
}).filter((u) => u.conditions.length > 0 && u.conditions[0].field !== "");
|
|
7339
7342
|
function a(b, u) {
|
|
7340
7343
|
if (u !== "and" && u !== "or")
|
|
7341
7344
|
throw new Error('type参数必须是"and"或"or"');
|
|
7342
|
-
function
|
|
7345
|
+
function $(H) {
|
|
7343
7346
|
return {
|
|
7344
7347
|
[H.field]: {
|
|
7345
7348
|
[H.operator]: H.value
|
|
7346
7349
|
}
|
|
7347
7350
|
};
|
|
7348
7351
|
}
|
|
7349
|
-
function
|
|
7350
|
-
return H.conditions.length === 1 ?
|
|
7351
|
-
[H.connector]: H.conditions.map(
|
|
7352
|
+
function V(H) {
|
|
7353
|
+
return H.conditions.length === 1 ? $(H.conditions[0]) : {
|
|
7354
|
+
[H.connector]: H.conditions.map($)
|
|
7352
7355
|
};
|
|
7353
7356
|
}
|
|
7354
7357
|
return {
|
|
7355
7358
|
conditions: {
|
|
7356
|
-
[u]: b.map(
|
|
7359
|
+
[u]: b.map(V)
|
|
7357
7360
|
}
|
|
7358
7361
|
};
|
|
7359
7362
|
}
|
|
7360
7363
|
const p = (b) => {
|
|
7361
|
-
w.value ? (
|
|
7362
|
-
},
|
|
7364
|
+
w.value ? (S.value = "更新筛选方案", h.value.name = w.value.content || "") : (S.value = "保存筛选方案", h.value.name = "", w.value = null), z.value = !0;
|
|
7365
|
+
}, g = () => {
|
|
7363
7366
|
z.value = !1;
|
|
7364
7367
|
}, l = () => {
|
|
7365
|
-
e(), w.value = null,
|
|
7368
|
+
e(), w.value = null, F.value = "", M.value = [
|
|
7366
7369
|
{
|
|
7367
7370
|
id: 1,
|
|
7368
7371
|
connector: "and",
|
|
@@ -7373,34 +7376,39 @@ const Se = [
|
|
|
7373
7376
|
}
|
|
7374
7377
|
], q.value = "and", k("reset"), c();
|
|
7375
7378
|
}, t = () => {
|
|
7376
|
-
const b = h.value.name.trim();
|
|
7379
|
+
const b = h.value.name.trim(), u = JSON.parse(JSON.stringify(M.value));
|
|
7380
|
+
if (d.filterCount > 0 && m.value.length > 0) {
|
|
7381
|
+
u[0] || (u[0] = { id: 1, connector: "and", conditions: [] });
|
|
7382
|
+
const $ = u[0].conditions || [];
|
|
7383
|
+
m.value.forEach((V, R) => {
|
|
7384
|
+
V.field && V.field.trim() !== "" && ($[R] = JSON.parse(JSON.stringify(V)));
|
|
7385
|
+
}), u[0].conditions = $;
|
|
7386
|
+
}
|
|
7377
7387
|
if (w.value) {
|
|
7378
|
-
const
|
|
7388
|
+
const $ = v(u);
|
|
7379
7389
|
k("update-plan", {
|
|
7380
7390
|
name: b,
|
|
7381
|
-
precepts:
|
|
7391
|
+
precepts: $,
|
|
7382
7392
|
topOp: q.value,
|
|
7383
7393
|
plan: w.value,
|
|
7384
7394
|
columns: d.visibleColumns || []
|
|
7385
|
-
// 包含当前列配置
|
|
7386
7395
|
});
|
|
7387
7396
|
} else {
|
|
7388
|
-
const
|
|
7397
|
+
const $ = v(u);
|
|
7389
7398
|
k("save-plan", {
|
|
7390
7399
|
name: b,
|
|
7391
|
-
precepts:
|
|
7400
|
+
precepts: $,
|
|
7392
7401
|
topOp: q.value,
|
|
7393
7402
|
plan: w.value,
|
|
7394
7403
|
columns: d.visibleColumns || []
|
|
7395
|
-
// 包含当前列配置
|
|
7396
7404
|
});
|
|
7397
7405
|
}
|
|
7398
|
-
|
|
7406
|
+
g();
|
|
7399
7407
|
}, y = (b) => {
|
|
7400
7408
|
const u = a(b.filterCards, b.type1);
|
|
7401
7409
|
if (k("confirm", u), d.filterCount > 0) {
|
|
7402
|
-
const
|
|
7403
|
-
|
|
7410
|
+
const $ = b.filterCards[0];
|
|
7411
|
+
$ && $.conditions && (m.value = Array.from({ length: d.filterCount }, (V, R) => $.conditions[R] ? JSON.parse(JSON.stringify($.conditions[R])) : A()));
|
|
7404
7412
|
}
|
|
7405
7413
|
U();
|
|
7406
7414
|
}, z = _(!1), h = _({ name: "" }), L = _(!1), Q = _([]), le = () => {
|
|
@@ -7413,14 +7421,14 @@ const Se = [
|
|
|
7413
7421
|
_("");
|
|
7414
7422
|
const oe = (b) => {
|
|
7415
7423
|
k("smart-colors-change", b);
|
|
7416
|
-
},
|
|
7417
|
-
(u) => u.conditions.some((
|
|
7424
|
+
}, x = ee(() => Q.value.filter((b) => b.field && b.operator && b.value).length), Ce = ee(() => m.value.some((u) => u.field && u.field.trim() !== "") ? !0 : M.value.some(
|
|
7425
|
+
(u) => u.conditions.some(($) => $.field && $.field.trim() !== "")
|
|
7418
7426
|
)), he = ee(() => {
|
|
7419
|
-
const b = Q.value.filter((
|
|
7427
|
+
const b = Q.value.filter(($) => $.field && $.operator && $.value);
|
|
7420
7428
|
return b.length === 0 ? "颜色筛选" : `
|
|
7421
|
-
${b.map((
|
|
7422
|
-
const
|
|
7423
|
-
return `${
|
|
7429
|
+
${b.map(($) => {
|
|
7430
|
+
const V = d.fieldOptions.find((H) => H.value === $.field);
|
|
7431
|
+
return `${V ? V.label : $.field} ${_e($.operator)} ${$.value}`;
|
|
7424
7432
|
}).join(`
|
|
7425
7433
|
`)}`;
|
|
7426
7434
|
}), _e = (b) => ({
|
|
@@ -7434,36 +7442,38 @@ ${b.map((A) => {
|
|
|
7434
7442
|
notContains: "不包含"
|
|
7435
7443
|
})[b] || b;
|
|
7436
7444
|
return (b, u) => {
|
|
7437
|
-
const
|
|
7438
|
-
return
|
|
7439
|
-
|
|
7440
|
-
fe(b.$slots, "
|
|
7441
|
-
|
|
7445
|
+
const $ = O("t-radio-button"), V = O("t-radio-group"), R = O("t-button"), H = O("t-icon"), ke = O("t-badge"), ce = O("t-tooltip"), ze = O("t-input"), Oe = O("t-form-item"), Fe = O("t-form"), we = O("t-dialog");
|
|
7446
|
+
return C(), B("div", ja, [
|
|
7447
|
+
b.$slots.head ? (C(), B("div", Ma, [
|
|
7448
|
+
fe(b.$slots, "head", {}, void 0, !0)
|
|
7449
|
+
])) : X("", !0),
|
|
7450
|
+
i("div", Ia, [
|
|
7451
|
+
r.planFilterOptions.length > 0 ? (C(), J(V, {
|
|
7442
7452
|
key: 0,
|
|
7443
|
-
modelValue:
|
|
7444
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
7453
|
+
modelValue: F.value,
|
|
7454
|
+
"onUpdate:modelValue": u[0] || (u[0] = (D) => F.value = D),
|
|
7445
7455
|
size: r.size,
|
|
7446
7456
|
onChange: N
|
|
7447
7457
|
}, {
|
|
7448
7458
|
default: s(() => [
|
|
7449
|
-
(
|
|
7450
|
-
key:
|
|
7451
|
-
value:
|
|
7452
|
-
disabled:
|
|
7459
|
+
(C(!0), B(W, null, Z(r.planFilterOptions, (D) => (C(), J($, {
|
|
7460
|
+
key: D.value,
|
|
7461
|
+
value: D.value,
|
|
7462
|
+
disabled: D.disabled
|
|
7453
7463
|
}, {
|
|
7454
7464
|
default: s(() => [
|
|
7455
|
-
T(se(
|
|
7465
|
+
T(se(D.content), 1)
|
|
7456
7466
|
]),
|
|
7457
7467
|
_: 2
|
|
7458
7468
|
}, 1032, ["value", "disabled"]))), 128))
|
|
7459
7469
|
]),
|
|
7460
7470
|
_: 1
|
|
7461
7471
|
}, 8, ["modelValue", "size"])) : X("", !0),
|
|
7462
|
-
o(
|
|
7472
|
+
o(R, {
|
|
7463
7473
|
theme: "default",
|
|
7464
7474
|
variant: "outline",
|
|
7465
7475
|
size: r.size,
|
|
7466
|
-
onClick: u[1] || (u[1] = (
|
|
7476
|
+
onClick: u[1] || (u[1] = (D) => P.value = !0),
|
|
7467
7477
|
title: "列配置"
|
|
7468
7478
|
}, {
|
|
7469
7479
|
icon: s(() => [...u[15] || (u[15] = [
|
|
@@ -7471,18 +7481,18 @@ ${b.map((A) => {
|
|
|
7471
7481
|
])]),
|
|
7472
7482
|
_: 1
|
|
7473
7483
|
}, 8, ["size"]),
|
|
7474
|
-
r.filterCount > 0 ? (
|
|
7475
|
-
(
|
|
7484
|
+
r.filterCount > 0 ? (C(), B("div", Ka, [
|
|
7485
|
+
(C(!0), B(W, null, Z(m.value, (D, ve) => (C(), J(me, {
|
|
7476
7486
|
key: ve,
|
|
7477
7487
|
"field-options": r.fieldOptions,
|
|
7478
7488
|
size: r.size,
|
|
7479
7489
|
"filter-condition": m.value[ve],
|
|
7480
7490
|
"select-options": r.selectOptions,
|
|
7481
|
-
onSearch:
|
|
7491
|
+
onSearch: E
|
|
7482
7492
|
}, null, 8, ["field-options", "size", "filter-condition", "select-options"]))), 128))
|
|
7483
7493
|
])) : X("", !0),
|
|
7484
|
-
i("div",
|
|
7485
|
-
r.filterCount > 0 ? (
|
|
7494
|
+
i("div", Ha, [
|
|
7495
|
+
r.filterCount > 0 ? (C(), J(R, {
|
|
7486
7496
|
key: 0,
|
|
7487
7497
|
theme: "primary",
|
|
7488
7498
|
size: r.size,
|
|
@@ -7494,7 +7504,7 @@ ${b.map((A) => {
|
|
|
7494
7504
|
]),
|
|
7495
7505
|
_: 1
|
|
7496
7506
|
}, 8, ["size"])) : X("", !0),
|
|
7497
|
-
r.filterCount > 0 ? (
|
|
7507
|
+
r.filterCount > 0 ? (C(), J(R, {
|
|
7498
7508
|
key: 1,
|
|
7499
7509
|
theme: "primary",
|
|
7500
7510
|
size: r.size,
|
|
@@ -7506,18 +7516,18 @@ ${b.map((A) => {
|
|
|
7506
7516
|
]),
|
|
7507
7517
|
_: 1
|
|
7508
7518
|
}, 8, ["size"])) : X("", !0),
|
|
7509
|
-
r.filterCount > 0 ? (
|
|
7519
|
+
r.filterCount > 0 ? (C(), J(ce, {
|
|
7510
7520
|
key: 2,
|
|
7511
7521
|
content: he.value,
|
|
7512
7522
|
placement: "top"
|
|
7513
7523
|
}, {
|
|
7514
7524
|
default: s(() => [
|
|
7515
7525
|
o(ke, {
|
|
7516
|
-
count:
|
|
7526
|
+
count: x.value,
|
|
7517
7527
|
"max-count": 99
|
|
7518
7528
|
}, {
|
|
7519
7529
|
default: s(() => [
|
|
7520
|
-
o(
|
|
7530
|
+
o(R, {
|
|
7521
7531
|
theme: "primary",
|
|
7522
7532
|
size: r.size,
|
|
7523
7533
|
onClick: le
|
|
@@ -7533,13 +7543,13 @@ ${b.map((A) => {
|
|
|
7533
7543
|
]),
|
|
7534
7544
|
_: 1
|
|
7535
7545
|
}, 8, ["content"])) : X("", !0),
|
|
7536
|
-
r.filterCount > 0 ? (
|
|
7546
|
+
r.filterCount > 0 ? (C(), J(ce, {
|
|
7537
7547
|
key: 3,
|
|
7538
7548
|
content: "保存方案",
|
|
7539
7549
|
placement: "top"
|
|
7540
7550
|
}, {
|
|
7541
7551
|
default: s(() => [
|
|
7542
|
-
$e(o(
|
|
7552
|
+
$e(o(R, {
|
|
7543
7553
|
theme: "primary",
|
|
7544
7554
|
size: r.size,
|
|
7545
7555
|
onClick: p
|
|
@@ -7549,23 +7559,23 @@ ${b.map((A) => {
|
|
|
7549
7559
|
]),
|
|
7550
7560
|
_: 1
|
|
7551
7561
|
}, 8, ["size"]), [
|
|
7552
|
-
[
|
|
7562
|
+
[Se, Ce.value]
|
|
7553
7563
|
])
|
|
7554
7564
|
]),
|
|
7555
7565
|
_: 1
|
|
7556
7566
|
})) : X("", !0)
|
|
7557
7567
|
]),
|
|
7558
|
-
i("div",
|
|
7559
|
-
fe(b.$slots, "
|
|
7568
|
+
i("div", La, [
|
|
7569
|
+
fe(b.$slots, "toolbar-right", {}, void 0, !0)
|
|
7560
7570
|
])
|
|
7561
7571
|
]),
|
|
7562
7572
|
o(pa, {
|
|
7563
7573
|
visible: j.value,
|
|
7564
|
-
"onUpdate:visible": u[2] || (u[2] = (
|
|
7574
|
+
"onUpdate:visible": u[2] || (u[2] = (D) => j.value = D),
|
|
7565
7575
|
"field-options": r.fieldOptions,
|
|
7566
7576
|
"select-options": r.selectOptions,
|
|
7567
7577
|
"plan-filter-options": r.planFilterOptions,
|
|
7568
|
-
"filter-cards":
|
|
7578
|
+
"filter-cards": M.value,
|
|
7569
7579
|
"top-op": q.value,
|
|
7570
7580
|
size: r.size,
|
|
7571
7581
|
"person-tabs": r.personTabs,
|
|
@@ -7574,36 +7584,36 @@ ${b.map((A) => {
|
|
|
7574
7584
|
width: "1000",
|
|
7575
7585
|
onConfirm: y,
|
|
7576
7586
|
onReset: l,
|
|
7577
|
-
onDeletePlan: u[3] || (u[3] = (
|
|
7578
|
-
onCopyPlan: u[4] || (u[4] = (
|
|
7579
|
-
onSetDefaultPlan: u[5] || (u[5] = (
|
|
7580
|
-
onUpdatePlan: u[6] || (u[6] = (
|
|
7581
|
-
onLoadUsers: u[7] || (u[7] = (
|
|
7582
|
-
onSearch: u[8] || (u[8] = (
|
|
7583
|
-
onDeptClick: u[9] || (u[9] = (
|
|
7584
|
-
onColumnChange: u[10] || (u[10] = (
|
|
7587
|
+
onDeletePlan: u[3] || (u[3] = (D) => k("delete-plan", D)),
|
|
7588
|
+
onCopyPlan: u[4] || (u[4] = (D) => k("copy-plan", D)),
|
|
7589
|
+
onSetDefaultPlan: u[5] || (u[5] = (D) => k("set-default-plan", D)),
|
|
7590
|
+
onUpdatePlan: u[6] || (u[6] = (D) => k("update-plan", D)),
|
|
7591
|
+
onLoadUsers: u[7] || (u[7] = (D) => k("load-users", D)),
|
|
7592
|
+
onSearch: u[8] || (u[8] = (D) => k("search-persons", D)),
|
|
7593
|
+
onDeptClick: u[9] || (u[9] = (D) => k("dept-click", D)),
|
|
7594
|
+
onColumnChange: u[10] || (u[10] = (D) => k("column-change", D))
|
|
7585
7595
|
}, null, 8, ["visible", "field-options", "select-options", "plan-filter-options", "filter-cards", "top-op", "size", "person-tabs", "person-organizations", "visible-columns"]),
|
|
7586
7596
|
o(we, {
|
|
7587
|
-
header:
|
|
7597
|
+
header: S.value,
|
|
7588
7598
|
visible: z.value,
|
|
7589
7599
|
width: "600px",
|
|
7590
|
-
onClose:
|
|
7600
|
+
onClose: g
|
|
7591
7601
|
}, {
|
|
7592
7602
|
body: s(() => [
|
|
7593
|
-
i("div",
|
|
7594
|
-
o(
|
|
7603
|
+
i("div", Ya, [
|
|
7604
|
+
o(Fe, {
|
|
7595
7605
|
data: h.value,
|
|
7596
7606
|
"label-width": "100px"
|
|
7597
7607
|
}, {
|
|
7598
7608
|
default: s(() => [
|
|
7599
|
-
o(
|
|
7609
|
+
o(Oe, {
|
|
7600
7610
|
label: "方案名称",
|
|
7601
7611
|
required: ""
|
|
7602
7612
|
}, {
|
|
7603
7613
|
default: s(() => [
|
|
7604
7614
|
o(ze, {
|
|
7605
7615
|
modelValue: h.value.name,
|
|
7606
|
-
"onUpdate:modelValue": u[11] || (u[11] = (
|
|
7616
|
+
"onUpdate:modelValue": u[11] || (u[11] = (D) => h.value.name = D),
|
|
7607
7617
|
placeholder: "请输入筛选方案名称"
|
|
7608
7618
|
}, null, 8, ["modelValue"])
|
|
7609
7619
|
]),
|
|
@@ -7615,16 +7625,16 @@ ${b.map((A) => {
|
|
|
7615
7625
|
])
|
|
7616
7626
|
]),
|
|
7617
7627
|
footer: s(() => [
|
|
7618
|
-
o(
|
|
7628
|
+
o(R, {
|
|
7619
7629
|
theme: "default",
|
|
7620
|
-
onClick:
|
|
7630
|
+
onClick: g
|
|
7621
7631
|
}, {
|
|
7622
7632
|
default: s(() => [...u[17] || (u[17] = [
|
|
7623
7633
|
T("取消", -1)
|
|
7624
7634
|
])]),
|
|
7625
7635
|
_: 1
|
|
7626
7636
|
}),
|
|
7627
|
-
o(
|
|
7637
|
+
o(R, {
|
|
7628
7638
|
theme: "primary",
|
|
7629
7639
|
onClick: t
|
|
7630
7640
|
}, {
|
|
@@ -7638,14 +7648,14 @@ ${b.map((A) => {
|
|
|
7638
7648
|
}, 8, ["header", "visible"]),
|
|
7639
7649
|
o(Ja, {
|
|
7640
7650
|
visible: P.value,
|
|
7641
|
-
"onUpdate:visible": u[12] || (u[12] = (
|
|
7651
|
+
"onUpdate:visible": u[12] || (u[12] = (D) => P.value = D),
|
|
7642
7652
|
"field-options": r.fieldOptions,
|
|
7643
7653
|
"visible-columns": r.visibleColumns,
|
|
7644
|
-
onColumnChange: u[13] || (u[13] = (
|
|
7654
|
+
onColumnChange: u[13] || (u[13] = (D) => k("column-change", D))
|
|
7645
7655
|
}, null, 8, ["visible", "field-options", "visible-columns"]),
|
|
7646
|
-
o(
|
|
7656
|
+
o(ge, {
|
|
7647
7657
|
visible: L.value,
|
|
7648
|
-
"onUpdate:visible": u[14] || (u[14] = (
|
|
7658
|
+
"onUpdate:visible": u[14] || (u[14] = (D) => L.value = D),
|
|
7649
7659
|
"field-options": r.fieldOptions,
|
|
7650
7660
|
size: r.size,
|
|
7651
7661
|
"initial-rules": Q.value,
|
|
@@ -7656,15 +7666,15 @@ ${b.map((A) => {
|
|
|
7656
7666
|
]);
|
|
7657
7667
|
};
|
|
7658
7668
|
}
|
|
7659
|
-
},
|
|
7660
|
-
r.component("FilterDialog", ye), r.component("FilterComponent", ye), r.component("CdFilterBar",
|
|
7669
|
+
}, Wa = /* @__PURE__ */ ae(Ga, [["__scopeId", "data-v-d2af873f"]]), Za = (r) => {
|
|
7670
|
+
r.component("FilterDialog", ye), r.component("FilterComponent", ye), r.component("CdFilterBar", Wa), r.component("ColorFilterDialog", ge);
|
|
7661
7671
|
};
|
|
7662
7672
|
export {
|
|
7663
|
-
|
|
7664
|
-
|
|
7673
|
+
Wa as CdFilterBar,
|
|
7674
|
+
ge as ColorFilterDialog,
|
|
7665
7675
|
Ja as ColumnSettingsDialog,
|
|
7666
7676
|
ye as FilterComponent,
|
|
7667
7677
|
ye as FilterDialog,
|
|
7668
7678
|
ye as default,
|
|
7669
|
-
|
|
7679
|
+
Za as install
|
|
7670
7680
|
};
|