import { V as u, bk as O, d as j, r as v, a as L, Z as d, cZ as M, c as P, o as A, w as t, j as a, W as N, l as r, H as V, aI as F, p as E, B as I, i as $, X as q, __tla as __tla_0 } from "./index-9PRMimni.js";
import { B as X } from "./BasicForm-dL_oCSPM.js";
import { u as Z } from "./useForm-CKmgcynv.js";
import { a1 as z, aK as G, aL as H } from "./template-rpthWlT9.js";
import { B as K } from "./Table-0PViRYCf.js";
import { _ as J } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import Q, { __tla as __tla_1 } from "./Modal-Db3shBK6.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.js";
import "./SingleImageUpload-CNx4b9eC.js";
import "./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";
import "./componentSetting-DVhNDBTO.js";
import "./ImageUpload-DUsnro3W.js";
import "./vuedraggable.umd-Co2xEC3p.js";
import "./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";
import "./tabsView-BXskTdVh.js";
import "./BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js";
import "./propTypes-CebMRUpe.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";
import "./usePageCache-DluHn7Yy.js";
import "./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";
import "./componentMap-CElCaWis.js";
import "./format-DgF6KtHk.js";
import "./omit-B2_8Y6O_.js";
import "./_flatRest-DBrd2CHT.js";
import "./flatten-DeoUZLdb.js";
import "./print-CT_2hrjP.js";
import "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import "./useModal-CO65vga3.js";
import "./useTimeout-BxFilWvD.js";
import "./Flex-CTSf12gq.js";
import "./management-DjeaRnx2.js";
import "./role-DXhO1zOz.js";
let Ie;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    let b, U, l, Y, ee, oe;
    ({ t: b } = u());
    U = [
        {
            field: "keyword",
            component: "NInput",
            label: b("mdm.approval.moduleCode"),
            componentProps: {
                placeholder: b("mdm.approval.moduleCodePlaceholder")
            }
        }
    ];
    ({ t: l } = u());
    Y = await z("RejectOperation");
    ee = O();
    oe = [
        {
            title: l("common.messagedefine.Num"),
            key: "num",
            width: 80,
            render: (m, e)=>e + 1
        },
        {
            title: l("mdm.approval.approvalLevel"),
            key: "approvalLevel",
            minWidth: 120
        },
        {
            title: l("mdm.approval.moduleCode"),
            key: "moduleCode",
            minWidth: 140
        },
        {
            title: l("mdm.approval.subModuleCode"),
            key: "subModuleCode",
            minWidth: 140
        },
        {
            title: l("mdm.approval.rejectOperation"),
            key: "rejectOperation",
            minWidth: 200,
            render: (m)=>{
                const e = (Y || []).find((p)=>p.value === m.rejectOperation);
                return ee.getLocale === "en" ? e?.labelEn : e?.label;
            }
        },
        {
            title: l("mdm.approval.description"),
            key: "description",
            minWidth: 140
        }
    ];
    Ie = j({
        __name: "index",
        setup (m) {
            const { t: e } = u(), p = M(), _ = v(), [g, { getFieldsValue: h }] = Z({
                gridProps: {
                    cols: 4,
                    xGap: 15
                },
                schemas: U,
                labelWidth: "auto",
                showAdvancedButton: !1
            }), k = L({
                width: 200,
                title: e("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (o) {
                    return d(J, {
                        style: "text",
                        actions: [
                            {
                                label: e("common.optionsEditText"),
                                labelShow: !1,
                                icon: d("i", {
                                    class: "iconfont icon-a-Frame28"
                                }),
                                onClick: x.bind(null, o)
                            },
                            {
                                label: e("common.optionsDelText"),
                                labelShow: !1,
                                icon: d("i", {
                                    class: "iconfont icon-Delete red"
                                }),
                                onPositiveClick: ()=>{
                                    y(o.id);
                                },
                                onNegativeClick: ()=>{}
                            }
                        ]
                    });
                }
            });
            async function y(o) {
                await G(o), p.success(e("common.optionsDelSuccessText")), s();
            }
            function s() {
                _.value.reload();
            }
            function C(o) {
                s();
            }
            function w(o) {
                s();
            }
            const n = v();
            function T() {
                n.value?.showModal(null), n.value.setProps({
                    title: e("mdm.approval.addTitle")
                }), n.value.getData(null);
            }
            async function x(o) {
                await n.value?.showModal(), n.value.setProps({
                    title: e("mdm.approval.editTitle")
                }), n.value.getData(o);
            }
            async function B(o, i) {
                return H({
                    ...o,
                    ...i
                });
            }
            return (o, i)=>{
                const f = N, D = I, R = F, S = V, W = q;
                return A(), P(W, null, {
                    default: t(()=>[
                            a(f, {
                                bordered: !1,
                                class: "mb-3 proCard"
                            }, {
                                default: t(()=>[
                                        a(r(X), {
                                            onRegister: r(g),
                                            onSubmit: C,
                                            onReset: w
                                        }, null, 8, [
                                            "onRegister"
                                        ])
                                    ]),
                                _: 1
                            }),
                            a(f, {
                                bordered: !1,
                                class: "proCard"
                            }, {
                                default: t(()=>[
                                        a(r(K), {
                                            columns: r(oe),
                                            request: (c)=>B(c, r(h)()),
                                            "row-key": (c)=>c.id,
                                            ref_key: "basicTableRef",
                                            ref: _,
                                            autoScrollX: !0,
                                            "virtual-scroll": "",
                                            actionColumn: r(k)
                                        }, {
                                            tableTitle: t(()=>[
                                                    a(S, null, {
                                                        default: t(()=>[
                                                                a(R, {
                                                                    trigger: "hover"
                                                                }, {
                                                                    trigger: t(()=>[
                                                                            a(D, {
                                                                                type: "primary",
                                                                                strong: "",
                                                                                bordered: "",
                                                                                secondary: "",
                                                                                class: "size-7",
                                                                                onClick: T
                                                                            }, {
                                                                                icon: t(()=>i[0] || (i[0] = [
                                                                                        $("i", {
                                                                                            class: "iconfont icon-ADD"
                                                                                        }, null, -1)
                                                                                    ])),
                                                                                _: 1
                                                                            })
                                                                        ]),
                                                                    default: t(()=>[
                                                                            i[1] || (i[1] = E(" Add "))
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    })
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "columns",
                                            "request",
                                            "row-key",
                                            "actionColumn"
                                        ])
                                    ]),
                                _: 1
                            }),
                            a(Q, {
                                ref_key: "modalRef",
                                ref: n,
                                onSuccess: s
                            }, null, 512)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { Ie as default, __tla };
