import { V as _, Z as g, bk as v, r as p, ay as W, d as $, e as A, f as X, a as M, gW as S, gX as w, aw as O, ac as Q, c as Z, o as z, w as m, j as l, W as G, l as r, k as H, X as J, __tla as __tla_0 } from "./index-9PRMimni.js";
import { B as K } from "./Table-0PViRYCf.js";
import { _ as Y } from "./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";
import { B as ee } from "./BasicForm-dL_oCSPM.js";
import { u as te } from "./useForm-CKmgcynv.js";
import { e as F, f as ae } from "./noticecircular-BlDTlrlg.js";
import "./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";
import "./vuedraggable.umd-Co2xEC3p.js";
import "./Render.vue_vue_type_script_lang-DKUYY0Zw.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 "./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 "./componentSetting-DVhNDBTO.js";
import "./useTimeout-BxFilWvD.js";
import "./usePageCache-DluHn7Yy.js";
import "./tabsView-BXskTdVh.js";
import "./Flex-CTSf12gq.js";
import "./SingleImageUpload-CNx4b9eC.js";
import "./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";
import "./ImageUpload-DUsnro3W.js";
import "./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";
import "./BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.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";
let Xe;
let __tla = Promise.all([
    (()=>{
        try {
            return __tla_0;
        } catch  {}
    })()
]).then(async ()=>{
    const y = v(), { t: a } = _(), ne = [
        {
            title: a("noticeCircular.general.No"),
            key: "noticeNo",
            width: 120
        },
        {
            title: a("noticeCircular.general.type"),
            key: "nickname",
            width: 60,
            render (e) {
                return g("span", {}, {
                    default: ()=>y.getLocale === "en" ? e.labelNameEn : e.labelName
                });
            }
        },
        {
            title: a("noticeCircular.general.subType"),
            key: "avatar",
            width: 100,
            render (e) {
                return g("span", {}, {
                    default: ()=>y.getLocale === "en" ? e.labelSubNameEn : e.labelSubName
                });
            }
        },
        {
            title: a("noticeCircular.general.Title"),
            key: "noticeTitle",
            width: 100
        },
        {
            title: a("noticeCircular.general.IssuedDept"),
            key: y.getLocale === "en" ? "objectNameEn" : "objectName",
            width: 100
        },
        {
            title: a("noticeCircular.general.IssuedDate"),
            key: "submitTime",
            width: 100
        },
        {
            title: a("noticeCircular.general.Validity"),
            key: "endEffectiveTime",
            width: 120,
            render: (e)=>e.endEffectiveTime ? e.endEffectiveTime : a("noticeCircular.general.permanent")
        },
        {
            title: a("noticeCircular.general.FeedbackRequired"),
            key: "status",
            width: 80,
            render: (e)=>e.isFeedback === 1 ? a("noticeCircular.general.AcknowledgeRequired") : a("noticeCircular.general.TrainingorMeetingRequired")
        },
        {
            title: a("noticeCircular.general.FeedbackStatus"),
            key: "status",
            width: 140,
            render: (e)=>e.feedbackNoticeStatus === 1 ? a("noticeCircular.general.FeedbackSubmitted") : a("noticeCircular.general.PendingFeedback")
        }
    ], { t: c } = _(), T = v(), oe = await F("notice_circular_type"), b = p([]), N = p("");
    W(()=>N.value, async (e)=>{
        e && (b.value = await F(e));
    }, {
        immediate: !1
    });
    let ie, le;
    ie = [
        {
            field: "noticeTypeCode",
            label: c("noticeCircular.general.type"),
            component: "NSelect",
            componentProps: ({ formAction: e })=>{
                const { setFieldsValue: o } = e;
                return {
                    options: oe,
                    "label-field": T.getLocale === "en" ? "labelEn" : "label",
                    onUpdateValue: (i)=>{
                        i === null && (b.value = []), N.value = i, o({
                            noticeSubTypeCode: null
                        });
                    }
                };
            }
        },
        {
            field: "noticeSubTypeCode",
            label: c("noticeCircular.general.subType"),
            component: "NSelect",
            componentProps: {
                options: b,
                "label-field": T.getLocale === "en" ? "labelEn" : "label"
            }
        },
        {
            field: "feedbackNoticeStatus",
            component: "NSelect",
            label: c("noticeCircular.general.FeedbackStatus"),
            componentProps: {
                options: [
                    {
                        label: c("noticeCircular.general.PendingFeedback"),
                        value: 0
                    },
                    {
                        label: c("noticeCircular.general.FeedbackSubmitted"),
                        value: 1
                    }
                ]
            }
        }
    ];
    le = {
        cleanSubTypeList: ()=>{
            b.value = [];
        }
    };
    Xe = $({
        __name: "index",
        setup (e) {
            const { t: o } = _(), i = A(), s = X(), f = p(), R = p(), { cleanSubTypeList: I } = le, [x, { getFieldsValue: q, setFieldsValue: L }] = te({
                gridProps: {
                    cols: "2 s:3 m:4 l:5 xl:6"
                },
                schemas: ie,
                labelWidth: "auto",
                labelPlacement: "top",
                showAdvancedButton: !0
            }), P = M({
                width: 120,
                title: o("common.optionsText"),
                key: "action",
                fixed: "right",
                align: "center",
                render (t) {
                    return g(Y, {
                        style: "text",
                        actions: [
                            {
                                label: o("hsqe.deficiency.view"),
                                labelShow: !1,
                                icon: S(w.view, "text-[#3F7AE9] text-[20px]"),
                                ifShow: t.feedbackNoticeStatus == 1,
                                onClick: ()=>{
                                    i.push({
                                        name: "noticeCircular_feedback",
                                        query: {
                                            id: t.noticeInfoId,
                                            noticeUserId: t.noticeUserId,
                                            type: t.isFeedback,
                                            isView: "1",
                                            objectId: t.objectId
                                        }
                                    });
                                }
                            },
                            {
                                label: o("common.optionsFeedbackText"),
                                labelShow: !1,
                                ifShow: t.feedbackNoticeStatus == 0,
                                icon: S(w.edit),
                                onClick: V.bind(null, t)
                            }
                        ]
                    });
                }
            }), E = async (t, u)=>{
                const d = await ae({
                    ...t,
                    ...u
                });
                return R.value = d.list, d;
            };
            function k() {
                f.value.restReload();
            }
            function V(t) {
                i.push({
                    name: "noticeCircular_feedback",
                    query: {
                        id: t.noticeInfoId,
                        noticeUserId: t.noticeUserId,
                        type: t.isFeedback
                    }
                });
            }
            function B(t) {
                k();
            }
            function U(t) {
                I(), k();
            }
            return O(async ()=>{
                if (Object.keys(s.query)?.length > 0) {
                    let u = {
                        noticeTypeCode: s.query.noticeTypeCode,
                        noticeCompletionStatus: s.query.noticeCompletionStatus ? Number(s.query.noticeCompletionStatus) : void 0
                    };
                    await L(u);
                }
                Q(()=>{
                    f.value?.reload();
                });
            }), (t, u)=>{
                const d = H, C = G, j = J;
                return z(), Z(j, null, {
                    default: m(()=>[
                            l(C, {
                                bordered: !1,
                                class: "mb-3 proCard"
                            }, {
                                default: m(()=>[
                                        l(r(ee), {
                                            onRegister: r(x),
                                            onSubmit: B,
                                            onReset: U
                                        }, {
                                            statusSlot: m(({ model: n, field: h })=>[
                                                    l(d, {
                                                        value: n[h],
                                                        "onUpdate:value": (D)=>n[h] = D
                                                    }, null, 8, [
                                                        "value",
                                                        "onUpdate:value"
                                                    ])
                                                ]),
                                            _: 1
                                        }, 8, [
                                            "onRegister"
                                        ])
                                    ]),
                                _: 1
                            }),
                            l(C, {
                                bordered: !1,
                                class: "proCard"
                            }, {
                                default: m(()=>[
                                        l(r(K), {
                                            columns: r(ne),
                                            request: (n)=>E(n, r(q)()),
                                            "row-key": (n)=>n.id,
                                            ref_key: "basicTableRef",
                                            ref: f,
                                            actionColumn: P,
                                            autoScrollX: !0,
                                            immediate: !1,
                                            "virtual-scroll": ""
                                        }, null, 8, [
                                            "columns",
                                            "request",
                                            "row-key",
                                            "actionColumn"
                                        ])
                                    ]),
                                _: 1
                            })
                        ]),
                    _: 1
                });
            };
        }
    });
});
export { Xe as default, __tla };
