import { d as N, u as O, eV as X, dc as U, e as $, f as j, r as f, a as C, Z as z, gW as s, gX as r, l as e, ay as Z, aw as G, d9 as J, c as v, o as w, w as i, j as a, W as K, x as Q, y as Y, H as oo, aI as eo, p as to, A as ao, aE as no, B as io, ca as so, X as ro, __tla as __tla_0 } from "./index-9PRMimni.js";
import { B as lo } from "./BasicForm-dL_oCSPM.js";
import { s as mo, e as co, d as po, f as uo, __tla as __tla_1 } from "./columns-0GoiBHi9.js";
import { B as _o } from "./Table-0PViRYCf.js";
import { _ as bo } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { d as fo } from "./download-CIBdrxiA.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import { u as vo } from "./useForm-CKmgcynv.js";
import { __tla as __tla_2 } from "./index.vue_vue_type_style_index_0_scoped_b974e5ec_lang-_0QwzFKM.js";
import { H as wo, __tla as __tla_3 } from "./index-8tHZJCCW.js";
import "./schemas-BmKi-UM9.js";
import "./props-CLtNejQT.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 "./template-rpthWlT9.js";
import { __tla as __tla_4 } from "./schemas-DzvLPsci.js";
import "./isEmpty-BUg1OsQj.js";
import "./index-CKrxNOjs.js";
import { __tla as __tla_5 } from "./columns-CcSTU2Qa.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 "./useModal-CO65vga3.js";
import "./useTimeout-BxFilWvD.js";
import "./usePageCache-DluHn7Yy.js";
import "./Flex-CTSf12gq.js";
import "./base64Conver-4Xd-Hzyx.js";
import "./jobOrder-CGbsc7bp.js";
import "./has-CjqcrIOV.js";
import "./TimelineItem-Bkds7ZW8.js";
let fe;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_2;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_3;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_4;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_5;
        } catch  {}
    })()
]).then(async ()=>{
    fe = N({
        __name: "index",
        setup (ho) {
            const h = O(), { t } = X(), { hasPermission: c } = U(), x = $(), E = j(), l = f(2), d = f(), { schemas: k } = mo(), y = f(), { columns: S } = co(), [R, { getFieldsValue: B }] = vo({
                gridProps: {
                    cols: "2 s:3 m:4 l:5 xl:6"
                },
                schemas: k,
                labelWidth: "auto",
                labelPlacement: "top",
                showAdvancedButton: !0
            }), A = C({
                width: 130,
                title: t("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (o) {
                    return z(bo, {
                        style: "text",
                        actions: [
                            {
                                label: t("common.optionsViewText"),
                                labelShow: !1,
                                ifShow: c([
                                    "crew:evaluation:view"
                                ]),
                                icon: s(r.view, "text-[#3F7AE9]"),
                                onClick: _.bind(null, o, "view")
                            },
                            {
                                label: t("common.optionsEditText"),
                                labelShow: !1,
                                ifShow: ()=>o.editFlag && c([
                                        "crew:evaluation:edit"
                                    ]),
                                icon: s(r.edit, "text-[#3F7AE9]"),
                                onClick: _.bind(null, o, "edit")
                            },
                            {
                                label: t("common.examineAndApprove"),
                                labelShow: !1,
                                ifShow: o.approveFlag && c([
                                    "crew:evaluation:approve"
                                ]),
                                icon: s(r.approve, "text-[#xe628] text-[14px]"),
                                onClick: _.bind(null, o)
                            },
                            {
                                label: t("common.reviewHistory"),
                                labelShow: !1,
                                icon: s(r.history, "text-[#b0b9c0] text-[22px]"),
                                onClick: ()=>{
                                    y.value.handleOpenModal({
                                        busId: o?.id,
                                        moduleCode: o?.moduleCode,
                                        shipId: o?.vesselId,
                                        subModuleCode: "",
                                        signShow: !0
                                    });
                                }
                            },
                            {
                                label: t("common.optionsExportListText"),
                                labelShow: !1,
                                ifShow: c([
                                    "crew:evaluation:export"
                                ]),
                                icon: s(r.export, "text-[#7A957D]"),
                                onClick: P.bind(null, o)
                            }
                        ]
                    });
                }
            });
            function F() {
                x.push({
                    name: "Add_Crew_Evaluation_Oil",
                    query: {
                        documentType: e(l),
                        type: "add"
                    }
                });
            }
            function _(o, n) {
                x.push({
                    name: "Add_Crew_Evaluation_Oil",
                    query: {
                        documentType: e(l),
                        id: o.id,
                        type: n
                    }
                });
            }
            async function P(o) {
                try {
                    const n = await po(Number(o?.id)) || "";
                    fo({
                        url: n
                    }), h.success(t("common.exportSuccess"));
                } catch  {
                    h.error(t("common.exportFail"));
                }
            }
            async function D(o, n) {
                const b = {
                    ...C({
                        ...n
                    }),
                    tab: l.value,
                    ...o
                };
                return await uo(b);
            }
            function I() {
                d.value.reload();
            }
            function p() {
                d.value.restReload();
            }
            Z(()=>E.path, (o, n)=>{
                o.includes("/crew/crewEvaluation") && p();
            });
            function M() {
                I();
            }
            return G(()=>{
                M();
            }), (o, n)=>{
                const u = Y, b = Q, g = lo, T = K, H = io, V = eo, q = oo, L = ro, W = J("permission");
                return w(), v(L, null, {
                    default: i(()=>[
                            a(T, {
                                bordered: !1,
                                class: "mb-3 proCard"
                            }, {
                                default: i(()=>[
                                        a(b, {
                                            value: l.value,
                                            "onUpdate:value": [
                                                n[0] || (n[0] = (m)=>l.value = m),
                                                p
                                            ],
                                            type: "line"
                                        }, {
                                            default: i(()=>[
                                                    a(u, {
                                                        tab: e(t)("crew.evaluation.quarterlyEvaluation"),
                                                        name: 2
                                                    }, null, 8, [
                                                        "tab"
                                                    ]),
                                                    a(u, {
                                                        tab: e(t)("crew.evaluation.disembarkationEvaluation"),
                                                        name: 1
                                                    }, null, 8, [
                                                        "tab"
                                                    ]),
                                                    a(u, {
                                                        tab: e(t)("crew.evaluation.otherEvaluation"),
                                                        name: 3
                                                    }, null, 8, [
                                                        "tab"
                                                    ])
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "value"
                                        ]),
                                        a(g, {
                                            onRegister: e(R),
                                            onSubmit: p,
                                            onReset: p
                                        }, null, 8, [
                                            "onRegister"
                                        ])
                                    ]),
                                _: 1
                            }),
                            a(T, {
                                bordered: !1,
                                class: "proCard"
                            }, {
                                default: i(()=>[
                                        a(e(_o), {
                                            ref_key: "basicTableRef",
                                            ref: d,
                                            columns: e(S),
                                            request: (m)=>D(m, e(B)()),
                                            "row-key": (m)=>m.id,
                                            autoScrollX: !0,
                                            actionColumn: A,
                                            immediate: !1,
                                            "virtual-scroll": ""
                                        }, {
                                            tableTitle: i(()=>[
                                                    a(q, null, {
                                                        default: i(()=>[
                                                                a(V, {
                                                                    trigger: "hover"
                                                                }, {
                                                                    trigger: i(()=>[
                                                                            no((w(), v(H, {
                                                                                type: "primary",
                                                                                strong: "",
                                                                                bordered: "",
                                                                                secondary: "",
                                                                                class: "size-7",
                                                                                onClick: F
                                                                            }, {
                                                                                icon: i(()=>[
                                                                                        (w(), v(so(e(s)(e(r).add))))
                                                                                    ]),
                                                                                _: 1
                                                                            })), [
                                                                                [
                                                                                    W,
                                                                                    {
                                                                                        action: [
                                                                                            "crew:evaluation:add"
                                                                                        ]
                                                                                    }
                                                                                ]
                                                                            ])
                                                                        ]),
                                                                    default: i(()=>[
                                                                            to(" " + ao(e(t)("common.addText")), 1)
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    })
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "columns",
                                            "request",
                                            "row-key",
                                            "actionColumn"
                                        ])
                                    ]),
                                _: 1
                            }),
                            a(e(wo), {
                                ref_key: "approvalHistoryModal",
                                ref: y
                            }, null, 512)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { fe as default, __tla };
