var Y = (r, L, s) => new Promise((T, e) => { var E = (n) => { try { C(s.next(n)); } catch (y) { e(y); } }, k = (n) => { try { C(s.throw(n)); } catch (y) { e(y); } }, C = (n) => n.done ? T(n.value) : Promise.resolve(n.value).then(E, k); C((s = s.apply(r, L)).next()); }); import { ref as I, computed as D, watch as j, resolveComponent as O, openBlock as o, createElementBlock as P, createBlock as m, createCommentVNode as c, mergeProps as R, withCtx as B, Fragment as z, renderList as q, createTextVNode as J, toDisplayString as K } from "vue"; import { I as Q, a6 as W, a7 as X, d5 as g, d6 as Z } from "./index2.js"; import { _ as ee } from "./index8.js"; import { D as le } from "./dayjs.js"; const te = { key: 0, class: "custom-input" }, re = /* @__PURE__ */ Object.assign({ name: "CustomInput" }, { __name: "CustomInput", props: { value: { type: [String, Object, Array, Number], default: "" }, data: { type: Object, default: () => ({}) }, disabled: { type: Boolean, default: !1 } }, setup(r) { const L = r, s = I(0), T = I(1), e = I({ filterConfig: {} }), E = D( () => { var i, l; return ((l = (i = e.value) == null ? void 0 : i.filterConfig) == null ? void 0 : l.filterType) === "DATETIME" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD"; } ), k = D(() => { var l, a; return ["SINGLE_SELECT", "MULTIPLE_SELECT", "GANDER", "IS"].includes((a = (l = e.value) == null ? void 0 : l.filterConfig) == null ? void 0 : a.filterType); }), C = D(() => { var l, a; return ["INT", "FLOAT"].includes((a = (l = e.value) == null ? void 0 : l.filterConfig) == null ? void 0 : a.filterType); }), n = D(() => { var l, a; return ["DATE", "DATETIME"].includes((a = (l = e.value) == null ? void 0 : l.filterConfig) == null ? void 0 : a.filterType); }); j( () => L.data, (i) => Y(this, null, function* () { var u, f, d, v, p, b, t, V, S, _; e.value = i || {}; const a = ["SINGLE_SELECT", "MULTIPLE_SELECT", "GANDER", "IS"].includes((f = (u = e.value) == null ? void 0 : u.filterConfig) == null ? void 0 : f.filterType) && !((v = (d = e.value) == null ? void 0 : d.filterConfig) != null && v.filterData) && !!((b = (p = e.value) == null ? void 0 : p.filterConfig) != null && b.filterApi); if (T.value = ((V = (t = e.value) == null ? void 0 : t.filterConfig) == null ? void 0 : V.step) || 1, s.value = ((_ = (S = e.value) == null ? void 0 : S.filterConfig) == null ? void 0 : _.precision) || 1, a) { const $ = yield e.value.filterConfig.filterApi( { type: "portal_config_type" }, { pageSize: 10, pageNo: 1 } ); e.value.filterConfig.filterData = ($.list || []).map((h) => { var U, N, w, x, A, M; return { value: h[(w = (N = (U = e.value) == null ? void 0 : U.filterConfig) == null ? void 0 : N.props) == null ? void 0 : w.value], name: h[(M = (A = (x = e.value) == null ? void 0 : x.filterConfig) == null ? void 0 : A.props) == null ? void 0 : M.key] }; }); } }), { immediate: !0, deep: !0 } ); function y(i, l) { return Z(i, l); } function F(i = g()) { var f, d, v, p; const l = (d = (f = e.value) == null ? void 0 : f.filterConfig) == null ? void 0 : d.startDate, a = (p = (v = e.value) == null ? void 0 : v.filterConfig) == null ? void 0 : p.endDate; if (!l && !a) return !1; const u = g(i).unix(); if (l && a) return u < g(l).unix() || u > g(a).unix(); if (l) return u <= g(l).unix(); if (a) return u >= g(a).unix(); } function G(i = "", l = "", a = []) { e.value.value = l; } function H(i, l) { e.value.value = l; } return (i, l) => { const a = Q, u = X, f = W, d = ee, v = le, p = O("s-office-select"), b = O("s-tree-select"); return e.value.filterConfig ? (o(), P("div", te, [ !e.value.filterConfig.filterType || e.value.filterConfig.filterType === "INPUT" ? (o(), m(a, { key: 0, style: { width: "100%" }, disabled: r.disabled, modelValue: e.value.value, "onUpdate:modelValue": l[0] || (l[0] = (t) => e.value.value = t), placeholder: i.$l("请输入"), maxLength: e.value.filterConfig.length || 200, onBlur: l[1] || (l[1] = (t) => e.value.value = t.target.value) }, null, 8, ["disabled", "modelValue", "placeholder", "maxLength"])) : c("", !0), k.value ? (o(), m(f, R({ key: 1, style: { width: "100%" }, disabled: r.disabled, modelValue: e.value.value, "onUpdate:modelValue": l[2] || (l[2] = (t) => e.value.value = t) }, e.value.filterConfig.filterType === "MULTIPLE_SELECT" ? { mode: "multiple" } : {}, { allowClear: !0, placeholder: i.$l("请选择"), onChange: l[3] || (l[3] = (t) => e.value.value = t) }), { default: B(() => [ (o(!0), P(z, null, q(e.value.filterConfig.filterData, (t, V) => (o(), m(u, { value: t.value, key: V }, { default: B(() => [ J(K(t.name), 1) ]), _: 2 }, 1032, ["value"]))), 128)) ]), _: 1 }, 16, ["disabled", "modelValue", "placeholder"])) : c("", !0), C.value ? (o(), m(d, { key: 2, disabled: r.disabled, precision: s.value, step: T.value, style: { width: "100%" }, modelValue: e.value.value, "onUpdate:modelValue": l[4] || (l[4] = (t) => e.value.value = t), placeholder: i.$l("请输入"), min: e.value.filterConfig.minValue, max: e.value.filterConfig.maxValue, onBlur: l[5] || (l[5] = (t) => e.value.value = t.target.value) }, null, 8, ["disabled", "precision", "step", "modelValue", "placeholder", "min", "max"])) : c("", !0), n.value ? (o(), m(v, { key: 3, style: { width: "100%" }, disabled: r.disabled, modelValue: e.value.value, "onUpdate:modelValue": l[6] || (l[6] = (t) => e.value.value = t), "show-time": E.value && E.value.split(" ").length > 1 ? { format: "HH:mm:ss" } : !1, placeholder: i.$l("请选择"), "disabled-date": F, onChange: H }, null, 8, ["disabled", "modelValue", "show-time", "placeholder"])) : c("", !0), e.value.filterConfig.filterType === "USER" ? (o(), m(p, { key: 4, value: e.value.value, "onUpdate:value": l[7] || (l[7] = (t) => e.value.value = t), onChange: G }, null, 8, ["value"])) : c("", !0), e.value.filterConfig.filterType === "OFFICE" ? (o(), m(b, { key: 5, modelValue: e.value.value, "onUpdate:modelValue": l[8] || (l[8] = (t) => e.value.value = t), onChange: l[9] || (l[9] = (t) => e.value.value = t), recursionChildren: y }, null, 8, ["modelValue"])) : c("", !0) ])) : c("", !0); }; } }); export { re as default };