const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BRrQwh4h.js","assets/index-9PRMimni.js","assets/index-CZ_CrH4_.css","assets/BasicForm-dL_oCSPM.js","assets/Render.vue_vue_type_script_lang-DKUYY0Zw.js","assets/SingleImageUpload-CNx4b9eC.js","assets/ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js","assets/componentSetting-DVhNDBTO.js","assets/ImageUpload-2O79x_Q-.css","assets/ImageUpload-DUsnro3W.js","assets/vuedraggable.umd-Co2xEC3p.js","assets/BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js","assets/BasicUpload-q2aOClOy.css","assets/tabsView-BXskTdVh.js","assets/BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js","assets/propTypes-CebMRUpe.js","assets/BasicForm-foIylFd_.css","assets/BasicSelect-C_uwzMkE.js","assets/BasicSelect.vue_vue_type_style_index_0_scoped_772d51cc_lang-Brp6PjEU.js","assets/BasicSelect-DteQK1Vf.css","assets/dictionary-BRse4lkf.js","assets/index-DkvzUEqh.js","assets/index-kKnqLkWM.js","assets/AutoComplete-Dv1Bqed4.js","assets/TreeSelect-BZh2DeCh.js","assets/template-rpthWlT9.js","assets/useForm-CKmgcynv.js","assets/usePageCache-DluHn7Yy.js","assets/index-CbV1Qctj.js","assets/Table-0PViRYCf.js","assets/Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js","assets/componentMap-CElCaWis.js","assets/format-DgF6KtHk.js","assets/omit-B2_8Y6O_.js","assets/_flatRest-DBrd2CHT.js","assets/flatten-DeoUZLdb.js","assets/Table-Dcnz4X4a.css","assets/print-CT_2hrjP.js","assets/basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js","assets/basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js","assets/basicModal-DbyYhys_.css","assets/useModal-CO65vga3.js","assets/useTimeout-BxFilWvD.js","assets/Flex-CTSf12gq.js","assets/index-CMZiCyer.css","assets/index-OIzMHhaN.js","assets/index-2eofYzjG.js","assets/index-V7OrLt0Z.js"])))=>i.map(i=>d[i]);
import { d as ce, e as le, f as pe, V as ue, r as c, a as j, a4 as de, ay as me, ec as v, aw as fe, c as y, o as g, w as e, j as o, W as _e, i as p, H as ye, aI as ge, p as b, A as m, l as t, B as be, D as x, ds as L, T as ve, ca as Re, t as he, _ as ke, k as xe, X as Ce, br as R, cZ as qe, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as Ie } from "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import { T as Te } from "./tabsView-BuQA2jOW.js";
import { W as we, C, E as Me } from "./template-rpthWlT9.js";
import { B as Ve } from "./Table-0PViRYCf.js";
import { _ as Be } from "./Modal.vue_vue_type_script_setup_true_lang-em0-XSxs.js";
import { u as O } from "./useModal-CO65vga3.js";
import "./vuedraggable.umd-Co2xEC3p.js";
import "./element-resize-detector-D6t9qRKJ.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.js";
import "./index-kKnqLkWM.js";
import "./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.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 "./TimelineItem-Bkds7ZW8.js";
let it;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })()
]).then(async ()=>{
    it = ce({
        __name: "index",
        setup (De) {
            const w = {
                basicInfo: v(()=>R(()=>import("./index-BRrQwh4h.js").then(async (m)=>{
                            await m.__tla;
                            return m;
                        }), __vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]))),
                causeAnalysis: v(()=>R(()=>import("./index-CbV1Qctj.js").then(async (m)=>{
                            await m.__tla;
                            return m;
                        }), __vite__mapDeps([28,29,1,2,30,10,4,31,15,32,33,34,35,36,37,38,39,40,41,7,42,27,13,43,25,22,44]))),
                action: v(()=>R(()=>import("./index-OIzMHhaN.js").then(async (m)=>{
                            await m.__tla;
                            return m;
                        }), __vite__mapDeps([45,3,4,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]))),
                attachments: v(()=>R(()=>import("./index-2eofYzjG.js"), __vite__mapDeps([46,3,4,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]))),
                review: v(()=>R(()=>import("./index-V7OrLt0Z.js"), __vite__mapDeps([47,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])))
            }, M = le(), s = pe(), { t: n } = ue(), V = qe(), f = c(!1);
            let r = j({
                operationMemo: ""
            });
            const [z] = O({
                title: n("hsqe.deficiency.historicalRecords"),
                closable: !1,
                maskClosable: !0,
                width: 680,
                subBtuText: n("common.okText"),
                cancelText: n("common.cancelText")
            }), S = [
                {
                    title: "Reviewed By",
                    key: "username"
                },
                {
                    title: "Reviewed Date",
                    key: "operateTime"
                },
                {
                    title: "Status",
                    key: "displayStatus"
                },
                {
                    title: "Review Comments",
                    key: "comment"
                }
            ], N = de(()=>[
                    {
                        label: n("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabBasicInfo"),
                        value: "basicInfo",
                        compPage: "basicInfo"
                    },
                    {
                        label: n("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabCauseAnalysis"),
                        value: "causeAnalysis",
                        compPage: "causeAnalysis"
                    },
                    {
                        label: n("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabAction"),
                        value: "action",
                        compPage: "action"
                    },
                    {
                        label: n("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabReferences"),
                        value: "references",
                        compPage: "references"
                    },
                    {
                        label: n("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.rabAttachments"),
                        value: "attachments",
                        compPage: "attachments"
                    }
                ]), q = j({
                tabsList: N.value,
                collapsed: !1,
                activeKey: "basicInfo"
            }), [H, { openModal: U, closeModal: F, setSubLoading: W }] = O({
                title: n("hsqe.deficiency.captainReject"),
                closable: !1,
                maskClosable: !0,
                width: 680,
                subBtuText: n("common.okText"),
                cancelText: n("common.cancelText")
            }), $ = {
                operationMemo: {
                    required: !0,
                    message: n("hsqe.planner.modal.reasonHint"),
                    trigger: [
                        "input",
                        "blur"
                    ]
                }
            }, K = c(), u = c(), X = c(), I = c("basicInfo"), h = c("basicInfo"), B = c(), D = c(), A = c();
            me(()=>h.value, (i)=>{
                console.log("watch currentTab", i), w[I.value] && (B.value = w[I.value]);
            }, {
                immediate: !0
            });
            async function Z() {
                u.value = await we({
                    deficiencyId: s.query.id
                }), X.value = s.query.isEdit, s.query.type == "view" ? f.value = !0 : f.value = !1;
            }
            function G(i) {
                h.value = i.value, I.value = i.compPage || "basicInfo";
            }
            function J() {
                M.back();
            }
            async function Q() {
                await C({
                    id: s.query.id,
                    operation: "commit"
                }), k();
            }
            async function Y() {
                if (h.value == "action") {
                    const i = D.value.getData();
                    (i.correctActionReview == "yes" || i.correctActionReview == "no") && await C({
                        id: s.query.id,
                        operation: i.correctActionReview == "yes" ? "superintendent_close" : "superintendent_reject",
                        operationMemo: i.comments
                    }), k();
                }
            }
            async function ee() {
                await C({
                    id: s.query.id,
                    operation: "captain_pass"
                }), k();
            }
            async function te() {
                if (!r.operationMemo || r.operationMemo == "") {
                    V.error(n("hsqe.planner.modal.reasonHint")), W(!1);
                    return;
                }
                await C({
                    id: s.query.id,
                    operation: "captain_reject",
                    operationMemo: r.operationMemo
                }), F(), k();
            }
            const oe = async ()=>{
                const i = await Me({
                    busId: s.query.id,
                    moduleCode: "approveDeficiency"
                });
                return {
                    list: i,
                    total: i.length
                };
            };
            function ne() {
                A.value?.showModal(s.query.id, "approveDeficiency");
            }
            function k() {
                V.success(n("hsqe.deficiency.operationSuccessful")), M.go(-1);
            }
            return fe(()=>{
                Z();
            }), (i, a)=>{
                const _ = be, d = ge, T = ye, P = _e, E = Ie, ae = xe, ie = ke, se = he, re = Ce;
                return g(), y(re, null, {
                    default: e(()=>[
                            o(P, {
                                bordered: !1,
                                class: "py-3 proCard",
                                size: "small",
                                segmented: {
                                    content: !0
                                },
                                "content-style": "padding: 20px 15px 0 15px;"
                            }, {
                                header: e(()=>[
                                        p("div", null, [
                                            o(T, {
                                                justify: "space-between"
                                            }, {
                                                default: e(()=>[
                                                        o(T, {
                                                            justify: "start"
                                                        }, {
                                                            default: e(()=>[
                                                                    o(d, {
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                o(_, {
                                                                                    type: "text",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: J
                                                                                }, {
                                                                                    icon: e(()=>a[3] || (a[3] = [
                                                                                            p("i", {
                                                                                                class: "iconfont icon-a-shangyibu2 text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: e(()=>[
                                                                                b(" " + m(t(n)("hsqe.noticeCircular.back")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    }),
                                                                    o(d, {
                                                                        trigger: "click"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                p("span", null, m(t(n)("hsqe.nc.title")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })
                                                                ]),
                                                            _: 1
                                                        }),
                                                        o(T, {
                                                            justify: "end"
                                                        }, {
                                                            default: e(()=>[
                                                                    t(u)?.hasDeficiencyCommit == "1" && !t(f) ? (g(), y(d, {
                                                                        key: 0,
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                o(_, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    secondary: "",
                                                                                    bordered: "",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: Q
                                                                                }, {
                                                                                    icon: e(()=>a[4] || (a[4] = [
                                                                                            p("i", {
                                                                                                class: "iconfont icon-Submit text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: e(()=>[
                                                                                b(" " + m(t(n)("hsqe.deficiency.deficiencyCommit")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })) : x("", !0),
                                                                    t(u)?.hasOfficerCommit == "1" && !t(f) ? (g(), y(d, {
                                                                        key: 1,
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                o(_, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    secondary: "",
                                                                                    bordered: "",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: Y
                                                                                }, {
                                                                                    icon: e(()=>a[5] || (a[5] = [
                                                                                            p("i", {
                                                                                                class: "iconfont icon-Submit text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: e(()=>[
                                                                                b(" " + m(t(n)("hsqe.deficiency.officerCommit")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })) : x("", !0),
                                                                    t(u)?.hasDpaPass == "1" && !t(f) ? (g(), y(d, {
                                                                        key: 2,
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                o(_, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    secondary: "",
                                                                                    bordered: "",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: ee
                                                                                }, {
                                                                                    icon: e(()=>a[6] || (a[6] = [
                                                                                            p("i", {
                                                                                                class: "iconfont icon-Approve text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: e(()=>[
                                                                                b(" " + m(t(n)("hsqe.deficiency.captainPass")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })) : x("", !0),
                                                                    t(u)?.hasCaptainReject == "1" && !t(f) ? (g(), y(d, {
                                                                        key: 3,
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                o(_, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    secondary: "",
                                                                                    bordered: "",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: t(U)
                                                                                }, {
                                                                                    icon: e(()=>a[7] || (a[7] = [
                                                                                            p("i", {
                                                                                                class: "iconfont icon-Returned text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                }, 8, [
                                                                                    "onClick"
                                                                                ])
                                                                            ]),
                                                                        default: e(()=>[
                                                                                b(" " + m(t(n)("hsqe.deficiency.captainReject")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })) : x("", !0),
                                                                    o(d, {
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                o(_, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    secondary: "",
                                                                                    bordered: "",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: ne
                                                                                }, {
                                                                                    icon: e(()=>a[8] || (a[8] = [
                                                                                            p("i", {
                                                                                                class: "iconfont icon-Log text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: e(()=>[
                                                                                b(" " + m(t(n)("hsqe.deficiency.historicalRecords")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })
                                                                ]),
                                                            _: 1
                                                        })
                                                    ]),
                                                _: 1
                                            })
                                        ])
                                    ]),
                                _: 1
                            }),
                            o(P, {
                                bordered: !1,
                                class: "mt-3 py-3 proCard",
                                size: "small",
                                segmented: {
                                    content: !0
                                },
                                "content-style": "padding: 20px 15px 0 15px;"
                            }, {
                                default: e(()=>[
                                        o(Te, {
                                            modelValue: t(q),
                                            "onUpdate:modelValue": a[0] || (a[0] = (l)=>L(q) ? q.value = l : null),
                                            onChangeTab: G
                                        }, null, 8, [
                                            "modelValue"
                                        ]),
                                        o(ve, {
                                            name: "slide-fade",
                                            mode: "out-in"
                                        }, {
                                            default: e(()=>[
                                                    (g(), y(Re(t(B)), {
                                                        key: t(h),
                                                        basicInfoEdit: t(u)?.hasBasicInfoEditFlag ?? !1,
                                                        btnsDisabled: t(u),
                                                        ref_key: "currentComponentRef",
                                                        ref: D
                                                    }, null, 8, [
                                                        "basicInfoEdit",
                                                        "btnsDisabled"
                                                    ]))
                                                ]),
                                            _: 1
                                        })
                                    ]),
                                _: 1
                            }),
                            o(E, {
                                onRegister: t(z),
                                ref: "modalRef"
                            }, {
                                default: e(()=>[
                                        o(t(Ve), {
                                            columns: S,
                                            request: ()=>oe(),
                                            "row-key": (l)=>l.id,
                                            ref_key: "basicTableRef",
                                            ref: K
                                        }, null, 8, [
                                            "request",
                                            "row-key"
                                        ])
                                    ]),
                                _: 1
                            }, 8, [
                                "onRegister"
                            ]),
                            o(E, {
                                onRegister: t(H),
                                ref: "rejectModalRef",
                                onOnOk: te
                            }, {
                                default: e(()=>[
                                        o(se, {
                                            modelValue: t(r),
                                            "onUpdate:modelValue": a[2] || (a[2] = (l)=>L(r) ? r.value = l : r = l),
                                            rules: $
                                        }, {
                                            default: e(()=>[
                                                    o(ie, {
                                                        label: t(n)("hsqe.planner.modal.reason"),
                                                        path: "operationMemo"
                                                    }, {
                                                        default: e(()=>[
                                                                o(ae, {
                                                                    type: "textarea",
                                                                    value: t(r).operationMemo,
                                                                    "onUpdate:value": a[1] || (a[1] = (l)=>t(r).operationMemo = l),
                                                                    class: "h-[200px]"
                                                                }, null, 8, [
                                                                    "value"
                                                                ])
                                                            ]),
                                                        _: 1
                                                    }, 8, [
                                                        "label"
                                                    ])
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "modelValue"
                                        ])
                                    ]),
                                _: 1
                            }, 8, [
                                "onRegister"
                            ]),
                            o(Be, {
                                ref_key: "historyModalRef",
                                ref: A
                            }, null, 512)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { it as default, __tla };
