import { _ as v } from "./seaconLogo-CQwr8ZvW.js";
import { d as q, V as D, f as V, r as w, aw as A, h as c, o as r, j as s, w as p, p as f, B as C, i as d, S as g, A as m, l, F as y, a9 as B, W as L, v as $, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as j, __tla as __tla_1 } from "./BasicInfo.vue_vue_type_script_setup_true_lang-BSq0g8fU.js";
import k from "./index-BGbBO1Av.js";
import { _ as F } from "./Action.vue_vue_type_script_setup_true_lang-Cf2a0uAv.js";
import { _ as N } from "./Attachments.vue_vue_type_script_setup_true_lang-DWAES-rJ.js";
import { h as E } from "./template-rpthWlT9.js";
import { e as S } from "./helper-DAsjAERN.js";
import "./ExportTable-DVFKlzsK.js";
import "./index-kKnqLkWM.js";
let tt;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    let T, M, P, W;
    T = {
        class: "pdf-container"
    };
    M = {
        id: "pdfRef",
        class: "flex items-center justify-between h-[30px] w-full border-b-[1px] border-solid border-[#000] pb-[16px]"
    };
    P = {
        class: "text-xs text-[#676767]"
    };
    W = q({
        __name: "index",
        setup (z) {
            const { t } = D(), i = V(), u = w();
            function h(e) {
                const n = [
                    {
                        title: t("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.causeAnalysis.substandardActsPractices"),
                        data: e.deficiency_substandard_acts
                    },
                    {
                        title: t("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.causeAnalysis.substandardConditions"),
                        data: e.deficiency_substandard_conditions
                    }
                ], o = [
                    {
                        title: t("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.causeAnalysis.personalFactors"),
                        data: e.deficiency_personal_factors
                    },
                    {
                        title: t("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.causeAnalysis.jobFactors"),
                        data: e.deficiency_job_factor
                    }
                ];
                return [
                    {
                        title: t("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.causeAnalysis.immediateCause"),
                        data: n
                    },
                    {
                        title: t("hsqe.auditInspection.vesselInspection.shipVisitReport.deficiencyReport.causeAnalysis.basicRootCause"),
                        data: o
                    }
                ];
            }
            function x() {
                window.print();
            }
            async function b() {
                const e = await E({
                    reportId: i.query.uuid,
                    deficiencyId: i.query.id
                });
                u.value = e;
            }
            return A(()=>{
                b();
            }), (e, n)=>{
                const o = C, I = g, R = L;
                return r(), c("div", T, [
                    s(o, {
                        class: "primary-btn",
                        onClick: x
                    }, {
                        default: p(()=>n[0] || (n[0] = [
                                f("导出")
                            ])),
                        _: 1
                    }),
                    s(R, {
                        class: "pt-[40px] bg-white"
                    }, {
                        default: p(()=>[
                                d("div", M, [
                                    s(I, {
                                        class: "text-[#191919] font-semibold text-[18px]"
                                    }, {
                                        default: p(()=>[
                                                f(m(l(S)(l(i).query.name)), 1)
                                            ]),
                                        _: 1
                                    }),
                                    n[1] || (n[1] = d("img", {
                                        src: v,
                                        alt: "公司logo",
                                        class: "m-0 h-[25px]"
                                    }, null, -1))
                                ]),
                                (r(!0), c(y, null, B(u.value, (a, _)=>(r(), c(y, {
                                        key: _
                                    }, [
                                        d("span", P, m(`${l(t)("hsqe.planner.no")} ${_ + 1}`), 1),
                                        s(j, {
                                            templateDataList: a.basic
                                        }, null, 8, [
                                            "templateDataList"
                                        ]),
                                        s(k, {
                                            causeData: h(a.cause)
                                        }, null, 8, [
                                            "causeData"
                                        ]),
                                        s(F, {
                                            actionData: a.action
                                        }, null, 8, [
                                            "actionData"
                                        ]),
                                        s(N, {
                                            attachments: a.photo.correct
                                        }, null, 8, [
                                            "attachments"
                                        ])
                                    ], 64))), 128))
                            ]),
                        _: 1
                    })
                ]);
            };
        }
    });
    tt = $(W, [
        [
            "__scopeId",
            "data-v-515d3d08"
        ]
    ]);
});
export { tt as default, __tla };
