import { d as R, V as h, e as x, r as t, a as C, Z as p, gE as D, c_ as I, aw as B, c as P, o as q, w as S, j as n, l as i, X as V, __tla as __tla_0 } from "./index-9PRMimni.js";
import { _ as $, __tla as __tla_1 } from "./RectificationModal.vue_vue_type_script_setup_true_lang-fAwMd5lQ.js";
import { _ as j } from "./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";
import { B as A } from "./Table-0PViRYCf.js";
import { _ as E } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { c as F } from "./columns-CSOIGjyz.js";
import { ai as L } from "./template-rpthWlT9.js";
import "./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";
import "./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";
import "./BasicForm-dL_oCSPM.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.js";
import "./SingleImageUpload-CNx4b9eC.js";
import "./ImageUpload-DUsnro3W.js";
import "./componentSetting-DVhNDBTO.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 { __tla as __tla_2 } from "./schemas-C0ECnkWr.js";
import "./planner-BebmniHR.js";
import "./useModal-CO65vga3.js";
import "./useForm-CKmgcynv.js";
import "./usePageCache-DluHn7Yy.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 "./useTimeout-BxFilWvD.js";
import "./Flex-CTSf12gq.js";
import "./dateUtil-BtafrT1f.js";
let Bo;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_1;
        } catch  {}
    })(),
    (()=>{
        try {
            return __tla_2;
        } catch  {}
    })()
]).then(async ()=>{
    Bo = R({
        __name: "RectificationProject",
        props: {
            currentTab: {},
            tabReadonly: {
                type: Boolean
            },
            formData: {}
        },
        setup (l) {
            const f = l, { t: e } = h(), u = x(), _ = I(), a = t(), m = t(), d = t(), c = t(""), { deficiencyColumns: y } = F({
                handlePreviewImage: v
            }), T = C({
                width: 180,
                title: e("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (o) {
                    return p(E, {
                        style: "text",
                        actions: [
                            {
                                label: e("common.optionsViewText"),
                                labelShow: !1,
                                icon: p(D, {
                                    iconName: "view",
                                    iconType: "lineIcon"
                                }),
                                onClick: b.bind(null, o)
                            }
                        ]
                    });
                }
            });
            function w(o) {
                return L({
                    ...o,
                    reportId: f.formData?.uuid
                });
            }
            function b(o) {
                _.info({
                    title: e("common.tipsText"),
                    content: e("hsqe.auditInspection.qualitySafetyInspection.rectificationBackTips"),
                    positiveText: e("common.okText"),
                    negativeText: e("common.cancelText"),
                    onPositiveClick: ()=>{
                        u.push({
                            name: "Add_HSQE_AuditInspection_ReportList_VesselInspection_DeficiencyReport",
                            query: {
                                id: o.id,
                                type: "view"
                            }
                        });
                    }
                });
            }
            function v(o) {
                a.value.openModal(), c.value = o;
            }
            function s() {
                m.value.reload();
            }
            function g() {
                s();
            }
            return B(()=>{
                g();
            }), (o, M)=>{
                const k = V;
                return q(), P(k, null, {
                    default: S(()=>[
                            n(i(A), {
                                ref_key: "basicTableRef",
                                ref: m,
                                columns: i(y),
                                request: (r)=>w(r),
                                "row-key": (r)=>r.id,
                                autoScrollX: !0,
                                actionColumn: i(T),
                                immediate: !1,
                                "virtual-scroll": ""
                            }, null, 8, [
                                "columns",
                                "request",
                                "row-key",
                                "actionColumn"
                            ]),
                            n($, {
                                ref_key: "rectificationFormRef",
                                ref: d,
                                formData: o.formData,
                                onSuccess: s
                            }, null, 8, [
                                "formData"
                            ]),
                            n(j, {
                                ref_key: "imagePreviewRef",
                                ref: a,
                                url: i(c)
                            }, null, 8, [
                                "url"
                            ])
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { Bo as default, __tla };
