const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-m3Br1Q9Y.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-D_9awgYF.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/TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js","assets/index-dsGvHbJ1.css","assets/index-V8LgqcHj.js","assets/index-Cag9b2jO.js","assets/index-Bnh2ABrk.js"])))=>i.map(i=>d[i]);
import { d as me, a4 as fe, V as _e, a as B, e as ye, f as ge, u as be, ar as ve, r as l, ay as he, ec as C, aw as Re, d9 as ke, c as u, o as p, w as e, i as d, j as n, W as qe, ds as N, l as t, T as Ce, fX as De, ca as Ie, H as xe, aI as we, p as v, A as y, B as Te, D, aE as Ae, t as Me, _ as Be, k as Ve, X as Pe, br as I, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as Ee } 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 je } from "./tabsView-BuQA2jOW.js";
import { B as Le, I as Se, K as Ne, L as Oe, C as h, D as ze, E as He, F as Ue } from "./template-rpthWlT9.js";
import { B as Fe } from "./Table-0PViRYCf.js";
import { _ as Ke } 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 ht;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })()
]).then(async ()=>{
    let $e;
    $e = {
        style: {
            height: "84vh",
            "background-color": "#fff"
        }
    };
    ht = me({
        __name: "index",
        setup (Qe) {
            const V = {
                basicInfo: C(()=>I(()=>import("./index-m3Br1Q9Y.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: C(()=>I(()=>import("./index-D_9awgYF.js").then(async (m)=>{
                            await m.__tla;
                            return m;
                        }), __vite__mapDeps([28,1,2,29,30,10,4,31,15,32,33,34,35,36,37,38,39,40,41,7,42,27,13,43,44,25,22,45]))),
                action: C(()=>I(()=>import("./index-V8LgqcHj.js").then(async (m)=>{
                            await m.__tla;
                            return m;
                        }), __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]))),
                references: C(()=>I(()=>import("./index-Cag9b2jO.js"), __vite__mapDeps([47,1,2]))),
                attachments: C(()=>I(()=>import("./index-Bnh2ABrk.js"), __vite__mapDeps([48,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])))
            }, z = fe(()=>[
                    {
                        label: o("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabBasicInfo"),
                        value: "basicInfo",
                        compPage: "basicInfo"
                    },
                    {
                        label: o("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabCauseAnalysis"),
                        value: "causeAnalysis",
                        compPage: "causeAnalysis"
                    },
                    {
                        label: o("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabAction"),
                        value: "action",
                        compPage: "action"
                    },
                    {
                        label: o("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.tabReferences"),
                        value: "references",
                        compPage: "references"
                    },
                    {
                        label: o("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.rabAttachments"),
                        value: "attachments",
                        compPage: "attachments"
                    }
                ]), T = B({
                tabsList: z.value,
                collapsed: !1,
                activeKey: "basicInfo"
            }), R = ye(), s = ge(), { t: o } = _e(), A = be(), H = ve(), g = l(!1);
            let c = B({
                operationMemo: ""
            });
            const [U] = O({
                title: o("hsqe.deficiency.historicalRecords"),
                closable: !1,
                maskClosable: !0,
                width: 680,
                subBtuText: o("common.okText"),
                cancelText: o("common.cancelText")
            }), F = [
                {
                    title: "Reviewed By",
                    key: "username"
                },
                {
                    title: "Reviewed Date",
                    key: "operateTime"
                },
                {
                    title: "Status",
                    key: "displayStatus"
                },
                {
                    title: "Review Comments",
                    key: "comment"
                }
            ], [K, { openModal: $, closeModal: Q, setSubLoading: W }] = O({
                title: o("hsqe.deficiency.captainReject"),
                closable: !1,
                maskClosable: !0,
                width: 680,
                subBtuText: o("common.okText"),
                cancelText: o("common.cancelText")
            }), X = {
                operationMemo: {
                    required: !0,
                    message: o("hsqe.planner.modal.reasonHint"),
                    trigger: [
                        "input",
                        "blur"
                    ]
                }
            }, G = l(), m = B({}), r = l(), J = l(), x = l("basicInfo"), k = l("basicInfo"), P = l(), w = l(), E = l();
            he(()=>k.value, (a, i)=>{
                j(i), V[x.value] && (P.value = V[x.value]);
            }, {
                immediate: !0
            });
            async function Y() {
                r.value = await Le({
                    deficiencyId: s.query.id
                });
                let a = await Se(Number(s.query.id));
                m.causeAnalysis = [
                    ...a.deficiency_job_factor,
                    ...a.deficiency_personal_factors,
                    ...a.deficiency_substandard_acts,
                    ...a.deficiency_substandard_conditions
                ], m.action = await Ne(Number(s.query.id));
                let i = await Oe(Number(s.query.id));
                m.attachments = i.correct, J.value = s.query.isEdit, s.query.type == "view" ? g.value = !0 : g.value = !1;
            }
            function j(a) {
                a && w.value?.getData && (m[a] = w.value.getData());
            }
            function Z(a) {
                k.value = a.value, x.value = a.compPage || "basicInfo";
            }
            function ee() {
                R.back();
            }
            async function te() {
                await L(), await h({
                    id: s.query.id,
                    operation: "commit"
                }), q();
            }
            async function oe() {
                if (k.value == "action") {
                    const a = w.value.getData();
                    a.correctActionReview == "yes" ? H.warning({
                        title: o("hsqe.nc.tip"),
                        content: o("hsqe.nc.content"),
                        positiveText: o("hsqe.nc.yes"),
                        negativeText: o("hsqe.nc.no"),
                        draggable: !0,
                        onPositiveClick: async ()=>{
                            await h({
                                id: s.query.id,
                                operation: "superintendent_close",
                                operationMemo: a.comments
                            });
                            let i = await ze(s.query.id);
                            R.push({
                                name: "Add_HSQE_AuditInspection_ReportList_Nc_DeficiencyReport",
                                query: {
                                    id: String(i),
                                    isEdit: "1"
                                }
                            });
                        },
                        onNegativeClick: async ()=>{
                            await h({
                                id: s.query.id,
                                operation: "superintendent_close",
                                operationMemo: a.comments
                            }), R.push({
                                path: "/hsqe/auditInspection/reportLis"
                            }), q();
                        }
                    }) : a.correctActionReview == "no" && (await h({
                        id: s.query.id,
                        operation: "superintendent_reject",
                        operationMemo: a.comments
                    }), R.push({
                        path: "/hsqe/auditInspection/reportLis"
                    }), q());
                }
            }
            async function ie() {
                await h({
                    id: s.query.id,
                    operation: "captain_pass"
                }), q();
            }
            async function ae() {
                if (!c.operationMemo || c.operationMemo == "") {
                    A.error(o("hsqe.planner.modal.reasonHint")), W(!1);
                    return;
                }
                await h({
                    id: s.query.id,
                    operation: "captain_reject",
                    operationMemo: c.operationMemo
                }), Q(), q();
            }
            const ne = async ()=>{
                const a = await He({
                    busId: s.query.id,
                    moduleCode: "approveDeficiency"
                });
                return {
                    list: a,
                    total: a.length
                };
            };
            function se() {
                E.value?.showModal(s.query.id, "approveDeficiency");
            }
            async function L() {
                j(k.value);
                let a = {
                    causeDtoList: m.causeAnalysis,
                    photoDtoList: m.attachments,
                    basicDto: m.basicInfo,
                    actionDto: m.action
                };
                await Ue(a), A.success(o("common.editPop.success"));
            }
            function q() {
                A.success(o("hsqe.deficiency.operationSuccessful")), R.go(-1);
            }
            return Re(()=>{
                Y();
            }), (a, i)=>{
                const b = Te, f = we, M = xe, ce = qe, S = Ee, re = Ve, le = Be, ue = Me, pe = Pe, de = ke("debounce");
                return p(), u(pe, null, {
                    default: e(()=>[
                            d("div", $e, [
                                n(ce, {
                                    bordered: !1,
                                    class: "py-3 proCard",
                                    size: "small",
                                    segmented: {
                                        content: !0
                                    },
                                    "content-style": "padding: 20px 15px 0 15px;"
                                }, {
                                    header: e(()=>[
                                            n(M, {
                                                justify: "space-between"
                                            }, {
                                                default: e(()=>[
                                                        n(M, {
                                                            justify: "start"
                                                        }, {
                                                            default: e(()=>[
                                                                    n(f, {
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                n(b, {
                                                                                    border: !1,
                                                                                    type: "text",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: ee
                                                                                }, {
                                                                                    icon: e(()=>i[3] || (i[3] = [
                                                                                            d("i", {
                                                                                                class: "iconfont icon-a-shangyibu2 text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: e(()=>[
                                                                                v(" " + y(t(o)("hsqe.noticeCircular.back")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    }),
                                                                    n(f, {
                                                                        trigger: "click"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                d("span", null, y(t(o)("hsqe.rightShip.pscReport")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })
                                                                ]),
                                                            _: 1
                                                        }),
                                                        n(M, {
                                                            justify: "end"
                                                        }, {
                                                            default: e(()=>[
                                                                    !t(g) && t(x) !== "basicInfo" && (t(r)?.hasDeficiencyCommit == "1" || t(r)?.hasOfficerCommit == "1") ? (p(), u(f, {
                                                                        key: 0,
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                Ae((p(), u(b, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    secondary: "",
                                                                                    bordered: "",
                                                                                    class: "size-8",
                                                                                    title: "Back"
                                                                                }, {
                                                                                    icon: e(()=>i[4] || (i[4] = [
                                                                                            d("i", {
                                                                                                class: "iconfont icon-Save text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })), [
                                                                                    [
                                                                                        de,
                                                                                        ()=>L(),
                                                                                        "1000"
                                                                                    ]
                                                                                ])
                                                                            ]),
                                                                        default: e(()=>[
                                                                                v(" " + y(t(o)("hsqe.deficiency.deficiencyCommit")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })) : D("", !0),
                                                                    t(r)?.hasDeficiencyCommit == "1" && !t(g) ? (p(), u(f, {
                                                                        key: 1,
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                n(b, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    secondary: "",
                                                                                    bordered: "",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: te
                                                                                }, {
                                                                                    icon: e(()=>i[5] || (i[5] = [
                                                                                            d("i", {
                                                                                                class: "iconfont icon-Submit text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: e(()=>[
                                                                                v(" " + y(t(o)("hsqe.deficiency.deficiencyCommit")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })) : D("", !0),
                                                                    t(r)?.hasOfficerCommit == "1" && !t(g) ? (p(), u(f, {
                                                                        key: 2,
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                n(b, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    secondary: "",
                                                                                    bordered: "",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: oe
                                                                                }, {
                                                                                    icon: e(()=>i[6] || (i[6] = [
                                                                                            d("i", {
                                                                                                class: "iconfont icon-Submit text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: e(()=>[
                                                                                v(" " + y(t(o)("hsqe.deficiency.officerCommit")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })) : D("", !0),
                                                                    t(r)?.hasCaptainPass == "1" && !t(g) ? (p(), u(f, {
                                                                        key: 3,
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                n(b, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    secondary: "",
                                                                                    bordered: "",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: ie
                                                                                }, {
                                                                                    icon: e(()=>i[7] || (i[7] = [
                                                                                            d("i", {
                                                                                                class: "iconfont icon-Approve text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: e(()=>[
                                                                                v(" " + y(t(o)("hsqe.deficiency.captainPass")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })) : D("", !0),
                                                                    t(r)?.hasCaptainReject == "1" && !t(g) ? (p(), u(f, {
                                                                        key: 4,
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                n(b, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    secondary: "",
                                                                                    bordered: "",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: t($)
                                                                                }, {
                                                                                    icon: e(()=>i[8] || (i[8] = [
                                                                                            d("i", {
                                                                                                class: "iconfont icon-Returned text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                }, 8, [
                                                                                    "onClick"
                                                                                ])
                                                                            ]),
                                                                        default: e(()=>[
                                                                                v(" " + y(t(o)("hsqe.deficiency.captainReject")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })) : D("", !0),
                                                                    n(f, {
                                                                        trigger: "hover"
                                                                    }, {
                                                                        trigger: e(()=>[
                                                                                n(b, {
                                                                                    type: "primary",
                                                                                    strong: "",
                                                                                    secondary: "",
                                                                                    bordered: "",
                                                                                    class: "size-8",
                                                                                    title: "Back",
                                                                                    onClick: se
                                                                                }, {
                                                                                    icon: e(()=>i[9] || (i[9] = [
                                                                                            d("i", {
                                                                                                class: "iconfont icon-Log text-[16px]"
                                                                                            }, null, -1)
                                                                                        ])),
                                                                                    _: 1
                                                                                })
                                                                            ]),
                                                                        default: e(()=>[
                                                                                v(" " + y(t(o)("hsqe.deficiency.historicalRecords")), 1)
                                                                            ]),
                                                                        _: 1
                                                                    })
                                                                ]),
                                                            _: 1
                                                        })
                                                    ]),
                                                _: 1
                                            })
                                        ]),
                                    default: e(()=>[
                                            n(je, {
                                                modelValue: t(T),
                                                "onUpdate:modelValue": i[0] || (i[0] = (_)=>N(T) ? T.value = _ : null),
                                                onChangeTab: Z
                                            }, null, 8, [
                                                "modelValue"
                                            ]),
                                            n(Ce, {
                                                name: "slide-fade",
                                                mode: "out-in"
                                            }, {
                                                default: e(()=>[
                                                        (p(), u(De, null, [
                                                            (p(), u(Ie(t(P)), {
                                                                key: t(k),
                                                                basicInfoEdit: t(r)?.hasBasicInfoEditFlag ?? !1,
                                                                btnsDisabled: t(r),
                                                                ref_key: "currentComponentRef",
                                                                ref: w
                                                            }, null, 8, [
                                                                "basicInfoEdit",
                                                                "btnsDisabled"
                                                            ]))
                                                        ], 1024))
                                                    ]),
                                                _: 1
                                            })
                                        ]),
                                    _: 1
                                }),
                                n(S, {
                                    onRegister: t(U),
                                    ref: "modalRef"
                                }, {
                                    default: e(()=>[
                                            n(t(Fe), {
                                                columns: F,
                                                request: ()=>ne(),
                                                "row-key": (_)=>_.id,
                                                ref_key: "basicTableRef",
                                                ref: G
                                            }, null, 8, [
                                                "request",
                                                "row-key"
                                            ])
                                        ]),
                                    _: 1
                                }, 8, [
                                    "onRegister"
                                ]),
                                n(S, {
                                    onRegister: t(K),
                                    ref: "rejectModalRef",
                                    onOnOk: ae
                                }, {
                                    default: e(()=>[
                                            n(ue, {
                                                modelValue: t(c),
                                                "onUpdate:modelValue": i[2] || (i[2] = (_)=>N(c) ? c.value = _ : c = _),
                                                rules: X
                                            }, {
                                                default: e(()=>[
                                                        n(le, {
                                                            label: t(o)("hsqe.planner.modal.reason"),
                                                            path: "operationMemo"
                                                        }, {
                                                            default: e(()=>[
                                                                    n(re, {
                                                                        type: "textarea",
                                                                        value: t(c).operationMemo,
                                                                        "onUpdate:value": i[1] || (i[1] = (_)=>t(c).operationMemo = _),
                                                                        class: "h-[200px]"
                                                                    }, null, 8, [
                                                                        "value"
                                                                    ])
                                                                ]),
                                                            _: 1
                                                        }, 8, [
                                                            "label"
                                                        ])
                                                    ]),
                                                _: 1
                                            }, 8, [
                                                "modelValue"
                                            ])
                                        ]),
                                    _: 1
                                }, 8, [
                                    "onRegister"
                                ])
                            ]),
                            n(Ke, {
                                ref_key: "historyModalRef",
                                ref: E
                            }, null, 512)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { ht as default, __tla };
