cd-vue-filter 2.3.4 → 2.3.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 +195 -195
- package/dist/cd-vue-filter.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +8 -8
package/dist/cd-vue-filter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Be, computed as re, ref as _, watch as I, resolveComponent as p, createElementBlock as
|
|
1
|
+
import { defineComponent as Be, computed as re, ref as _, watch as I, resolveComponent as p, createElementBlock as A, openBlock as y, createVNode as a, createBlock as j, withCtx as l, Fragment as Z, renderList as le, nextTick as Ve, createElementVNode as s, createTextVNode as w, createCommentVNode as ne, toDisplayString as ce, unref as Me, normalizeClass as Se, withModifiers as De, normalizeStyle as $e } from "vue";
|
|
2
2
|
import { MessagePlugin as de } from "tdesign-vue-next";
|
|
3
3
|
import { CdUsersList as Je } from "cd-usercard";
|
|
4
4
|
const Re = [
|
|
@@ -5572,7 +5572,7 @@ const Re = [
|
|
|
5572
5572
|
"this_year",
|
|
5573
5573
|
"last_year",
|
|
5574
5574
|
"next_year"
|
|
5575
|
-
].includes(f),
|
|
5575
|
+
].includes(f), D = (f) => {
|
|
5576
5576
|
if (r.selectOptions && r.selectOptions[f])
|
|
5577
5577
|
return r.selectOptions[f];
|
|
5578
5578
|
if (r.selectOptions && Array.isArray(r.selectOptions)) {
|
|
@@ -5598,7 +5598,7 @@ const Re = [
|
|
|
5598
5598
|
I(() => r.filterCondition, (f) => {
|
|
5599
5599
|
f && (W.value = { ...f });
|
|
5600
5600
|
}, { deep: !0 });
|
|
5601
|
-
const
|
|
5601
|
+
const q = (f) => {
|
|
5602
5602
|
const c = r.fieldOptions.find((F) => F.value === f);
|
|
5603
5603
|
return c ? c.type : "text";
|
|
5604
5604
|
}, B = () => {
|
|
@@ -5609,7 +5609,7 @@ const Re = [
|
|
|
5609
5609
|
Ve(() => {
|
|
5610
5610
|
P("search", { ...r.filterCondition });
|
|
5611
5611
|
});
|
|
5612
|
-
},
|
|
5612
|
+
}, S = (f) => {
|
|
5613
5613
|
r.filterCondition.value = f, P("search", { ...r.filterCondition });
|
|
5614
5614
|
}, C = re(() => {
|
|
5615
5615
|
var F;
|
|
@@ -5702,10 +5702,10 @@ const Re = [
|
|
|
5702
5702
|
}), (f, c) => {
|
|
5703
5703
|
var ie;
|
|
5704
5704
|
const F = p("t-option"), J = p("t-select"), L = p("t-input"), ae = p("t-date-picker"), Q = p("t-cascader");
|
|
5705
|
-
return y(),
|
|
5705
|
+
return y(), A("div", Le, [
|
|
5706
5706
|
a(J, {
|
|
5707
5707
|
modelValue: r.filterCondition.field,
|
|
5708
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
5708
|
+
"onUpdate:modelValue": c[0] || (c[0] = ($) => r.filterCondition.field = $),
|
|
5709
5709
|
placeholder: "请选择字段",
|
|
5710
5710
|
size: r.size,
|
|
5711
5711
|
style: { "min-width": "80px", "max-width": "110px" },
|
|
@@ -5713,17 +5713,17 @@ const Re = [
|
|
|
5713
5713
|
filterable: ""
|
|
5714
5714
|
}, {
|
|
5715
5715
|
default: l(() => [
|
|
5716
|
-
(y(!0),
|
|
5717
|
-
key:
|
|
5718
|
-
label:
|
|
5719
|
-
value:
|
|
5716
|
+
(y(!0), A(Z, null, le(r.fieldOptions, ($) => (y(), j(F, {
|
|
5717
|
+
key: $.key,
|
|
5718
|
+
label: $.key,
|
|
5719
|
+
value: $.value
|
|
5720
5720
|
}, null, 8, ["label", "value"]))), 128))
|
|
5721
5721
|
]),
|
|
5722
5722
|
_: 1
|
|
5723
5723
|
}, 8, ["modelValue", "size"]),
|
|
5724
5724
|
a(J, {
|
|
5725
5725
|
modelValue: r.filterCondition.operator,
|
|
5726
|
-
"onUpdate:modelValue": c[1] || (c[1] = (
|
|
5726
|
+
"onUpdate:modelValue": c[1] || (c[1] = ($) => r.filterCondition.operator = $),
|
|
5727
5727
|
placeholder: "请选择条件",
|
|
5728
5728
|
size: r.size,
|
|
5729
5729
|
style: { width: "80px" },
|
|
@@ -5731,55 +5731,55 @@ const Re = [
|
|
|
5731
5731
|
onChange: Y
|
|
5732
5732
|
}, {
|
|
5733
5733
|
default: l(() => [
|
|
5734
|
-
(y(!0),
|
|
5735
|
-
key:
|
|
5736
|
-
label:
|
|
5737
|
-
value:
|
|
5734
|
+
(y(!0), A(Z, null, le(C.value, ($) => (y(), j(F, {
|
|
5735
|
+
key: $.key,
|
|
5736
|
+
label: $.label,
|
|
5737
|
+
value: $.value
|
|
5738
5738
|
}, null, 8, ["label", "value"]))), 128))
|
|
5739
5739
|
]),
|
|
5740
5740
|
_: 1
|
|
5741
5741
|
}, 8, ["modelValue", "size"]),
|
|
5742
|
-
|
|
5742
|
+
q(r.filterCondition.field) === "number" ? (y(), j(L, {
|
|
5743
5743
|
key: 0,
|
|
5744
5744
|
type: "number",
|
|
5745
5745
|
modelValue: r.filterCondition.value,
|
|
5746
|
-
"onUpdate:modelValue": c[2] || (c[2] = (
|
|
5746
|
+
"onUpdate:modelValue": c[2] || (c[2] = ($) => r.filterCondition.value = $),
|
|
5747
5747
|
placeholder: "请输入数字",
|
|
5748
5748
|
size: r.size,
|
|
5749
5749
|
style: { width: "80px" },
|
|
5750
5750
|
onChange: B,
|
|
5751
5751
|
clearable: ""
|
|
5752
|
-
}, null, 8, ["modelValue", "size"])) :
|
|
5752
|
+
}, null, 8, ["modelValue", "size"])) : q(r.filterCondition.field) === "money" ? (y(), j(L, {
|
|
5753
5753
|
key: 1,
|
|
5754
5754
|
type: "number",
|
|
5755
5755
|
modelValue: r.filterCondition.value,
|
|
5756
|
-
"onUpdate:modelValue": c[3] || (c[3] = (
|
|
5756
|
+
"onUpdate:modelValue": c[3] || (c[3] = ($) => r.filterCondition.value = $),
|
|
5757
5757
|
placeholder: "请输入金额",
|
|
5758
5758
|
size: r.size,
|
|
5759
5759
|
style: { width: "80px" },
|
|
5760
5760
|
onChange: B,
|
|
5761
5761
|
clearable: ""
|
|
5762
|
-
}, null, 8, ["modelValue", "size"])) :
|
|
5762
|
+
}, null, 8, ["modelValue", "size"])) : q(r.filterCondition.field) === "date" ? (y(), A(Z, { key: 2 }, [
|
|
5763
5763
|
o(r.filterCondition.operator) ? (y(), j(L, {
|
|
5764
5764
|
key: 1,
|
|
5765
|
-
value: (ie = C.value.find((
|
|
5765
|
+
value: (ie = C.value.find(($) => $.value === r.filterCondition.operator)) == null ? void 0 : ie.label,
|
|
5766
5766
|
disabled: "",
|
|
5767
5767
|
size: r.size,
|
|
5768
5768
|
style: { "min-width": "80px", "max-width": "120px" }
|
|
5769
5769
|
}, null, 8, ["value", "size"])) : (y(), j(ae, {
|
|
5770
5770
|
key: 0,
|
|
5771
5771
|
modelValue: r.filterCondition.value,
|
|
5772
|
-
"onUpdate:modelValue": c[4] || (c[4] = (
|
|
5772
|
+
"onUpdate:modelValue": c[4] || (c[4] = ($) => r.filterCondition.value = $),
|
|
5773
5773
|
placeholder: "请选择日期",
|
|
5774
5774
|
size: r.size,
|
|
5775
5775
|
style: { "min-width": "80px", "max-width": "120px" },
|
|
5776
5776
|
onChange: B,
|
|
5777
5777
|
clearable: ""
|
|
5778
5778
|
}, null, 8, ["modelValue", "size"]))
|
|
5779
|
-
], 64)) :
|
|
5779
|
+
], 64)) : q(r.filterCondition.field) === "time" ? (y(), j(ae, {
|
|
5780
5780
|
key: 3,
|
|
5781
5781
|
modelValue: r.filterCondition.value,
|
|
5782
|
-
"onUpdate:modelValue": c[5] || (c[5] = (
|
|
5782
|
+
"onUpdate:modelValue": c[5] || (c[5] = ($) => r.filterCondition.value = $),
|
|
5783
5783
|
placeholder: "请选择日期时间",
|
|
5784
5784
|
size: r.size,
|
|
5785
5785
|
style: { "min-width": "80px", "max-width": "120px" },
|
|
@@ -5787,31 +5787,31 @@ const Re = [
|
|
|
5787
5787
|
format: "YYYY-MM-DD HH:mm:ss",
|
|
5788
5788
|
onChange: B,
|
|
5789
5789
|
clearable: ""
|
|
5790
|
-
}, null, 8, ["modelValue", "size"])) :
|
|
5790
|
+
}, null, 8, ["modelValue", "size"])) : q(r.filterCondition.field) === "select" ? (y(), j(J, {
|
|
5791
5791
|
key: 4,
|
|
5792
5792
|
modelValue: r.filterCondition.value,
|
|
5793
|
-
"onUpdate:modelValue": c[6] || (c[6] = (
|
|
5794
|
-
options:
|
|
5793
|
+
"onUpdate:modelValue": c[6] || (c[6] = ($) => r.filterCondition.value = $),
|
|
5794
|
+
options: D(r.filterCondition.field),
|
|
5795
5795
|
placeholder: "请选择",
|
|
5796
5796
|
size: r.size,
|
|
5797
5797
|
style: { "min-width": "80px", "max-width": "120px" },
|
|
5798
5798
|
onChange: B,
|
|
5799
5799
|
clearable: ""
|
|
5800
|
-
}, null, 8, ["modelValue", "options", "size"])) :
|
|
5800
|
+
}, null, 8, ["modelValue", "options", "size"])) : q(r.filterCondition.field) === "selectProvince" ? (y(), j(Q, {
|
|
5801
5801
|
key: 5,
|
|
5802
5802
|
modelValue: r.filterCondition.value,
|
|
5803
|
-
"onUpdate:modelValue": c[7] || (c[7] = (
|
|
5803
|
+
"onUpdate:modelValue": c[7] || (c[7] = ($) => r.filterCondition.value = $),
|
|
5804
5804
|
options: v.value,
|
|
5805
5805
|
placeholder: "请选择地区",
|
|
5806
5806
|
size: r.size,
|
|
5807
5807
|
style: { "min-width": "80px", "max-width": "120px" },
|
|
5808
5808
|
clearable: "",
|
|
5809
5809
|
loading: !1,
|
|
5810
|
-
onChange:
|
|
5810
|
+
onChange: S
|
|
5811
5811
|
}, null, 8, ["modelValue", "options", "size"])) : (y(), j(L, {
|
|
5812
5812
|
key: 6,
|
|
5813
5813
|
modelValue: r.filterCondition.value,
|
|
5814
|
-
"onUpdate:modelValue": c[8] || (c[8] = (
|
|
5814
|
+
"onUpdate:modelValue": c[8] || (c[8] = ($) => r.filterCondition.value = $),
|
|
5815
5815
|
placeholder: "请输入关键字",
|
|
5816
5816
|
size: r.size,
|
|
5817
5817
|
style: { "min-width": "80px", "max-width": "100px" },
|
|
@@ -5826,7 +5826,7 @@ const Re = [
|
|
|
5826
5826
|
for (const [v, o] of ee)
|
|
5827
5827
|
d[v] = o;
|
|
5828
5828
|
return d;
|
|
5829
|
-
},
|
|
5829
|
+
}, xe = /* @__PURE__ */ ue(He, [["__scopeId", "data-v-f859bc03"]]), je = { class: "filter-dialog-content" }, Ye = { class: "leader-line-container" }, Ge = {
|
|
5830
5830
|
class: "filter-scroll-wrapper",
|
|
5831
5831
|
id: "filter-scroll-wrapper"
|
|
5832
5832
|
}, We = {
|
|
@@ -5873,12 +5873,12 @@ const Re = [
|
|
|
5873
5873
|
{ field: "", operator: "eq", value: "" }
|
|
5874
5874
|
]
|
|
5875
5875
|
}
|
|
5876
|
-
]),
|
|
5876
|
+
]), D = _("and");
|
|
5877
5877
|
let X = 3;
|
|
5878
|
-
I(() => d.initialFilterCards, (
|
|
5879
|
-
|
|
5880
|
-
}, { immediate: !0, deep: !0 }), I(() => d.initialType1, (
|
|
5881
|
-
|
|
5878
|
+
I(() => d.initialFilterCards, (S) => {
|
|
5879
|
+
S && S.length > 0 && (o.value = S);
|
|
5880
|
+
}, { immediate: !0, deep: !0 }), I(() => d.initialType1, (S) => {
|
|
5881
|
+
S && (D.value = S);
|
|
5882
5882
|
}, { immediate: !0 });
|
|
5883
5883
|
const r = () => {
|
|
5884
5884
|
o.value.push({
|
|
@@ -5886,34 +5886,34 @@ const Re = [
|
|
|
5886
5886
|
connector: "and",
|
|
5887
5887
|
conditions: [{ field: "", operator: "eq", value: "" }]
|
|
5888
5888
|
});
|
|
5889
|
-
}, P = (
|
|
5890
|
-
|
|
5889
|
+
}, P = (S) => {
|
|
5890
|
+
S >= 0 && S < o.value.length && o.value[S].conditions.push({
|
|
5891
5891
|
field: "",
|
|
5892
5892
|
operator: "eq",
|
|
5893
5893
|
value: ""
|
|
5894
5894
|
});
|
|
5895
|
-
}, W = (
|
|
5896
|
-
if (
|
|
5897
|
-
const k = o.value[
|
|
5895
|
+
}, W = (S, C) => {
|
|
5896
|
+
if (S >= 0 && S < o.value.length) {
|
|
5897
|
+
const k = o.value[S];
|
|
5898
5898
|
k.conditions.length > 1 && C >= 0 && C < k.conditions.length ? k.conditions.splice(C, 1) : k.conditions.length <= 1 && de.warning("每个卡片至少需要一个筛选条件");
|
|
5899
5899
|
}
|
|
5900
|
-
},
|
|
5901
|
-
o.value.length > 1 ? o.value.splice(
|
|
5900
|
+
}, q = (S) => {
|
|
5901
|
+
o.value.length > 1 ? o.value.splice(S, 1) : de.warning("至少需要保留一个筛选卡片");
|
|
5902
5902
|
}, B = () => {
|
|
5903
5903
|
v("submit", {
|
|
5904
5904
|
filterCards: o.value,
|
|
5905
|
-
type1:
|
|
5905
|
+
type1: D.value
|
|
5906
5906
|
});
|
|
5907
5907
|
}, Y = () => {
|
|
5908
5908
|
v("close"), v("update:visible", !1);
|
|
5909
5909
|
};
|
|
5910
|
-
return (
|
|
5910
|
+
return (S, C) => {
|
|
5911
5911
|
const k = p("t-radio-button"), z = p("t-radio-group"), b = p("t-icon"), u = p("t-button"), f = p("t-dialog");
|
|
5912
5912
|
return y(), j(f, {
|
|
5913
5913
|
header: "筛选条件设置",
|
|
5914
5914
|
placement: "center",
|
|
5915
5915
|
visible: i.visible,
|
|
5916
|
-
"onUpdate:visible": C[1] || (C[1] = (c) =>
|
|
5916
|
+
"onUpdate:visible": C[1] || (C[1] = (c) => S.$emit("update:visible", c)),
|
|
5917
5917
|
width: "700px",
|
|
5918
5918
|
"z-index": 999,
|
|
5919
5919
|
footer: !0,
|
|
@@ -5924,13 +5924,13 @@ const Re = [
|
|
|
5924
5924
|
s("div", je, [
|
|
5925
5925
|
s("div", Ye, [
|
|
5926
5926
|
s("div", Ge, [
|
|
5927
|
-
o.value.length > 1 ? (y(),
|
|
5927
|
+
o.value.length > 1 ? (y(), A("div", We, [
|
|
5928
5928
|
s("div", Ke, [
|
|
5929
5929
|
a(z, {
|
|
5930
5930
|
size: "small",
|
|
5931
5931
|
class: "connector-selector",
|
|
5932
|
-
modelValue:
|
|
5933
|
-
"onUpdate:modelValue": C[0] || (C[0] = (c) =>
|
|
5932
|
+
modelValue: D.value,
|
|
5933
|
+
"onUpdate:modelValue": C[0] || (C[0] = (c) => D.value = c),
|
|
5934
5934
|
style: { "margin-right": "20px" }
|
|
5935
5935
|
}, {
|
|
5936
5936
|
default: l(() => [
|
|
@@ -5953,7 +5953,7 @@ const Re = [
|
|
|
5953
5953
|
])) : ne("", !0),
|
|
5954
5954
|
s("div", Qe, [
|
|
5955
5955
|
s("div", Xe, [
|
|
5956
|
-
(y(!0),
|
|
5956
|
+
(y(!0), A(Z, null, le(o.value, (c, F) => (y(), A("div", {
|
|
5957
5957
|
key: c.id,
|
|
5958
5958
|
class: "filter-card-item"
|
|
5959
5959
|
}, [
|
|
@@ -5987,7 +5987,7 @@ const Re = [
|
|
|
5987
5987
|
theme: "default",
|
|
5988
5988
|
variant: "text",
|
|
5989
5989
|
size: "small",
|
|
5990
|
-
onClick: (J) =>
|
|
5990
|
+
onClick: (J) => q(F),
|
|
5991
5991
|
disabled: o.value.length === 1
|
|
5992
5992
|
}, {
|
|
5993
5993
|
icon: l(() => [
|
|
@@ -5997,11 +5997,11 @@ const Re = [
|
|
|
5997
5997
|
}, 8, ["onClick", "disabled"])
|
|
5998
5998
|
]),
|
|
5999
5999
|
s("div", aa, [
|
|
6000
|
-
(y(!0),
|
|
6000
|
+
(y(!0), A(Z, null, le(c.conditions, (J, L) => (y(), A("div", {
|
|
6001
6001
|
key: L,
|
|
6002
6002
|
class: "filter-combination"
|
|
6003
6003
|
}, [
|
|
6004
|
-
a(
|
|
6004
|
+
a(xe, {
|
|
6005
6005
|
"field-options": i.fieldOptions,
|
|
6006
6006
|
"filter-condition": c.conditions[L],
|
|
6007
6007
|
index: L,
|
|
@@ -6134,7 +6134,7 @@ const Re = [
|
|
|
6134
6134
|
shareMode: "none",
|
|
6135
6135
|
shareType: "specific",
|
|
6136
6136
|
selectedUsers: []
|
|
6137
|
-
}),
|
|
6137
|
+
}), D = _([]), X = _([]), r = re(() => d.isEditing && d.originalShareMode === "copy");
|
|
6138
6138
|
I(() => d.visible, (k) => {
|
|
6139
6139
|
k ? d.isEditing && d.planName && (o.value.planName = d.planName, o.value.shareMode = d.originalShareMode || "none", o.value.shareType = d.originalShareType || "specific", d.originalSelectedUsers && d.originalSelectedUsers.length > 0 && (o.value.selectedUsers = [...d.originalSelectedUsers])) : P();
|
|
6140
6140
|
}), I(() => d.deptMembersDataProp, (k) => {
|
|
@@ -6146,7 +6146,7 @@ const Re = [
|
|
|
6146
6146
|
shareMode: "none",
|
|
6147
6147
|
shareType: "specific",
|
|
6148
6148
|
selectedUsers: []
|
|
6149
|
-
},
|
|
6149
|
+
}, D.value = [], X.value = [];
|
|
6150
6150
|
}, W = (k) => {
|
|
6151
6151
|
console.log("选中人员:", k), k.map((b) => ({
|
|
6152
6152
|
id: b.id,
|
|
@@ -6161,15 +6161,15 @@ const Re = [
|
|
|
6161
6161
|
tags: [],
|
|
6162
6162
|
isUser: b.isUser === !0
|
|
6163
6163
|
})).forEach((b) => {
|
|
6164
|
-
|
|
6165
|
-
}), o.value.selectedUsers =
|
|
6166
|
-
},
|
|
6164
|
+
D.value.find((f) => f.id === b.id) || D.value.push(b);
|
|
6165
|
+
}), o.value.selectedUsers = D.value.map((b) => b.id);
|
|
6166
|
+
}, q = (k) => {
|
|
6167
6167
|
v("load-users", k);
|
|
6168
6168
|
}, B = (k) => {
|
|
6169
6169
|
v("search", k);
|
|
6170
6170
|
}, Y = (k) => {
|
|
6171
6171
|
v("dept-click", k);
|
|
6172
|
-
},
|
|
6172
|
+
}, S = () => {
|
|
6173
6173
|
if (!o.value.planName.trim()) {
|
|
6174
6174
|
de.warning("请输入方案名称");
|
|
6175
6175
|
return;
|
|
@@ -6195,7 +6195,7 @@ const Re = [
|
|
|
6195
6195
|
"onUpdate:visible": z[3] || (z[3] = (Q) => k.$emit("update:visible", Q)),
|
|
6196
6196
|
width: "600px",
|
|
6197
6197
|
footer: !0,
|
|
6198
|
-
onConfirm:
|
|
6198
|
+
onConfirm: S,
|
|
6199
6199
|
onClose: C
|
|
6200
6200
|
}, {
|
|
6201
6201
|
body: l(() => [
|
|
@@ -6293,7 +6293,7 @@ const Re = [
|
|
|
6293
6293
|
}, {
|
|
6294
6294
|
default: l(() => [
|
|
6295
6295
|
a(Me(Je), {
|
|
6296
|
-
users:
|
|
6296
|
+
users: D.value,
|
|
6297
6297
|
"avatar-size": 32,
|
|
6298
6298
|
"max-display": 10,
|
|
6299
6299
|
edit: !0,
|
|
@@ -6301,7 +6301,7 @@ const Re = [
|
|
|
6301
6301
|
"person-organizations": i.organizations,
|
|
6302
6302
|
"dept-members-data": X.value,
|
|
6303
6303
|
onPersonSelect: W,
|
|
6304
|
-
onLoadUsers:
|
|
6304
|
+
onLoadUsers: q,
|
|
6305
6305
|
onSearch: B,
|
|
6306
6306
|
onDeptClick: Y
|
|
6307
6307
|
}, null, 8, ["users", "person-tabs", "person-organizations", "dept-members-data"])
|
|
@@ -6325,7 +6325,7 @@ const Re = [
|
|
|
6325
6325
|
}),
|
|
6326
6326
|
a(L, {
|
|
6327
6327
|
theme: "primary",
|
|
6328
|
-
onClick:
|
|
6328
|
+
onClick: S
|
|
6329
6329
|
}, {
|
|
6330
6330
|
default: l(() => [...z[10] || (z[10] = [
|
|
6331
6331
|
w("确定", -1)
|
|
@@ -6346,7 +6346,7 @@ const Re = [
|
|
|
6346
6346
|
}, fa = { class: "filter-tab-content" }, pa = {
|
|
6347
6347
|
key: 0,
|
|
6348
6348
|
class: "filter-dialog-left"
|
|
6349
|
-
}, ya = { class: "connectors-container" }, ba = { class: "filter-cards" }, ga = { class: "filter-card-header" }, ha = { class: "filter-card-header-left" }, Ca = { class: "filter-card-title" }, ka = { class: "filter-card-content" }, _a = { class: "filter-card-actions" }, za = { class: "add-card-content" }, Fa = { class: "column-settings-panel" }, Oa = { class: "column-title-row" }, wa = { class: "column-title column-title-show" }, Va = { class: "column-list" }, Sa = ["onDragstart", "onDragover", "onDrop"], $a = { class: "column-name" },
|
|
6349
|
+
}, ya = { class: "connectors-container" }, ba = { class: "filter-cards" }, ga = { class: "filter-card-header" }, ha = { class: "filter-card-header-left" }, Ca = { class: "filter-card-title" }, ka = { class: "filter-card-content" }, _a = { class: "filter-card-actions" }, za = { class: "add-card-content" }, Fa = { class: "column-settings-panel" }, Oa = { class: "column-title-row" }, wa = { class: "column-title column-title-show" }, Va = { class: "column-list" }, Sa = ["onDragstart", "onDragover", "onDrop"], $a = { class: "column-name" }, xa = { class: "column-show" }, Ua = { class: "column-freeze" }, Da = { class: "column-width" }, Ea = { class: "column-sort-buttons" }, Aa = { class: "filter-dialog-right" }, qa = { class: "filter-plan-list" }, Pa = ["onClick"], Ta = { class: "plan-name" }, Na = { class: "filter-dialog-footer-container" }, Ba = { class: "filter-dialog-footer-left" }, Ma = { class: "filter-dialog-footer-right" }, Ja = {
|
|
6350
6350
|
__name: "cd-filter",
|
|
6351
6351
|
props: {
|
|
6352
6352
|
visible: {
|
|
@@ -6419,12 +6419,12 @@ const Re = [
|
|
|
6419
6419
|
"column-change"
|
|
6420
6420
|
],
|
|
6421
6421
|
setup(i, { emit: ee }) {
|
|
6422
|
-
const d = i, v = ee, o = _(JSON.parse(JSON.stringify(d.filterCards))),
|
|
6422
|
+
const d = i, v = ee, o = _(JSON.parse(JSON.stringify(d.filterCards))), D = _(d.topOp), X = _(null), r = _(!1), P = _([]), W = _("filter"), q = _(!1), B = _(""), Y = _("none"), S = _("specific"), C = _([]), k = _(null);
|
|
6423
6423
|
let z = 100;
|
|
6424
6424
|
I(() => d.filterCards, (e) => {
|
|
6425
6425
|
o.value = JSON.parse(JSON.stringify(e));
|
|
6426
6426
|
}, { deep: !0 }), I(() => d.topOp, (e) => {
|
|
6427
|
-
|
|
6427
|
+
D.value = e;
|
|
6428
6428
|
});
|
|
6429
6429
|
const b = () => {
|
|
6430
6430
|
o.value.push({
|
|
@@ -6446,11 +6446,11 @@ const Re = [
|
|
|
6446
6446
|
O.conditions.length > 1 && t >= 0 && t < O.conditions.length ? O.conditions.splice(t, 1) : O.conditions.length <= 1 && de.warning("每个卡片至少需要一个筛选条件");
|
|
6447
6447
|
}
|
|
6448
6448
|
}, F = (e) => e.map((t) => {
|
|
6449
|
-
const O = t.conditions.filter((
|
|
6449
|
+
const O = t.conditions.filter((E) => E.field && E.field.trim() !== "").map((E) => {
|
|
6450
6450
|
let h = "";
|
|
6451
|
-
return
|
|
6452
|
-
field:
|
|
6453
|
-
operator:
|
|
6451
|
+
return E.value !== null && E.value !== void 0 && (Array.isArray(E.value) ? h = E.value.join("/") : h = String(E.value)), {
|
|
6452
|
+
field: E.field.trim(),
|
|
6453
|
+
operator: E.operator || "eq",
|
|
6454
6454
|
value: h
|
|
6455
6455
|
};
|
|
6456
6456
|
});
|
|
@@ -6460,50 +6460,50 @@ const Re = [
|
|
|
6460
6460
|
conditions: O.length > 0 ? O : [{ field: "", operator: "eq", value: "" }]
|
|
6461
6461
|
};
|
|
6462
6462
|
}).filter((t) => t.conditions.length > 0 && t.conditions[0].field !== ""), J = (e) => {
|
|
6463
|
-
if (e.value !== "empty" && (X.value = e, v("plan-click", e), e.precepts && (o.value = JSON.parse(JSON.stringify(e.precepts))), e.sqlConnectType && (
|
|
6463
|
+
if (e.value !== "empty" && (X.value = e, v("plan-click", e), e.precepts && (o.value = JSON.parse(JSON.stringify(e.precepts))), e.sqlConnectType && (D.value = e.sqlConnectType), e.columns && e.columns.length > 0)) {
|
|
6464
6464
|
te.value = {}, m.value = {}, G.value = e.columns.filter((U) => U.show !== !1).map((U) => U.value), e.columns.forEach((U) => {
|
|
6465
|
-
U.width && (te.value[U.value] = parseInt(U.width)), U.
|
|
6465
|
+
U.width && (te.value[U.value] = parseInt(U.width)), U.fixed ? m.value[U.value] = U.fixed : m.value[U.value] = "none";
|
|
6466
6466
|
});
|
|
6467
6467
|
const t = e.columns.map((U) => U.value), O = t.map(
|
|
6468
6468
|
(U) => d.fieldOptions.find((ve) => ve.value === U)
|
|
6469
|
-
).filter(Boolean),
|
|
6469
|
+
).filter(Boolean), E = d.fieldOptions.filter(
|
|
6470
6470
|
(U) => !t.includes(U.value)
|
|
6471
6471
|
);
|
|
6472
|
-
n.value = [...O, ...
|
|
6472
|
+
n.value = [...O, ...E], se.value = G.value.length === d.fieldOptions.length;
|
|
6473
6473
|
const h = e.columns.filter((U) => U.show !== !1);
|
|
6474
6474
|
v("column-change", h);
|
|
6475
6475
|
}
|
|
6476
6476
|
}, L = () => {
|
|
6477
|
-
|
|
6477
|
+
q.value = !1, k.value = null, B.value = "", Y.value = "none", S.value = "specific", C.value = [], r.value = !0;
|
|
6478
6478
|
}, ae = (e) => {
|
|
6479
6479
|
const t = n.value.map((O) => {
|
|
6480
|
-
const
|
|
6480
|
+
const E = te.value[O.value], h = m.value[O.value] || "none";
|
|
6481
6481
|
return {
|
|
6482
6482
|
value: O.value,
|
|
6483
6483
|
show: G.value.includes(O.value),
|
|
6484
6484
|
// 是否显示
|
|
6485
|
-
width:
|
|
6486
|
-
|
|
6485
|
+
width: E ? `${E}px` : "120px",
|
|
6486
|
+
fixed: h
|
|
6487
6487
|
// 冻结状态
|
|
6488
6488
|
};
|
|
6489
6489
|
});
|
|
6490
|
-
|
|
6490
|
+
q.value && k.value ? v("update-plan", {
|
|
6491
6491
|
...e,
|
|
6492
6492
|
plan: k.value,
|
|
6493
6493
|
filterCards: o.value,
|
|
6494
|
-
topOp:
|
|
6494
|
+
topOp: D.value,
|
|
6495
6495
|
columns: t
|
|
6496
6496
|
}) : v("save-plan", {
|
|
6497
6497
|
...e,
|
|
6498
6498
|
filterCards: o.value,
|
|
6499
|
-
topOp:
|
|
6499
|
+
topOp: D.value,
|
|
6500
6500
|
columns: t
|
|
6501
|
-
}),
|
|
6501
|
+
}), q.value = !1, k.value = null;
|
|
6502
6502
|
}, Q = (e) => {
|
|
6503
|
-
|
|
6503
|
+
q.value = !0, k.value = e, B.value = e.content || "", Y.value = e.shareMode || "none", S.value = e.shareType || "specific", C.value = e.selectedUsers || [], r.value = !0;
|
|
6504
6504
|
}, ie = (e) => {
|
|
6505
6505
|
v("copy-plan", e);
|
|
6506
|
-
},
|
|
6506
|
+
}, $ = (e) => {
|
|
6507
6507
|
v("delete-plan", e);
|
|
6508
6508
|
}, T = (e) => {
|
|
6509
6509
|
v("set-default-plan", e);
|
|
@@ -6517,13 +6517,13 @@ const Re = [
|
|
|
6517
6517
|
{ field: "", operator: "eq", value: "" }
|
|
6518
6518
|
]
|
|
6519
6519
|
}
|
|
6520
|
-
],
|
|
6520
|
+
], D.value = "and", v("reset");
|
|
6521
6521
|
}, N = () => {
|
|
6522
6522
|
if (W.value === "filter") {
|
|
6523
6523
|
const e = F(o.value);
|
|
6524
6524
|
v("confirm", {
|
|
6525
6525
|
filterCards: e,
|
|
6526
|
-
type1:
|
|
6526
|
+
type1: D.value
|
|
6527
6527
|
});
|
|
6528
6528
|
} else W.value === "column" && Fe();
|
|
6529
6529
|
me();
|
|
@@ -6537,25 +6537,25 @@ const Re = [
|
|
|
6537
6537
|
v("dept-click", { dept: e, callback: (O) => {
|
|
6538
6538
|
P.value = O;
|
|
6539
6539
|
} });
|
|
6540
|
-
}, G = _([]), se = _(!1), te = _({}), m = _({}), n = _([]),
|
|
6540
|
+
}, G = _([]), se = _(!1), te = _({}), m = _({}), n = _([]), x = _(null), V = _(null);
|
|
6541
6541
|
I(() => d.visibleColumns, (e) => {
|
|
6542
6542
|
if (te.value = {}, m.value = {}, e && e.length > 0) {
|
|
6543
6543
|
if (typeof e[0] == "object") {
|
|
6544
6544
|
G.value = e.filter((h) => h.show !== !1).map((h) => h.value), e.forEach((h) => {
|
|
6545
|
-
h.width && (te.value[h.value] = parseInt(h.width)), h.
|
|
6545
|
+
h.width && (te.value[h.value] = parseInt(h.width)), h.fixed ? m.value[h.value] = h.fixed : m.value[h.value] = "none";
|
|
6546
6546
|
});
|
|
6547
6547
|
const t = e.map((h) => h.value), O = t.map(
|
|
6548
6548
|
(h) => d.fieldOptions.find((U) => U.value === h)
|
|
6549
|
-
).filter(Boolean),
|
|
6549
|
+
).filter(Boolean), E = d.fieldOptions.filter(
|
|
6550
6550
|
(h) => !t.includes(h.value)
|
|
6551
6551
|
);
|
|
6552
|
-
n.value = [...O, ...
|
|
6552
|
+
n.value = [...O, ...E];
|
|
6553
6553
|
} else {
|
|
6554
6554
|
G.value = [...e];
|
|
6555
6555
|
const t = e.map(
|
|
6556
|
-
(
|
|
6556
|
+
(E) => d.fieldOptions.find((h) => h.value === E)
|
|
6557
6557
|
).filter(Boolean), O = d.fieldOptions.filter(
|
|
6558
|
-
(
|
|
6558
|
+
(E) => !e.includes(E.value)
|
|
6559
6559
|
);
|
|
6560
6560
|
n.value = [...t, ...O];
|
|
6561
6561
|
}
|
|
@@ -6588,36 +6588,36 @@ const Re = [
|
|
|
6588
6588
|
n.value[e] = n.value[e + 1], n.value[e + 1] = t, n.value = [...n.value];
|
|
6589
6589
|
}
|
|
6590
6590
|
}, Ce = (e, t) => {
|
|
6591
|
-
|
|
6591
|
+
x.value = e, t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/html", t.target.innerHTML);
|
|
6592
6592
|
}, ke = (e, t) => {
|
|
6593
|
-
t.preventDefault(), t.dataTransfer.dropEffect = "move",
|
|
6593
|
+
t.preventDefault(), t.dataTransfer.dropEffect = "move", V.value = e;
|
|
6594
6594
|
}, _e = () => {
|
|
6595
|
-
|
|
6595
|
+
x.value = null, V.value = null;
|
|
6596
6596
|
}, ze = (e, t) => {
|
|
6597
6597
|
t.preventDefault();
|
|
6598
|
-
const O =
|
|
6598
|
+
const O = x.value;
|
|
6599
6599
|
if (O === null || O === e)
|
|
6600
6600
|
return;
|
|
6601
|
-
const
|
|
6602
|
-
|
|
6601
|
+
const E = [...n.value], h = E[O];
|
|
6602
|
+
E.splice(O, 1), E.splice(e, 0, h), n.value = E, x.value = null, V.value = null;
|
|
6603
6603
|
}, Fe = () => {
|
|
6604
6604
|
const e = n.value.filter((t) => G.value.includes(t.value)).map((t) => {
|
|
6605
|
-
const O = te.value[t.value],
|
|
6605
|
+
const O = te.value[t.value], E = m.value[t.value] || "none";
|
|
6606
6606
|
return {
|
|
6607
6607
|
value: t.value,
|
|
6608
6608
|
show: !0,
|
|
6609
6609
|
// 已通过filter筛选,都是显示的
|
|
6610
6610
|
width: O ? `${O}px` : "120px",
|
|
6611
6611
|
// 没有设置宽度时使用默认值120px
|
|
6612
|
-
|
|
6612
|
+
fixed: E
|
|
6613
6613
|
// 冻结状态
|
|
6614
6614
|
};
|
|
6615
6615
|
});
|
|
6616
6616
|
v("column-change", e);
|
|
6617
6617
|
};
|
|
6618
6618
|
return (e, t) => {
|
|
6619
|
-
const O = p("t-radio-button"),
|
|
6620
|
-
return y(),
|
|
6619
|
+
const O = p("t-radio-button"), E = p("t-radio-group"), h = p("t-icon"), U = p("t-button"), ve = p("t-tab-panel"), Ue = p("t-checkbox"), Oe = p("t-option"), qe = p("t-select"), Pe = p("t-input-number"), Te = p("t-tabs"), fe = p("t-tooltip"), Ne = p("t-dialog");
|
|
6620
|
+
return y(), A(Z, null, [
|
|
6621
6621
|
a(Ne, {
|
|
6622
6622
|
header: "方案设置",
|
|
6623
6623
|
placement: "center",
|
|
@@ -6646,13 +6646,13 @@ const Re = [
|
|
|
6646
6646
|
}, {
|
|
6647
6647
|
default: l(() => [
|
|
6648
6648
|
s("div", fa, [
|
|
6649
|
-
o.value.length > 1 ? (y(),
|
|
6649
|
+
o.value.length > 1 ? (y(), A("div", pa, [
|
|
6650
6650
|
s("div", ya, [
|
|
6651
|
-
a(
|
|
6651
|
+
a(E, {
|
|
6652
6652
|
size: i.size,
|
|
6653
6653
|
class: "connector-selector",
|
|
6654
|
-
modelValue:
|
|
6655
|
-
"onUpdate:modelValue": t[0] || (t[0] = (g) =>
|
|
6654
|
+
modelValue: D.value,
|
|
6655
|
+
"onUpdate:modelValue": t[0] || (t[0] = (g) => D.value = g)
|
|
6656
6656
|
}, {
|
|
6657
6657
|
default: l(() => [
|
|
6658
6658
|
a(O, { value: "and" }, {
|
|
@@ -6673,14 +6673,14 @@ const Re = [
|
|
|
6673
6673
|
])
|
|
6674
6674
|
])) : ne("", !0),
|
|
6675
6675
|
s("div", ba, [
|
|
6676
|
-
(y(!0),
|
|
6676
|
+
(y(!0), A(Z, null, le(o.value, (g, K) => (y(), A("div", {
|
|
6677
6677
|
key: g.id,
|
|
6678
6678
|
class: "filter-card-item"
|
|
6679
6679
|
}, [
|
|
6680
6680
|
s("div", ga, [
|
|
6681
6681
|
s("div", ha, [
|
|
6682
6682
|
s("span", Ca, "筛选卡片 " + ce(K + 1), 1),
|
|
6683
|
-
a(
|
|
6683
|
+
a(E, {
|
|
6684
6684
|
size: i.size,
|
|
6685
6685
|
modelValue: g.connector,
|
|
6686
6686
|
"onUpdate:modelValue": (M) => g.connector = M,
|
|
@@ -6717,11 +6717,11 @@ const Re = [
|
|
|
6717
6717
|
}, 8, ["size", "onClick", "disabled"])
|
|
6718
6718
|
]),
|
|
6719
6719
|
s("div", ka, [
|
|
6720
|
-
(y(!0),
|
|
6720
|
+
(y(!0), A(Z, null, le(g.conditions, (M, we) => (y(), A("div", {
|
|
6721
6721
|
key: we,
|
|
6722
6722
|
class: "filter-combination"
|
|
6723
6723
|
}, [
|
|
6724
|
-
a(
|
|
6724
|
+
a(xe, {
|
|
6725
6725
|
"field-options": i.fieldOptions,
|
|
6726
6726
|
"filter-condition": g.conditions[we],
|
|
6727
6727
|
"select-options": i.selectOptions,
|
|
@@ -6780,7 +6780,7 @@ const Re = [
|
|
|
6780
6780
|
s("div", Oa, [
|
|
6781
6781
|
t[13] || (t[13] = s("div", { class: "column-title column-title-name" }, "名称", -1)),
|
|
6782
6782
|
s("div", wa, [
|
|
6783
|
-
a(
|
|
6783
|
+
a(Ue, {
|
|
6784
6784
|
modelValue: se.value,
|
|
6785
6785
|
"onUpdate:modelValue": t[1] || (t[1] = (g) => se.value = g),
|
|
6786
6786
|
onChange: R
|
|
@@ -6792,9 +6792,9 @@ const Re = [
|
|
|
6792
6792
|
t[16] || (t[16] = s("div", { class: "column-title column-title-sort" }, "排序", -1))
|
|
6793
6793
|
]),
|
|
6794
6794
|
s("div", Va, [
|
|
6795
|
-
(y(!0),
|
|
6795
|
+
(y(!0), A(Z, null, le(n.value, (g, K) => (y(), A("div", {
|
|
6796
6796
|
key: g.value,
|
|
6797
|
-
class: Se(["column-item-row", { dragging:
|
|
6797
|
+
class: Se(["column-item-row", { dragging: x.value === K }]),
|
|
6798
6798
|
draggable: "true",
|
|
6799
6799
|
onDragstart: (M) => Ce(K, M),
|
|
6800
6800
|
onDragover: (M) => ke(K, M),
|
|
@@ -6808,14 +6808,14 @@ const Re = [
|
|
|
6808
6808
|
}),
|
|
6809
6809
|
w(" " + ce(g.label), 1)
|
|
6810
6810
|
]),
|
|
6811
|
-
s("div",
|
|
6812
|
-
a(
|
|
6811
|
+
s("div", xa, [
|
|
6812
|
+
a(Ue, {
|
|
6813
6813
|
checked: G.value.includes(g.value),
|
|
6814
6814
|
onChange: (M) => H(g.value, M)
|
|
6815
6815
|
}, null, 8, ["checked", "onChange"])
|
|
6816
6816
|
]),
|
|
6817
|
-
s("div",
|
|
6818
|
-
a(
|
|
6817
|
+
s("div", Ua, [
|
|
6818
|
+
a(qe, {
|
|
6819
6819
|
modelValue: m.value[g.value],
|
|
6820
6820
|
"onUpdate:modelValue": (M) => m.value[g.value] = M,
|
|
6821
6821
|
size: "small",
|
|
@@ -6892,12 +6892,12 @@ const Re = [
|
|
|
6892
6892
|
_: 1
|
|
6893
6893
|
}, 8, ["modelValue"])
|
|
6894
6894
|
]),
|
|
6895
|
-
s("div",
|
|
6895
|
+
s("div", Aa, [
|
|
6896
6896
|
t[17] || (t[17] = s("div", { class: "filter-plan-title" }, "我的方案", -1)),
|
|
6897
|
-
s("div",
|
|
6898
|
-
(y(!0),
|
|
6897
|
+
s("div", qa, [
|
|
6898
|
+
(y(!0), A(Z, null, le(i.planFilterOptions, (g) => {
|
|
6899
6899
|
var K;
|
|
6900
|
-
return y(),
|
|
6900
|
+
return y(), A("div", {
|
|
6901
6901
|
key: g.value,
|
|
6902
6902
|
class: Se(["filter-plan-item", { active: ((K = X.value) == null ? void 0 : K.value) === g.value }]),
|
|
6903
6903
|
onClick: (M) => J(g)
|
|
@@ -6906,7 +6906,7 @@ const Re = [
|
|
|
6906
6906
|
name: "file-text",
|
|
6907
6907
|
class: "plan-icon"
|
|
6908
6908
|
}),
|
|
6909
|
-
s("span", Ta, ce(g.
|
|
6909
|
+
s("span", Ta, ce(g.name), 1),
|
|
6910
6910
|
s("div", {
|
|
6911
6911
|
class: "plan-actions",
|
|
6912
6912
|
onClick: t[3] || (t[3] = De(() => {
|
|
@@ -6990,7 +6990,7 @@ const Re = [
|
|
|
6990
6990
|
theme: "default",
|
|
6991
6991
|
variant: "text",
|
|
6992
6992
|
size: "small",
|
|
6993
|
-
onClick: (M) =>
|
|
6993
|
+
onClick: (M) => $(g),
|
|
6994
6994
|
disabled: !g.value || g.value === "empty"
|
|
6995
6995
|
}, {
|
|
6996
6996
|
icon: l(() => [
|
|
@@ -7059,10 +7059,10 @@ const Re = [
|
|
|
7059
7059
|
a(da, {
|
|
7060
7060
|
visible: r.value,
|
|
7061
7061
|
"onUpdate:visible": t[5] || (t[5] = (g) => r.value = g),
|
|
7062
|
-
"is-editing":
|
|
7062
|
+
"is-editing": q.value,
|
|
7063
7063
|
"plan-name": B.value,
|
|
7064
7064
|
"original-share-mode": Y.value,
|
|
7065
|
-
"original-share-type":
|
|
7065
|
+
"original-share-type": S.value,
|
|
7066
7066
|
"original-selected-users": C.value,
|
|
7067
7067
|
tabs: i.personTabs,
|
|
7068
7068
|
organizations: i.personOrganizations,
|
|
@@ -7075,7 +7075,7 @@ const Re = [
|
|
|
7075
7075
|
], 64);
|
|
7076
7076
|
};
|
|
7077
7077
|
}
|
|
7078
|
-
}, Ra = /* @__PURE__ */ ue(Ja, [["__scopeId", "data-v-
|
|
7078
|
+
}, Ra = /* @__PURE__ */ ue(Ja, [["__scopeId", "data-v-586daf19"]]), La = { class: "dialog-header" }, Ha = { class: "color-filter-dialog" }, ja = { class: "color-filter-rules" }, Ya = { class: "rule-content" }, Ga = { class: "rule-color-section" }, Wa = { class: "color-block-wrapper" }, Ka = {
|
|
7079
7079
|
key: 0,
|
|
7080
7080
|
class: "bold-indicator"
|
|
7081
7081
|
}, Qa = { class: "color-picker-panel" }, Xa = { class: "preset-colors" }, Za = ["onClick"], Ia = { class: "bold-option" }, el = { class: "apply-to-section" }, al = { class: "rule-condition" }, ll = { class: "dialog-footer" }, tl = {
|
|
@@ -7088,7 +7088,7 @@ const Re = [
|
|
|
7088
7088
|
},
|
|
7089
7089
|
emits: ["update:visible", "confirm", "clear", "smart-colors-change"],
|
|
7090
7090
|
setup(i, { emit: ee }) {
|
|
7091
|
-
const d = i, v = ee, o = _(d.visible),
|
|
7091
|
+
const d = i, v = ee, o = _(d.visible), D = [
|
|
7092
7092
|
// 第一行 - 暖色系
|
|
7093
7093
|
"#FFE7BA",
|
|
7094
7094
|
"#FFD6E7",
|
|
@@ -7156,7 +7156,7 @@ const Re = [
|
|
|
7156
7156
|
});
|
|
7157
7157
|
const W = (b, u) => {
|
|
7158
7158
|
P.value[b].backgroundColor = u, P.value[b].showColorPicker = !1;
|
|
7159
|
-
},
|
|
7159
|
+
}, q = () => {
|
|
7160
7160
|
P.value.push({
|
|
7161
7161
|
field: "",
|
|
7162
7162
|
operator: "eq",
|
|
@@ -7170,7 +7170,7 @@ const Re = [
|
|
|
7170
7170
|
P.value.length > 1 && P.value.splice(b, 1);
|
|
7171
7171
|
}, Y = () => {
|
|
7172
7172
|
o.value = !1;
|
|
7173
|
-
},
|
|
7173
|
+
}, S = () => {
|
|
7174
7174
|
v("clear"), o.value = !1;
|
|
7175
7175
|
}, C = () => {
|
|
7176
7176
|
const b = P.value.filter(
|
|
@@ -7185,10 +7185,10 @@ const Re = [
|
|
|
7185
7185
|
}));
|
|
7186
7186
|
v("confirm", b), o.value = !1;
|
|
7187
7187
|
}, k = re(() => {
|
|
7188
|
-
const b = P.value.length, u = Math.floor(
|
|
7188
|
+
const b = P.value.length, u = Math.floor(D.length / b), f = [];
|
|
7189
7189
|
for (let c = 0; c < b; c++) {
|
|
7190
|
-
const F = c * u %
|
|
7191
|
-
f.push(
|
|
7190
|
+
const F = c * u % D.length;
|
|
7191
|
+
f.push(D[F]);
|
|
7192
7192
|
}
|
|
7193
7193
|
return f;
|
|
7194
7194
|
}), z = () => {
|
|
@@ -7197,8 +7197,8 @@ const Re = [
|
|
|
7197
7197
|
}), v("smart-colors-change", k.value);
|
|
7198
7198
|
};
|
|
7199
7199
|
return (b, u) => {
|
|
7200
|
-
const f = p("t-button"), c = p("t-checkbox"), F = p("t-popup"), J = p("t-radio-button"), L = p("t-radio-group"), ae = p("t-select"), Q = p("t-input"), ie = p("t-icon"),
|
|
7201
|
-
return y(), j(
|
|
7200
|
+
const f = p("t-button"), c = p("t-checkbox"), F = p("t-popup"), J = p("t-radio-button"), L = p("t-radio-group"), ae = p("t-select"), Q = p("t-input"), ie = p("t-icon"), $ = p("t-dialog");
|
|
7201
|
+
return y(), j($, {
|
|
7202
7202
|
visible: o.value,
|
|
7203
7203
|
"onUpdate:visible": u[0] || (u[0] = (T) => o.value = T),
|
|
7204
7204
|
width: "800px",
|
|
@@ -7228,7 +7228,7 @@ const Re = [
|
|
|
7228
7228
|
body: l(() => [
|
|
7229
7229
|
s("div", Ha, [
|
|
7230
7230
|
s("div", ja, [
|
|
7231
|
-
(y(!0),
|
|
7231
|
+
(y(!0), A(Z, null, le(P.value, (T, oe) => (y(), A("div", {
|
|
7232
7232
|
key: oe,
|
|
7233
7233
|
class: "color-rule-item"
|
|
7234
7234
|
}, [
|
|
@@ -7243,7 +7243,7 @@ const Re = [
|
|
|
7243
7243
|
content: l(() => [
|
|
7244
7244
|
s("div", Qa, [
|
|
7245
7245
|
s("div", Xa, [
|
|
7246
|
-
(y(),
|
|
7246
|
+
(y(), A(Z, null, le(D, (N) => s("div", {
|
|
7247
7247
|
key: N,
|
|
7248
7248
|
class: Se(["preset-color-item", { active: T.backgroundColor === N }]),
|
|
7249
7249
|
style: $e({ backgroundColor: N }),
|
|
@@ -7269,7 +7269,7 @@ const Re = [
|
|
|
7269
7269
|
class: "color-block",
|
|
7270
7270
|
style: $e({ backgroundColor: T.backgroundColor })
|
|
7271
7271
|
}, [
|
|
7272
|
-
T.isBold ? (y(),
|
|
7272
|
+
T.isBold ? (y(), A("span", Ka, "B")) : ne("", !0)
|
|
7273
7273
|
], 4)
|
|
7274
7274
|
])
|
|
7275
7275
|
]),
|
|
@@ -7352,7 +7352,7 @@ const Re = [
|
|
|
7352
7352
|
theme: "default",
|
|
7353
7353
|
variant: "dashed",
|
|
7354
7354
|
size: i.size,
|
|
7355
|
-
onClick:
|
|
7355
|
+
onClick: q,
|
|
7356
7356
|
style: { width: "100%", "margin-top": "12px" }
|
|
7357
7357
|
}, {
|
|
7358
7358
|
icon: l(() => [
|
|
@@ -7380,7 +7380,7 @@ const Re = [
|
|
|
7380
7380
|
a(f, {
|
|
7381
7381
|
theme: "default",
|
|
7382
7382
|
size: i.size,
|
|
7383
|
-
onClick:
|
|
7383
|
+
onClick: S
|
|
7384
7384
|
}, {
|
|
7385
7385
|
default: l(() => [...u[11] || (u[11] = [
|
|
7386
7386
|
w("清除", -1)
|
|
@@ -7403,7 +7403,7 @@ const Re = [
|
|
|
7403
7403
|
}, 8, ["visible"]);
|
|
7404
7404
|
};
|
|
7405
7405
|
}
|
|
7406
|
-
},
|
|
7406
|
+
}, Ae = /* @__PURE__ */ ue(tl, [["__scopeId", "data-v-822b291e"]]), nl = { class: "cd-filter-bar" }, ol = {
|
|
7407
7407
|
key: 0,
|
|
7408
7408
|
class: "inline-filter-toolbar"
|
|
7409
7409
|
}, il = {
|
|
@@ -7456,37 +7456,37 @@ const Re = [
|
|
|
7456
7456
|
"smart-colors-change"
|
|
7457
7457
|
],
|
|
7458
7458
|
setup(i, { emit: ee }) {
|
|
7459
|
-
const d = i, v = ee, o = _([]),
|
|
7459
|
+
const d = i, v = ee, o = _([]), D = () => ({ field: "", operator: "eq", value: "" });
|
|
7460
7460
|
(() => {
|
|
7461
|
-
var n,
|
|
7461
|
+
var n, x;
|
|
7462
7462
|
if (d.filterCount === 0) {
|
|
7463
7463
|
o.value = [];
|
|
7464
7464
|
return;
|
|
7465
7465
|
}
|
|
7466
|
-
const m = ((
|
|
7467
|
-
o.value = Array.from({ length: d.filterCount }, (
|
|
7466
|
+
const m = ((x = (n = d.filterCards) == null ? void 0 : n[0]) == null ? void 0 : x.conditions) || [];
|
|
7467
|
+
o.value = Array.from({ length: d.filterCount }, (V, H) => m[H] ? JSON.parse(JSON.stringify(m[H])) : D());
|
|
7468
7468
|
})();
|
|
7469
7469
|
const r = () => {
|
|
7470
7470
|
if (d.filterCount === 0) {
|
|
7471
7471
|
o.value = [];
|
|
7472
7472
|
return;
|
|
7473
7473
|
}
|
|
7474
|
-
o.value = Array.from({ length: d.filterCount }, () =>
|
|
7475
|
-
}, P = _("保存筛选方案"), W = _(!1),
|
|
7476
|
-
I(() => d.topOp, (m) =>
|
|
7477
|
-
const Y = _(null),
|
|
7478
|
-
const n = d.planFilterOptions.find((
|
|
7474
|
+
o.value = Array.from({ length: d.filterCount }, () => D());
|
|
7475
|
+
}, P = _("保存筛选方案"), W = _(!1), q = _(d.topOp), B = _(JSON.parse(JSON.stringify(d.filterCards)));
|
|
7476
|
+
I(() => d.topOp, (m) => q.value = m), I(() => d.filterCards, (m) => B.value = JSON.parse(JSON.stringify(m)));
|
|
7477
|
+
const Y = _(null), S = _(""), C = re(() => d.planFilterOptions && d.planFilterOptions.length > 0 ? d.planFilterOptions : [{ content: "暂无方案", value: "empty", disabled: !0 }]), k = (m) => {
|
|
7478
|
+
const n = d.planFilterOptions.find((x) => x.value === m);
|
|
7479
7479
|
n && z(n);
|
|
7480
7480
|
}, z = (m) => {
|
|
7481
7481
|
if (!m.precepts || m.precepts.length === 0) return;
|
|
7482
|
-
if (Y.value = m,
|
|
7483
|
-
const
|
|
7484
|
-
|
|
7482
|
+
if (Y.value = m, S.value = m.value, B.value = JSON.parse(JSON.stringify(m.precepts)), q.value = m.sqlConnectType, d.filterCount > 0) {
|
|
7483
|
+
const V = m.precepts[0];
|
|
7484
|
+
V && V.conditions && (o.value = Array.from({ length: d.filterCount }, (H, R) => V.conditions[R] ? JSON.parse(JSON.stringify(V.conditions[R])) : D()));
|
|
7485
7485
|
}
|
|
7486
|
-
const n = F(m.precepts),
|
|
7487
|
-
if (v("confirm",
|
|
7488
|
-
const
|
|
7489
|
-
v("column-change",
|
|
7486
|
+
const n = F(m.precepts), x = J(n, m.sqlConnectType);
|
|
7487
|
+
if (v("confirm", x), m.columns && m.columns.length > 0) {
|
|
7488
|
+
const V = m.columns.filter((H) => H.show !== !1);
|
|
7489
|
+
v("column-change", V);
|
|
7490
7490
|
}
|
|
7491
7491
|
}, b = () => {
|
|
7492
7492
|
u();
|
|
@@ -7496,7 +7496,7 @@ const Re = [
|
|
|
7496
7496
|
return;
|
|
7497
7497
|
}
|
|
7498
7498
|
const m = F([
|
|
7499
|
-
{ id: 1, connector:
|
|
7499
|
+
{ id: 1, connector: q.value, conditions: o.value }
|
|
7500
7500
|
]), n = J(m, "and");
|
|
7501
7501
|
v("search", n);
|
|
7502
7502
|
}, f = () => {
|
|
@@ -7504,45 +7504,45 @@ const Re = [
|
|
|
7504
7504
|
}, c = () => {
|
|
7505
7505
|
W.value = !1;
|
|
7506
7506
|
}, F = (m) => m.map((n) => {
|
|
7507
|
-
const
|
|
7507
|
+
const x = n.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) => {
|
|
7508
7508
|
let H = "";
|
|
7509
|
-
return
|
|
7510
|
-
field:
|
|
7511
|
-
operator:
|
|
7509
|
+
return V.value !== null && V.value !== void 0 && (Array.isArray(V.value) ? H = V.value.join("/") : H = String(V.value)), {
|
|
7510
|
+
field: V.field.trim(),
|
|
7511
|
+
operator: V.operator || "eq",
|
|
7512
7512
|
value: H
|
|
7513
7513
|
};
|
|
7514
7514
|
});
|
|
7515
7515
|
return {
|
|
7516
7516
|
...n,
|
|
7517
7517
|
connector: n.connector || "and",
|
|
7518
|
-
conditions:
|
|
7518
|
+
conditions: x.length > 0 ? x : [{ field: "", operator: "eq", value: "" }]
|
|
7519
7519
|
};
|
|
7520
7520
|
}).filter((n) => n.conditions.length > 0 && n.conditions[0].field !== "");
|
|
7521
7521
|
function J(m, n) {
|
|
7522
7522
|
if (n !== "and" && n !== "or")
|
|
7523
7523
|
throw new Error('type参数必须是"and"或"or"');
|
|
7524
|
-
function
|
|
7524
|
+
function x(R) {
|
|
7525
7525
|
return {
|
|
7526
7526
|
[R.field]: {
|
|
7527
7527
|
[R.operator]: R.value
|
|
7528
7528
|
}
|
|
7529
7529
|
};
|
|
7530
7530
|
}
|
|
7531
|
-
function
|
|
7532
|
-
return R.conditions.length === 1 ?
|
|
7533
|
-
[R.connector]: R.conditions.map(
|
|
7531
|
+
function V(R) {
|
|
7532
|
+
return R.conditions.length === 1 ? x(R.conditions[0]) : {
|
|
7533
|
+
[R.connector]: R.conditions.map(x)
|
|
7534
7534
|
};
|
|
7535
7535
|
}
|
|
7536
7536
|
return {
|
|
7537
7537
|
conditions: {
|
|
7538
|
-
[n]: m.map(
|
|
7538
|
+
[n]: m.map(V)
|
|
7539
7539
|
}
|
|
7540
7540
|
};
|
|
7541
7541
|
}
|
|
7542
7542
|
const L = () => {
|
|
7543
|
-
|
|
7543
|
+
$.value = !1;
|
|
7544
7544
|
}, ae = () => {
|
|
7545
|
-
r(), Y.value = null,
|
|
7545
|
+
r(), Y.value = null, S.value = "", B.value = [
|
|
7546
7546
|
{
|
|
7547
7547
|
id: 1,
|
|
7548
7548
|
connector: "and",
|
|
@@ -7551,14 +7551,14 @@ const Re = [
|
|
|
7551
7551
|
{ field: "", operator: "eq", value: "" }
|
|
7552
7552
|
]
|
|
7553
7553
|
}
|
|
7554
|
-
],
|
|
7554
|
+
], q.value = "and", v("reset"), u();
|
|
7555
7555
|
}, Q = () => {
|
|
7556
7556
|
if (Y.value) {
|
|
7557
7557
|
const m = F(B.value);
|
|
7558
7558
|
v("update-plan", {
|
|
7559
7559
|
name: T.value.name,
|
|
7560
7560
|
precepts: m,
|
|
7561
|
-
topOp:
|
|
7561
|
+
topOp: q.value,
|
|
7562
7562
|
plan: Y.value,
|
|
7563
7563
|
columns: d.visibleColumns || []
|
|
7564
7564
|
// 包含当前列配置
|
|
@@ -7568,7 +7568,7 @@ const Re = [
|
|
|
7568
7568
|
v("save-plan", {
|
|
7569
7569
|
name: T.value.name,
|
|
7570
7570
|
precepts: m,
|
|
7571
|
-
topOp:
|
|
7571
|
+
topOp: q.value,
|
|
7572
7572
|
plan: Y.value,
|
|
7573
7573
|
columns: d.visibleColumns || []
|
|
7574
7574
|
// 包含当前列配置
|
|
@@ -7578,11 +7578,11 @@ const Re = [
|
|
|
7578
7578
|
}, ie = (m) => {
|
|
7579
7579
|
const n = J(m.filterCards, m.type1);
|
|
7580
7580
|
if (v("confirm", n), d.filterCount > 0) {
|
|
7581
|
-
const
|
|
7582
|
-
|
|
7581
|
+
const x = m.filterCards[0];
|
|
7582
|
+
x && x.conditions && (o.value = Array.from({ length: d.filterCount }, (V, H) => x.conditions[H] ? JSON.parse(JSON.stringify(x.conditions[H])) : D()));
|
|
7583
7583
|
}
|
|
7584
7584
|
c();
|
|
7585
|
-
},
|
|
7585
|
+
}, $ = _(!1), T = _({ name: "" }), oe = _(!1), N = _([]), me = () => {
|
|
7586
7586
|
oe.value = !0;
|
|
7587
7587
|
}, pe = (m) => {
|
|
7588
7588
|
N.value = m, v("color-filter-change", m);
|
|
@@ -7593,11 +7593,11 @@ const Re = [
|
|
|
7593
7593
|
const be = (m) => {
|
|
7594
7594
|
v("smart-colors-change", m);
|
|
7595
7595
|
}, G = re(() => N.value.filter((m) => m.field && m.operator && m.value).length), se = re(() => {
|
|
7596
|
-
const m = N.value.filter((
|
|
7596
|
+
const m = N.value.filter((x) => x.field && x.operator && x.value);
|
|
7597
7597
|
return m.length === 0 ? "颜色筛选" : `
|
|
7598
|
-
${m.map((
|
|
7599
|
-
const
|
|
7600
|
-
return `${
|
|
7598
|
+
${m.map((x) => {
|
|
7599
|
+
const V = d.fieldOptions.find((R) => R.value === x.field);
|
|
7600
|
+
return `${V ? V.label : x.field} ${te(x.operator)} ${x.value}`;
|
|
7601
7601
|
}).join(`
|
|
7602
7602
|
`)}`;
|
|
7603
7603
|
}), te = (m) => ({
|
|
@@ -7611,10 +7611,10 @@ ${m.map(($) => {
|
|
|
7611
7611
|
notContains: "不包含"
|
|
7612
7612
|
})[m] || m;
|
|
7613
7613
|
return (m, n) => {
|
|
7614
|
-
const
|
|
7615
|
-
return y(),
|
|
7616
|
-
i.filterCount > 0 ? (y(),
|
|
7617
|
-
(y(!0),
|
|
7614
|
+
const x = p("t-radio-button"), V = p("t-radio-group"), H = p("t-icon"), R = p("t-button"), ge = p("t-badge"), he = p("t-tooltip"), Ce = p("t-dropdown"), ke = p("t-input"), _e = p("t-form-item"), ze = p("t-form"), Fe = p("t-dialog");
|
|
7615
|
+
return y(), A("div", nl, [
|
|
7616
|
+
i.filterCount > 0 ? (y(), A("div", ol, [
|
|
7617
|
+
(y(!0), A(Z, null, le(o.value, (e, t) => (y(), j(xe, {
|
|
7618
7618
|
key: t,
|
|
7619
7619
|
"field-options": i.fieldOptions,
|
|
7620
7620
|
size: i.size,
|
|
@@ -7623,16 +7623,16 @@ ${m.map(($) => {
|
|
|
7623
7623
|
onSearch: b
|
|
7624
7624
|
}, null, 8, ["field-options", "size", "filter-condition", "select-options"]))), 128))
|
|
7625
7625
|
])) : ne("", !0),
|
|
7626
|
-
i.filterCount === 0 && i.planFilterOptions.length > 0 ? (y(),
|
|
7626
|
+
i.filterCount === 0 && i.planFilterOptions.length > 0 ? (y(), A("div", il, [
|
|
7627
7627
|
n[12] || (n[12] = s("span", { class: "plan-label" }, "我的方案:", -1)),
|
|
7628
|
-
a(
|
|
7629
|
-
modelValue:
|
|
7630
|
-
"onUpdate:modelValue": n[0] || (n[0] = (e) =>
|
|
7628
|
+
a(V, {
|
|
7629
|
+
modelValue: S.value,
|
|
7630
|
+
"onUpdate:modelValue": n[0] || (n[0] = (e) => S.value = e),
|
|
7631
7631
|
size: i.size,
|
|
7632
7632
|
onChange: k
|
|
7633
7633
|
}, {
|
|
7634
7634
|
default: l(() => [
|
|
7635
|
-
(y(!0),
|
|
7635
|
+
(y(!0), A(Z, null, le(i.planFilterOptions, (e) => (y(), j(x, {
|
|
7636
7636
|
key: e.value,
|
|
7637
7637
|
value: e.value,
|
|
7638
7638
|
disabled: e.disabled
|
|
@@ -7729,7 +7729,7 @@ ${m.map(($) => {
|
|
|
7729
7729
|
"select-options": i.selectOptions,
|
|
7730
7730
|
"plan-filter-options": i.planFilterOptions,
|
|
7731
7731
|
"filter-cards": B.value,
|
|
7732
|
-
"top-op":
|
|
7732
|
+
"top-op": q.value,
|
|
7733
7733
|
size: i.size,
|
|
7734
7734
|
"person-tabs": i.personTabs,
|
|
7735
7735
|
"person-organizations": i.personOrganizations,
|
|
@@ -7748,7 +7748,7 @@ ${m.map(($) => {
|
|
|
7748
7748
|
}, null, 8, ["visible", "field-options", "select-options", "plan-filter-options", "filter-cards", "top-op", "size", "person-tabs", "person-organizations", "visible-columns"]),
|
|
7749
7749
|
a(Fe, {
|
|
7750
7750
|
header: P.value,
|
|
7751
|
-
visible:
|
|
7751
|
+
visible: $.value,
|
|
7752
7752
|
width: "600px",
|
|
7753
7753
|
onClose: L
|
|
7754
7754
|
}, {
|
|
@@ -7799,7 +7799,7 @@ ${m.map(($) => {
|
|
|
7799
7799
|
]),
|
|
7800
7800
|
_: 1
|
|
7801
7801
|
}, 8, ["header", "visible"]),
|
|
7802
|
-
a(
|
|
7802
|
+
a(Ae, {
|
|
7803
7803
|
visible: oe.value,
|
|
7804
7804
|
"onUpdate:visible": n[11] || (n[11] = (e) => oe.value = e),
|
|
7805
7805
|
"field-options": i.fieldOptions,
|
|
@@ -7812,12 +7812,12 @@ ${m.map(($) => {
|
|
|
7812
7812
|
]);
|
|
7813
7813
|
};
|
|
7814
7814
|
}
|
|
7815
|
-
}, ul = /* @__PURE__ */ ue(dl, [["__scopeId", "data-v-
|
|
7816
|
-
i.component("FilterDialog", Ee), i.component("FilterComponent", Ee), i.component("CdFilterBar", ul), i.component("ColorFilterDialog",
|
|
7815
|
+
}, ul = /* @__PURE__ */ ue(dl, [["__scopeId", "data-v-ac4f1791"]]), pl = (i) => {
|
|
7816
|
+
i.component("FilterDialog", Ee), i.component("FilterComponent", Ee), i.component("CdFilterBar", ul), i.component("ColorFilterDialog", Ae);
|
|
7817
7817
|
};
|
|
7818
7818
|
export {
|
|
7819
7819
|
ul as CdFilterBar,
|
|
7820
|
-
|
|
7820
|
+
Ae as ColorFilterDialog,
|
|
7821
7821
|
Ee as FilterComponent,
|
|
7822
7822
|
Ee as FilterDialog,
|
|
7823
7823
|
Ee as default,
|