| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- import { ref as f, resolveComponent as q, openBlock as r, createBlock as F, withCtx as a, createElementVNode as _, createVNode as t, createTextVNode as s, toDisplayString as u, createElementBlock as v, Fragment as g, renderList as C } from "vue";
- import z from "./CustomInput.js";
- import { n as A, d8 as L, d9 as G, a6 as H, a7 as J, B as K } from "./index2.js";
- import { _ as Q } from "./index7.js";
- import { _ as W, a as X } from "./index9.js";
- const Y = { class: "drawer-wrap" }, Z = { class: "content-wrap" }, ee = { class: "remove-filter-wrap" }, le = { class: "drawer-footer" }, ne = /* @__PURE__ */ Object.assign({ name: "SFilter" }, {
- __name: "SettingFilter",
- emits: ["reset", "submit"],
- setup(te, { expose: x, emit: O }) {
- const V = O, S = [
- { id: "includes", name: window.$l("包含") },
- { id: "excludes", name: window.$l("不包含") },
- { id: "equal", name: window.$l("等于") },
- { id: "notequal", name: window.$l("不等于") },
- { id: "null", name: window.$l("为空") },
- { id: "notnull", name: window.$l("不为空") }
- ], d = f(!1), c = f({ filter: 1 }), i = f([]), w = f([]);
- function U(o) {
- w.value = o.filter((e) => e.show !== !1 && !!e.filterConfig), d.value = !0;
- }
- function B() {
- d.value = !1;
- }
- function N() {
- i.value.push({
- id: window.$utils.uuid(),
- name: "",
- equals: "",
- value: ""
- });
- }
- function E() {
- i.value = [], V("reset"), k();
- }
- function k() {
- V("submit", i.value, c.value.filter), d.value = !1;
- }
- function I(o) {
- i.value = i.value.filter((e) => e.id !== o.id) || [];
- }
- function T(o, e) {
- const p = w.value.find(($) => $.dataIndex === o);
- Object.assign(e, p);
- }
- function j(o, e) {
- e.equals = o;
- }
- return x({
- show: U,
- visible: d,
- filters: i,
- superFilter: c
- }), (o, e) => {
- const p = G, $ = L, y = X, b = J, h = H, D = q("MinusCircleOutlined"), M = W, P = q("PlusOutlined"), m = K, R = Q;
- return r(), F(R, {
- rootClassName: "filter-drawer-wrap",
- title: `${o.$l("高级搜索")}`,
- placement: "right",
- width: 500,
- visible: d.value,
- onClose: B
- }, {
- default: a(() => [
- _("div", Y, [
- _("div", Z, [
- t(M, null, {
- default: a(() => [
- t(y, null, {
- default: a(() => [
- t($, {
- value: c.value.filter,
- "onUpdate:value": e[0] || (e[0] = (l) => c.value.filter = l)
- }, {
- default: a(() => [
- t(p, { value: 1 }, {
- default: a(() => [
- s(u(o.$l("以下全部条件")), 1)
- ]),
- _: 1
- }),
- t(p, { value: 2 }, {
- default: a(() => [
- s(u(o.$l("以下任意条件")), 1)
- ]),
- _: 1
- })
- ]),
- _: 1
- }, 8, ["value"])
- ]),
- _: 1
- }),
- t(y, null, {
- default: a(() => [
- (r(!0), v(g, null, C(i.value, (l) => (r(), v("div", {
- class: "filter-item",
- key: l.id
- }, [
- t(h, {
- style: { width: "240px" },
- modelValue: l.filterType,
- "onUpdate:modelValue": (n) => l.filterType = n,
- onChange: (n) => T(n, l)
- }, {
- default: a(() => [
- (r(!0), v(g, null, C(w.value, (n) => (r(), F(b, {
- key: n.dataIndex
- }, {
- default: a(() => [
- s(u(n.name || n.title), 1)
- ]),
- _: 2
- }, 1024))), 128))
- ]),
- _: 1
- }, 8, ["modelValue", "onUpdate:modelValue", "onChange"]),
- e[5] || (e[5] = _("div", { class: "divider" }, null, -1)),
- t(h, {
- style: { width: "240px" },
- modelValue: l.equals,
- "onUpdate:modelValue": (n) => l.equals = n,
- onChange: (n) => j(n, l)
- }, {
- default: a(() => [
- (r(), v(g, null, C(S, (n) => t(b, {
- key: n.id
- }, {
- default: a(() => [
- s(u(n.name), 1)
- ]),
- _: 2
- }, 1024)), 64))
- ]),
- _: 1
- }, 8, ["modelValue", "onUpdate:modelValue", "onChange"]),
- e[6] || (e[6] = _("div", { class: "divider" }, null, -1)),
- _("div", ee, [
- t(z, {
- style: { width: "240px" },
- data: l,
- modelValue: l.value,
- "onUpdate:modelValue": (n) => l.value = n
- }, null, 8, ["data", "modelValue", "onUpdate:modelValue"]),
- t(D, {
- style: { "font-size": "16px", "margin-left": "6px", color: "red" },
- onClick: (n) => I(l)
- }, null, 8, ["onClick"])
- ])
- ]))), 128))
- ]),
- _: 1
- })
- ]),
- _: 1
- }),
- t(m, {
- onClick: e[1] || (e[1] = (l) => N()),
- class: "add-filter",
- type: "link"
- }, {
- default: a(() => [
- t(P),
- s(" " + u(o.$l("添加筛选条件")), 1)
- ]),
- _: 1
- })
- ]),
- _("div", le, [
- t(m, {
- class: "cancel",
- onClick: e[2] || (e[2] = (l) => d.value = !1)
- }, {
- default: a(() => [
- s(u(o.$l("取消")), 1)
- ]),
- _: 1
- }),
- t(m, {
- class: "reset",
- onClick: e[3] || (e[3] = (l) => E())
- }, {
- default: a(() => [
- s(u(o.$l("重置")), 1)
- ]),
- _: 1
- }),
- t(m, {
- class: "submit",
- type: "primary",
- onClick: e[4] || (e[4] = (l) => k())
- }, {
- default: a(() => [
- s(u(o.$l("确定")), 1)
- ]),
- _: 1
- })
- ])
- ])
- ]),
- _: 1
- }, 8, ["title", "visible"]);
- };
- }
- }), de = /* @__PURE__ */ A(ne, [["__scopeId", "data-v-85c923c8"]]);
- export {
- de as default
- };
|