import { V as _, d as P, r as f, a as M, Z as r, cZ as F, c as $, o as N, w as l, j as n, W as O, l as m, H as j, B as E, i as V, X as q, __tla as __tla_0 } from "./index-9PRMimni.js";
import { c as A, e as b, d as W, _ as X, g as Z, __tla as __tla_1 } from "./FormModal.vue_vue_type_script_setup_true_lang-of4eChAb.js";
import { B as z } from "./Table-0PViRYCf.js";
import { _ as H } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { B as I } from "./BasicForm-dL_oCSPM.js";
import { u as L } from "./useForm-CKmgcynv.js";
import { c as G } from "./schemas-BONoQFmQ.js";
import "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import "./dashboardManagement-DwIFZ7Hm.js";
import "./useModal-CO65vga3.js";
import "./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";
import "./vuedraggable.umd-Co2xEC3p.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.js";
import "./componentMap-CElCaWis.js";
import "./propTypes-CebMRUpe.js";
import "./format-DgF6KtHk.js";
import "./omit-B2_8Y6O_.js";
import "./_flatRest-DBrd2CHT.js";
import "./flatten-DeoUZLdb.js";
import "./print-CT_2hrjP.js";
import "./componentSetting-DVhNDBTO.js";
import "./useTimeout-BxFilWvD.js";
import "./usePageCache-DluHn7Yy.js";
import "./tabsView-BXskTdVh.js";
import "./Flex-CTSf12gq.js";
import "./SingleImageUpload-CNx4b9eC.js";
import "./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";
import "./ImageUpload-DUsnro3W.js";
import "./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";
import "./BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js";
import "./BasicSelect-C_uwzMkE.js";
import "./BasicSelect.vue_vue_type_style_index_0_scoped_772d51cc_lang-Brp6PjEU.js";
import "./dictionary-BRse4lkf.js";
import "./index-DkvzUEqh.js";
import "./index-kKnqLkWM.js";
import "./AutoComplete-Dv1Bqed4.js";
import "./TreeSelect-BZh2DeCh.js";
let Oe;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    const { t: c } = _(), { statusList: J } = G();
    function K() {
        return {
            tableColumns: [
                {
                    title: c("common.messagedefine.Num"),
                    key: "num",
                    width: 80,
                    render: (e, s)=>s + 1
                },
                {
                    title: c("system.mergeRoleManagement.mergeRoleName"),
                    key: "viewName",
                    width: 200
                },
                {
                    title: c("system.mergeRoleManagement.mergeRoleCode"),
                    key: "viewCode",
                    width: 200
                },
                {
                    title: c("system.mergeRoleManagement.status"),
                    key: "status",
                    width: 130,
                    render (e) {
                        return J.find((u)=>+e.status == +u.value)?.label;
                    }
                },
                {
                    title: c("system.mergeRoleManagement.viewOrder"),
                    key: "priority",
                    width: 130
                }
            ]
        };
    }
    Oe = P({
        __name: "index",
        setup (g) {
            const { t: e } = _(), s = F(), u = f(), p = f(), { searchSchemas: C } = A(), [y, { getFieldsValue: w }] = L({
                gridProps: {
                    cols: "2 s:3 m:4 l:5 xl:6"
                },
                schemas: C,
                labelWidth: "auto",
                labelPlacement: "top",
                showAdvancedButton: !1
            }), { tableColumns: T } = K(), h = M({
                width: 130,
                title: e("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (o) {
                    return r(H, {
                        style: "text",
                        actions: [
                            {
                                label: e("common.optionsEditText"),
                                labelShow: !1,
                                icon: r("i", {
                                    class: "iconfont icon-a-Frame28"
                                }),
                                onClick: x.bind(null, o)
                            },
                            {
                                label: e("common.optionsDisableText"),
                                labelShow: !1,
                                icon: r("i", {
                                    class: "iconfont icon-jinyong1 text-[16px]"
                                }),
                                onPositiveClick: async ()=>{
                                    await b({
                                        ...o,
                                        status: 0
                                    }), s.success(e("common.disablePop.success")), a(!1);
                                },
                                isConfirm: !0,
                                confirmContent: e("common.disablePop.disableCont"),
                                ifShow: ()=>+o.status == 1
                            },
                            {
                                label: e("common.optionsEnableText"),
                                icon: r("i", {
                                    class: "iconfont icon-qiyong1 text-[16px]"
                                }),
                                labelShow: !1,
                                onPositiveClick: async ()=>{
                                    await b({
                                        ...o,
                                        status: 1
                                    }), s.success(e("common.disablePop.success")), a(!1);
                                },
                                isConfirm: !0,
                                confirmContent: e("common.disablePop.ableCont"),
                                ifShow: ()=>+o.status == 0
                            },
                            {
                                label: e("common.optionsDelText"),
                                labelShow: !1,
                                icon: r("i", {
                                    class: "iconfont icon-Delete"
                                }),
                                color: "red",
                                isConfirm: !0,
                                confirmContent: e("common.dialogContentDeleteText"),
                                onPositiveClick: ()=>{
                                    v(o);
                                }
                            }
                        ]
                    });
                }
            });
            function x(o) {
                p.value?.handleOpenModal(e("common.optionsEditText"), o);
            }
            function k() {
                p.value?.handleOpenModal(e("common.addText"));
            }
            async function v(o) {
                await W(o.id), s.success(e("common.optionsDelSuccessText")), a(!1);
            }
            function R(o, t) {
                return Z({
                    ...o,
                    ...t
                });
            }
            function a(o) {
                u.value[o ? "restReload" : "reload"]();
            }
            return (o, t)=>{
                const d = O, S = E, D = j, B = q;
                return N(), $(B, null, {
                    default: l(()=>[
                            n(d, {
                                class: "mb-3 proCard"
                            }, {
                                default: l(()=>[
                                        n(m(I), {
                                            onRegister: m(y),
                                            onSubmit: t[0] || (t[0] = (i)=>a(!0)),
                                            onReset: t[1] || (t[1] = (i)=>a(!0))
                                        }, null, 8, [
                                            "onRegister"
                                        ])
                                    ]),
                                _: 1
                            }),
                            n(d, {
                                class: "proCard"
                            }, {
                                default: l(()=>[
                                        n(m(z), {
                                            ref_key: "basicTableRef",
                                            ref: u,
                                            columns: m(T),
                                            request: (i)=>R(i, m(w)()),
                                            "row-key": (i)=>i.id,
                                            actionColumn: m(h),
                                            autoScrollX: !0,
                                            "virtual-scroll": ""
                                        }, {
                                            tableTitle: l(()=>[
                                                    n(D, null, {
                                                        default: l(()=>[
                                                                n(S, {
                                                                    type: "primary",
                                                                    strong: "",
                                                                    bordered: "",
                                                                    secondary: "",
                                                                    class: "size-7",
                                                                    onClick: k
                                                                }, {
                                                                    icon: l(()=>t[3] || (t[3] = [
                                                                            V("i", {
                                                                                class: "iconfont icon-ADD"
                                                                            }, null, -1)
                                                                        ])),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    })
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "columns",
                                            "request",
                                            "row-key",
                                            "actionColumn"
                                        ])
                                    ]),
                                _: 1
                            }),
                            n(X, {
                                ref_key: "formModalRef",
                                ref: p,
                                onSuccess: t[2] || (t[2] = (i)=>a(!1))
                            }, null, 512)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { Oe as default, __tla };
