import { V as W, Z as y, n as R, d as j, r as c, a as Z, gW as N, gX as B, cZ as z, aw as E, c as G, o as L, w as o, j as t, W as q, l as e, aI as H, p as J, A as K, B as O, db as Q, ik as U, X as Y, __tla as __tla_0 } from "./index-9PRMimni.js";
import { B as ee } from "./BasicForm-dL_oCSPM.js";
import { B as w } from "./Table-0PViRYCf.js";
import { _ as te } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { c as oe, _ as ae, __tla as __tla_1 } from "./Modal.vue_vue_type_script_setup_true_lang-BPq_vuh5.js";
import { d as se, g as k } from "./crewDailyTask-CA-vJisZ.js";
import { u as ne } from "./useForm-CKmgcynv.js";
import { _ as re, a as le } from "./CollapseItem-DQYTgHby.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 "./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 "./usePageCache-DluHn7Yy.js";
import "./Flex-CTSf12gq.js";
import "./isEmpty-BUg1OsQj.js";
let Je;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    let m, ie;
    ({ t: m } = W());
    ie = ()=>({
            columns: [
                {
                    title: m("common.messagedefine.Num"),
                    key: "num",
                    width: 60,
                    render: (s, g)=>g + 1
                },
                {
                    title: m("operation.crewDailyTask.code"),
                    key: "code",
                    width: 120
                },
                {
                    title: m("operation.crewDailyTask.subTask"),
                    key: "subtask",
                    width: 120
                },
                {
                    title: m("operation.crewDailyTask.color"),
                    key: "colour",
                    width: 120,
                    render: (s)=>y("NTag", {
                            class: "h-[20px] w-[48px] flex rounded-lg",
                            style: {
                                backgroundColor: s.colour
                            }
                        })
                },
                {
                    title: m("operation.crewDailyTask.active"),
                    key: "active",
                    width: 120,
                    render: (s)=>y(R, {
                            checkedValue: 1,
                            uncheckedValue: 2,
                            checked: s.active,
                            disabled: !0
                        })
                },
                {
                    title: m("operation.crewDailyTask.specialTask"),
                    key: "specialTask",
                    width: 120,
                    render: (s)=>y(R, {
                            checkedValue: 1,
                            uncheckedValue: 2,
                            checked: s.specialTask,
                            disabled: !0
                        })
                }
            ]
        });
    Je = j({
        __name: "index",
        setup (I) {
            const s = z(), { infoSchemas: g, initShipValue: l } = oe(), { t: a } = W(), p = c(), b = c(), S = c(), v = c(), x = c(), D = c(), d = Z({
                width: 100,
                title: a("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (u) {
                    return y(te, {
                        style: "text",
                        actions: [
                            {
                                label: a("common.optionsEditText"),
                                labelShow: !1,
                                icon: N(B.edit),
                                onClick: ()=>{
                                    b.value?.showModal(u);
                                }
                            },
                            {
                                label: a("common.optionsDelText"),
                                labelShow: !1,
                                icon: N(B.delete, "red"),
                                onPositiveClick: async ()=>{
                                    await se({
                                        id: u.id
                                    }), s.success(a("common.optionsDelSuccessText")), h();
                                },
                                onNegativeClick: ()=>{},
                                isConfirm: !0,
                                confirmContent: a("common.delPop.contRole")
                            }
                        ]
                    });
                }
            });
            async function h() {
                const u = await k({
                    type: "SeaNormal",
                    vesselId: l
                }), n = await k({
                    type: "SeaWatch",
                    vesselId: l
                }), T = await k({
                    type: "PortNormal",
                    vesselId: l
                }), C = await k({
                    type: "PortWatch",
                    vesselId: l
                });
                S.value = u.list, v.value = n.list, x.value = T.list, D.value = C.list, P();
            }
            const [V, { setFieldsValue: M }] = ne({
                gridProps: {
                    cols: 5
                },
                schemas: g,
                labelPlacement: "left",
                labelWidth: 80,
                showAdvancedButton: !1
            });
            E(()=>{
                M({
                    vesselId: l
                }), h();
            });
            const { columns: f } = ie();
            function P() {
                p.value?.reload();
            }
            function X() {
                b.value?.showModal({
                    vesselId: l
                });
            }
            return (u, n)=>{
                const T = ee, C = O, A = H, i = q, _ = le, F = re, $ = Y;
                return L(), G($, null, {
                    default: o(()=>[
                            t(i, {
                                bordered: !1,
                                class: "proCard mt-2"
                            }, {
                                default: o(()=>[
                                        t(i, {
                                            class: "proCard bg-transparent mb-4",
                                            "content-class": "flex justify-between align-center p-0 pt-8"
                                        }, {
                                            default: o(()=>[
                                                    t(T, {
                                                        class: "w-[30%]",
                                                        onRegister: e(V),
                                                        showActionButtonGroup: !1,
                                                        showSubmitButton: !1,
                                                        showResetButton: !1
                                                    }, null, 8, [
                                                        "onRegister"
                                                    ]),
                                                    t(A, {
                                                        trigger: "hover"
                                                    }, {
                                                        trigger: o(()=>[
                                                                t(C, {
                                                                    type: "primary",
                                                                    strong: "",
                                                                    bordered: "",
                                                                    secondary: "",
                                                                    class: "size-9 mr-3",
                                                                    onClick: Q(X, [
                                                                        "stop"
                                                                    ])
                                                                }, {
                                                                    icon: o(()=>[
                                                                            t(e(U))
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        default: o(()=>[
                                                                J(" " + K(e(a)("common.addText")), 1)
                                                            ]),
                                                        _: 1
                                                    })
                                                ]),
                                            _: 1
                                        }),
                                        t(F, {
                                            "default-expanded-names": [
                                                "1",
                                                "2"
                                            ],
                                            "display-directive": "show"
                                        }, {
                                            default: o(()=>[
                                                    t(_, {
                                                        title: e(a)("operation.crewDailyTask.seaNormal"),
                                                        name: "1"
                                                    }, {
                                                        default: o(()=>[
                                                                t(i, {
                                                                    class: "proCard bg-transparent",
                                                                    "content-class": "p-2"
                                                                }, {
                                                                    default: o(()=>[
                                                                            t(e(w), {
                                                                                columns: e(f),
                                                                                showTableSetting: !1,
                                                                                dataSource: e(S),
                                                                                pagination: !1,
                                                                                actionColumn: e(d),
                                                                                "row-key": (r)=>r.id,
                                                                                ref_key: "basicTableRef",
                                                                                ref: p,
                                                                                autoScrollX: !0,
                                                                                "virtual-scroll": ""
                                                                            }, null, 8, [
                                                                                "columns",
                                                                                "dataSource",
                                                                                "actionColumn",
                                                                                "row-key"
                                                                            ])
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    }, 8, [
                                                        "title"
                                                    ]),
                                                    t(_, {
                                                        title: e(a)("operation.crewDailyTask.seaWatch"),
                                                        name: "2"
                                                    }, {
                                                        default: o(()=>[
                                                                t(i, {
                                                                    class: "proCard bg-transparent",
                                                                    "content-class": "p-2"
                                                                }, {
                                                                    default: o(()=>[
                                                                            t(e(w), {
                                                                                columns: e(f),
                                                                                showTableSetting: !1,
                                                                                dataSource: e(v),
                                                                                pagination: !1,
                                                                                actionColumn: e(d),
                                                                                "row-key": (r)=>r.id,
                                                                                ref_key: "basicTableRef",
                                                                                ref: p,
                                                                                autoScrollX: !0,
                                                                                "virtual-scroll": ""
                                                                            }, {
                                                                                tableTitle: o(()=>n[0] || (n[0] = [])),
                                                                                _: 1
                                                                            }, 8, [
                                                                                "columns",
                                                                                "dataSource",
                                                                                "actionColumn",
                                                                                "row-key"
                                                                            ])
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    }, 8, [
                                                        "title"
                                                    ]),
                                                    t(_, {
                                                        title: e(a)("operation.crewDailyTask.portNormal"),
                                                        name: "3"
                                                    }, {
                                                        default: o(()=>[
                                                                t(i, {
                                                                    class: "proCard bg-transparent",
                                                                    "content-class": "p-2"
                                                                }, {
                                                                    default: o(()=>[
                                                                            t(e(w), {
                                                                                columns: e(f),
                                                                                showTableSetting: !1,
                                                                                dataSource: e(x),
                                                                                pagination: !1,
                                                                                actionColumn: e(d),
                                                                                "row-key": (r)=>r.id,
                                                                                ref_key: "basicTableRef",
                                                                                ref: p,
                                                                                autoScrollX: !0,
                                                                                "virtual-scroll": ""
                                                                            }, {
                                                                                tableTitle: o(()=>n[1] || (n[1] = [])),
                                                                                _: 1
                                                                            }, 8, [
                                                                                "columns",
                                                                                "dataSource",
                                                                                "actionColumn",
                                                                                "row-key"
                                                                            ])
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    }, 8, [
                                                        "title"
                                                    ]),
                                                    t(_, {
                                                        title: e(a)("operation.crewDailyTask.portWatch"),
                                                        name: "4"
                                                    }, {
                                                        default: o(()=>[
                                                                t(i, {
                                                                    class: "proCard bg-transparent",
                                                                    "content-class": "p-2"
                                                                }, {
                                                                    default: o(()=>[
                                                                            t(e(w), {
                                                                                columns: e(f),
                                                                                showTableSetting: !1,
                                                                                pagination: !1,
                                                                                actionColumn: e(d),
                                                                                dataSource: e(D),
                                                                                "row-key": (r)=>r.id,
                                                                                ref_key: "basicTableRef",
                                                                                ref: p,
                                                                                autoScrollX: !0,
                                                                                "virtual-scroll": ""
                                                                            }, {
                                                                                tableTitle: o(()=>n[2] || (n[2] = [])),
                                                                                _: 1
                                                                            }, 8, [
                                                                                "columns",
                                                                                "actionColumn",
                                                                                "dataSource",
                                                                                "row-key"
                                                                            ])
                                                                        ]),
                                                                    _: 1
                                                                })
                                                            ]),
                                                        _: 1
                                                    }, 8, [
                                                        "title"
                                                    ])
                                                ]),
                                            _: 1
                                        })
                                    ]),
                                _: 1
                            }),
                            t(ae, {
                                ref_key: "addModalRef",
                                ref: b,
                                onSuccess: h
                            }, null, 512)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { Je as default, __tla };
