import { ref as _, resolveComponent as m, openBlock as V, createBlock as B, withCtx as a, createElementVNode as o, toDisplayString as i, createVNode as d, unref as N, createTextVNode as c } from "vue"; import { d as O } from "./vuedraggable.js"; import { n as D, d7 as E, B as H } from "./index2.js"; import { _ as T } from "./index7.js"; import { _ as j } from "./index8.js"; const q = { class: "drawer-wrap" }, z = { class: "content-wrap" }, K = { class: "table-wrap" }, R = { class: "title" }, W = { class: "columns-wrap" }, A = { class: "item" }, G = { class: "td-item flex-start" }, J = { class: "drag-icon" }, L = { class: "checkbox" }, M = { class: "checkbox" }, P = { class: "name" }, Q = { class: "td-item" }, X = { style: { "margin-right": "8px" } }, Y = { class: "drawer-footer" }, Z = /* @__PURE__ */ Object.assign({ name: "SettingColumns" }, { __name: "SettingColumns", props: { pageCode: { type: String, required: !0 } }, emits: ["reset"], setup(ee, { expose: p, emit: f }) { const v = f, l = _(!1), r = _([]); function g(t) { r.value = t.map((e) => (e.item = "item", e.width && !window.$utils.isNumber(e.width) && (e.width = parseInt(e.width)), e.fixed && (e.isFixed = !0), e.show === void 0 && (e.show = !0), e.dataIndex === "action" && (e.isFixed = !0, e.disabledFixed = !0), e)), l.value = !0; } function w() { v("reset", (t) => { console.log(t); }); } function C() { } function x(t) { t.show = !t.show; } function b(t) { t.fixed = !t.fixed; } function k({ target: { value: t } }, e) { e.width = t + "px"; } function $() { } function S() { } return p({ show: g, columns: r, visible: l }), (t, e) => { const y = m("HolderOutlined"), u = E, U = j, F = m("UndoOutlined"), h = H, I = T; return V(), B(I, { rootClassName: "filter-columns-wrap", title: `${t.$l("高级表格")}`, placement: "right", width: 700, visible: l.value, onClose: e[1] || (e[1] = (s) => l.value = !1) }, { default: a(() => [ o("div", q, [ o("div", z, [ o("div", K, [ o("div", R, i(t.$l("勾选要显示的列,拖动排序")), 1), o("div", W, [ d(N(O), { list: r.value, itemKey: "dataIndex", handle: ".mover", animation: "300", "ghost-class": "ghost", "chosen-class": "chosenClass", touchStartThreshold: 20, onStart: $, onEnd: S }, { item: a(({ element: s }) => [ o("div", A, [ o("div", G, [ o("div", J, [ d(y), e[2] || (e[2] = o("div", { class: "mask mover" }, null, -1)) ]), o("div", L, [ d(u, { checked: s.show, "onUpdate:checked": (n) => s.show = n, onChange: (n) => x(s) }, { default: a(() => [ c(i(t.$l("显示")), 1) ]), _: 1 }, 8, ["checked", "onUpdate:checked", "onChange"]) ]), o("div", M, [ d(u, { checked: s.isFixed, "onUpdate:checked": (n) => s.isFixed = n, disabled: s.disabledFixed, onChange: (n) => b(s) }, { default: a(() => [ c(i(t.$l("冻结")), 1) ]), _: 1 }, 8, ["checked", "onUpdate:checked", "disabled", "onChange"]) ]), o("div", P, i(s.title || s.name), 1) ]), o("div", Q, [ o("span", X, i(t.$l("宽度")), 1), d(U, { style: { width: "80px" }, size: "small", modelValue: s.width, "onUpdate:modelValue": (n) => s.width = n, onBlur: (n) => k(n, s) }, null, 8, ["modelValue", "onUpdate:modelValue", "onBlur"]), e[3] || (e[3] = o("span", { style: { "margin-left": "8px" } }, "px", -1)) ]) ]) ]), _: 1 }, 8, ["list"]) ]) ]) ]), o("div", Y, [ d(h, { class: "reset", onClick: e[0] || (e[0] = (s) => w()) }, { default: a(() => [ d(F), c(i(t.$l("重置")), 1) ]), _: 1 }), d(h, { class: "submit", type: "primary", onClick: C }, { default: a(() => [ c(i(t.$l("确定")), 1) ]), _: 1 }) ]) ]) ]), _: 1 }, 8, ["title", "visible"]); }; } }), ie = /* @__PURE__ */ D(Z, [["__scopeId", "data-v-11dd8264"]]); export { ie as default };