import { V as c, d as L, r as m, e as R, a as j, Z as B, c as A, o as D, w as l, j as o, W as G, l as r, H as F, B as V, h3 as q, X as M, __tla as __tla_0 } from "./index-9PRMimni.js";
import { B as W } from "./BasicForm-dL_oCSPM.js";
import { u as $ } from "./useForm-CKmgcynv.js";
import { e as y } from "./dictionary-BRse4lkf.js";
import { a as z, h as X } from "./group-DxznlajQ.js";
import { B as E } from "./Table-0PViRYCf.js";
import { _ as H } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { _ as O } from "./timeLine.vue_vue_type_script_setup_true_lang-C4xK2Ym8.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 "./AutoComplete-Dv1Bqed4.js";
import "./TreeSelect-BZh2DeCh.js";
import "./usePageCache-DluHn7Yy.js";
import "./index-DkvzUEqh.js";
import "./index-kKnqLkWM.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 "./TimelineItem-Bkds7ZW8.js";
let qe;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })()
]).then(async ()=>{
    let e, Z, J, K, Q, U, Y, a, ee;
    ({ t: e } = c());
    Z = await y({
        dictCode: "exercise_project_type",
        pageNum: 1,
        pageSize: 999
    });
    J = await y({
        dictCode: "exercise_project_vessel_type",
        pageNum: 1,
        pageSize: 999
    });
    ({ records: K } = await z({}));
    Q = K.map((i)=>({
            label: i.groupName,
            value: i.id
        }));
    U = [
        {
            label: "Active",
            value: "Active"
        },
        {
            label: "Inactive",
            value: "Inactive"
        }
    ];
    Y = [
        {
            field: "exerciseType",
            component: "NSelect",
            label: e("drill.manage.formCategory"),
            componentProps: {
                placeholder: e("drill.manage.fromSelectCategory"),
                options: Z.list
            }
        },
        {
            field: "status",
            component: "NSelect",
            label: e("drill.manage.formStatus"),
            componentProps: {
                placeholder: e("drill.manage.fromSelectStatus"),
                options: U
            }
        },
        {
            field: "groupName",
            component: "NSelect",
            label: e("drill.manage.formGroup"),
            componentProps: {
                placeholder: e("drill.manage.fromSelectGroup"),
                options: Q
            }
        },
        {
            field: "exerciseVesselType",
            component: "NSelect",
            label: e("drill.manage.formType"),
            componentProps: {
                placeholder: e("drill.manage.fromSelectShipType"),
                options: J.list
            }
        },
        {
            field: "exerciseProjectName",
            component: "NInput",
            label: e("drill.manage.formItem"),
            componentProps: {
                placeholder: e("drill.manage.fromSelecItem")
            }
        }
    ];
    ({ t: a } = c());
    ee = [
        {
            title: a("drill.manage.tableCategory"),
            key: "exerciseType",
            width: 140
        },
        {
            title: a("drill.manage.tableStatus"),
            key: "status",
            width: 140
        },
        {
            title: a("drill.manage.tableGroup"),
            key: "groupName",
            width: 140
        },
        {
            title: a("drill.manage.tablePeroid"),
            key: "peroId",
            width: 140
        }
    ];
    qe = L({
        __name: "index",
        setup (i) {
            const p = m(0), d = R(), { t: n } = c(), [h, { getFieldsValue: S }] = $({
                gridProps: {
                    cols: 4,
                    xGap: 15
                },
                schemas: Y,
                labelWidth: "auto"
            }), u = m(), _ = m(), x = j({
                width: 120,
                title: n("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (t) {
                    return B(H, {
                        style: "text",
                        actions: [
                            {
                                label: "log",
                                onClick: k.bind(null, t)
                            },
                            {
                                label: n("common.optionsEditText"),
                                onClick: ()=>{
                                    d.push({
                                        name: "Drill_exerciseProjectManagement_Add_Drill_Project",
                                        query: {
                                            id: t.id,
                                            type: "edit"
                                        }
                                    });
                                }
                            }
                        ]
                    });
                }
            });
            function f() {
                u.value.reload();
            }
            function C(t) {
                f();
            }
            function T(t) {
                f();
            }
            function k(t) {
                p.value = t.id, _.value.openModal();
            }
            function v() {
                d.push({
                    name: "Drill_exerciseProjectManagement_Add_Drill_Project"
                });
            }
            async function w(t, g) {
                return X({
                    ...t,
                    ...g
                });
            }
            return (t, g)=>{
                const b = G, P = V, I = F, N = M;
                return D(), A(N, null, {
                    default: l(()=>[
                            o(b, {
                                bordered: !1,
                                class: "mt-1 proCard"
                            }, {
                                default: l(()=>[
                                        o(r(W), {
                                            onRegister: r(h),
                                            onSubmit: C,
                                            onReset: T
                                        }, null, 8, [
                                            "onRegister"
                                        ])
                                    ]),
                                _: 1
                            }),
                            o(b, {
                                bordered: !1,
                                class: "mt-2 proCard"
                            }, {
                                default: l(()=>[
                                        o(r(E), {
                                            columns: r(ee),
                                            request: (s)=>w(s, r(S)()),
                                            "row-key": (s)=>s.id,
                                            ref_key: "basicTableRef",
                                            ref: u,
                                            autoScrollX: !0,
                                            "virtual-scroll": "",
                                            actionColumn: r(x)
                                        }, {
                                            tableTitle: l(()=>[
                                                    o(I, null, {
                                                        default: l(()=>[
                                                                o(P, {
                                                                    type: "primary",
                                                                    onClick: v
                                                                }, {
                                                                    icon: l(()=>[
                                                                            o(r(q))
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    })
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "columns",
                                            "request",
                                            "row-key",
                                            "actionColumn"
                                        ])
                                    ]),
                                _: 1
                            }),
                            o(O, {
                                ref_key: "timeLineRef",
                                ref: _,
                                title: r(n)("drill.manage.timeLineTitle"),
                                logId: p.value
                            }, null, 8, [
                                "title",
                                "logId"
                            ])
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { qe as default, __tla };
