import { V as f, r as l, bk as P, Z as p, ae as D, eB as L, d as O, e as W, a as $, aw as z, c as H, o as Q, w as m, j as a, W as X, l as i, cb as j, X as G, __tla as __tla_0 } from "./index-9PRMimni.js";
import { B as M } from "./BasicForm-dL_oCSPM.js";
import { B as Y } from "./Table-0PViRYCf.js";
import { _ as Z } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { u as J } from "./useForm-CKmgcynv.js";
import { av as K, ay as U } from "./template-rpthWlT9.js";
import { _ as ee, __tla as __tla_1 } from "./Modal.vue_vue_type_script_setup_true_lang-BWzSPHvu.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";
let ze;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })()
]).then(async ()=>{
    const { t: te } = f(), oe = [
        {
            field: "year",
            label: te("hsqe.auditInspection.vesselInspection.year"),
            slot: "yearSlot",
            defaultValue: []
        }
    ], se = P(), { t: o } = f(), v = [
        {
            key: 1,
            value: o("hsqe.rs.status.filling"),
            color: {
                color: "#F8F0FF",
                textColor: "#7A42C4",
                borderColor: "#F8F0FF"
            }
        },
        {
            key: 2,
            value: o("hsqe.rs.status.submitted"),
            color: {
                color: "#FFFCF0",
                textColor: "#C19A44",
                borderColor: "#FFFCF0"
            }
        },
        {
            key: 3,
            value: o("hsqe.rs.status.approval"),
            color: {
                color: "#F0F5FF",
                textColor: "#357CBB",
                borderColor: "#F0F5FF"
            }
        },
        {
            key: 4,
            value: o("hsqe.rs.status.completed"),
            color: {
                color: "#F0FFFB",
                textColor: "#42C4B2",
                borderColor: "#F0FFFB"
            }
        }
    ];
    function ae() {
        const d = l(), n = l();
        return {
            columns: [
                {
                    title: o("hsqe.planner.no"),
                    key: "",
                    width: 60,
                    render (t, s) {
                        return (d.value - 1) * n.value + s + 1;
                    }
                },
                {
                    title: o("hsqe.auditInspection.vesselInspection.vessel"),
                    key: se.getLocale === "en" ? "shipNameEn" : "shipName",
                    width: 140
                },
                {
                    title: o("hsqe.auditInspection.vesselInspection.reportNum"),
                    key: "reportNum",
                    width: 140
                },
                {
                    title: o("hsqe.auditInspection.vesselInspection.reportDate"),
                    key: "raisedOn",
                    width: 140
                },
                {
                    title: o("hsqe.auditInspection.vesselInspection.reporter"),
                    key: "reportBy",
                    width: 140
                },
                {
                    title: o("hsqe.auditInspection.vesselInspection.reportStatus"),
                    key: "status",
                    width: 180,
                    render (t) {
                        return p(D, {
                            bordered: !1,
                            color: v.find((s)=>s.key === t.approveStatus)?.color
                        }, {
                            default: ()=>v.find((s)=>s.key === t.approveStatus)?.value
                        });
                    }
                },
                {
                    title: o("hsqe.auditInspection.vesselInspection.Process"),
                    key: "closedPercentage",
                    width: 140,
                    ellipsis: !1,
                    render (t) {
                        return p(L, {
                            type: "line",
                            percentage: t.approveStatus === 4 ? 100 : Number(t.closedPercentage),
                            style: {
                                width: "100%"
                            },
                            color: "#0EC06A",
                            railColor: "#E8FBEE",
                            indicatorTextColor: "#0EC06A"
                        });
                    }
                }
            ],
            methods: {
                setPage: (t)=>{
                    d.value = t.pageNum, n.value = t.pageSize;
                }
            }
        };
    }
    ze = O({
        __name: "index",
        setup (d) {
            const n = W(), { t: c } = f(), { columns: F, methods: t } = ae(), { setPage: s } = t, [C, { getFieldsValue: k }] = J({
                schemas: oe,
                labelWidth: "60px",
                gridProps: {
                    cols: 4,
                    xGap: 15
                },
                showAdvancedButton: !1
            }), g = $({
                width: 180,
                title: c("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (e) {
                    return p(Z, {
                        style: "text",
                        actions: [
                            {
                                label: c("common.optionsViewText"),
                                labelShow: !1,
                                icon: p("i", {
                                    class: "iconfont icon-View text-[#3F7AE9]  text-[20px]"
                                }),
                                onClick: q.bind(this, e)
                            },
                            {
                                label: c("common.optionsEditText"),
                                labelShow: !1,
                                icon: p("i", {
                                    class: "iconfont icon-a-Frame28 text-[20px]"
                                }),
                                onClick: B.bind(this, e),
                                ifShow: e.updateEnable == 1 && e.approveStatus == 1
                            }
                        ]
                    });
                }
            }), h = l(), w = l(), S = l("");
            function x() {
                _();
            }
            function I() {
                h.value.reload();
            }
            function q(e) {
                n.push({
                    name: "Add_HSQE_AuditInspection_ReportList_VesselInspection_AddSire",
                    query: {
                        uuid: e.uuid,
                        type: "view",
                        shipName: e.shipName
                    }
                });
            }
            function B(e) {
                n.push({
                    name: "Add_HSQE_AuditInspection_ReportList_VesselInspection_AddSire",
                    query: {
                        uuid: e.uuid,
                        type: "edit",
                        shipName: e.shipName
                    }
                });
            }
            function _() {
                h.value.reload();
            }
            async function A(e, u) {
                return s(e), await K({
                    templateCode: "sireReport",
                    ...e,
                    ...u
                });
            }
            async function E() {
                let u = await U({
                    templateCode: "rightshipReport"
                });
                S.value = u.addEnable, _();
            }
            return z(()=>{
                E();
            }), (e, u)=>{
                const N = j, R = M, y = X, T = G;
                return Q(), H(T, null, {
                    default: m(()=>[
                            a(y, {
                                bordered: !1,
                                class: "mb-2 proCard"
                            }, {
                                default: m(()=>[
                                        a(R, {
                                            onRegister: i(C),
                                            onSubmit: x,
                                            onReset: I
                                        }, {
                                            yearSlot: m(({ model: r, field: V })=>[
                                                    a(N, {
                                                        type: "year",
                                                        clearable: "",
                                                        "on-update:value": (b)=>{
                                                            r[V] = b ? new Date(b).getFullYear().toString() : null;
                                                        }
                                                    }, null, 8, [
                                                        "on-update:value"
                                                    ])
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "onRegister"
                                        ])
                                    ]),
                                _: 1
                            }),
                            a(y, {
                                bordered: !1,
                                class: "proCard"
                            }, {
                                default: m(()=>[
                                        a(i(Y), {
                                            ref_key: "basicTableRef",
                                            ref: h,
                                            columns: i(F),
                                            request: (r)=>A(r, i(k)()),
                                            immediate: !1,
                                            "row-key": (r)=>r.id,
                                            actionColumn: i(g),
                                            autoScrollX: !0,
                                            "virtual-scroll": ""
                                        }, null, 8, [
                                            "columns",
                                            "request",
                                            "row-key",
                                            "actionColumn"
                                        ])
                                    ]),
                                _: 1
                            }),
                            a(ee, {
                                ref_key: "modalRef",
                                ref: w,
                                onSuccess: _
                            }, null, 512)
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { ze as default, __tla };
